chore: provisional installation test fix (#12049)

This commit is contained in:
Pavel Feldman 2022-02-11 14:46:36 -08:00 committed by GitHub
parent ccb09acdba
commit aee844eaed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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