diff --git a/installation-tests/installation-tests.sh b/installation-tests/installation-tests.sh index 633c4bd3dd..7364cd400f 100755 --- a/installation-tests/installation-tests.sh +++ b/installation-tests/installation-tests.sh @@ -437,7 +437,7 @@ function test_playwright_electron_should_work { copy_test_scripts echo "Running sanity-electron.js" - xvfb-run --auto-servernum -- bash -c "node sanity-electron.js" + node sanity-electron.js echo "${FUNCNAME[0]} success" } @@ -556,13 +556,29 @@ function test_playwright_cli_codegen_should_work { npm install ${PLAYWRIGHT_TGZ} echo "Running playwright codegen" - OUTPUT=$(PWTEST_CLI_EXIT=1 xvfb-run --auto-servernum -- bash -c "npx playwright codegen") + OUTPUT=$(PWTEST_CLI_EXIT=1 npx playwright codegen) if [[ "${OUTPUT}" != *"@playwright/test"* ]]; then echo "ERROR: missing @playwright/test in the output" exit 1 fi + if [[ "${OUTPUT}" != *"{ page }"* ]]; then + echo "ERROR: missing { page } in the output" + exit 1 + fi + + echo "Running playwright codegen --target=javascript" + OUTPUT=$(PWTEST_CLI_EXIT=1 npx playwright codegen --target=javascript) + if [[ "${OUTPUT}" != *"playwright"* ]]; then + echo "ERROR: missing playwright in the output" + exit 1 + fi + if [[ "${OUTPUT}" != *"page.close"* ]]; then + echo "ERROR: missing page.close in the output" + exit 1 + fi + echo "Running playwright codegen --target=python" - OUTPUT=$(PWTEST_CLI_EXIT=1 xvfb-run --auto-servernum -- bash -c "npx playwright codegen --target=python") + OUTPUT=$(PWTEST_CLI_EXIT=1 npx playwright codegen --target=python) if [[ "${OUTPUT}" != *"chromium.launch"* ]]; then echo "ERROR: missing chromium.launch in the output" exit 1