Commit graph

13140 commits

Author SHA1 Message Date
Max Schmitt a32d04f00e
cherry-pick(1.47): remove old CDNs (#34102) 2024-12-27 13:42:52 +01:00
Yury Semikhatsky 8b3ba3f34e
cherry-pick(#32771): Revert chore: ignore third-party execution conte… (#32773)
…xts (#32437)

Partially revert #32437 and add a test that console.log() messages from
content scripts are properly reported

Fixes https://github.com/microsoft/playwright/issues/32762
2024-09-23 18:05:37 -07:00
Max Schmitt d93029f32f
chore: mark v1.47.2 (#32729) 2024-09-20 19:21:03 +02:00
Pavel Feldman 0c6217a85f cherry-pick(#32699): fix(codegen): use content_frame property in python 2024-09-20 09:21:46 -07:00
Dmitry Gozman f96b487030
cherry-pick(#32714): fix(test runner): page.pause() should enable debug mode (#32722)
Fixes #32706.
2024-09-20 03:21:38 -07:00
Yury Semikhatsky 937424fb59
cherry-pick(#32661): fix(trace-viewer): time delta between local and … (#32663)
…remote actions
2024-09-17 11:43:41 -07:00
Max Schmitt 3d2ffd0fe9
chore: mark v1.47.1 (#32617) 2024-09-13 19:17:37 +02:00
Max Schmitt dba1319300 cherry-pick(#32589): docs: release note fixes for 1.47 2024-09-12 12:52:02 +02:00
Max Schmitt 90f959a11c cherry-pick(#32553): fix(trace-viewer): fix ui issue on network request details 2024-09-12 12:27:40 +02:00
Dmitry Gozman 13e6e48a2b
cherry-pick(#32491): fix(test runner): allow directory imports with path mapping (#32571)
We now hopefully align with `moduleResolution: bundler` tsconfig option,
allowing directory imports in every scenario, and allowing proper module
imports when not going through the type mapping.

This regressed in #32078. Fixes #32480, fixes #31811.
2024-09-12 00:59:57 -07:00
Dmitry Gozman 8762407038
cherry-pick(#32492): Revert "fix(test runner): align with typescript … (#32560)
…behaviour for resolving `index.js` and `package.json` through path
mapping (#32078)"

This reverts commit effb1ae234.

This broke path mapping into directories in ESM mode. References #32480.
2024-09-11 13:09:20 -07:00
Max Schmitt f9145b1a7e cherry-pick(#32516): chore: allow query as string in Python/.NET
https://github.com/microsoft/playwright-python/issues/2497
2024-09-09 15:52:06 +02:00
Simon Knott 2c17b1f0d3
cherry-pick(#32482): docs: update release notes for 1.47 to our changes from yesterday (#32482)
I'll also cherry-pick this into the release branch and update
playwright.dev.
2024-09-06 10:31:40 +02:00
Yury Semikhatsky d5943def35
cherry-pick(#32475): docs: update browsers version in release notes (#32476) 2024-09-05 14:07:57 -07:00
Dmitry Gozman 73fdd2505d
cherry-pick(#32470): feat(chromium): roll to r1134 (#32473) 2024-09-05 13:39:23 -07:00
Simon Knott 13f4531da4
chore: mark 1.47 (#32472) 2024-09-05 17:40:39 +02:00
Simon Knott 0a49c05e2d
chore(test runner): document that --only-changed on CI needs history (#32461)
Closes https://github.com/microsoft/playwright/issues/32452

`--only-changed=$GITHUB_BASE_REF` needs the base ref available locally
to work properly. `fetch-depth: 0` does that, see
https://github.com/actions/checkout?tab=readme-ov-file#fetch-all-history-for-all-tags-and-branches.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-09-05 12:13:09 +02:00
Simon Knott a8139b5d77
docs: add release notes for 1.47 (#32463) 2024-09-05 11:57:14 +02:00
Dmitry Gozman 91012833c6
chore: move 'dev-server' extensibility point to plugin (#32448)
Instead of plumbing it through a custom unspecified config field, make
it a part of plugin interface.

Additionally, use task runner for starting/stopping dev server.
2024-09-05 02:22:27 -07:00
Playwright Service 255143e201
feat(webkit): roll to r2070 (#32451)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-04 20:41:06 +02:00
Yury Semikhatsky 9a2c60a77c
chore: identify largest gaps in Bidi API (#32434)
This pull request introduces initial support for the WebDriver BiDi
protocol in Playwright. The primary goal of this PR is not to fully
implement BiDi but to experiment with the current state of the
specification and its implementation. We aim to identify the biggest
gaps and challenges that need to be addressed before considering BiDi as
the main protocol for Playwright.
2024-09-04 11:36:52 -07:00
Pavel Feldman a87426ee0d
Update bug.yml
Signed-off-by: Pavel Feldman <pavel.feldman@gmail.com>
2024-09-04 09:17:43 -07:00
Kuba Janik ee91bdc585
feat(ui-mode): display list of query params in request tab (#32443) 2024-09-04 07:54:44 -07:00
dependabot[bot] b43915f4cc
chore(deps): bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows (#32436) 2024-09-04 13:05:51 +02:00
Dmitry Gozman 60631409d6
chore: make dev server only use public config (#32441)
In preparation to make it a part of a plugin.
2024-09-04 01:29:55 -07:00
Dmitry Gozman d7393f998e
chore: simplify settings management in UI mode (#32440) 2024-09-04 01:05:07 -07:00
Simon Knott b3d767fa14
fix(trace viewer): fix memory leak (#32379)
In the `visit` method, we currently cache the rendered HTML for every
walked node. This re-use works well for traces that consist mostly of
references to earlier snapshots.
But for traces that don't share much, this is a large memory overhead
and leads to the memory crash documented in
https://github.com/microsoft/playwright/issues/32336. For the algocracks
amongst you, the current memory usage for an html tree $h$ is
$\mathcal{O}(|h| * \text{height}(h))$.

This PR removes that cache from the nodes and replaces it with a
snapshot-level cache, fixing the memory crash.
Traces *without* reference should not see a performance impact from
this.
Traces *with* references will have slower initial rendering, but
re-rendering maintains speed because of the snapshot-level cache.

Closes https://github.com/microsoft/playwright/issues/32336

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-09-04 09:57:15 +02:00
Playwright Service 2fabd15fef
feat(firefox): roll to r1463 (#32439)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-04 08:49:10 +02:00
Yury Semikhatsky d7b9cf21db
chore: ignore third-party execution contexts (#32437)
* Only track main and utility world contexts
* Properly update click metadata
2024-09-03 23:00:59 -07:00
Dmitry Gozman cfae7f755c
chore(test runner): always go through internal reporter (#32426)
This way we guarantee the API contract and do not miss errors because we
forgot to call `onBegin()`.
2024-09-03 22:38:02 -07:00
Pavel Feldman 446ed72878
docs: revert typo (#32433) 2024-09-03 10:18:40 -07:00
Yury Semikhatsky b75483bbb4
Revert "docs: deprecate: Request.serviceWorker() (#32136)" (#32432)
This reverts commit b7ed4d7b9e.
2024-09-03 10:18:20 -07:00
Yury Semikhatsky 565aed6c39
Revert "chore: enforce tags format via typescript types (#32384)" (#32431)
After API review we decided to revert it:
* VSCode extension and UI mode users already get the (runtime) error if
the tag is not prefixed
* The typescript error message is not very nice
* The type change would break those clients that generate tests with
tags passed as string

This reverts commit 90e7b9ebac.
2024-09-03 10:07:08 -07:00
Playwright Service 9f466a1ead
feat(chromium-tip-of-tree): roll to r1256 (#32423)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-03 17:12:54 +02:00
Simon Knott 201bad75d3
chore(test runner): rebase watch mode onto TestServerConnection (#32156)
Closes https://github.com/microsoft/playwright/issues/32076.

This PR rewrites `watchMode.ts` to use `TestServer` under the hood. It's
essentially a complete rewrite, so don't pay too much attention on the
old implementation. Note that there's no changes to tests, so all
behaviour we have specced out there still works.

To make this work without a superfluous WebSocket connection, I had to
refactor `TestServerConnection` a little. Originally, I pulled this into
a [separate PR](https://github.com/microsoft/playwright/pull/32132), but
then realised how small the refactoring is. So it's in this PR now. Let
me know if you'd like to land it separately.
2024-09-03 15:15:44 +02:00
dependabot[bot] 53bf9534ec
chore(deps): bump micromatch from 4.0.5 to 4.0.8 in /packages/playwright/bundles/expect (#32399) 2024-09-03 14:52:52 +02:00
Playwright Service 847d29dd86
feat(webkit): roll to r2069 (#32422)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-03 13:28:15 +02:00
Playwright Service 221b77309c
feat(webkit): roll to r2068 (#32417)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-03 09:54:14 +02:00
Przemyslaw Malolepszy b8c4a477ff
chore(docs): fix APIResponse.headersArray() desc (#32375) 2024-09-03 09:01:01 +02:00
Kevin Jagodic 787da9b5a5
docs(mock): fix routeFromHAR() arguments for Java (#32409) 2024-09-03 08:57:57 +02:00
Playwright Service d145c4c91c
feat(webkit): roll to r2067 (#32415) 2024-09-03 06:59:54 +02:00
dependabot[bot] 7318293355
chore(deps-dev): bump svelte from 4.2.9 to 4.2.19 (#32398) 2024-09-02 15:16:46 +02:00
Simon Knott f62f85ba51
fix(test runner): fix types to allow calling custom matchers on expect.poll (#32407)
The `'should support custom matchers'` test asserts that the
functionality works, but it was a type error. This PR updates the types
so that it's allowed.

Closes https://github.com/microsoft/playwright/issues/32408

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-09-02 13:42:15 +02:00
Playwright Service 5c2e9962b4
feat(chromium-tip-of-tree): roll to r1255 (#32376)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-02 09:54:58 +02:00
Playwright Service d9016e506e
feat(chromium): roll to r1133 (#32391)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-02 09:49:38 +02:00
Simon Knott 3f09d10601
fix(test runner): perform shallow clone check in config directory (#32299)
Our CI operates on shallow clones. In vcs.ts, we perform a check for
shallow clones in `process.cwd()` instead of the test directory. This
makes the test in
3c208aeeff/tests/playwright-test/only-changed.spec.ts (L201)
failing in CI, but only for PRs. The fix is to perform the check on. the
test directory.
2024-09-02 09:11:04 +02:00
Simon Knott cf8c14f884
feat(html reporter): open html attachments in new tab (#32389)
Closes https://github.com/microsoft/playwright/issues/32281.

HTML attachments get a linkified name that opens the attachment in a new
tab.
2024-09-02 08:35:53 +02:00
Kuba Janik a6b320e362
fix(ui-mode): format request body when headers are lower case (#32395)
Resolves https://github.com/microsoft/playwright/issues/32396

Currently, the request body is not formatted when content type header is
lower case (`content-type`). Even though the value is
`application/json`.

It happens because we are looking only for `Content-Type` header
ignoring headers that are lower case.

<img width="674" alt="363197933-5178ec23-b9cf-46b5-8284-e8d4d730b036"
src="https://github.com/user-attachments/assets/0ef01b52-7dd8-4f33-b836-9adb86f94cc9">
2024-08-30 16:21:51 +02:00
Simon Knott ed5c21b827
fix(ui): respect --output param (#32351)
Closes https://github.com/microsoft/playwright/issues/32331

We're already passing the `outputDir` param to the UI, but the UI isn't
passing it back to the TestServer. This PR fixes that. I've added it to
`listTests`, which is requires to that
`TestServerDispatcher#_ignoredProjectOutputs` is populated with the
correct output dir. And i've added it to `runGlobalSetup`, which is what
the bug report was about.
2024-08-30 08:29:49 +02:00
Yury Semikhatsky 90e7b9ebac
chore: enforce tags format via typescript types (#32384)
Leverage [template literal
types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html).

Fixes https://github.com/microsoft/playwright/issues/32382
2024-08-29 14:16:49 -07:00