Commit Graph

1198 Commits

Author SHA1 Message Date
Pavel Feldman
56a5f2c506
fix(types): fix the toHaveScreenshot types (#14174)
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-05-16 07:53:46 -07:00
Dmitry Gozman
c3beb71b07
fix(test runner): do not run automatic fixtures for beforeAll hooks (#14104)
There are a few issues this covers:
- Some fixtures like `page` and `context` are not allowed in `beforeAll`
  hooks, so using them in automatic fixture makes it throw.
- Running automatic fixture solely for `afterAll` is unexpected.
  This currently happens when `afterAll` is run for cleanup after
  fixture timeout/throw.

For built-in playwright fixture, we keep `'all-hooks-included'` auto mode.

Added a doc explaining the execution order.
2022-05-13 11:17:20 +01:00
Andrey Lushnikov
f7adbd83ee
chore: cut v1.22.0 (#14098) 2022-05-12 11:12:01 -07:00
Dmitry Gozman
f6712ec43a
fix(tracing): workaround chromium scrollTop slowness (#14114)
References #14037.

We used to query and save all non-zero `scrollTop`/`scrollLeft` to restore the page perfectly. However, this became very slow with Chromium v100 regression (see issue).

This change only queries and stores `scrollTop`/`scrollLeft` for elements that are ancestors of the action target. The resulting snapshot does not perfectly recreate the original screen, but should be good enough to inspect the action.
2022-05-12 10:55:29 -07:00
Dmitry Gozman
0e2855348c
feat(locators): remove layout locators (#14129) 2022-05-12 18:50:19 +01:00
Max Schmitt
2844623109
docs: add route class -> networking guide reference (#14092) 2022-05-11 16:07:00 +01:00
Max Schmitt
9693635c86
chore: remove babel__parser (#14096) 2022-05-11 15:31:48 +01:00
Dmitry Gozman
b753ff8686
chore: split injected utils into proper files (#14093) 2022-05-11 13:49:12 +01:00
Dmitry Gozman
305afcdacf
fix(test runner): fix duplicate titles error when multiple issues are present (#14090) 2022-05-11 11:53:16 +01:00
Pavel Feldman
c99ca17199
chore: disable AvoidUnnecessaryBeforeUnloadCheckSync on chromium (#14080) 2022-05-10 14:55:44 -07:00
Dmitry Gozman
ba0cfaeb2d
fix(chromium): work around about:blank issue on Chromium (#14068)
fix(chromium): work around about:blank issue on Chromium

We don't receive the `loaderId` which translates to `newDocumentId`,
so we expect the same-document navigation. Instead, we can wait
for any new-document navigation as a workaround, only for `about:blank`.

This also reverts commit f0f65fa247.
2022-05-10 20:32:19 +01:00
Pavel Feldman
39489931d1
chore: add more ct options to allow redirecting templates/cache (#14077) 2022-05-10 12:21:29 -07:00
Ross Wollman
0c9e0d22df
fix(ct): preserve context changes (#13986)
1. add test (and fix) using context fixture with mount
2. add test for innerText that was failing prior to https://github.com/microsoft/playwright/pull/14008
2022-05-10 11:45:47 -07:00
Andrey Lushnikov
a64ea8698e
chore: add disclaimer to experimental ct packages (#14075) 2022-05-10 10:59:30 -07:00
github-actions[bot]
653373a75a
feat(chromium-tip-of-tree): roll to r1005 (#14064)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-10 10:05:15 -07:00
Andrey Lushnikov
4634adbdc3
devops: auto-publish experimental CT packages (#14060)
This patch:
- adds a hard dependency from `experimental-ct-*` packages to the
  same-version of `@playwright/test`
- aligns `experimental-ct-*` package versions with main package
  version
- starts publishing experimental CT packages together with other
  packages
2022-05-10 08:01:45 -07:00
github-actions[bot]
8a517c6d82
feat(webkit): roll to r1641 (#14061)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-10 07:41:46 -07:00
Andrey Lushnikov
3ba1ea5c39
fix: support installing dependencies on non-ubuntu. (#14010)
We should not fast-return if someone tries to run
`npx playwright install-deps` on Debian.

Instead, we should warn users, fallback to Ubuntu 20.04 dependencies,
and proceed.
2022-05-10 04:05:39 -07:00
Pavel Feldman
cf89a36181
chore: serialize circular objects (#14045) 2022-05-09 18:51:53 -07:00
Pavel Feldman
f0f65fa247 Revert "feat(chromium): roll to r1005 (#13999)"
This reverts commit 56b3bca8db.
2022-05-09 18:28:39 -07:00
Pavel Feldman
e55f7bd896
feat(bindings): best-effort serialize circular structures (#14008) 2022-05-09 15:07:04 -07:00
Dmitry Gozman
e8fb5a6337
fix(test runner): ensure that hooks run before fixtures teardown after timeout (#14035)
We had common cleanup exiting early after timeout, because we did not
reset the time slot.
2022-05-09 20:38:20 +01:00
Pavel Feldman
e9378ba5fc
chore: hide plugins again (#14038) 2022-05-09 10:06:13 -07:00
Max Schmitt
04fafcabd8
fix: leaking server side objects (#13991) 2022-05-09 17:34:00 +01:00
Pavel Feldman
46e82e8fea
feat(ct): only rebuild when necessary (#14026) 2022-05-09 09:10:47 -07:00
Andrey Lushnikov
5aa82dc5e4
chore: un-experiment expect(pageOrLocator).toHaveScreenshot() (#14033)
This patch un-experiments `expect(pageOrLocator).toHaveScreenshot()`
method.

Fixes #13526
2022-05-09 08:34:03 -07:00
github-actions[bot]
56b3bca8db
feat(chromium): roll to r1005 (#13999)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-05-09 15:52:00 +01:00
Pavel Feldman
a052211dbf
chore: do not reset internal bindings for reuse (#14019) 2022-05-09 07:44:20 -07:00
Andrey Lushnikov
98945a81a8
feat: move toHaveScreenshot to use old snapshot paths by default (#14006)
Note: all toHaveScreenshot tests still use `__screenshots__` directory
for their expectations. One more test was added to make sure that
by default, `toHaveScreenshot` uses old snapshots.
2022-05-09 07:34:53 -07:00
github-actions[bot]
f4dc067a49
feat(chromium-tip-of-tree): roll to r1004 (#13966)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-09 15:12:47 +01:00
Dmitry Gozman
6931d89eaf
feat(locators): rename locator.that to locator.filter (#14025) 2022-05-08 21:59:40 +01:00
Dmitry Gozman
64cd55089a
chore: role selectors non-experimental (#14021) 2022-05-08 11:07:01 +01:00
Dmitry Gozman
c3cf7ee4a7
feat(layout locators): remove maxDistance option (#14013) 2022-05-08 07:18:16 +01:00
Pavel Feldman
5c9e7f48e0
fix(debug): do not pause on internal calls, update ct docs (#14018) 2022-05-07 19:56:25 -07:00
Andrey Lushnikov
d711734d38
chore: cleanup stray "fonts" mention in the codebase (#14016)
This is a follow-up to #14004
2022-05-07 09:16:55 -07:00
Pavel Feldman
b8c4f426cc
chore: return source map from registry generator (#14005) 2022-05-06 18:29:49 -07:00
Andrey Lushnikov
5a5bb36d28
chore: nuke "fonts" screenshot option (#14004)
It was never released since it wasn't working as expected on WebKit WPE.

Fixes #12839
2022-05-06 17:54:17 -07:00
Pavel Feldman
dc36b0158a
chore: dedupe ct fixtures (#14002) 2022-05-06 14:53:38 -07:00
Pavel Feldman
1bbefce9af
Revert "chore: use plugins for component testing again (#13977)" (#13998)
This reverts commit a2f9f15e3e.
2022-05-06 12:02:07 -07:00
github-actions[bot]
a1cda41cfd
feat(webkit): roll to r1640 (#13982) 2022-05-06 11:06:47 -07:00
Pavel Feldman
f5e2171c80 chore: fix ct npm ignores 2022-05-05 17:42:01 -07:00
Pavel Feldman
43e7a2b91a chore: bump ct deps 2022-05-05 17:37:57 -07:00
Pavel Feldman
a2f9f15e3e
chore: use plugins for component testing again (#13977) 2022-05-05 14:26:56 -07:00
Pavel Feldman
058f32caff
chore: fixtures-via-plugin implementation (#13950) 2022-05-05 10:14:00 -07:00
github-actions[bot]
88fd4a79a8
feat(webkit): roll to r1638 (#13956) 2022-05-05 08:41:02 -07:00
Andrey Lushnikov
bfafb2680d
fix: put browserVersion in the browsers.json (#13946)
This patch:
- adds `browserVersion` field to the `browsers.json`. This is
  updated every time we roll browser.
- starts using `browserVersion` to display browser version that's
  been downloaded.

The downloading output now looks like this:

```bash
Downloading Chromium 101.0.4951.41 (playwright build v1003) - 118.9 Mb [====================] 100% 0.0s
Chromium 101.0.4951.41 (playwright build v1003) downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/chromium-1003
Downloading FFMPEG playwright build v1007 - 1 Mb [====================] 100% 0.0s
FFMPEG playwright build v1007 downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/ffmpeg-1007
Downloading Firefox 99.0.1 (playwright build v1323) - 67.5 Mb [====================] 100% 0.0s
Firefox 99.0.1 (playwright build v1323) downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/firefox-1323
Downloading Webkit 15.4 (playwright build v1632) - 52.7 Mb [====================] 100% 0.0s
Webkit 15.4 (playwright build v1632) downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/webkit-1632
```

Fixes #13198
2022-05-05 04:17:13 -07:00
github-actions[bot]
969e6f2ada
feat(webkit): roll to r1637 (#13916) 2022-05-04 16:38:25 -07:00
Pavel Feldman
cfde11b6e2
docs: add a brief components doc (#13944) 2022-05-04 16:01:48 -07:00
Ross Wollman
95f7acf1e4
chore: widen Metadata type (#13942) 2022-05-04 13:16:11 -07:00
Dmitry Gozman
cf5101d44a
fix(networkidle): do not produce networkidle event on errored pages (#13938) 2022-05-04 20:52:50 +01:00