Commit Graph

7409 Commits

Author SHA1 Message Date
Dmitry Gozman
f6936c0461
chore: move private fields to FullConfigInternal (#13261) 2022-04-01 18:32:34 -07:00
Pavel Feldman
66cf82766e
test(html-reporter): add image diff tests (#13262) 2022-04-01 18:11:15 -07:00
Pavel Feldman
55ee41c848
feat(html): render image diff slider (#13257) 2022-04-01 15:27:51 -07:00
Dmitry Gozman
f9ae423eab
docs: attempt to fix rendering of test-timeouts page (#13256) 2022-04-01 15:06:26 -07:00
Ross Wollman
12abae7f31
feat(test-runner): friendly expect errors for typos (#13229)
If you typo'd an `expect` property, you got a cryptic error message:

```
Uncaught TypeError: Cannot create proxy with a non-object as target or handler
```

Now we get this nice friendly message:

```
  1) a.spec.ts:6:9 › explodes ======================================================================

    Error: expect: Property 'toBeLessThen' not found.

    Did you mean 'toBeLessThan'?

    See https://playwright.dev/docs/test-assertions for available options and documentation.

      5 |         const { test } = pwt;
      6 |         test('explodes', () => {
    > 7 |           expect.soft(1).toBeLessThen();
        |           ^
      8 |         });
      9 |

```

Fixes #13218
2022-04-01 13:38:22 -07:00
Dmitry Gozman
fee9b6007f
test: fix windows paths in golden.spec (#13258) 2022-04-01 13:12:29 -07:00
Pavel Feldman
c262a80762
chore: extract image diff component (#13221) 2022-04-01 12:53:56 -07:00
Ross Wollman
16efbdef98
chore: remove/rename FullConfig._attachments (#13233)
This was originally introduced in #12734.

It will be replaced with GlobalInfo (#13083), but not before the 1.21
release.
2022-04-01 12:36:05 -07:00
Ross Wollman
e5ba0d6846
test: ensure tests do not run after globalSetup fail (#13255)
Resolves #13244
2022-04-01 12:35:25 -07:00
Dmitry Gozman
a200fe3528
feat(screenshot): rename "size" option to "scale" (#13254)
Drive-by: fix `caret` handling in `toHaveScreenshot`.
2022-04-01 12:28:40 -07:00
liuxingbaoyu
2eb1c8bc42
fix(show-trace): traceModel was removed by mistake (#12968) 2022-04-01 12:20:05 -07:00
Dmitry Gozman
356fc35b85
feat(role selector): allow unquoted name attribute (#13224)
- This supports `role=button[name=Hello]` similarly to CSS selectors.
- Does not change `_react` or `_vue` behavior that insist on quoting the string.
- Uses CSS notion of "identifier" characters.
2022-04-01 10:08:02 -07:00
Andrey Lushnikov
a87794dae6
fix: demand --force to re-install stable browser channels (#13200)
This patch will check if browser channel is already installed.
If it is, it'll abort installation with the following error:

```
aslushnikov:~/prog/playwright$ npx playwright install msedge
Failed to install browsers
Error:
╔═════════════════════════════════════════════════════════════════╗
║ ATTENTION: "msedge" is already installed on the system!         ║
║                                                                 ║
║ "msedge" installation is not hermetic; installing newer version ║
║ requires *removal* of a current installation first.             ║
║                                                                 ║
║ To *uninstall* current version and re-install latest "msedge":  ║
║                                                                 ║
║ - Close all running instances of "msedge", if any               ║
║ - Use "--force" to install browser:                             ║
║                                                                 ║
║     npx playwright install --force msedge                       ║
║                                                                 ║
║ <3 Playwright Team                                              ║
╚═════════════════════════════════════════════════════════════════╝
```

To re-install browser channel, use `--force`.

Fixes https://github.com/microsoft/playwright/issues/13061
2022-04-01 10:05:53 -07:00
Yury Semikhatsky
7d7fe3c618
fix(route): remove cors option, compare origin (#13231) 2022-03-31 19:21:21 -07:00
Andrey Lushnikov
a02384d2dd
devops: fix uploading test runner reports on windows (#13232)
Fixes #12443
2022-03-31 15:56:28 -07:00
Dmitry Gozman
9fc95dda84
fix(screenshot): do not stall on hideHiglight attempt 2 (#13222)
It turns out that "non stalling evaluate" can stall in Chromium
in some weird conditions, like `document.open` after some weird
`iframe.src` value.

We now only hide highlight in those frames where we did install
highlight in the first place.
2022-03-31 15:33:29 -07:00
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