Commit Graph

9403 Commits

Author SHA1 Message Date
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
Dmitry Gozman
c547416e24
test: unflake "should highlight locators with custom testId" (#19236) 2022-12-02 17:32:29 -08:00
Pavel Feldman
291ad6e618
fix(md): ensure list offset when rendering (#19241) 2022-12-02 16:33:51 -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
Yury Semikhatsky
e998b6cab9
docs: auth in project setup (#19220) 2022-12-01 16:53:54 -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
Yury Semikhatsky
4fbd8b9672
chore: outlook login example (#19221) 2022-12-01 16:04:18 -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
Pavel
d63f2542a2 chore: follow up to mock api doc change 2022-11-30 19:31:30 -08:00
Pavel Feldman
2fd0982372
docs: improve API mocking docs (#19189) 2022-11-30 19:29:14 -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
Max Schmitt
878401ff2b
docs(test-reporters): fix code snippet typos
Fixes #19159
2022-11-30 15:37:31 -08:00
Dmitry Gozman
6721ea4d3a
docs: fix string AriaRole in java/csharp (#19183) 2022-11-30 13:46:33 -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
Jacob Stevenson
b7a49fb371
docs: Improve usage of PublishTestResults for Azure Pipelines (#18241) 2022-11-29 13:02:30 -08:00
Zihua Li
0c6a0f40c6
feat(keyboard): support simple cut-pasting using meta+x/v (#18756) 2022-11-29 12:58:14 -08:00
Dmitry Gozman
23e02dd006
test: unflake some timeout-dependent tests (#19139) 2022-11-29 12:54:53 -08:00
Tom Sparrow
90e3194482
docs(debug.md): clarify what slowMo number means (#18788) 2022-11-29 12:54:18 -08:00
Devin Beliveau
707cb1a0d5
docs: correct CircleCI brand name (#18988) 2022-11-29 12:52:07 -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
Max Schmitt
dd18792087
test: navigator.webdriver is set to true (#19065)
https://github.com/microsoft/playwright/issues/18307
2022-11-28 20:03:49 -08:00
Brian Zelip
7a68e79b7f
docs(js): add step to the cli install command overview (#19089) 2022-11-28 20:02:55 -08:00
Simon Legner
43cde2db10
docs(locator): fix #locate-by-test-id link (#19095) 2022-11-28 20:00:30 -08:00