It proved to be unmaintainable due to the following reasons:
- determining upstream branch for the technology preview was a manual
and tedious process
- once determined, actual Safari Technology Preview occasionally
diverted from the branch
This is a speculative fix that moves "background pages cleanup"
to `_didCloseInternal` so that it is only run once, but on both
context closure and browser closure.
Symptom from a flaky test:
```log
browserContext.close: page@18087c372d32819222707ca5e8fd1030 is sending "close" event after being disposed
at PageDispatcher._dispatchEvent (D:\a\playwright\playwright\src\dispatchers\dispatcher.ts:86:15)
at Page.<anonymous> (D:\a\playwright\playwright\src\dispatchers\pageDispatcher.ts:59:12)
at Page.emit (events.js:314:20)
at Page._didClose (D:\a\playwright\playwright\src\server\page.ts:220:10)
at CRPage.didClose (D:\a\playwright\playwright\src\server\chromium\crPage.ts:165:16)
at CRBrowserContext._onClosePersistent (D:\a\playwright\playwright\src\server\chromium\crBrowser.ts:476:24)
at CRBrowserContext.close (D:\a\playwright\playwright\src\server\browserContext.ts:288:20)
```
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
- 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.