When new page turns into download, we can have `_markAsError` followed
by the `Page.ready` signal and report the page twice (as an error and
as a real page). This is flaky and depends on whether `Page.ready` is
fast enough before the page closes or not.
Exposed by the "should report new window downloads" test.
This is exposed by the flaky "should report new window downloads" test.
In this test a new page is created, initialized and closed before initialization
finishes. If `lifecycleEventsEnabled` fails with "Target closed error",
we correctly ignore the initialization failure, but a single usage of the
failed promise with `.then` fails anyway.
Running `npx playwright test` results in a cryptic error message that says to check `--help` for more information.
I started to rewrite it, but I think instead it would be much nicer if we just treated `npx playwright test` as an alias for `npx playwright test -c .`. There is a comment in the code that worries this will be slow because it will scan the world. However we need to support this case anyway for the tests-next-to-code pattern.
It looks like this should be fast because we ignore node_modules/.gitignore entries. If this is still too slow we should make it faster. If we can't make it faster we should throw a more specific error telling the user how to make it faster.
This patch:
- rolls Firefox to v1269 which is now a firefox-stable build.
- introduces a new channel, `firefox-beta`, for our internal needs.
Fixes#6817
This reverts commit a25b11659be8887b700311180fcd3653aa9e472b.
In a discussion with Dmitry Gozman we decided to revert this and instead
proceed with the following approach:
- rename `//browser_patches/firefox` to `//browser_patches/firefox-beta`
- rename `//browser_patches/firefox-stable` folder to
`//browser_patches/firefox`
In all of the folders, we will keep the `BUILD_NUMBER` original so that
it doesn't clash on the CDN.
This patch:
- starts downloading Firefox Stable equivalent by default
- starts running Firefox-Stable on our smoke tests (tests-1)
- starts running Firefox-Beta on our CQ1 tests (tests-2)
Note: there's a little confusion right now with browser names:
- `firefox-stable` - firefox-stable equivalent
- `firefox`- firefox-beta equivalent
I'll rename `firefox` to `firefox-beta` in a follow-up.
Fixes#6817
The new message is much more prominent in the logs:
```
aslushnikov:~/prog/playwright(make-deprecation-error-more-prominent)$ node a.js
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
browserType.launch: Protocol error (Playwright.enable): Browser closed.
==================== Browser output: ====================
<launching> /Users/aslushnikov/prog/playwright/browser_patches/deprecated-webkit-mac-10.14/pw_run.sh --inspector-pipe --headless --no-startup-window
<launched> pid=5120
[pid=5120][out] ****************************************************************
[pid=5120][out] ****************************************************************
[pid=5120][out]
[pid=5120][out] ERROR: MacOS version is too old!
[pid=5120][out]
[pid=5120][out] This version of Playwright does not support running
[pid=5120][out] WebKit on MacOS 10.14. Please either:
[pid=5120][out] - update your operating system to version 10.15 or higher
[pid=5120][out] - use Playwright v1.11 or older
[pid=5120][out]
[pid=5120][out] ****************************************************************
[pid=5120][out] ****************************************************************
[pid=5120] <process did exit: exitCode=1, signal=null>
[pid=5120] starting temporary directories cleanup
```
- Source now lives at `src/test`.
- Former folio tests live at `tests/playwright-test`.
- We use `src/test/internal.ts` that exposes base test without
Playwright fixtures for most tests (to avoid modifications for now).
- Test types live in `types/testFoo.d.ts`.
- Stable test runner is installed to `tests/config/test-runner` during `npm install`.
- All deps including test-only are now listed in `package.json`.
Non-test deps must also be listed in `build_package.js` to get included.