Commit Graph

7543 Commits

Author SHA1 Message Date
liuxingbaoyu
297edb02f1
devops: support msys2 (#13194) 2022-03-31 15:09:38 -07:00
Pavel Feldman
6a463195c4
chore: allow multiple image diffs (#13202) 2022-03-31 14:11:34 -07:00
Pavel Feldman
0346b5204b
chore: roll test runner to next (#13220) 2022-03-31 14:11:11 -07:00
Dmitry Gozman
e5182259b1
feat(role selector): docs and minor fixes (#13203)
- Added docs to `selectors.md`.
- `[pressed]` and `[checked]` do not match `"mixed"` states.
- Disallow `[name]` shorthand without a value.
- Renamed `includeHidden` to `include-hidden`.
2022-03-31 13:06:39 -07:00
Pavel Feldman
b2c863f6a3
fix(tracing): account for screencast timestamps when computing timeline boundary of empty trace (#13214) 2022-03-31 09:45:45 -07:00
github-actions[bot]
28234b6540
feat(webkit): roll to r1623 (#13195) 2022-03-31 07:40:08 -07:00
Pavel Feldman
923f74c5a6
chore: allow matchers decorate step title (#13199) 2022-03-30 21:52:00 -07:00
Dmitry Gozman
ecc804d808
chore: prepare types to stricter checks in TS 4.7.0 (#13193) 2022-03-30 20:33:36 -07:00
Pavel Feldman
42f260c688
chore: prepare image diff for refactornig (#13197) 2022-03-30 17:42:08 -07:00
github-actions[bot]
6157c3e743
feat(webkit): roll to r1622 (#13187) 2022-03-30 15:39:14 -07:00
Yury Semikhatsky
f45656aa5d
browser(webkit): exit inspector pause loop when page closes (#13185) 2022-03-30 12:13:44 -07:00
Yury Semikhatsky
c200321402
fix: export request from index.jsm (#13158) 2022-03-30 09:35:47 -07:00
Dmitry Gozman
a8d4a8aa52
fix(text selector): ignore non-leading quote when parsing (#13170)
Previously, any unpaired quote in the text selector "escaped"
everything till the end of the selector string, and so any
subsequent chained selectors, including ">>" separator were ignored.

An example of misbehaving selector: `text=19" >> nth=1`.

Now, when text selector contains a non-leading quote, selector parser
does not assume it should escape ">>" separator and correctly
tokenizes all selectors from the chain.

Note that this behavior is a workaround for the fact that our
text selectors is somewhat poorly defined in this area. That said,
this workaround seems to be safe enough. It still does not work for
unpaired leading quotes like this: `text="19 >> nth=1`.
2022-03-30 09:33:32 -07:00
Marcus Felling
705a994f18
docs: add VS Code extension (#12372) 2022-03-30 09:31:35 -07:00
Jim Fisher
7d734802fc
docs: explain why video has gray borders 2022-03-30 09:19:05 -07:00
Ross Wollman
2932da33f2
chore(html-reporter): remove no-longer-needed code (#13167) 2022-03-29 21:08:10 -07:00
Pavel Feldman
5e30375c8c
test(components): add more tests (#13168) 2022-03-29 21:06:11 -07:00
Yury Semikhatsky
d3a9eb604a
browser(webkit): do not create NetworkProcess in ~WebsiteDataStore (#13169) 2022-03-29 20:04:42 -07:00
Pavel Feldman
81e7c0a77c
chore(html-report): render metainfo as a chip (#13166) 2022-03-29 18:13:08 -07:00
Andrey Lushnikov
a9989852d5
feat(vrt): new option "caret" for taking screenshots (#13164)
This has two values:
- `"hide"` to hide input caret for taking screenshot
- `"initial"` to keep caret behavior unchanged

Defaults to `"hide"`.

Fixes #12643
2022-03-29 17:48:13 -07:00
Pavel Feldman
5e17ed137b
fix(html-report): only invoke git once (#13165) 2022-03-29 15:49:58 -07:00
Dmitry Gozman
eb09306db2
feat(connect): add connectOptions.timeout (#13163) 2022-03-29 15:03:43 -07:00
Andrey Lushnikov
aa1daeba85
fix(html): put HTML report next to package.json by default (#13141)
Fixes #12970
2022-03-29 14:19:31 -07:00
Yury Semikhatsky
de0a457856
chore: add webkit linux debugging note 2022-03-29 14:13:31 -07:00
Pavel Feldman
bd6e88b8be
test: start adding component tests (#13159) 2022-03-29 13:27:37 -07:00
Pavel Feldman
5575476697
chore: make webserver try index.html for / (#13155) 2022-03-29 12:19:56 -07:00
Dmitry Gozman
6b48631eed
feat(role): add more tests for accessible name (#13154) 2022-03-29 11:59:44 -07:00
github-actions[bot]
54f6e5db19
feat(firefox): roll to r1322 (#13150)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-29 11:28:20 -07:00
github-actions[bot]
29e0525926
feat(firefox-beta): roll to r1321 (#13142)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-29 01:16:25 -07:00
Andrey Lushnikov
95c6ba9116
browser(firefox): roll Firefox stable to 98.0.2 (#13145) 2022-03-29 01:16:04 -07:00
Pavel Feldman
1961959dcb
chore: migrate injected scripts to esbuild (#13143) 2022-03-28 23:10:17 -07:00
Dmitry Gozman
de0af27837
feat(test runner): show last tests in the worker on teardown error (#13139) 2022-03-28 19:58:24 -07:00
Pavel Feldman
8758cf8cbf
chore: migrate html reporter to vite (#13116) 2022-03-28 18:21:19 -07:00
Dmitry Gozman
d59c2b996f
fix(parallel): minimize the number of beforeAll/afterAll hooks in parallel mode (#13138)
Previously, we always formed groups consisting of a single test.
Now, we group tests that share `beforeAll`/`afterAll` hooks into
`config.workers` equally-sized groups.
2022-03-28 16:10:32 -07:00
Ross Wollman
13dedd27ca
test: out-of-viewport should be considered visible (#13134)
Closes #13131.

Per the visibility spec on https://playwright.dev/docs/next/actionability#visible:

> Element is considered visible when it has non-empty bounding box and does not have visibility:hidden computed style. Note that elements of zero size or with display:none are not considered visible.

 non-empty bounding box
 does not have visibility:hidden

Given the above conditions are satisfied, the locator is considered visible.

https://github.com/microsoft/playwright/issues/8740 proposes something like `isInViewport()` that would be better suited for checking if an element is offscreen.
2022-03-28 16:10:16 -07:00
Ross Wollman
ae365dda3b
chore: remove internal dep on FullConfig (#13074)
Resolves #13058.

This blocks adding #8206 since we don't want the new launch configs
publicly available on FullConfig.
2022-03-28 15:53:42 -07:00
Dmitry Gozman
01a39e5b4c
test(role): add tests for implicit role calculation (#13132) 2022-03-28 15:22:50 -07:00
Andrey Lushnikov
db334a8e71
browser(ff-beta): roll Firefox Beta to 99.0b9 (#13084)
Pretty Diff: 0e75c8a0dc
2022-03-28 15:14:20 -07:00
Philip Sanetra
be41c4a35d
fix(registry): Fix support for generic-linux (#13129)
Fixes https://github.com/microsoft/playwright/issues/13128
2022-03-28 14:50:56 -07:00
Dmitry Gozman
9420a53939
fix(esm): make sure import from './foo.js' is supported (#13137)
Drive-by: migrate all @esm tests to esm.spec.ts.
2022-03-28 14:37:46 -07:00
Ross Wollman
bb90ab1471
docs: use case-sensitive keyword (#13136) 2022-03-28 14:16:33 -07:00
Dmitry Gozman
8c19f71c36
feat(selectors): role selector engine (#12999)
This introduces `role=button[name="Click me"][pressed]` attribute-style
role selector. It is only available under `env.PLAYWRIGHT_EXPERIMENTAL_FEATURES`.

Supported attributes:
- `role` is required, for example `role=button`;
- `name` is accessible name, supports matching operators and regular expressions:
  `role=button[name=/Click(me)?/]`;
- `checked` boolean/mixed, for example `role=checkbox[checked=false]`;
- `selected` boolean, for example `role=option[selected]`;
- `expanded` boolean, for example `role=button[expanded=true]`;
- `disabled` boolean, for example `role=button[disabled]`;
- `level` number, for example `role=heading[level=3]`;
- `pressed` boolean/mixed, for example `role=button[pressed="mixed"]`;
- `includeHidden` - by default, only non-hidden elements are considered.
   Passing `role=button[includeHidden]` matches hidden elements as well.
2022-03-28 09:24:58 -07:00
Pavel Feldman
1471bb7177
fix(tests): remove lock from component tests, test real experience (#13095) 2022-03-26 13:54:33 -07:00
Pavel Feldman
a4a2d41705 fix(tests): fix selenium installation tests 2022-03-26 08:36:25 -07:00
Pavel Feldman
a58707b8a6
chore: group tests under tests/ (2) (#13082) 2022-03-25 23:09:02 -07:00
Pavel Feldman
a454328c25
fix(test): follow up to tests refactoring (#13085) 2022-03-25 22:11:29 -07:00
Pavel Feldman
02cac8a066
chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
Yury Semikhatsky
5734c18ef8
feat(route): add cors header in route.fulfill (#12943) 2022-03-25 14:56:57 -07:00
Andrey Lushnikov
4ab4c0bda1
feat: detect docker version and Playwright version mismatch (#12806)
This patch prints a friendly instructions in case Docker image version
mismatches Playwright version and there are missing browser
dependencies.

With this patch, Playwright will yield the following error:

```
root@f0774d2b2097:~# node a.mjs
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

browserType.launch:
╔════════════════════════════════════════════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers.                                       ║
║ This is most likely due to docker image version not matching Playwright version:           ║
║ - Playwright: 1.22.0                                                                       ║
║ -     Docker: 1.21.0                                                                       ║
║                                                                                            ║
║ Either:                                                                                    ║
║ - (recommended) use docker image "mcr.microsoft.com/playwright:v1.22.0-focal"              ║
║ - (alternative 1) run the following command inside docker to install missing dependencies: ║
║                                                                                            ║
║     npx playwright install-deps                                                            ║
║                                                                                            ║
║ - (alternative 2) use Aptitude inside docker:                                              ║
║                                                                                            ║
║     apt-get install libgbm1                                                                ║
║                                                                                            ║
║ <3 Playwright Team                                                                         ║
╚════════════════════════════════════════════════════════════════════════════════════════════╝
    at file:///root/a.mjs:3:10 {
  name: 'Error'
}```

Fixes #12796

Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2022-03-25 14:45:53 -07:00
Pavel Feldman
6b81e76c2b
chore: migrate trace-viewer and recorder to vite (#13076) 2022-03-25 14:12:00 -07:00