Commit Graph

12872 Commits

Author SHA1 Message Date
Playwright Service
d5a77c0f0b
feat(chromium-tip-of-tree): roll to r1243 (#31812)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-23 15:22:06 +02:00
Andrey Lushnikov
d23ea26947
feat(firefox): roll Firefox & Firefox-Beta to 1458 (#31807)
Fixes https://github.com/microsoft/playwright/issues/31525
Closes https://github.com/microsoft/playwright/pull/31806
Closes https://github.com/microsoft/playwright/pull/31805
2024-07-23 10:37:00 +02:00
Simon Knott
1408a45595
chore(ct): remove suite dependency by connecting dependency graphs at read time, not write time (#31794)
Broken out of https://github.com/microsoft/playwright/pull/31727 as per
@dgozman's
[request](https://github.com/microsoft/playwright/pull/31727#discussion_r1685793229).

The PR goal is to remove the `suite` argument from the Component
testing's Vite Plugin. `suite` is used to enrich Vite's dependency graph
with information about dependencies between test suites and helper
files. It essentially merges the Vite graph with the
`compilationCache.ts > fileDependencies` graph, and then writes the
result back into `compilationCache.ts > externalDependencies`.

By refactoring this to make the connection on the reading end in
`collectAffectedTestFiles`, we can drop the `suite` parameter.

We didn't yet have a test that depended on the dependency graph being
connected correctly between `fileDependencies` and
`externalDepedencies`, so I've [extended an existing
test](53a539938b)
to capture that.
2024-07-23 10:19:58 +02:00
Pavel Feldman
cf1a313a0c
chore: allow empty string in regex patterns (#31804) 2024-07-22 13:02:12 -07:00
Dmitry Gozman
d87cb7a303
feat(trace viewer): allow hiding route actions (#31726)
Adds a new settings tab above the actions list.

<img width="307" alt="settings tab"
src="https://github.com/user-attachments/assets/792212b7-e2fd-4a5c-8878-654e2e060505">

Toggling the "Show route actions" checkbox hides all route calls:
`continue`, `fulfill`, `fallback`, `abort` and `fetch`.

References #30970.
2024-07-22 11:34:34 -07:00
Yury Semikhatsky
e269092ef9
Revert "fix: add 'window-management' to chromium browser (#31687)" (#31801)
This reverts commit 0aa2f06f68.

Discussed the new permission in the API review and decided not to
proceed with the feature as we are not ready to commit to supporting it
yet:
* the API is Chromium specific
* the API is still experimental
* there is no clarity to what extend the screen manipulation APIs will
work in old headless which is our main test environment

We'll keep an eye on the demand for the feature and may get back to
implementing it in the future.

Reference: https://github.com/microsoft/playwright/issues/27198
2024-07-22 11:27:12 -07:00
Yury Semikhatsky
bef87849e3
chore: show error when opening newer trace with old viewer (#31781)
Reference: https://github.com/microsoft/playwright-java/issues/1617
2024-07-22 08:16:25 -07:00
Josh Soref
7abbbd0c84
docs: spelling (#31779)
Fixes misspellings identified by the [check-spelling
action](https://github.com/marketplace/actions/check-spelling).

The misspellings have been reported at
https://github.com/jsoref/playwright/actions/runs/10015023629#summary-27685777352

The action will report that the changes in this PR would make it happy:
https://github.com/jsoref/playwright/actions/runs/10015023971#summary-27685778305

---

I understand that the commit messages will need to be reworded to match
house style. For the time being, these are merely noting the changes
they contain so that when I rebase or need to drop things, I can. --
I've already rebased once as someone fixed one of the items that my
draft work was going to fix.

---

## Testing
* The tests _mostly_ passed when I managed to trigger them, but there
were a handful of things that I didn't quite understand
* There are a large number of warnings relating to a bad interaction
between any workflow that uses this local action
b535139b32/.github/actions/run-test/action.yml (L74-L80)
and the action it calls -- I've opened Azure/login#474 asking them to
refactor their action so that it doesn't cause so much noise while
running this repository's tests
* I'm vaguely curious as to why this repository has a `branch`
constraint for its `pull_request` events in its workflows -- that
constraint gave me a number of additional headaches while trying to
prepare this branch for this PR.

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-07-22 06:45:22 -07:00
Playwright Service
af3d2ba9fe
feat(webkit): roll to r2048 (#31778)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-20 14:27:41 +02:00
Dmitry Gozman
b535139b32
fix(trace viewer): library-only trace should not merge actions (#31768)
Without `wallTime`, actions are matched by `actionName:undefined` and
all actions with the same are merged.

Fixes #31764.
2024-07-19 11:18:22 -07:00
Max Schmitt
b8546eb35e
test: unflake client-certificate WebKit tests (#31776) 2024-07-19 15:08:04 +02:00
Simon Knott
b269ceb773
chore(policy files): Update SECURITY.md to V0.0.9 (#31775)
Prompted by https://github.com/microsoft/playwright/pull/31738. There's
an updated `SECURITY.md` at
https://github.com/microsoft/repo-templates/blob/main/shared/SECURITY.md.
This PR pulls that into Playwright.

Signed-off-by: Simon Knott <info@simonknott.de>
2024-07-19 14:56:32 +02:00
Max Schmitt
f570c747d5
test: unskip har http2 test on WebKit Windows (#31774) 2024-07-19 13:44:56 +02:00
Max Schmitt
f104e920e0
fix(client-certificates): pass TLS servername for SNI (#31761) 2024-07-19 12:55:20 +02:00
Max Schmitt
0ecae56750
test: unflake 'should have ignoreHTTPSErrors=false by default' (#31771) 2024-07-19 12:04:12 +02:00
Yury Semikhatsky
d007ff3b62
chore: make WKInterceptableRequest._requestId private (#31762)
With COOP navigation we may need to take over request in the new
provisional page where it will have different id. This is preparation to
that.
2024-07-18 15:19:53 -07:00
Max Schmitt
708def8804
fix(client-certificates): keep ignoreHTTPSErrors false by default (#31760) 2024-07-18 22:37:11 +02:00
Max Schmitt
6dbc7b54e8
feat(ui-mode): highlight console message in timeline on hover (#31756) 2024-07-18 16:39:40 +02:00
Playwright Service
097f28def9
feat(chromium-tip-of-tree): roll to r1242 (#31751)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-18 14:46:42 +02:00
Playwright Service
26c9478648
feat(chromium): roll to r1127 (#31755)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-18 14:46:19 +02:00
Max Schmitt
297b1a8afe
test: move page-clock tests into library/ tests folder (#31752) 2024-07-18 14:45:45 +02:00
Max Schmitt
453e3bdf9d
test: fix client-certificates tests on Windows (#31750) 2024-07-18 13:43:56 +02:00
Dmitry Gozman
e78ce8521d
feat(chromium-tip-of-tree): roll to r1241 (#31748)
Closes https://github.com/microsoft/playwright/pull/31650
Closes https://github.com/microsoft/playwright/pull/31705
Relates https://github.com/microsoft/playwright/issues/31747
2024-07-18 12:11:03 +02:00
Dmitry Gozman
056997c41f
fix(toHaveScreenshot): attach "expected" when writing a missing expectation (#31745)
Previously, only the "actual" attachment was created, pointing to the
file in `test-results`. Now, the "expected" attachment pointing to the
file in `__screenshots__` is also created. This will help any reporters
that would like to know the "expected" path, for example to do a manual
accept/decline of the baseline.

Fixes #30693.
2024-07-18 02:42:44 -07:00
Dmitry Gozman
6491e5b415
chore: deprecate/remove noWaitAfter from some actions (#31739)
The following actions keep `noWaitAfter` option: `click`, `selectOption`
and `press`.

All other actions that used to have `noWaitAfter` now behave like it was
set to true, not waiting for follow-up navigations. In the docs, this
option is marked as completely ignored.

A small logic change was made to compensate for this behavior: when
waiting for the `hitTargetInterceptor`, we now race it against
navigations to avoid stalling when navigation stalls. Previously,
waiting for the interceptor was disabled when `noWaitAfter` was passed,
and since it's impossible to pass this option now, we mitigate by never
stalling instead.

Fixes #31469.
2024-07-18 00:19:08 -07:00
Matt Kleinsmith
e06481a332
fix(recorder): address custom context menus (#31634) 2024-07-17 11:45:48 -07:00
Playwright Service
3cb41739a0
feat(firefox-beta): roll to r1457 (#31733)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-17 18:33:47 +02:00
Yury Semikhatsky
3f15fe8518
feat(reporter): links in attachment names, attachments name only (#31714)
* Allow calling `test.info().attach('My text');` without options (no
path nor body).
* Highlight links in attachment names:

<img width="992" alt="image"
src="https://github.com/user-attachments/assets/770e7876-3e43-4434-8cf1-194ad6ae5819">

Fixes https://github.com/microsoft/playwright/issues/31284
2024-07-17 09:30:49 -07:00
Dmitry Gozman
f4399f7f06
fix(toHaveScreenshot): sanitize attachment names and paths (#31712)
... unless an array of file-system-friendly parts is provided.

Motivation: attachment name is used as a file system path when
downloading attachments, so we keep them fs-friendly.

References #30693.
2024-07-17 07:08:43 -07:00
Simon Knott
8eab28d858
fix(list reporter): print step ends in non-TTY mode (#31703)
When used in a terminal, the `list` reporter prints out information
about test steps to help debugging. In non-TTY environments like GitHub
Actions, currently it doesn't.

This PR changes that, so that in non-TTY environments you'll see the
"step end" messages appearing, but not the "step begin" messages. This
is a good middleground, because it helps the user understand test
progress, without being too verbose.

Closes https://github.com/microsoft/playwright/issues/31674
2024-07-17 13:36:37 +02:00
Max Schmitt
ed6abf86c7
fix(expect): throw unsupported error when using this.equals() in expect (#31723) 2024-07-17 13:22:00 +02:00
Max Schmitt
e11c0c0cbb
fix(connect): annotate internal api calls correctly (#31715) 2024-07-17 09:00:47 +02:00
Max Schmitt
3694c1422d
Revert "test: rebase golden snapshots on Chromium macOS arm64 (#31344)" (#31711)
This reverts commit 02416877da.

Since we landed
3127571b24
- we should revert this one as well.
2024-07-16 21:16:55 +02:00
Max Schmitt
bb2e9d1175
chore: make 'npm run clean' ignore .DS_Store (#31710) 2024-07-16 20:55:12 +02:00
Max Schmitt
6a9e60d6a1
fix(ct): import ct* flavour types from ct-core and then from pwt (#31642) 2024-07-16 19:32:51 +02:00
Yury Semikhatsky
8021312c99
chore: enable notification permission tests in WebKit (#31699)
The Notifications API has been supported in WebKit since 2022, enable
related permission and tests.
2024-07-16 09:44:38 -07:00
Max Schmitt
f66f5b800e
docs: fix broken anchor links (#31707) 2024-07-16 16:11:20 +02:00
Max Schmitt
7ce9b7e56b
fix(setInputFiles): throw when uploading file in directory upload (#31706) 2024-07-16 15:55:35 +02:00
damar Zaky
96e0a96ac1
docs: fix grammar and typos in various files (#31678)
- docs/src/best-practices-js.md
- docs/src/codegen.md
- docs/src/debug.md
- docs/src/events.md
- docs/src/library-js.md
- docs/src/locators.md
- docs/src/other-locators.md
- docs/src/test-components-js.md
- docs/src/trace-viewer.md

---------

Signed-off-by: damar Zaky <damzaky@gmail.com>
2024-07-16 06:15:25 -07:00
Playwright Service
a5ca9b7d37
feat(webkit): roll to r2047 (#31701)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-16 08:28:58 +02:00
Yury Semikhatsky
37ffbd757e
chore: remove unused project to id mapping from html builder (#31698) 2024-07-15 14:35:11 -07:00
Ismael Onilearan
0aa2f06f68
fix: add 'window-management' to chromium browser (#31687) 2024-07-15 14:34:57 -07:00
Yury Semikhatsky
de39d227f7
chore: linkify urls in attachments body (#31673)
Reference: https://github.com/microsoft/playwright/issues/31284
2024-07-15 12:20:22 -07:00
Max Schmitt
d463d1f285
fix(snapshotter): allow rendering of & in STYLE tags (#31627)
Fixes https://github.com/microsoft/playwright/issues/31607
2024-07-15 17:33:22 +02:00
Max Schmitt
950875f0db
fix(docs): index all deeply nested types (#31690) 2024-07-15 16:35:15 +02:00
Simon Knott
58bcdde956
docs(contributing): some updates to recommended test commands (#31693)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-07-15 16:32:50 +02:00
Dmitry Gozman
6ee8f1de2d
Revert "chore: move artifacts recording to TestLifecycleInstrumentation (#30935)" (#31686)
This reverts commit ba5b460444.
2024-07-15 07:01:51 -07:00
Dmitry Gozman
1686e5174d
chore: allow evaluating Error objects (#31691)
Previously, Error objects were replaced with strings.
Now, Error objects are reconstructed back from the serialized value.
2024-07-15 05:47:40 -07:00
Dmitry Gozman
074cc7d467
Revert "feat(trace): record trace upon browser closure (#31563)" (#31677)
This reverts commit bc27ca225e. Considered
too risky.
2024-07-15 01:08:51 -07:00
Yury Semikhatsky
1b4d9003c6
fix(har): ignore boundary when matching multipart/form-data body (#31672)
Fixes https://github.com/microsoft/playwright/issues/31495
2024-07-12 16:59:48 -07:00