Commit Graph

2050 Commits

Author SHA1 Message Date
Andrey Lushnikov
92375f6333
fix: support import assertions (#20009)
Fixes #19928

Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-01-16 08:26:14 -08:00
Andrey Lushnikov
780e64f2c6
test: fix toIntersectViewport test on WebKit @ Ubuntu 22.04 (#20132)
For some reason scrolling inline element into view doesn't
always work.
2023-01-16 00:11:33 -08:00
Sander
5b3a306284
test(ct): react vite slice by feature (#20098) 2023-01-13 18:15:43 -08:00
Sander
10404706e9
test(ct): react slice by feature (#20099) 2023-01-13 18:15:33 -08:00
Pavel Feldman
d1c161ce99
chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
Pavel Feldman
736cf5c585
fix(tsx): resolve .js imports to .tsx as well (#20092)
Fixes: https://github.com/microsoft/playwright/issues/20039
2023-01-13 10:49:10 -08:00
Pavel Feldman
e065d608b6
chore: introduce defineConfig for easier JS typing (#20061)
Fixes https://github.com/microsoft/playwright/issues/19694
2023-01-12 13:12:02 -08:00
Yury Semikhatsky
730a197c80
feat: config.globalScripts (#20062)
Introduce config.globalScripts. Tests from the matching files will run
before all projects. We'll only allow beforeAll/afterAll instead of
tests in such files (next PR).

Global scripts are executed as part of 'Global Scripts' project which is
not present in FullConfig.projects but may be referenced by
corresponding global setup Suites.

Signed-off-by: Yury Semikhatsky <yurys@chromium.org>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2023-01-12 13:02:54 -08:00
Sander
4a038b726d
test(ct): vue2 slice by feature (#20080) 2023-01-12 10:46:15 -08:00
Dmitry Gozman
862125e122
test: record trace+video at the same time (#20082)
Fixes #12266.
2023-01-12 10:44:20 -08:00
Sander
5d86d6f662
test(ct): vue cli slice by feature (#20083) 2023-01-12 10:43:47 -08:00
Sander
c4b9654fa7
test(ct): svelte slice by feature (#20045)
follow up for: https://github.com/microsoft/playwright/pull/19657.
2023-01-11 14:07:02 -08:00
Sander
ff23b49457
test(ct): solid slice by feature (#20048) 2023-01-11 14:06:43 -08:00
Max Schmitt
a7495c3326
fix: use no internal selectors for frame locators (#19964)
Fixes https://github.com/microsoft/playwright/issues/19406
2023-01-11 21:53:19 +01:00
Dmitry Gozman
4f837690e2
fix(connect): do not log ws query params (#20047) 2023-01-11 12:27:27 -08:00
Dmitry Gozman
bd4efa9dc1
test: update tests for waituntil:commit (#20042)
Instead of never finishing the response which works differently across
browsers, stall the required script.
This makes "DOMContentLoaded" to never fire and properly tests the
"commit" signal.
2023-01-11 10:16:51 -08:00
Dmitry Gozman
e674ea217f
chore: respect headless option when reusing browser (#19980)
References #19746.
2023-01-10 10:49:53 -08:00
Max Schmitt
e2a2196e6a
chore(html-reporter): show project name always for the test file (#19905)
Fixes https://github.com/microsoft/playwright/issues/19874
2023-01-10 17:11:38 +01:00
Dmitry Gozman
28577afde4
feat(soft expect): mark steps with failed soft expects as failed (#19973)
Fixes #19673.
2023-01-09 16:17:06 -08:00
Sander
a5f4717192
test(ct): vue vite slice by feature (#19657) 2023-01-09 12:36:33 -08:00
Yury Semikhatsky
a39a97f0ee
chore: setup -> test.projectSetup (#19932)
* Changed `setup` to `test.projectSetup`
* Only `test.projectSetup.only` is supported on the new method
* test.* methods except for before/after/Each/All hooks can be called
inside the project setup files
2023-01-09 11:21:48 -08:00
Dmitry Gozman
830c3c9f0f
fix(reuse): workaround long sw unregister (#19930)
Bogus `importScripts()` sometimes makes `unregister()` hang for long
time. We detect this case and not await it.

Fixes #19789.
2023-01-06 17:02:40 -08:00
Andrey Lushnikov
2a49c5e498
feat(expect): introduce expect(locator).toIntersectViewport() (#19901)
This is a new web-first assertion that should be used like this:

```ts
test('should work', async ({ page }) => {
  const locator = page.locator('body');
  // New web-first assertion.
  await expect(locator).toIntersectViewport();
  // The same functionality.
  await expect.poll(() => locator.viewportRatio()).toBeGreaterThan(0);
});
```

Fixes #8740
2023-01-06 16:56:24 -08:00
Andrey Lushnikov
1385007185
test: fix locator.viewportRatio() tests (#19931)
Drive-by: make sure `locator.viewportRatio()` returns `0`
for non-existing element.
2023-01-06 16:55:38 -08:00
Max Schmitt
c339e1615b
fix(fetch): handle invalid redirect URL (#19890)
Fixes https://github.com/microsoft/playwright/issues/19879.

This part is then similar to how node-fetch is doing it:
55a4870ae5/src/index.js (L152-L159)

node-fetch also throws as of today with this URL. Before in Python it
was stalling, because the error was written to stdout and on Windows the
stdout wasn't working. On Node.js it ended up in an unhandled exception.
2023-01-06 10:22:17 -08:00
Dmitry Gozman
cd698a2258
feat(trace viewer): render selectors as locators (#19907)
Drive-by: fix more places with SerializedValue rendering.

Fixes #19085.
2023-01-05 16:59:50 -08:00
Dmitry Gozman
31a63b5c2a
fix(reuse): make reuse work with tracing (#19733)
Fixes #19059.
2023-01-05 14:50:47 -08:00
Yury Semikhatsky
10ccfa9517
feat(fetch): happy eyeballs (#19902)
Fixes #18790
2023-01-05 14:39:49 -08:00
Max Schmitt
4359111289
test: unskip wk test (#19903) 2023-01-05 22:51:08 +01:00
Dmitry Gozman
e07d1722ec
test: rebase permission test for Chromium >= 110 (#19899)
Fixes #19180.
2023-01-05 13:01:37 -08:00
Andrey Lushnikov
1afa38d5a7
chore(expect): extract polling from expect.poll and expect().toPass (#19882)
This extracts & unifies polling machinery from `expect.poll` and
`expect.toPass` methods.
2023-01-05 11:14:37 -08:00
Max Schmitt
ddccb59093
chore: fix Java CLI invocation on Windows (#19895)
For reference: https://stackoverflow.com/a/64300409
2023-01-05 10:55:07 -08:00
Andrey Lushnikov
3883799d68
feat: introduce locator.viewportRatio (#19761)
References #8740
2023-01-05 10:49:32 -08:00
Playwright Service
abe901d598
feat(chromium-tip-of-tree): roll to r1074 (#19853)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-01-05 19:04:20 +01:00
Dmitry Gozman
388a3e1f37
fix(test runner): make sure to run afterAll after skipped tests (#19878)
Fixes #19745.
2023-01-04 14:13:49 -08:00
Dmitry Gozman
6193e6d8ea
fix(reuse): reset tracing (#19876)
References #19059.
2023-01-04 13:19:05 -08:00
Dmitry Gozman
711a1aadbf
chore: update tracing tests helper (#19848)
To be reused in future tests.

Signed-off-by: Dmitry Gozman <dgozman@gmail.com>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2023-01-03 17:30:36 -08:00
Dmitry Gozman
f58015281a
test: attempt to unflake inspector tests (#19845)
On headed bots, we might get `locator('body')` from initial mouse
position.
2023-01-03 16:26:21 -08:00
Grant Colestock
a30aac5668
fix: make sure jsx fragments are transformed (#19755)
Fixes: #19142
2022-12-31 11:08:36 -08:00
Andrey Lushnikov
caec93ef42
test: enable ssim-cie94 image comparison algorithm for our tests (#19313) 2022-12-29 23:48:28 -08:00
Sander
b363902e1b
feat(ct): https (#19697) 2022-12-28 17:04:23 -08:00
Dmitry Gozman
5cdf118a42
fix(reuse): disable trace/video when reusing the context (#19764)
Previously, we disabled reuse when trace/video was on. Component testing
keeps this behavior.

References #19059.
2022-12-28 16:58:34 -08:00
Yury Semikhatsky
137070d889
Revert "chore: hide setup, store, TestProject.setupMatch, storageStat… (#19756)
…eName (#19442)"

This reverts commit 92dd734e04.
2022-12-28 15:39:31 -08:00
Yury Semikhatsky
b8f96a9411
fix(generator): FilterOptions in java (#19741)
Fixes #19448
2022-12-28 09:13:06 -08:00
Dmitry Gozman
0b223b9036
fix(hit target): account for iframes with padding (#19732)
Padding on iframes moves the `documentElement` inside the iframe, so we
should account for it when converting coordinates between frames.

Fixes #19613.
2022-12-27 16:59:34 -08:00
Dmitry Gozman
3334d89ad7
fix(socks): support ipv6 (#19727)
Signed-off-by: Dmitry Gozman <dgozman@gmail.com>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2022-12-27 14:45:35 -08:00
Sander
ba393f51a8
feat(ct): before mount hook wrapper (#18616) 2022-12-27 14:26:17 -08:00
Dmitry Gozman
c1b9a56079
chore: migrate waitForSelector to not use rerunnable task (#19715) 2022-12-27 13:39:35 -08:00
Dmitry Gozman
24f2ccb4ca
feat(getByLabel): support aria-label (#19726)
References #19284.
2022-12-27 12:43:55 -08:00
Dmitry Gozman
3ad65e7ce8
fix(launchServer): disable socks by default (#19723)
Socks does not support ipV6 yet.

References #19661.
2022-12-27 10:43:36 -08:00