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