Commit Graph

13398 Commits

Author SHA1 Message Date
Dmitry Gozman
814f7eb556
test: fix/fixme/update a few tests (#33006) 2024-10-08 03:59:35 -07:00
Playwright Service
5b29ead6f0
chore(driver): roll driver to recent Node.js LTS version (#33005)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-08 12:53:38 +02:00
Dmitry Gozman
0f2cbdedac
fix(routeWebSocket): do not show in the trace (#32991) 2024-10-08 02:47:24 -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
Aaron Sherwood
4d13677ebd
chore: add Devuan OS fallback to Debian (#32990) 2024-10-07 23:24:18 +02: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
Yury Semikhatsky
4fe33db392
docs(route): header override propagation (#32971)
Fix https://github.com/microsoft/playwright/issues/32939
2024-10-07 13:52:55 -07:00
Simon Knott
9a6f03eb87
fix(fetch): listener leaks on Socket (#32956)
Closes https://github.com/microsoft/playwright/issues/32951

`node:http` reuses TCP Sockets under the hood. We weren't cleaning up
our listeners, leading to the `MaxListenersExceededWarning`.

This PR adds cleanup logic. It also raises the warning threshhold, so
that it doesn't trigger until there's 100 concurrent requests over the
same socket.
2024-10-07 18:43:25 +02:00
Simon Knott
d3fbf1aaeb
fix(clock): amend setSystemTime docs (#32901)
As discussed yesterday over
https://github.com/microsoft/playwright/issues/32807. Adds some words to
differentiate `setSystemTime` from `setFixedTime`.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-07 12:12:12 +02: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
Bruno
317ddd4117
docs(best practices): tabs with yarn and pnpm commands added (#32980) 2024-10-07 10:48:30 +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
Max Schmitt
ddeabdf770
devops: speculative fix for flakiness dashboard data loss (#32963) 2024-10-04 18:47:35 +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
Simon Knott
40670e6ffd
fix(emulate media): document "no-preference" as deprecated (#32881)
Closes https://github.com/microsoft/playwright/issues/32862.

`prefers-color-scheme: no-preference` was removed from browsers. This PR
marks it as deprecated in our docs and removes all mentions.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-04 16:49:32 +02:00
Simon Knott
80ff7c396a
chore(docs): fix code highlighting (#32927)
Closes https://github.com/microsoft/playwright/issues/32921

This is the diff when rolling to `playwright.dev` locally:
<img width="1262" alt="Screenshot 2024-10-02 at 14 54 42"
src="https://github.com/user-attachments/assets/aade7ad4-420c-48c4-a2c9-03fe815a3959">

---------

Signed-off-by: Simon Knott <info@simonknott.de>
2024-10-04 16:38:13 +02:00
Simon Knott
6be97f34dd
docs(test-reporters): replace reporter showcase with list of interesting OSS implementations (#32896)
As discussed yesterday, this PR replaces the "reporter showcase" with a
list of interesting implementations for folks who are writing their own
custom reporters.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
2024-10-04 16:29:13 +02: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
1b457b1ff8
fix(html reporter): render annotation newlines (#32948)
Closes https://github.com/microsoft/playwright/issues/32925. Before this
change, newlines in annotation descriptions weren't respected. This
change makes them shown. Here's how it looks for this annotation:

```ts
test.info().annotations.push({
  type: 'user story',
  description: '\n- user goes to the page\n- user clicks the button\n- user sees the result',
});
```

Before:

<img width="1071" alt="Screenshot 2024-10-04 at 09 55 15"
src="https://github.com/user-attachments/assets/89e74ff5-ea83-48da-a33b-833423916d95">

After:

<img width="1031" alt="Screenshot 2024-10-04 at 09 51 08"
src="https://github.com/user-attachments/assets/0f2914e8-bd88-4970-aa68-6a5a9828295c">
2024-10-04 14:18:38 +02: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
Dmitry Gozman
10d6812058
chore: clear pendingDocument() for the same-document navigation (#32954)
WebKit notifies about a pending same-document navigation through
`Page.frameScheduledNavigation`, and committing it should clear the
`pendingDocument()`.

Extracted from #32899.
2024-10-04 04:54:56 -07:00
Max Schmitt
895be9f8de
chore: lint java docs snippets (#32945) 2024-10-04 11:34:04 +02:00
Playwright Service
0a45549533
feat(chromium): roll to r1140 (#32949)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-04 11:14:08 +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
Playwright Service
076a6e84a1
feat(chromium-tip-of-tree): roll to r1266 (#32942)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-03 16:03:30 +02: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
Playwright Service
616425a0fb
feat(firefox): roll to r1465 (#32938) 2024-10-03 08:25:44 +02:00
Max Schmitt
8715652a0d
devops: don't run codegen tests in trace-events mode (#32810) 2024-10-02 23:22:00 +02:00
Yury Semikhatsky
d7651b8f56
chore(bidi): disable firefox tracing on CI (#32935)
Disabling as it produces [too much
output](https://github.com/microsoft/playwright/pull/32908#issuecomment-2387914821).
2024-10-02 11:16:56 -07: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
Max Schmitt
31a4a74598
chore: do not create a GitHub Status Check for merge results (#32928) 2024-10-02 15:23:42 +02: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
Max Schmitt
6373fe703d
docs: fix Java/.NET types for docs rolling (#32924) 2024-10-02 13:27:56 +02:00
Max Schmitt
67c37cf813
docs(ci): recommend noble instead of jammy (#32923) 2024-10-02 13:12:11 +02:00
Viet Nguyen Duc
dbf7976dd8
docs(selenium): update docker image tag in feat Playwright connect Selenium Grid (#32777) 2024-10-02 11:34:05 +02:00
Simon Knott
6ccaad3a1b
chore: call out that that the vscode extension is for Node.js (#32882)
In https://github.com/microsoft/playwright/issues/32861, an interested
.NET user wanted to try Playwright and found the VS Code Getting Started
guide. It didn't work for them because the VS Code Extension is for
usage with Node.js, and they don't have NPM installed. We can reduce
confusion by mentioning that VS Code Getting started is for Node.js.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
2024-10-02 11:19:51 +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
Playwright Service
0fd9452127
feat(webkit): roll to r2084 (#32912)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-02 09:02:32 +02:00