Commit Graph

3676 Commits

Author SHA1 Message Date
Pavel Feldman
23b1012c70
chore: fix ff test for codegen (#33122) 2024-10-15 13:34:08 -07:00
Dmitry Gozman
59a50cf596
fix(chromium): disable PlzDedicatedWorker again (#33110) 2024-10-15 02:13:19 -07:00
Dmitry Gozman
17837e564d
fix(routeWebSocket): make sure ws url without trailing slash is supported (#33095) 2024-10-15 02:08:27 -07:00
Pavel Feldman
2c05d294a8
chore: fix webkit visibility check in aria matcher (#33102) 2024-10-14 15:55:21 -07:00
Pavel Feldman
a38ff6e0d8
chore: experimental toMatchAriaSnapshot (#33014) 2024-10-14 14:07:19 -07:00
Pavel Feldman
6cfcbe0d6d
chore: fix codegen selector while debugging (#33099)
Fixes #33052
2024-10-14 14:04:24 -07:00
Dmitry Gozman
ecd147ce43
fix(test runner): when sharding with beforeAll, use shards total instead of workers (#33083)
Otherwise, we might split the `beforeAll`-grouped test group into
`workers` parts instead of `shard.total` parts as the user would expect.

Fixes #33077.
2024-10-14 13:46:06 -07:00
Playwright Service
c7fbeddaf4
feat(webkit): roll to r2092 (#33078) 2024-10-14 22:21:49 +02:00
Simon Knott
a8df750a48
fix(har): account for reused sockets (#33087)
Closes https://github.com/microsoft/playwright/issues/32960

If the socket is reused, the connect and DNS timings are set to -1,
because that timing doesn't apply to the current request. The time
between request start and the socket being free is counted as `blocked`.
2024-10-14 17:22:29 +02:00
Max Schmitt
87624c5434
Revert "fix(codegen): fix unselect issue (#32127)" (#33065)
This reverts commit 5121b19ac6.

The tree is red and fixing seems non-trivial.

Closes https://github.com/microsoft/playwright/issues/33064
Closes https://github.com/microsoft/playwright/pull/33060
2024-10-11 16:33:17 +02:00
Yury Semikhatsky
b9cce598dd
fix(screenshot): show image diff inline in errors list (#32997)
The diff is now shown inline in the errors list.

There are 2 possible failures of toHaveScreenshot
* Previous and actual snapshot mismatch. In this case html report will
show diff between Actual/Previous and have Expected as a separate
screenshot.
* Actual/Previous are equal but they differ from the expected. In this
case html report only contains Actual/Expected images and the diff.

Reference: https://github.com/microsoft/playwright/issues/32341

<img width="1039" alt="image"
src="https://github.com/user-attachments/assets/b458f986-cc25-4721-862c-0cc2c1b01a42">
2024-10-10 16:49:17 -07:00
Playwright Service
10a9e1c730
feat(webkit): roll to r2090 (#33050) 2024-10-11 00:08:03 +02:00
Yury Semikhatsky
82fe882004
fix(webkit): scroll mobile page with background-attachment: fixed (#33048)
Fixes #31551
Fixes #23573
2024-10-10 14:32:27 -07:00
Dmitry Gozman
25dd9b5cd4
feat: config.build.tsconfig (#33026)
Allows to specify `tsconfig` in the configuration file, which applies to
test files but not the config file itself.

Fixes #32808.
2024-10-10 01:37:46 -07:00
Max Schmitt
6210fef681
test: fix android tests (#33021) 2024-10-09 11:22:27 +02:00
Yury Semikhatsky
bcf4ff1e47
chore(bidi): update setContent expectations for ff (#32992) 2024-10-08 11:58:01 -07:00
Simon Knott
892d67ffef
feat(test runner): allow stopping testrun with escape (#32584)
Closes https://github.com/microsoft/playwright/issues/32579
2024-10-08 11:39:54 -07:00
Fumiaki MATSUSHIMA
5121b19ac6
fix(codegen): fix unselect issue (#32127)
Fixes https://github.com/microsoft/playwright/issues/31290
2024-10-08 11:38:52 -07:00
Max Schmitt
d0f2170e21
Revert "fix(test): do not allow mixing tests from different types (#29284)" (#33002)
This reverts commit 4784139bb0.

Closes https://github.com/microsoft/playwright/issues/29734
2024-10-08 16:00:40 +02:00
Simon Knott
042161e1ce
Reapply "fix(har timing): record connect timing for proxied connections" (#32855) (#33003)
This reapplies what we reverted in
https://github.com/microsoft/playwright/pull/32989.

Max and me debugged this, and found that the test failures come from
SOCKS proxy now preferring IPv6 over IPv4. We've updated the tests and
made sure that this doesn't mask any breaking change.

I'm enabling CQ1 to make sure we don't oversee any other CI failures.
2024-10-08 14:17:50 +02:00
Max Schmitt
47a889ac48
chore: roll stable-test-runner to 1.48.0-beta-1728384960000 (#33008) 2024-10-08 14:01:45 +02:00
Dmitry Gozman
814f7eb556
test: fix/fixme/update a few tests (#33006) 2024-10-08 03:59:35 -07:00
Simon Knott
1b589c4bd3
Revert "fix(har timing): record connect timing for proxied connections" (#32989)
Reverts microsoft/playwright#32855. This broke two tests on main, and we
don't yet know how to fix it other than downgrading.
2024-10-08 10:13:21 +02:00
Mark
04bf425268
feat(base-reporter): Add tags to test output (#32930) 2024-10-07 17:14:46 -07:00
Pavel Feldman
7047c3a6c6
fix(codegen): do not codegen non-existing fixtures (#32993)
Closes https://github.com/microsoft/playwright/issues/32981
2024-10-07 17:12:36 -07:00
Yury Semikhatsky
6ba5ee3a83
chore(ui-mode): expand all button (#32994)
<img width="230" alt="image"
src="https://github.com/user-attachments/assets/dd7fa3a1-39ec-4b88-9279-d664c9c4e5cd">


Reference https://github.com/microsoft/playwright/issues/32825
2024-10-07 15:42:12 -07:00
Yury Semikhatsky
4ab857ce8e
test: fetch header propagation on redirect (#32970)
Documenting current behavior with and without interception.

Reference https://github.com/microsoft/playwright/issues/32939
2024-10-07 14:06:28 -07:00
Dmitry Gozman
e6afb650be
test: mark a few tests as fixme (#32985) 2024-10-07 02:58:03 -07:00
Max Schmitt
001ba37706
test: update webview2 skipme's (#32984)
This leaves only reasonable skipmes for WebView2 in the code base.
2024-10-07 11:08:07 +02:00
Simon Knott
de4a4d1ce1
fix(har timing): record connect timing for proxied connections (#32855)
Fixes a bug discovered in
https://github.com/microsoft/playwright/pull/32647. When using http
proxy, the `connect` event isn't emitted so we don't populate
`tcpConnectionAt`. The updated version of `https-proxy-agent` emits a
`proxyConnect` as a replacement, so this PR updates and listens to that
event.
For socks proxies, the `on("socket")` event is emitted once the SOCKS
connection is established, which is the equivalent of having a TCP
connection available.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-10-07 09:59:13 +02:00
Dmitry Gozman
b284df984b
test: enable test after chromium roll to 1140 (#32965)
Fixes #32355. Fixed after the last roll #32949.
2024-10-04 09:23:11 -07:00
Dmitry Gozman
9f842da8b3
fix: throw when element handle is detached while waiting for selector (#32961) 2024-10-04 08:23:25 -07:00
Dmitry Gozman
eaeaa0b158
test: remove tests that we are not going to ever fix (#32962) 2024-10-04 08:22:36 -07:00
Dmitry Gozman
34ad67659f
test: remove some fixmes (#32953) 2024-10-04 08:22:27 -07:00
Dmitry Gozman
84b4fd4e40
feat: wait for pending navigation to resolve before many actions (#32899)
This includes all actions that perform locator handler check.
    
Note this makes it impossible to interact with the page while a main
frame navigation is ongoing. This was already the case for Chromium, but
now WebKit and Firefox align with it.

Setting `PLAYWRIGHT_SKIP_NAVIGATION_CHECK` environment variable disables
this behavior.
2024-10-04 07:25:18 -07:00
Simon Knott
ff0c498904
fix(ct-vue): update default slot should work (#32952)
Closes https://github.com/microsoft/playwright/issues/32809

We were writing onto the wrong object.
2024-10-04 14:18:21 +02:00
Max Schmitt
dfa4ab8726
test: speed up only-changed CT test (#32947) 2024-10-04 10:06:56 +02:00
Yury Semikhatsky
d7020cba63
test: scroll mobile page with background-attachment: fixed (#31992)
Reference: https://github.com/microsoft/playwright/issues/31551
Reference: https://github.com/microsoft/playwright/issues/23573
2024-10-03 18:16:49 -07:00
Dmitry Gozman
6b1d0361cd
fix(chromium): reset mouse position upon page reuse (#32944)
Similarly to Firefox, move the mouse to (-1, -1) upon page reuse. This
fixes the corresponding test on all platforms.
2024-10-03 08:09:00 -07:00
Dmitry Gozman
d98fa5da2f
test: update some expectations for headed chromium, unskip tests (#32943) 2024-10-03 07:59:48 -07:00
Dmitry Gozman
0ffac886e8
test: fix android tests (#32932)
One test is removed, since it's impossible to fix. Hopefully, the rest
will pass.
2024-10-03 03:37:43 -07:00
Dmitry Gozman
3c5967d4f5
fix(trace viewer): clear old highlighted elements upon change (#32917)
When the list of highlighted elements changes over time, we should
update the elements marked as `__playwright_target__` in the snapshot.

A good example is an `expect(locator).toHaveText([...])` where the list
of elements changes from 4 items to 3 after clicking a "Delete" button.
2024-10-02 23:48:26 -07:00
Max Schmitt
8715652a0d
devops: don't run codegen tests in trace-events mode (#32810) 2024-10-02 23:22:00 +02:00
Simon Knott
29ffcdfc4e
test(html reporter): filtering by type works (#32931)
The folks who opened
https://github.com/microsoft/playwright/issues/32925 would benefit from
filtering by annotation existence. Turns out we already have it! This PR
adds a test to ensure it stays that way.
2024-10-02 16:29:27 +02:00
Dmitry Gozman
face24dc66
test: unflake/skip a few tests (#32929) 2024-10-02 06:58:21 -07:00
Simon Knott
3a5bf1cc1d
fix(trace viewer): reveal stack for highlighted action (#32919)
Closes https://github.com/microsoft/playwright/issues/32915.

In the `Call` and `Logs` tabs, we update the contents based on the
hovered action. We document that this is also the case for the `Source`
tab:


78054a7652/docs/src/test-ui-mode-js.md (L61-L65)

But it isn't. Not sure if it's a regression or not, but this PR fixes
it.
2024-10-02 13:30:44 +02:00
Simon Knott
208a54529d
fix(ct-react): support shorthand fragment notation (#32900)
Closes https://github.com/microsoft/playwright/issues/32853

Vite turns the shorthand fragment notation `<></>` into `import {
Fragment } from "react"; <Fragment></Fragment>`. On the Node.js side of
things, this `react` import resolves to our mock version of React, which
currently mocks `Fragment` as `{}`. Currently, we pass that straight to
`React.createElement`, which throws an error.

The fix is to make our `Fragment` mock detectable with a tag, and when
we render it replace it with the real `__pwReact.Fragment`.
2024-10-02 11:19:09 +02:00
Dmitry Gozman
773202867d
feat(trace): highlight strict mode violation elements in the snapshot (#32893)
This is fixing a case where the test failed with strict mode violation,
but all the matched elements are not highlighted in the trace.

For example, all the buttons will be highlighted when the following line
fails due to strict mode violation:
```ts
await page.locator('button').click();
```

To achieve this, we mark elements during `querySelector` phase instead
of inside `onBeforeInputAction`. This allows us to only mark from inside
the `InjectedScript` and remove the other way of marking from inside the
`Snapshotter`.
2024-10-02 00:00:45 -07:00
Max Schmitt
daac0ddd24
fix(fetch): fallback to given URL if baseURL is invalid (#32911) 2024-10-01 22:43:32 +02:00
Max Schmitt
c84305ed73
test: retry installation tests up to 3 times (#32910)
Installation tests can fail due to e.g. network issues. Lets align with
library tests and retry up to 3 times.
2024-10-01 13:12:38 -07:00