Commit graph

1357 commits

Author SHA1 Message Date
Ross Wollman e0a87e52d7
feat: support multi-select/combo box with toHaveValue (#14555) 2022-06-02 12:10:28 -04:00
Dmitry Gozman d00efa0dfe
feat(expect): add ignoreCase option to toHaveText and toContainText (#14534) 2022-06-02 05:52:53 -07:00
Andrey Lushnikov e185082a47
tests: mark failing android tests (#14542) 2022-06-02 04:34:05 -07:00
Yury Semikhatsky 00b8d9f3db
test: opener tab does not throttle rAF (#14564) 2022-06-01 20:24:25 -07:00
Pavel Feldman e912b6897d
fix(esm): respect source maps in esm-transpiled code (#14561) 2022-06-01 16:50:23 -07:00
Dmitry Gozman c4581e54c0
fix(click): detect iframe overlays that cover target element (#13876)
This restores the old hit target check, in addition to the new
hit target interceptor.

This way, we got some coverage for iframes and other quirky cases,
but keep the bullet-proof hit target check in place.
2022-06-01 15:23:41 -07:00
Dmitry Gozman dbcf039717
chore: remove experimental types (#14560) 2022-06-01 15:22:43 -07:00
Yury Semikhatsky d1a3f3306c
fix: respect min allowed firefox width in video tests (#14558)
In firefox browser window min width is 450, setting viewport to smaller value in the tests led to unexpected image in the video.

References #14405
2022-06-01 14:21:00 -07:00
Pavel Feldman 95672765bc
fix(ct): isolate component tests when recording video / trace (#14531) 2022-05-31 15:59:36 -07:00
Dmitry Gozman a7500c18d6
feat(test runner): allow serial suites inside parallel (#14530)
Also works for `fullyParallel` mode.
2022-05-31 15:24:20 -07:00
Yury Semikhatsky 2bcdf68ef5
fix(runner): do not override trace files in afterAll (#14529) 2022-05-31 15:21:51 -07:00
Playwright Service f087e39c01
feat(chromium): roll to r1008 (#14448)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-05-30 15:04:05 +02:00
Yury Semikhatsky c1aecc7d50
docs: maxDiffPixels description typo (#14456) 2022-05-29 09:46:06 -07:00
Yury Semikhatsky abced7223c
fix: filechooser interception in OOPIFs (#14432) 2022-05-27 13:04:58 -07:00
Pavel Feldman f724fa570f
docs: make ts snippets esm-friendly (#14451) 2022-05-27 12:36:59 -07:00
Yury Semikhatsky b164d82ba3
fix(runner): ignore .gitignore if testDir is explicitly configured (#14430)
If the tests are in an explicitly configured testDir (either at the global config level or per project) .gitignore filters are not applied.

Fixes #14381
2022-05-26 14:39:51 -07:00
Pavel Feldman ea07ff3ae9
fix(jsx): allow passing variables into mount (#14412) 2022-05-25 13:59:45 -07:00
Pavel Feldman 919d3eaf42 test(permissions): split expectations between tot and beta 2022-05-25 08:58:15 -07:00
Pavel Feldman 29f880153e
test: mark ff video tests as failing (#14406) 2022-05-25 08:55:03 -07:00
Pavel Feldman bfab9222a6
test(video): add video scale test (#14395) 2022-05-25 08:45:22 -07:00
Pavel Feldman 9440f52b88
feat(ct): support cra w/ .js (#14326) 2022-05-24 19:43:28 -07:00
Pavel Feldman d97c9bd5b6
test(ct): start covering components with tests (#14369) 2022-05-24 13:54:12 -07:00
Pavel Feldman 8c17704244 fix(edge): improve the anchor test 2022-05-24 11:39:37 -07:00
Ross Wollman 9b225f2ad4
fix: expect.toHaveScreenshot.animations types (#14387)
This makes the docs/types match the code which has already been
released.

Relevant code to traverse up from:
- 3e084829c0/packages/playwright-core/src/server/screenshotter.ts (L89)
- 3e084829c0/packages/playwright-core/src/server/screenshotter.ts (L118)

Fixes #14385
2022-05-24 11:34:29 -07:00
Pavel Feldman 19237c9490 chore: partially revert #14225 2022-05-24 10:57:38 -07:00
Andrey Lushnikov 3fd435d1d3
docs: fix docs for toHaveScreenshot (#14280) 2022-05-24 10:54:32 -07:00
Pavel Feldman 71a55c74da
fix(leak): do not retain test fixtures in worker fixtures (#14363) 2022-05-23 16:54:56 -07:00
Pavel Feldman a1324bd935
fix(route): support route w/ async handler & times (#14317) 2022-05-21 21:55:46 -07:00
Ross Wollman fbb364c1cd
fix: page.locator.focus() and page.locator(…).type(…) (#14267)
Fixes focus and blur management when `page.locator(…).focus()`  and  `page.locator(…).type(…)` are used which was regressed by 7a5b070 (#13510).

#13510 relied on an implicit assumption that this (conditional) [`blur`](7a5b070e95/packages/playwright-core/src/server/injected/injectedScript.ts (L672)) call would always be followed by a call that resulted in a newly focused element via this [`focus`](7a5b070e95/packages/playwright-core/src/server/injected/injectedScript.ts (L674)) call.

However, some elements are [not focusable](https://html.spec.whatwg.org/multipage/interaction.html#focusable-area), so we were blurring incorrectly, and losing focus that we should have maintained.

Two regression tests were added that pass on the commit prior to 7a5b070e95 (and match manual testing/expectations):

* `page.locator(…).focus()`: _keeps focus on element when attempting to focus a non-focusable element_
* `page.locator(…).type(…)`: _should type repeatedly in input in shadow dom_

Additionally, a third test (_should type repeatedly in input in shadow dom_) was added to check the invariant from #13510 that states:

> This affects [contenteditable] elements, but not input elements.

and allows us to introduce the targeted fix (contenteditble check before blur) without breaking FF again.

And _should type repeatedly in contenteditable in shadow dom with nested elements_ was added to ensure the above fix works with nest contenteditble detection.

Fixes #14254.
2022-05-19 14:31:56 -07:00
Andrey Lushnikov 9a73dfe773
feat(chromium-tip-of-tree): roll Chromium TOT to 1008 (#14279) 2022-05-19 09:29:44 -07:00
Andrey Lushnikov fd452058bb
test: try to unflake video spec (#14288) 2022-05-19 09:22:18 -07:00
Andrey Lushnikov 34429a222e
tests: mark certain tests as failing on Firefox Headed (#14286)
References #14285
2022-05-19 09:06:31 -07:00
Max Schmitt 57966333b5
test: skip large file upload tests on Android (#14283) 2022-05-19 18:24:20 +03:00
github-actions[bot] d6780c5b29
feat(chromium-tip-of-tree): roll to r1007 (#14225)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-05-19 07:10:18 -07:00
Max Schmitt 4af778fa46
test: fix 'should climb up to a anchor' test in Firefox (#14275) 2022-05-19 16:23:31 +03:00
Pavel Feldman 738d5e5b3e
chore: pass fixture defaults different from falsy (#14237) 2022-05-18 12:03:47 -07:00
Pavel Feldman 50b2d4aabe
chore: ease the stress tests (#14260) 2022-05-18 12:01:18 -07:00
Pavel Feldman d5ea1b38f0
fix(recorder): remove waitForNavigation from codegen (#14166) 2022-05-18 10:02:09 -07:00
Pavel Feldman b5beeab98b
fix(click): climb the hit target hierarchy to anchor (#14235)
fix(click): climb the hit target hierarcchy to anchor
2022-05-18 10:01:34 -07:00
Pavel Feldman f0b077ea82
test(stress): add stress tests (#14240) 2022-05-18 09:50:58 -07:00
Pavel Feldman fe0afd6b5c
fix(toHaveProperty): serialize falsy arguments as well (#14232) 2022-05-17 14:44:12 -07:00
Max Schmitt 9256de5f48
chore: fix wrong toHaveScreenshot defaults in docs (#14200) 2022-05-16 22:26:23 +03:00
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
Dmitry Gozman 0e2855348c
feat(locators): remove layout locators (#14129) 2022-05-12 18:50:19 +01:00
Dmitry Gozman 83d82fa466
test: make "outerWidth and outerHeight" test work on small screens (#14124) 2022-05-12 18:46:03 +01:00
Dmitry Gozman f562058805
test: make wheel event work on different host dsf (#14123)
Turns out, different mac bots have different device scale factor.
2022-05-12 17:29:03 +01:00
Dmitry Gozman 28cd3a1c5e
test: rebaseline wheel tests according to new chromium (#14110) 2022-05-12 10:05:44 +01:00
Max Schmitt 2844623109
docs: add route class -> networking guide reference (#14092) 2022-05-11 16:07:00 +01:00
Max Schmitt cdd589da91
chore: roll stable test-runner to 1.22.0-alpha-may-11-2022 (#14102) 2022-05-11 16:06:52 +01:00