Pavel Feldman
6022a4098f
chore: deprecate page.waitForNavigation, locator.elementHandle ( #19977 )
2023-01-09 20:04:04 -08:00
Pavel Feldman
3c8bc0b2f9
chore: minor trace viewer ui tweaks ( #19979 )
2023-01-09 19:51:33 -08:00
Pavel Feldman
3f0adf5dd0
chore: release from pause when the page closes ( #19975 )
...
Fixes: https://github.com/microsoft/playwright/issues/19168
2023-01-09 18:49:18 -08:00
Andrey Lushnikov
8f62aa9335
chore: vendor proper-lockfile dependency ( #19969 )
...
This patch vendors the
https://github.com/moxystudio/node-proper-lockfile
project we rely to manage Playwright Registry.
The reason to vender is the following upstream issue that
didn't get resolved in almost a month:
https://github.com/moxystudio/node-proper-lockfile/issues/111
Follow-up will apply the fix for the issue to the vendored file.
NOTE: this patch also inlines all code in a single file.
References #19418
2023-01-09 17:13:58 -08: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
Dmitry Gozman
7d2cc06355
docs: add usage sections to Locator methods ( #19968 )
2023-01-09 13:06:25 -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
Max Schmitt
e3d615e9f2
docs: add Electron troubleshooting note ( #19954 )
...
Fixes https://github.com/microsoft/playwright/issues/19854
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
2023-01-09 18:39:54 +01:00
Pavel Feldman
6083926111
chore: render readable title separator in errors ( #19754 )
2023-01-09 09:33:09 -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
Max Schmitt
7bbaf2af21
fix(docker): take language binding version in consideration ( #19924 )
2023-01-06 19:47:37 +01:00
Dmitry Gozman
b376110b77
docs: add proper usage for some test apis ( #19925 )
2023-01-06 10:26:23 -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
Yury Semikhatsky
2f3db200f6
chore(cli): filter matches against absolute path ( #19900 )
...
#19522
2023-01-05 13:39:39 -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
Oren
59e1437d7f
fix(serviceworker): network inspection works without options.serviceWorkers set ( #19870 )
2023-01-04 13:20:47 -08:00
Dmitry Gozman
6193e6d8ea
fix(reuse): reset tracing ( #19876 )
...
References #19059 .
2023-01-04 13:19:05 -08:00
Playwright Service
2714e728d0
feat(chromium): roll to r1042 ( #19799 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-02 14:11:44 +01:00
Grant Colestock
a30aac5668
fix: make sure jsx fragments are transformed ( #19755 )
...
Fixes : #19142
2022-12-31 11:08:36 -08:00
Michael Glass
13c5019ac9
fix(playwright-test): _removeOutputDirs called without await always returns truthy ( #19771 )
2022-12-31 11:05:10 -08:00
Andrey Lushnikov
caec93ef42
test: enable ssim-cie94 image comparison algorithm for our tests ( #19313 )
2022-12-29 23:48:28 -08:00
Ross Wollman
359d176ff6
fix(driver): avoid polluting stdout ( #19759 )
...
Relates microsoft/playwright-python#1699 .
2022-12-28 17:09:11 -08:00
Gosha Krikun
166a729386
feat(trace-viewer): add parameters copy to clip ( #19662 )
2022-12-28 17:05:52 -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
0fba4d5611
chore: migrate waitForFunction to not use rerunnable task ( #19730 )
2022-12-27 17:22:44 -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
Dmitry Gozman
1bb019ac81
chore: migrate most of rerunnable tasks to element callback ( #19713 )
2022-12-27 09:22:22 -08:00
Sander
c5d9b8d0fb
chore: update to vite 4 ( #19690 )
2022-12-27 09:14:39 -08:00
Sang Nguyen
f88b22d0c0
docs: fix wrong waitForResponse example in Node.js ( #19701 )
2022-12-27 09:12:43 -08:00
Dmitry Gozman
0087bfac23
fix(role): update allowsNameFromContent to closer align with blink/gecko ( #19692 )
2022-12-27 09:06:46 -08:00
Dmitry Gozman
cce29215f9
chore: make input actions not use rerunnable task ( #19638 )
2022-12-24 10:40:36 -08:00
Pavel Feldman
e61a8c6592
fix(generator): penalize for the selector length ( #19672 )
2022-12-22 20:54:04 -08:00
Pavel Feldman
233664bd30
chore: report more fatal errors via reporter ( #19640 )
2022-12-22 17:31:02 -08:00
Pavel Feldman
8b80e22a03
fix(har): recalculate receive time after response ended ( #19646 )
...
Fixes https://github.com/microsoft/playwright/issues/19327
2022-12-22 17:30:32 -08:00
Pavel Feldman
fe989d95eb
chore(electron): move loader to be preload ( #19650 )
...
Fixes https://github.com/microsoft/playwright/issues/19648
2022-12-22 17:28:08 -08:00
Dmitry Gozman
83418aa8ab
fix(socks): cleanup event listeners upon disconnect ( #19671 )
...
References #19661 .
2022-12-22 17:15:51 -08:00
Ross Wollman
06c7f1fb6c
fix(html): test and fix reporter timing display ( #19670 )
...
#19576 introduced a regression where the CLI reporters displayed some
times with way too many decimals. e.g. 7.123456789ms.
Prior to #19576 , there were two monotonicTime implementations; that PR
updated the reporters to use the common definition that had existed in
utils.ts. However, that introduced a regression in the base.ts reporters
which used the ms duration humanizing package which did not account for
the more precise decimals used by the shared monotonicTime function.
This fix removes the dependency on the third-party ms package and now
consistently uses Pavel's humanize function which the HTML reporter had
been using and proved to have better defaults for decimals.
Additionally, we add more test coverage to limit future regressions
since this was caught in passing.
Closes #19556 .
Relates #19576 .
2022-12-22 15:57:55 -08:00
Dmitry Gozman
e12cf19012
chore: refactor frame.expect to not use rerunnable task ( #19626 )
2022-12-21 15:31:08 -08:00
Dmitry Gozman
b8848fb499
fix(test runner): make sure undefined options in config result in default values ( #19632 )
...
Note: this keeps existing behavior of `undefined` in `test.use()`
reverting to the config value and not to the original default value.
References #19615 .
2022-12-21 14:34:43 -08:00
Dmitry Gozman
eaae8ebbf3
chore: throw InvalidSelectorError from selector parser, add some tests ( #19636 )
2022-12-21 14:27:35 -08:00
Dmitry Gozman
d12bc0be9a
fix(screenshot): account for screenshot === undefined
( #19627 )
2022-12-21 10:16:36 -08:00
Max Schmitt
7508c574e1
chore: bring ubuntu bionic back ( #19625 )
2022-12-21 18:37:42 +01:00
Pavel Feldman
675f0eb4a0
chore: report error location for fatal errors ( #19610 )
2022-12-21 09:36:59 -08:00
Playwright Service
acd3837484
feat(chromium): roll to r1041 ( #19617 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-21 14:47:40 +01:00
Dmitry Gozman
ae2b1ac5e8
chore: move some injected code to InjectedScript ( #19609 )
2022-12-20 17:26:54 -08:00
Ross Wollman
0844394270
feat(html): display overall duration ( #19576 )
...
<img width="1390" alt="Screenshot 2022-12-19 at 4 15 33 PM"
src="https://user-images.githubusercontent.com/11915034/208552484-c0127615-d2c6-414f-ae3b-e7836553d890.png ">
* Adds duration (time ellapsed from `onBegin` to `onEnd`); roughly
equivalent to `time npx playwright test …`.
* Removes cumulative per-file time
Resolves #19566 .
2022-12-20 14:13:10 -08:00
Pavel Feldman
95cc5c2a2e
fix(electron): fix the directory app path ( #19601 )
2022-12-20 12:50:53 -08:00
Pavel Feldman
971e30482a
fix(electron): allow using pre-ready apis ( #19599 )
2022-12-20 10:40:48 -08:00
Andrey Lushnikov
d7e7cab44a
fix: properly handle negated timed-out toPass
matcher ( #19580 )
2022-12-20 08:41:32 -08:00
Max Schmitt
bb2a2c7331
fix: render discouraged / deprecated types ( #19596 )
...
Fixes https://github.com/microsoft/playwright/issues/19591
2022-12-20 16:19:07 +01:00
Dmitry Gozman
412c11db20
fix(reuse): make sure all dispose and close sequences are executed ( #19572 )
...
- When disposing recursively, only the root dispatcher received
`_dispose()` call, while some dispatchers need `_onDispose()` to clean
things up.
- When reusing the context, pages should be notified with `_onClose()`
so that all client-side waiting promises could reject.
Fixes #19216 .
2022-12-19 15:54:53 -08:00
Sander
f540ce08f2
feat(ct): vue2 plugins ( #18596 )
2022-12-19 15:33:50 -08:00
Han Yeong-woo
00ffd74727
fix(runner): import export assignment from ts ( #19559 )
2022-12-19 14:41:29 -08:00
Vladimir Semenov
467d9f37fc
feat(reporter): Add parallelIndex
field to TestResult
( #19570 )
2022-12-19 14:37:04 -08:00
Pavel Feldman
3f333a8ef7
chore: simplify post_data processing ( #19490 )
2022-12-15 11:57:51 -08:00
Andrey Lushnikov
0be1fc8559
chore: cut version 1.29 ( #19489 )
2022-12-15 11:22:35 -08:00
Dmitry Gozman
1263bc3edd
feat(console api): first/last/nth ( #19485 )
2022-12-15 11:17:59 -08:00
Pavel Feldman
3afd83c8cc
chore: withdraw locator.enumerate ( #19484 )
2022-12-15 10:13:56 -08:00
Debbie O'Brien
7bc184f526
chore: recorder button styling ( #19231 )
2022-12-15 18:35:24 +01:00
Playwright Service
e7088cc685
feat(firefox): roll to r1369 ( #19465 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-15 09:01:03 -08:00
Playwright Service
091234e57f
feat(firefox-beta): roll to r1372 ( #19466 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-12-15 09:00:50 -08:00
Playwright Service
a67fa83ee1
feat(chromium-tip-of-tree): roll to r1069 ( #19479 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-15 17:15:07 +01:00
Playwright Service
ed196ae9a2
feat(chromium): roll to r1040 ( #19477 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-15 15:53:47 +01:00
Max Schmitt
1dcb8f643d
chore: fix Android tests ( #19426 )
2022-12-15 07:56:57 +01:00
Pavel Feldman
0e2732decf
feat(api): introduce expect().toPass ( #19463 )
2022-12-14 19:23:13 -08:00
Pavel Feldman
17a0074459
feat(api): introduce Locator.all, enumerate ( #19461 )
2022-12-14 16:42:50 -08:00
Playwright Service
cb4f26b41c
feat(webkit): roll to r1751 ( #19391 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-14 14:07:27 -08:00
Dmitry Gozman
a27f1f744f
feat(getByLabel): support aria-labelledby ( #19456 )
...
Testing library also treats them equally.
Fixes #19284 .
2022-12-14 13:51:05 -08:00
Andrey Lushnikov
8167f8bf54
chore: hide "comparator" option from documentation and types ( #19441 )
2022-12-14 09:58:19 -08:00
Playwright Service
8cc8fca129
feat(firefox-beta): roll to r1370 ( #19444 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-14 09:57:17 -08:00
Yury Semikhatsky
92dd734e04
chore: hide setup, store, TestProject.setupMatch, storageStateName ( #19442 )
2022-12-13 22:48:38 -08:00
Dmitry Gozman
ab9602bebf
chore: remove unused PW_TEST_OUT_OF_PROCESS_DRIVER ( #19434 )
2022-12-13 16:04:44 -08:00
Pavel Feldman
d1559a0fcc
chore: route.fetch(postData) ( #19436 )
2022-12-13 14:01:39 -08:00
Pavel Feldman
6cadc56ea3
feat(api): allow getByTestId(regex) ( #19419 )
2022-12-13 08:43:13 -08:00
Playwright Service
af1783f4a8
feat(chromium-tip-of-tree): roll to r1068 ( #19427 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-13 16:26:41 +01:00
Yury Semikhatsky
0cb1e97528
docs: strictSelectors does not affect Locators ( #19414 )
...
Fixes https://github.com/microsoft/playwright/issues/19398
2022-12-12 15:09:44 -08:00
Dmitry Gozman
539893402e
feat(socks): support pattern similar to proxy bypass rules ( #19387 )
...
- `<loopback>` for local interfaces;
- `123.123.123.123` for IPv4;
- `[1:2:3:4:5:6:7:8]` for IPv6;
- `*.example.com` and `.example.com` for subdomains;
- `example.com` for domains;
- `anything:3000` for port matching.
2022-12-12 12:27:34 -08:00
Pranav Jain
59118b83f9
feat(android): add support for passing CR args & proxy when launching browser ( #19212 )
...
Fixes https://github.com/microsoft/playwright/issues/19211
2022-12-12 16:15:19 +01:00
Dmitry Gozman
3c17a2603a
feat(console api): support locator.filter ( #19389 )
2022-12-09 15:25:12 -08:00
Dmitry Gozman
256e9fd443
feat(connect): allow exposing local network to the remote browser (experimental) ( #19372 )
...
`connectOptions: { _exposeNetwork: '*' | 'localhost' }`
References #19287 .
2022-12-09 11:16:29 -08:00
Playwright Service
8ea48752db
feat(chromium): roll to r1039 ( #19382 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-09 13:23:38 +01:00
Andrey Lushnikov
858c2453b3
feat(containers): implement reverse proxy for novnc and server ( #18569 )
...
This patch adds a reverse proxy in front of novnc and playwright
server inside the container.
As a result:
- container exposes a single HTTP port to the host
- all Playwright clients can connect using this exposed port, e.g.
`http://127.0.0.1:5400 `
- navigating to the exposed port in the browser lands on a nice HTML
page
with a link to view container screen
- users can also manually navigate to `http://127.0.0.1:5400/screen ` to
view screen
2022-12-08 17:17:18 -08:00
Andrey Lushnikov
526bc3f252
fix(ssim-cie94): further tune SSIM-CIE94 to fight wk artifacts ( #19370 )
...
This patch adds a grid border around the image so that the SSIM
resolution doesn't drop for the border pixels.
We also add a test with WebKit rendering artifacts to make sure
new approach helps to fight this.
2022-12-08 16:08:41 -08:00
Dmitry Gozman
465278a54f
feat(tether): always enable socks proxy on the server ( #19363 )
2022-12-08 14:23:14 -08:00
Max Schmitt
92b3995101
chore(recorder): align toolbar buttons correctly ( #19357 )
2022-12-08 17:33:18 +01:00
Playwright Service
883db90c3e
feat(chromium-tip-of-tree): roll to r1067 ( #19358 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-08 17:07:39 +01:00
Dmitry Gozman
bdaf11a568
chore: refactor roleEngine to allow alternative representation ( #19344 )
2022-12-07 16:49:20 -08:00
Andrey Lushnikov
6139b432fd
fix(ssim-cie94): increase SSIM window radius ( #19343 )
...
While migrating Playwright tests from pixelmatch comparator to the
ssim-cie94 comparator, we noticed a rendering artifact that happens
on playwright screenshot tests on WebKit Linux.
This PR adds a set of cropped-down examples and tunes the ssim-cie94
comparator to accept these rendering artifacts.
2022-12-07 16:25:16 -08:00
Dmitry Gozman
dd58609a0b
chore: fix lint in types.d.ts ( #19346 )
2022-12-07 15:29:57 -08:00
Pavel Feldman
7aa3935dcc
chore: match selected options by both value and label ( #19316 )
2022-12-07 09:04:32 -08:00
Dmitry Gozman
fd22d8bde1
feat(tether): support hostname pattern in socks proxy ( #19302 )
...
For now, only '*' and 'localhost' are supported.
References #19287 .
2022-12-07 08:46:35 -08:00
Fernando Garcia Llorente
cd4ccdfa29
feat: allow options in automatic screenshots ( #19143 )
...
Closes #9983
Allowing Automatic Screenshots in `PlaywrightTestConfig` to have
`fullPage` & `omitBackground` as optional parameters.
2022-12-07 08:45:33 -08:00
Andrey Lushnikov
cac67fb94f
chore: do not use "threshold" option for the ssim-cie94
comparator ( #19314 )
2022-12-06 17:03:13 -08:00
Dmitry Gozman
d294c5da33
chore: roll stable-test-runner to 1.28.1 ( #19310 )
...
This required `allowJs: false` in our `tsconfig.json` due to the
following error:
```
Error: Cannot find module './utilsBundleImpl'
Require stack:
- <playwright>/packages/playwright-core/src/utilsBundle.ts
- <playwright>/packages/playwright-test/lib/reporters/html.js
- <playwright>/tests/playwright-test/reporter-html.spec.ts
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/@playwright/test/lib/loader.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/@playwright/test/lib/runner.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/@playwright/test/lib/cli.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/playwright-core/lib/cli/cli.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/playwright-core/cli.js
- <playwright>/tests/playwright-test/stable-test-runner/node_modules/@playwright/test/cli.js
at ../../packages/playwright-core/src/utilsBundle.ts:20
18 | import path from 'path';
19 |
> 20 | export const colors: typeof import('../bundles/utils/node_modules/colors/safe') = require('./utilsBundleImpl').colors;
| ^
21 | export const debug: typeof import('../bundles/utils/node_modules/@types/debug') = require('./utilsBundleImpl').debug;
22 | export const getProxyForUrl: typeof import('../bundles/utils/node_modules/@types/proxy-from-env').getProxyForUrl = require('./utilsBundleImpl').getProxyForUrl;
23 | export const HttpsProxyAgent: typeof import('../bundles/utils/node_modules/https-proxy-agent').HttpsProxyAgent = require('./utilsBundleImpl').HttpsProxyAgent;
at Object.<anonymous> (<playwright>/packages/playwright-core/src/utilsBundle.ts:20:83)
at Object.<anonymous> (<playwright>/packages/playwright-test/src/reporters/html.ts:17:1)
```
2022-12-06 15:46:19 -08:00
Yury Semikhatsky
beb15bb504
chore: rename setup => setupMatch ( #19309 )
2022-12-06 14:55:22 -08:00
Yury Semikhatsky
1b3e53697b
chore: TestStorage => TestStore ( #19308 )
2022-12-06 13:33:43 -08:00
Dmitry Gozman
4784dae10f
fix(role): accessibleName computation should walk the flat dom tree ( #19301 )
...
- When visiting `<slot>` element, descend into assigned nodes.
- When node has `assignedSlot`, skip it during regular traversal.
Fixes #18989 .
2022-12-06 09:31:26 -08:00
Yury Semikhatsky
8660288518
chore: use isProjectSetup instead of set ( #19285 )
2022-12-06 08:59:28 -08:00
Yury Semikhatsky
3c1b26b9f1
feat: make storage a global variable ( #19283 )
2022-12-05 21:37:37 -08:00
Yury Semikhatsky
f9ef18912d
feat: use setup() instead of test() for project setup ( #19281 )
2022-12-05 18:15:01 -08:00
Dmitry Gozman
81c8620bfe
chore: upgrade internal types to support TypeScript 4.9.3 ( #19280 )
...
Fixes https://github.com/microsoft/TypeScript/issues/51619
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-12-05 17:22:25 -08:00
Dmitry Gozman
48182a4eb2
chore: refactor code around text selectors ( #19278 )
2022-12-05 14:08:54 -08:00
Playwright Service
84a0aaaaff
feat(chromium-tip-of-tree): roll to r1065 ( #19239 )
...
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-12-05 11:22:03 -08:00
Playwright Service
e576bd17df
feat(chromium): roll to r1038 ( #19237 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-03 13:03:43 -08:00
Dmitry Gozman
e55a2bdf16
docs: rework Selectors to Other Locators ( #19244 )
...
- Replace links to `selectors.md` with `locators.md`.
- Remove sections that are covered by Locators docs.
- Restructure the rest of selectors doc, update them in terms of
locators.
Fixes #18992 .
2022-12-02 21:48:37 -08:00
Pavel Feldman
9b35ef3b8d
docs: introduce the concept of details ( #19242 )
2022-12-02 17:35:21 -08:00
Dmitry Gozman
0be4fa768a
fix(codegen): do not generate Promise.all ( #19182 )
...
Drive-by: fix `download`, `dialog` and `popup` signals to use different
variable names in all languages.
2022-12-02 17:33:01 -08:00
Andrey Lushnikov
6d82460a02
feat: implement a new image comparison function ( #19166 )
...
This patch implements a new image comparison function, codenamed
"ssim-cie94". The goal of the new comparison function is to cancel out
browser non-determenistic rendering.
To use the new comparison function:
```ts
await expect(page).toHaveScreenshot({
comparator: 'ssim-cie94',
});
```
As of Nov 30, 2022, we identified the following sources of
non-determenistic rendering for Chromium:
- Anti-aliasing for certain shapes might be different due to the
way skia rasterizes certain shapes.
- Color blending might be different on `x86` and `aarch64`
architectures.
The new function employs a few heuristics to fight these
differences.
Consider two non-equal image pixels `(r1, g1, b1)` and `(r2, g2, b2)`:
1. If the [CIE94] metric is less then 1.0, then we consider these pixels
**EQUAL**. (The value `1.0` is the [just-noticeable difference] for
[CIE94].). Otherwise, proceed to next step.
1. If all the 8 neighbors of the first pixel match its color, or
if the 8 neighbors of the second pixel match its color, then these
pixels are **DIFFERENT**. (In case of anti-aliasing, some of the
direct neighbors have to be blended up or down.) Otherwise, proceed
to next step.
1. If SSIM in some locality around the different pixels is more than
0.99, then consider this pixels to be **EQUAL**. Otherwise, mark them
as **DIFFERENT**. (Local SSIM for anti-aliased pixels turns out to be
very close to 1.0).
[CIE94]: https://en.wikipedia.org/wiki/Color_difference#CIE94
[just-noticeable difference]:
https://en.wikipedia.org/wiki/Just-noticeable_difference
2022-12-02 15:22:05 -08:00
Dmitry Gozman
6471e8536e
feat(test runner): support jsconfig.json's baseUrl+paths ( #19219 )
...
Fixes #19129 .
2022-12-01 16:42:25 -08:00
Andrey Lushnikov
4cb49cb162
fix: remove firefox bandaid preferences ( #19217 )
...
These preferences were migrated to those we ship with builds.
Fixes #17442
2022-12-01 12:45:50 -08:00
Max Schmitt
3565d97a36
feat(recorder): make it work with [contenteditable] ( #19066 )
...
https://github.com/microsoft/playwright/issues/19029
2022-12-01 12:41:03 -08:00
Max Schmitt
1d3feba578
chore: do not set bypassCSP when inspector is used ( #19190 )
...
Fixes https://github.com/microsoft/playwright/issues/19186
2022-12-01 12:39:40 -08:00
Playwright Service
b212e99dbb
feat(firefox-beta): roll to r1369 ( #19197 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-01 12:26:17 -08:00
Playwright Service
881097a431
feat(firefox): roll to r1367 ( #19195 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-01 12:25:55 -08:00
Shubham Kanodia
4679cfaeb9
fix: Fixes #19169 Issue with moving up a directory in snapshotPathTemplate ( #19170 )
...
Fixes #19169
Note, I'm not sure why it was done this way before — e.g. Why `testDir`
were considered for resolution, but `testFileDir` wasn't.
Looking for guidance on the approach here, because there are still some
template tokens outside `path.resolve`
Co-authored-by: Shubham Kanodia <skanodia@atlassian.com>
2022-12-01 10:05:15 -08:00
Max Schmitt
62b28c89b4
docs(assertions): fix wrong toHaveText param description ( #19213 )
...
Fixes https://github.com/microsoft/playwright/issues/19202
2022-12-01 09:14:06 -08:00
Playwright Service
dbe4362b9c
feat(firefox): roll to r1366 ( #19185 )
...
Fixes https://github.com/microsoft/playwright/issues/18307 .
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-11-30 19:13:11 -08:00
Playwright Service
58c4d1574b
feat(firefox-beta): roll to r1368 ( #19191 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-30 19:09:41 -08:00
Pavel Feldman
f0e8d8f074
feat(api): introduce route.fetch and route.fulfill(json) ( #19184 )
2022-11-30 17:26:19 -08:00
Dmitry Gozman
499324961a
docs: remove Promise.all from examples ( #19154 )
...
Replaced with explicit `popupPromise` variable.
2022-11-30 12:36:35 -08:00
Playwright Service
f952e1147b
feat(chromium-tip-of-tree): roll to r1063 ( #19070 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-11-30 11:11:54 -08:00
Yury Semikhatsky
de1fc170b2
docs: TestProject.setup ( #19152 )
2022-11-30 09:18:47 -08:00
Dmitry Gozman
307a0b6ea7
fix(dotnet): codegen/docs use Name instead of NameString ( #19156 )
2022-11-29 20:56:18 -08:00
Pavel Feldman
5ac426b3d5
chore: expose utility script to inner evaluates ( #19147 )
2022-11-29 16:57:11 -08:00
Pavel Feldman
89bdaf2441
chore: rename ScreenshotAssertions to SnapshotAssertions ( #19150 )
2022-11-29 16:57:03 -08:00
Yury Semikhatsky
c9ec8b3e55
docs: clarify what is passed as Test.grep input ( #19153 )
...
Fixes https://github.com/microsoft/playwright/issues/18669
2022-11-29 16:03:30 -08:00
Dmitry Gozman
b1b21bdac5
fix(shards): zero-sized shard should not include all tests ( #19148 )
...
Fixes #19073 .
2022-11-29 16:02:11 -08:00
Zihua Li
0c6a0f40c6
feat(keyboard): support simple cut-pasting using meta+x/v ( #18756 )
2022-11-29 12:58:14 -08:00
Shubham Kanodia
3d804ff7cd
chore: rewrite error message for missing snapshot ( #19104 )
2022-11-29 12:51:15 -08:00
Dmitry Gozman
43a6bf4d45
fix(inspector): support custom test id attribute ( #18996 )
...
Fixes #18959 .
2022-11-29 11:43:47 -08:00
Dmitry Gozman
4f72a895e9
fix(inspector): render expect.not correctly ( #19125 )
...
Also fixes the same in expect logs.
References #19083 .
2022-11-28 20:50:16 -08:00
Pavel Feldman
85467d1b7d
chore: generate get by title ( #19119 )
2022-11-28 19:55:34 -08:00
Dmitry Gozman
65b0fb055d
docs: note assertion methods that only work with playwright test runner ( #19116 )
...
Fixes #18963 .
2022-11-28 10:32:48 -08:00
Dmitry Gozman
bd07a63683
docs: highlight printsToStdio
in reporter reference ( #19118 )
...
Fixes #18945 .
2022-11-28 10:32:01 -08:00
Playwright Service
e3d7e080b4
feat(webkit): roll to r1747 ( #19080 )
2022-11-28 09:50:07 -08:00
Playwright Service
2887a2a883
feat(webkit): roll to r1745 ( #19063 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-24 11:38:12 -10:00
Pavel Feldman
be2139f0ac
docs: split assertions list into langs ( #19039 )
2022-11-24 08:25:24 -08:00
Playwright Service
8ec3de7f41
feat(chromium-tip-of-tree): roll to r1062 ( #19037 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-23 14:49:58 -10:00
Pavel Feldman
f9a32e0927
chore: follow up to deprecation changes ( #19025 )
2022-11-23 12:32:14 -08:00
Max Schmitt
f8355b940e
chore: bump Babel dependencies ( #19026 )
2022-11-23 09:37:31 -10:00
Playwright Service
0c8d2cf4e0
feat(webkit): roll to r1744 ( #19006 )
2022-11-23 09:54:47 -08:00
Yury Semikhatsky
d3f41eaa47
fix(fetch): cookie with domain=localhost ( #18998 )
...
Fixes https://github.com/microsoft/playwright/issues/18362
2022-11-23 09:22:49 -08:00
Pavel Feldman
f97dcd4c79
docs: annotate deprecated methods ( #19005 )
2022-11-23 08:40:47 -08:00
Yury Semikhatsky
31d45ad4dc
chore(runner): add all setup files in separate pass ( #18978 )
2022-11-22 16:22:48 -08:00
Dmitry Gozman
503f8f51dc
fix(reuse): stop pending operations upon reuse/disconnect ( #18997 )
2022-11-22 15:21:20 -08:00
Dmitry Gozman
190ed9465f
fix(chromium): detach from shared workers ( #18976 )
...
This prevents shared workers from stalling upon restart.
We receive `Inspector.targetCrashed` and
`Inspector.targetReloadedAfterCrash` events that assume
`Runtime.runIfWaitingForDebugger` from any attached client. It is easier
and more stable to just detach from shared workers, because we do not
inspect them.
For service workers, we should actually issue
`Runtime.runIfWaitingForDebugger` in such cases, because we attach to
them.
Fixes #18932 .
2022-11-22 15:20:42 -08:00
Pavel Feldman
73e7c0ed3d
fix(electron): tolerate connection closed during quit ( #18993 )
2022-11-22 11:50:35 -08:00
Pavel Feldman
a0ea9b5fba
chore: simplify slowmo implementation ( #18990 )
2022-11-22 11:06:45 -08:00
Playwright Service
a51c48fcb1
feat(chromium): roll to r1035 ( #18984 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-22 07:48:46 -10:00
Pavel Feldman
228f78c89d
chore: render browser window in trace ( #18870 )
2022-11-22 08:41:52 -08:00
Yury Semikhatsky
2dc51f6c46
fix(runner): run all setup files when there is test.only ( #18967 )
2022-11-21 16:33:23 -08:00
Pavel Feldman
b5d756686d
fix(electron): consistently emit ready event after app is loaded ( #18972 )
...
Fixes: https://github.com/microsoft/playwright/issues/18928
2022-11-21 15:13:53 -08:00
Andrey Lushnikov
c0daeaa291
Revert "fix(webserver): do not spawn webserver as a new process group ( #18564 )" ( #18968 )
...
This reverts commit 26044c11c0
.
Fixes #18865
2022-11-21 14:40:59 -08:00
Dmitry Gozman
8ad3bc7ff3
fix(role selector): expanded=false does not match elements without aria-expanded ( #18929 )
...
Fixes #18920 .
2022-11-21 14:13:51 -08:00
Max Schmitt
6a5552ba24
chore: drop Ubuntu 18.04 support ( #18924 )
2022-11-21 11:23:45 -10:00
Pavel Feldman
620e8547d4
chore: generate usage: sections based on snippets ( #18965 )
2022-11-21 10:40:21 -08:00
Pavel Feldman
3fb4b3bbf9
chore: normalize api markdown ( #18942 )
2022-11-21 09:30:32 -08:00
Yury Semikhatsky
e1189a96b6
feat(runner): run all setup files if none matched the filter ( #18922 )
...
The behavior regarding filters (both in config, command line and .only)
is the following:
- if some of tests match and none of setup match then we'll run all
setup files and all matching tests
- otherwise the filters apply to setup files the same way as to regular
tests
2022-11-21 09:23:28 -08:00
Dmitry Gozman
941090f0c4
fix(click): account for transformed iframes ( #18926 )
...
- Properly convert coordinates for iframes with non-zero borders.
- IFrames that have `transform` anywhere in the ancestors skip
`hitPoint`-based check because we cannot reliably translate the viewport
point into frame document's coordinates.
Fixes #18245 .
2022-11-18 16:51:39 -08:00
Yury Semikhatsky
c0d0f54a12
feat(runner): allow filtering setup and tests ( #18900 )
...
Running `npx playwright test file:123` will have the following behavior
- if only test files match then only matching subset of tests will run
but all setup files will run as well
- if only setup files match the filter then only those setup tests will
run
- if both setup and test files match an error will be thrown
2022-11-18 11:35:29 -08:00
Playwright Service
7c5e4241b1
feat(chromium-tip-of-tree): roll to r1061 ( #18899 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-18 08:01:01 -10:00
Dmitry Gozman
1ec0bb277d
feat(expect): ensure at least one expectation check, no matter the timeout ( #18895 )
...
References #18859 .
2022-11-17 19:43:10 -08:00
Yury Semikhatsky
0f4b67bc6d
test(cli): setup files are in list-files and test --list output ( #18890 )
2022-11-17 16:31:04 -08:00
Pavel Feldman
b1acc0d0ea
chore: render user-friendly intermediate match values ( #18867 )
2022-11-16 18:05:36 -08:00
Pavel Feldman
4e58b0c2ea
chore: render timed out error message when expect timeouts ( #18863 )
...
Fixes https://github.com/microsoft/playwright/issues/18859
2022-11-16 17:00:42 -08:00
Yury Semikhatsky
05fb3e6de8
Revert "chore: hide TestProject.setup and TestInfo.storage ( #18800 )" ( #18836 )
...
Now that the patch has been cherry-picked to the release branch
reverting it on main.
This reverts commit 6deba5dc21
.
2022-11-16 11:23:10 -08:00
Andrey Lushnikov
c47c90cc25
chore: update WebKit browser version to 16.4 ( #18830 )
2022-11-15 12:46:15 -08:00
Pavel Feldman
20d4d4f4b4
fix(vue2): include hooks into the npm package ( #18826 )
...
Fixes: https://github.com/microsoft/playwright/issues/18812
2022-11-15 11:02:53 -08:00
Dmitry Gozman
f5b4e499fb
fix(locators): frameLocator().nth serialized correctly ( #18819 )
...
Fixes #18798 .
2022-11-15 10:50:46 -08:00
Pavel Feldman
5c530154f9
chore(electron): filter test args out ( #18822 )
2022-11-15 10:48:24 -08:00
Pavel Feldman
dbf3fc5089
fix(electron): stall node while browser is starting ( #18804 )
...
Fixes https://github.com/microsoft/playwright/issues/17765
2022-11-14 22:01:54 -08:00
Yury Semikhatsky
6deba5dc21
chore: hide TestProject.setup and TestInfo.storage ( #18800 )
2022-11-14 17:03:01 -08:00
Pavel Feldman
6258ed53f0
fix: recorder dark theme and strict explore locator parser ( #18801 )
2022-11-14 16:49:15 -08:00
Pavel Feldman
59418aa6f3
chore: ignore untrusted clicks when recording ( #18796 )
...
Fixes https://github.com/microsoft/playwright/issues/18776
2022-11-14 15:16:25 -08:00
Dmitry Gozman
bc6617b4ca
chore: verify tab groups in docs during lint ( #18768 )
...
This extracts the logic from playwright.dev so that we get early
warnings.
2022-11-14 13:05:05 -08:00
Playwright Service
1e309f375a
feat(webkit): roll to r1736 ( #18475 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-14 10:36:52 -08:00
Pavel Feldman
4bbfcef792
Revert "chore: support narrow terminal windows for messages ( #18714 )"
...
This reverts commit 23171c5037
.
2022-11-14 08:47:17 -08:00
Pavel Feldman
8e882fdd58
chore: make generated report writable ( #18750 )
...
Fixes: https://github.com/microsoft/playwright/issues/18747
2022-11-13 12:46:35 -08:00
Playwright Service
1b13519984
feat(chromium): roll to r1034 ( #18736 )
2022-11-11 17:11:58 -08:00
Playwright Service
49f6a965c6
feat(chromium-tip-of-tree): roll to r1059 ( #18753 )
2022-11-11 17:11:17 -08:00
Dmitry Gozman
a7b2b04588
fix(getByRole): name and exact ( #18719 )
...
Following the `getByText()` and other methods:
- By default, matching is substring and case-insensitive. Before, it was
only case-insensitive, but not substring.
- With new option `exact: true`, matching is full string and
case-sensitive.
- Matching always normalizes whitespace.
- Codegen generates `exact: false` by default.
- `internal:role` treats `[name="foo"i]` as non-exact match.
Various fixes:
- Updated `getByRole` docs to match the reality.
- Locator generator edge cases.
2022-11-11 15:58:36 -08:00
Andrey Lushnikov
bc78db07df
chore: cut 1.28 branch ( #18746 )
2022-11-11 15:30:15 -08:00
Andrey Lushnikov
251cc9e229
chore: fix docs ( #18751 )
2022-11-11 13:44:40 -08:00
Andrey Lushnikov
7685c929bf
chore: use '--disable-component-update' flag to avoid component updates ( #18745 )
2022-11-11 13:44:09 -08:00
sand4rt
46559a37c1
fix(ct): setting ctTemplateDir does not work ( #18152 )
...
closes: https://github.com/microsoft/playwright/issues/18116
2022-11-11 09:52:39 -08:00
Andrey Lushnikov
26044c11c0
fix(webserver): do not spawn webserver as a new process group ( #18564 )
...
This patch stops using `processLauncher` to launch web servers. Process
Launcher
will spawn a new process group which is separate from test runner.
This might result in unexpected behavior, e.g. `kill -sigkill
-<testrunnerpid>` will orphan web server process.
Instead, this patch simply spawns web server and sends `SIGTERM` to it
when ready.
2022-11-10 22:30:06 -08:00
Andrey Lushnikov
f3a99fdd69
chore: address API review comments for the snapshotPathTemplate
( #18716 )
...
This patch:
- updates documentation to lead users from `TestConfig.snapshotDir` and
`testInfo.snapshotSuffix` to `TestConfig.snapshotPathTemplate` as a
better and more flexible alternative.
- drops `{snapshotSuffix}` from documentation
- stops using `snapshotSuffix = ''` in our own tests and switches us
to the `snapshotPathTemplate`.
- adds `{testName}` token.
2022-11-10 17:23:57 -08:00
Pavel Feldman
d5eb74fa5d
chore: allow toggling recorder/traceviewer color modes ( #18718 )
...
Fixes: https://github.com/microsoft/playwright/issues/18700
2022-11-10 17:20:09 -08:00
Andrey Lushnikov
dfb4ad388a
feat: support custom png comparator ( #18689 )
...
This way we might experiment with different custom PNG comparators
for VRT.
2022-11-10 16:16:05 -08:00
Pavel Feldman
e42583f477
chore: soften selectors and hit target colors ( #18709 )
...
Fixes: https://github.com/microsoft/playwright/issues/18618
2022-11-10 16:04:12 -08:00
Chris Alley
1ec614bfc4
docs: fix grammar within class test API documentation ( #18627 )
2022-11-10 15:53:48 -08:00
Andrey Lushnikov
23171c5037
chore: support narrow terminal windows for messages ( #18714 )
...
This patch starts using a message box that's not really a box and thus
is better behaving on a narrow-width terminals.
Before:
<img width="744" alt="image"
src="https://user-images.githubusercontent.com/746130/201216551-abbac0f8-71b4-413f-9f4e-159c7123ef3d.png ">
After:
<img width="745" alt="image"
src="https://user-images.githubusercontent.com/746130/201216504-25257727-06c8-4ae9-8557-a2d937b7ca0b.png ">
Signed-off-by: Andrey Lushnikov <aslushnikov@gmail.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2022-11-10 15:50:52 -08:00
Andrey Lushnikov
db826c9c8c
chore: drive-by fixes for the snapshotPathTemplate
( #18715 )
...
- Use `snapshotPathTemplate` for docker screenshots in html-reporter
- Mark the snapshot path template test as slow since it re-spawns
worker for each project.
- Fix docker smoke tests
2022-11-10 15:50:13 -08:00
Max Schmitt
56d7d47d43
fix(codegen): make select work with size attribute ( #18712 )
...
Fixes https://github.com/microsoft/playwright/issues/18711
2022-11-10 15:06:53 -08:00
Yury Semikhatsky
0765182a4d
fix: conversion to snake case ( #18707 )
...
Fixes https://github.com/microsoft/playwright/issues/18695
2022-11-10 14:54:07 -08:00
Dmitry Gozman
194abc35cd
Revert #18561 "feat(test runner): test.reset() to reset options to default/config value" ( #18704 )
...
This reverts commit 6fef227f43
.
Not shipping in 1.28.
2022-11-10 14:45:05 -08:00
Pavel Feldman
ac25fdd74b
chore: fix ff tests with new events mode ( #18708 )
2022-11-10 12:59:27 -08:00
Dmitry Gozman
6d456d30dc
docs: improve test.describe.configure()
( #18705 )
2022-11-10 12:29:38 -08:00
Dmitry Gozman
7c80b77c57
feat(clear): remove clear()
methods from all classes except Locator
( #18703 )
...
The preferred way is to use the locator, so we should not encourage the
use of `ElementHandle` or `Page` in the new APIs.
2022-11-10 12:29:14 -08:00
Pavel Feldman
ca2e7ef199
chore: report paused signal to the debug controller clients ( #18701 )
2022-11-10 12:15:29 -08:00
Andrey Lushnikov
f52fa4ceba
chore(snapshotPathTemplate): address review comments ( #18702 )
2022-11-10 11:37:41 -08:00
Pavel Feldman
c25e67a0e7
chore: conditionally dispatch network events ( #18687 )
2022-11-09 21:10:57 -08:00
Dmitry Gozman
cafa558845
fix(codegen): update priorites in selector generator ( #18688 )
...
- prefer `role=checkbox` over `input[type=checkbox]`
- prefer `#id` over `input[type=checkbox]` and `role=checkbox`
- prefer `text=foo` over `internal:has-text=foo`
- ignore `none` and `presentation` roles
- remove non-strict support
2022-11-09 17:22:13 -08:00
Andrey Lushnikov
6d491f928d
feat(playwright-test): introduce snapshotPathTemplate configuration ( #18568 )
...
This configuration option allows to set a string with template
values for precise control over snapshot path location.
An example of `snapshotPathTemplate` usage:
```ts
// playwright.config.ts
// Notice the `testDir` configuration!
export default {
testDir: './tests',
snapshotPathTemplate: './__screenshots__/{platform}/{projectName}/{testFilePath}/{arg}{ext}',
}
```
Currently supported "magic tokens" inside the `snapshotPathTemplate`
are:
- `{testDir}` - project's `testDir`
- `{snapshotDir}` - project's `snapshotDir`
- `{platform}` - `process.platform`
- `{projectName}` - Project's sanitized name
- `{testFileDir}` - Directories in relative path from `testDir` to test
file path (e.g. `page/` in the example below)
- `{testFileName}` - Test file name (with extension) (e.g.
`page-click.spec.ts` in the example below)
- `{testFilePath}` - Relative path from `testDir` to test file path
(e.g. `page/page-click.spec.ts` in the example below)
- `{ext}` - snapshot extension (with dots)
- `{arg}` - joined snapshot name parts, without extension (e.g.
`foo/bar/baz` in the example below)
- `{snapshotSuffix}` - `testInfo.snapshotSuffix` value.
Consider the following file structure:
```
playwright.config.ts
tests/
└── page/
└── page-click.spec.ts
```
The following `page-click.spec.ts`:
```ts
// page-click.spec.ts
import { test, expect } from '@playwright/test';
test('should work', async ({ page }) => {
await expect(page).toHaveScreenshot(['foo', 'bar', 'baz.png']);
});
```
Fixes #7792
2022-11-09 15:29:07 -08:00
Andrey Lushnikov
9bcb28f25a
Revert "feat: send SIGTERM to webserver before SIGKILL'ing it. ( #18220 )" ( #18661 )
...
This reverts commit c63a0b536d
.
Reason: https://github.com/microsoft/playwright/pull/18564
2022-11-09 09:18:33 -08:00
Dmitry Gozman
a7f1c8cb65
fix(codegen): fix csharp options syntax ( #18662 )
2022-11-08 21:48:01 -08:00
Dmitry Gozman
ef1b68a998
feat(locators): support frame locators in asLocator
( #18653 )
...
Drive-by: change `true` to `True` in python.
References #18524 .
2022-11-08 17:08:08 -08:00
Playwright Service
54a235284a
feat(chromium-tip-of-tree): roll to r1058 ( #18658 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-08 16:11:42 -08:00
Pavel Feldman
b8bd4f7a48
chore: serialize config as a part of list-files ( #18649 )
2022-11-08 12:05:00 -08:00
Pavel Feldman
0355d8618f
chore: use provided value for the generated test id ( #18631 )
2022-11-08 12:04:43 -08:00
Dmitry Gozman
05b623e6b0
feat(locators): asLocator supports internal:has= ( #18625 )
...
The following snippet:
```js
rowLocator
.filter({ hasText: 'John' })
.filter({ has: page.getByRole('button', { name: 'Say hello' }) })
```
is shown in the logs:
```log
pw:api waiting for getByRole('listitem').filter({ hasText: 'John' }).filter({ has: getByRole('button', { name: 'Say hello' }) })
```
2022-11-08 08:47:02 -08:00
Yury Semikhatsky
d5494edf71
feat(runner): TestOptions.storageStateName ( #18587 )
2022-11-07 16:27:38 -08:00
Dmitry Gozman
1cee65722b
fix(inspector): disable highlight during screenshot actions ( #18621 )
...
Fixes #18049 .
2022-11-07 13:53:15 -08:00
Pavel Feldman
8432d1592f
chore: expose new locator apis on window.playwright ( #18595 )
2022-11-07 09:06:13 -08:00
Dmitry Gozman
6a65a43e9a
chore: use consistent asLocator() in all logs ( #18586 )
...
References #18524 .
2022-11-04 15:19:16 -07:00
Yury Semikhatsky
25dc0bfacb
feat(runner): change storage fixture to TestInfo.storage() ( #18584 )
2022-11-04 14:28:25 -07:00
Dmitry Gozman
6fef227f43
feat(test runner): test.reset() to reset options to default/config value ( #18561 )
2022-11-04 09:03:29 -07:00
Dmitry Gozman
7a9f1b5ee4
fix(firefox): force fast shutdown after "xpcom-will-shutdown" phase ( #18556 )
2022-11-04 09:02:13 -07:00
Dmitry Gozman
227f47effb
feat(firefox): roll to 1364 and 1367, rebase page-drag.spec ( #18559 )
2022-11-04 08:53:50 -07:00
Playwright Service
7e65b1927a
feat(chromium-tip-of-tree): roll to r1057 ( #18566 )
2022-11-04 08:27:44 -07:00
Playwright Service
ad39e7571d
feat(chromium-tip-of-tree): roll to r1056 ( #18500 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-03 16:54:59 -07:00
Playwright Service
ae811774b1
feat(chromium): roll to r1033 ( #18558 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-03 16:21:39 -07:00
Pavel Feldman
3bc9e07daf
chore: parse locators strictly ( #18553 )
2022-11-03 15:17:08 -07:00
Yury Semikhatsky
c8cd07594c
feat(runner): initialize context.storageState from storage entry ( #18549 )
2022-11-03 14:20:39 -07:00
Xiaoxing Ye
9338355e47
feat(testinfo): add name to attachment output name ( #18440 )
...
Per discussion in #12950 , adding sanitized name to the output filename
prefix. This can make debugging easier, and the filename structure more
human friendly.
2022-11-03 13:54:51 -07:00
Andrey Lushnikov
8538f61a72
feat(containers): implement global network tethering for playwright server ( #17719 )
...
This patch implements a new mode of network tethering for Playwright
server & its clients.
With this patch:
- playwright server could be launched with the
`--browser-proxy-mode=tether` flag to engage in the new mode
- a new type of client, "Network Tethering Client" can connect to the
server to provide network traffic to the browsers
- all clients that connect to the server with the `x-playwright-proxy:
*` header will get traffic from the "Network Tethering Client"
This patch also adds an environment variable
`PW_OWNED_BY_TETHER_CLIENT`. With this env, playwright server will
auto-close when the network tethering client disconnects. It will also
auto-close if the network client does not connect to the server in the
first 10 seconds of the server existence. This way we can ensure that
`npx playwright docker start` blocks terminal & controls the lifetime of
the started container.
2022-11-03 13:47:51 -07:00
Pavel Feldman
eac5cc98df
fix: compare selector when validating highlight ( #18530 )
2022-11-03 09:55:45 -07:00
Pavel Feldman
17c8554255
chore(recorder): explore using codemirror ( #18529 )
2022-11-03 09:55:23 -07:00
Yury Semikhatsky
45aa82242d
feat(runner): storage fixture ( #18522 )
2022-11-02 20:22:35 -07:00
Andrey Lushnikov
c3cff485d1
feat(html): add --host
and --port
to the show-report
command ( #18517 )
...
This enables serving HTML report from inside docker container.
Drive-by: restore default HTML serving port to 9323. This was
accidentally changed in 1.27 and mentioned in
https://github.com/microsoft/playwright/issues/16667#issuecomment-1269861623
2022-11-02 15:12:48 -07:00
Pavel Feldman
4d34a1a371
chore: do not generate role= selector, use internal ( #18519 )
2022-11-02 14:57:19 -07:00
Pavel Feldman
b2e4f5652e
chore: do not update highlight on focus outside of the recording mode ( #18516 )
2022-11-02 14:09:02 -07:00
Dmitry Gozman
8292398692
docs: support custom hrefs for api links ( #18514 )
2022-11-02 13:35:51 -07:00
Yury Semikhatsky
1d2fc1e963
feat(runner): project.setup ( #18486 )
2022-11-01 23:44:30 -07:00
Pavel Feldman
67c9624924
chore: send structured codegen info to the debug controller ( #18491 )
2022-11-01 18:02:14 -07:00
Pavel Feldman
2183d9e9a2
chore: use codemirror for editor ( #18482 )
2022-11-01 15:04:30 -07:00
Dmitry Gozman
c56877032d
fix(persistent): close browser instead of pages ( #18485 )
...
Previously, we closed pages one by one before closing the browser when
shutting down the persistent context. This logic was introduced in
https://github.com/microsoft/playwright/pull/4040 to properly finish
video recordings in persistent context.
Such a process makes it unnecessary brittle to close the persistent
context. For example, Chromium headless is sometimes unable to close the
last persistent page for unknown reasons.
Instead, we can just stop video recordings manually and close the
browser right away.
Fixes #18229 .
2022-11-01 14:26:38 -07:00
sand4rt
4896b22616
chore(ct): bump vue to v2.7.13 ( #18428 )
2022-11-01 14:17:43 -07:00
Max Schmitt
57c2ed91d9
chore: fix language binding based install message ( #18480 )
2022-11-01 13:46:17 -07:00
Pavel Feldman
4d53fd9c63
chore: download android driver from the cdn ( #18466 )
2022-10-31 16:08:26 -07:00
Dmitry Gozman
9cc5ca0cd4
feat(firefox): process.env.PLAYWRIGHT_DISABLE_FIREFOX_CROSS_PROCESS ( #18458 )
2022-10-31 15:19:10 -07:00
Yury Semikhatsky
7337dd4e28
chore: revert project.{stage,run} ( #18462 )
2022-10-31 14:04:24 -07:00
sand4rt
fbfec18678
fix(ct): vite base url ( #17767 )
2022-10-31 12:58:07 -07:00
Pavel Feldman
2c3fa1b1ff
chore: add explore locator parser ( #18429 )
2022-10-31 12:55:35 -07:00
Playwright Service
2d07c10888
feat(webkit): roll to r1735 ( #18419 )
2022-10-31 12:54:12 -07:00
Pavel Feldman
a7f5f2d7a1
chore: allow not overriding media when creating context ( #18413 )
2022-10-31 09:09:52 -07:00
sand4rt
fabe42dc28
chore(ct): bump vite to v3.2.1 ( #18427 )
2022-10-31 08:58:11 -07:00
sand4rt
afca134c9f
feat(ct): vue3 ts api component as slot ( #18425 )
2022-10-31 08:57:21 -07:00
Playwright Service
2e2698fa9d
feat(chromium): roll to r1032 ( #18437 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-30 21:03:06 -07:00
Playwright Service
5072263923
feat(chromium-tip-of-tree): roll to r1055 ( #18418 )
2022-10-28 19:09:59 -07:00
Pavel Feldman
c07f06aa3f
chore: support dark theme in recorder & tv ( #18389 )
2022-10-27 16:50:41 -07:00
Pavel Feldman
a3f30674d3
chore: roll highlightjs ( #18382 )
2022-10-27 16:49:54 -07:00
Playwright Service
ce63a9b206
feat(firefox-beta): roll to r1365 ( #18365 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-27 16:00:03 -07:00
Playwright Service
9115cbab18
feat(firefox): roll to r1362 ( #18367 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-27 15:59:56 -07:00
Dmitry Gozman
2d3b2a0768
feat(test runner): test.describe.configure({ retries, timeout }) ( #18388 )
...
References #10825 .
2022-10-27 15:53:27 -07:00
Dmitry Gozman
c4404ea98f
docs: add examples and clarifications to getByText ( #18380 )
...
Also be more explicit about normalizing whitespace, event with exact
match.
Fixes #17831 .
2022-10-27 10:27:18 -07:00
Pavel Feldman
041a98928b
chore: print where the browsers are downloaded from ( #18360 )
...
Fixes https://github.com/microsoft/playwright/issues/16926
2022-10-27 09:19:09 -07:00
Playwright Service
6eefe205f7
feat(firefox): roll to r1361 ( #18353 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-26 15:27:25 -07:00
Playwright Service
a75c23dd9b
feat(firefox-beta): roll to r1364 ( #18310 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-26 15:27:13 -07:00
Pavel Feldman
db456a020c
chore: do not point to node_modules in code frames ( #18358 )
...
Fixes https://github.com/microsoft/playwright/issues/18330
2022-10-26 15:18:31 -07:00
Pavel Feldman
1505a952fe
chore: make handle beforeunload when reusing the context ( #18357 )
...
Fixes: https://github.com/microsoft/playwright/issues/17903
2022-10-26 15:17:40 -07:00
Max Schmitt
e25537f941
feat(android): add AndroidDevice.close event ( #18306 )
2022-10-25 18:18:14 -07:00
Yury Semikhatsky
63c41f88cd
chore: remove stale TODOs ( #18331 )
2022-10-25 15:21:04 -07:00
Max Schmitt
ffc47271f2
fix(junit): escape null control character ( #18325 )
...
Fixes https://github.com/microsoft/playwright/issues/18322
2022-10-25 14:39:16 -07:00
Dmitry Gozman
0653692a5b
fix(selectors): :scope
combined with other css should work ( #18324 )
...
Previously, we considered root when selector has `:scope` modifier, but
did not actually match it with other css specifiers, like in
`:scope.selected`.
Fixes #17824 .
2022-10-25 14:31:39 -07:00
Max Schmitt
721ae2b3ed
fix: make reoccurring networkidle work ( #18323 )
...
Fixes https://github.com/microsoft/playwright/issues/18283
Signed-off-by: Max Schmitt <max@schmitt.mx>
2022-10-25 13:35:18 -07:00
Jean-François Greffier
0fe1998c72
feat(api): add clear() ( #18296 )
...
Add `clear()` method as a convenience shortcut for `fill('')`.
Implemented for AndroidDevice, ElementHandle, Frame, Locator and Page.
Fixes https://github.com/microsoft/playwright/issues/14041
2022-10-25 12:56:11 -07:00
Dmitry Gozman
caa9c6a597
fix(test runner): make sure soft expect error does not mask a timeout flag ( #18321 )
...
We have to reliably know whether test timed out or not, and soft expect
error could have marked it with `status=failed` but it would still time
out. Now we have a separate `_didTimeout` flag for this.
Fixes #18023 .
2022-10-25 12:34:15 -07:00
Pavel Feldman
37250cde17
chore: switch to the new debug controller harness ( #18308 )
2022-10-25 09:55:20 -07:00
Pavel Feldman
d8ec7cba47
chore: don't generate new lines in codegen ( #18309 )
2022-10-25 09:02:06 -07:00
Dmitry Gozman
3cd64e1449
fix(check): support all ARIA roles that could be aria-checked ( #18304 )
...
Fixes #18193 .
2022-10-25 06:11:11 -07:00
Dmitry Gozman
329b3eadb4
feat: locator.blur() ( #18303 )
...
Note this is only available on Locator. Fixes #10724 .
2022-10-25 06:10:40 -07:00
Max Schmitt
805312b722
feat(android): add Android.{launchServer,connect} ( #18263 )
...
Fixes https://github.com/microsoft/playwright/issues/17538
2022-10-24 17:23:11 -07:00
Pavel Feldman
d3948d1308
chore: enable debug controller testing ( #18270 )
2022-10-24 16:19:58 -07:00
Dmitry Gozman
9a684d39ab
feat(firefox): prepare to fission roll ( #18302 )
...
- Handle `Runtime.executionContextsCleared` event.
- Skip one auto-waiting test, because navigations now happen
asynchronously.
2022-10-24 16:03:56 -07:00
Pavel Feldman
ab78865a8d
chore: render steps in list reporter ( #18269 )
2022-10-24 15:54:53 -07:00
Pavel Feldman
3f850d27e9
fix(highlight): fix the testing harness to be real ( #18294 )
2022-10-24 15:01:48 -07:00
Max Schmitt
be67189a54
fix(fetch): throw on unexpected end of file brotli requests ( #18223 )
...
https://github.com/microsoft/playwright/issues/18190
2022-10-24 12:51:45 -07:00
Pavel Feldman
3c0832a0d9
chore: brush up the debug controller api ( #18262 )
2022-10-21 17:57:22 -07:00
Dmitry Gozman
48c44f2c78
fix(selectors): hasText and getByText exact match should consider full text ( #18260 )
...
Fixes #18259 .
2022-10-21 16:29:45 -07:00
Dmitry Gozman
d4053abd29
fix(video): do not produce frames much faster than desired fps ( #18228 )
...
Otherwise, we get very long but slow videos.
Fixes #18198 .
2022-10-21 14:30:14 -07:00
Playwright Service
96aa42c541
feat(chromium): roll to r1031 ( #18258 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-21 14:27:46 -07:00
Playwright Service
7a65e0cbb3
feat(ffmpeg): roll to r1008 ( #18251 )
...
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-21 09:40:57 -07:00
Andrey Lushnikov
c63a0b536d
feat: send SIGTERM to webserver before SIGKILL'ing it. ( #18220 )
...
We now will send `SIGTERM` to the webserver and wait for the `timeout`
before sending `SIGKILL` to it.
Fixes #18209
2022-10-21 08:55:06 -07:00