Commit Graph

4609 Commits

Author SHA1 Message Date
Yury Semikhatsky
193013c9ee
docs(har): default update mode is minimal (#32016)
Update the documentation to match actual behavior.

The actual behavior today:
* Default mode is `full` when `recordHar` is passed to
`browser.newContext`
* Default mode is `minimal` when calling `context.routeFromHAR` and
`page.routeFromHAR`

Reference https://github.com/microsoft/playwright/issues/31983
2024-08-05 11:29:43 -07:00
Yury Semikhatsky
fef27395a5
chore(trace): do not nest API actions based on time (#31990)
They should be properly nested based on Node.js zones now.
2024-08-05 10:06:14 -07:00
Max Schmitt
613ccb8d5b
chore(client-certificates): rewrite error for unsupported PFX errors (#32008) 2024-08-05 14:42:29 +02:00
Max Schmitt
71e614dc5a
fix(client-certificates): report error to the browser if incorrect passphrase (#32007) 2024-08-05 10:54:33 +02:00
Max Schmitt
dbc4bc84d6
fix(trace-viewer): popup snapshot utf-8 support (#32006) 2024-08-05 09:11:31 +02:00
Playwright Service
c54567a46b
feat(webkit): roll to r2056 (#31999)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-05 06:12:38 +02:00
Max Schmitt
d0c840f639
fix(clock): mock time in Event.prototype.timeStamp (#31986)
Ideally we generate the timestamp when the Event gets created. This
patch adds a best-effort logic, since we can't override the constructor
of natively created events, e.g. `MouseEvent`.

Fixes https://github.com/microsoft/playwright/issues/31924
2024-08-02 15:27:54 +02:00
Max Schmitt
878a6a499b
chore: prefer executablePath for page.pause() (#31985)
Motivation: For scenarios where
[`findChromiumChannel`](f17de8222f/packages/playwright-core/src/server/registry/index.ts (L1016))
throws (no branded browser and no normal browser is installed) we were
[silently
catching](f17de8222f/packages/playwright-core/src/server/recorder.ts (L79))
when calling `page.pause()`.

This patch does not invoke `findChromiumChannel` when the
inspectedContext is Chromium based and has an `executablePath`
specified.

Note this was already fixed by #6214, but regressed since then.

Fixes https://github.com/microsoft/playwright/issues/31967
2024-08-02 11:18:51 +02:00
Max Schmitt
f17de8222f
chore: run client-certificate tests in service mode (#31973) 2024-08-02 08:34:28 +02:00
Yury Semikhatsky
db0980a850
chore(fetch): include response text into failOnStatusCode errors (#31978)
Fixes https://github.com/microsoft/playwright/issues/31834
2024-08-01 17:53:43 -07:00
Yury Semikhatsky
5a83fe55bc
chore(trace-viewer): hide status code field for failed request (#31977)
* Hide 'Status Code:' field for interrupted requests that don't have it.
* Clear up previously selected body when showing aborted requests.
* Highlight interrupted requests in red.
2024-08-01 17:26:52 -07:00
Yury Semikhatsky
5a80ddfaf9
chore: remove bright counter from sidebar tab selector (#31975)
Removing the following icon:

![image](https://github.com/user-attachments/assets/d2de2ed0-f66e-4452-8763-aad1b6e7bb79)

HTML `options` element cannot be styled, so just removing the counter in
sidebar mode:

<img width="348" alt="image"
src="https://github.com/user-attachments/assets/d636dca2-5007-41f7-866e-3a0f604d46fc">
2024-08-01 16:18:10 -07:00
Yury Semikhatsky
1074a765e4
fix(trace): do not place expect into unfinished api calls based on time (#31970)
Fixes https://github.com/microsoft/playwright/issues/31959
2024-08-01 14:14:10 -07:00
Max Schmitt
69561a194a
fix(trace-viewer): make 'hide route actions' work for .NET (#31961) 2024-08-01 21:02:47 +02:00
Dmitry Gozman
a541751657
feat(ui mode): linkify attachment names and content (#31960)
- Pass `contentType` to the CodeMirror.
- Support `text/markdown` mode.
- Custom mode for non-supported types that linkifies urls.
2024-08-01 09:27:45 -07:00
Simon Knott
76cca7fc2c
fix(ui): only populate settings once (#31958)
We populate `localStorage` using an init script. Currently, this script
isn't just run for the UI though, but also for all iframes. So we're
resetting `localStorage` every time the UI loads an iframe.

This hasn't been a problem in the past, because the only consumer of
`localStorage`, `Settings`, only read from `localStorage` once and kept
most state in `useState` afterwards. With
https://github.com/microsoft/playwright/pull/31911, this is no longer
true, so the bug starts biting us!

The fix is to ensure the init script isn't run on iframes.
2024-08-01 17:28:48 +02:00
Playwright Service
c858554dca
feat(chromium-tip-of-tree): roll to r1246 (#31951) 2024-08-01 15:13:15 +02:00
Dmitry Gozman
bbe252a3d7
fix(ui mode): api review feedback (#31952)
- Hide "Testing Options" as not ready.
- Update SettingsView margins.
- Include `page.route` and similar methods into "Show route actions".
2024-08-01 05:36:19 -07:00
Playwright Service
6c6f10b678
feat(chromium): roll to r1129 (#31955)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-01 14:32:44 +02:00
Playwright Service
a83134b270
feat(ffmpeg): roll to r1010 (#31949) 2024-08-01 13:17:11 +02:00
Yury Semikhatsky
47714d6559
feat(ui-mode): add annotations tab (#31945)
<img width="867" alt="image"
src="https://github.com/user-attachments/assets/7d714723-1d3f-49b2-944a-0a476d79aee8">

---------

Signed-off-by: Dmitry Gozman <dgozman@gmail.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-08-01 03:43:29 -07:00
Playwright Service
6af2635343
feat(chromium-tip-of-tree): roll to r1245 (#31948)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-01 10:27:02 +02:00
Yury Semikhatsky
62834e314f
chore(trace-viewer): less bright status code icon (#31940)
<img width="182" alt="image"
src="https://github.com/user-attachments/assets/8b381bcc-46e3-45c7-8fd2-e020436d1bff">

<img width="206" alt="image"
src="https://github.com/user-attachments/assets/4ea02b47-a4da-44f7-9c26-13b05374e89d">

<img width="213" alt="image"
src="https://github.com/user-attachments/assets/38b50e2a-f69c-4a78-abb2-2680453fc5fd">
2024-07-31 17:29:05 -07:00
Yury Semikhatsky
0217defab4
chore(trace-viewer): do not shrink metadata view (#31938)
Avoids the following effect:

![image](https://github.com/user-attachments/assets/694de773-acc0-4266-87f2-eab67a3c7ce2)
2024-07-31 16:37:16 -07:00
Yury Semikhatsky
ecd384212d
chore(trace-viewer): copy only file name without line number (#31939)
As discussed in the meeting, copy only file name which is shown in the
same line, do not include highlighted line number.
2024-07-31 15:40:13 -07:00
Dmitry Gozman
e62a54af7a
fix(test runner): do not revert the transform (#31930)
This allows a dynamic import of a TS file to be processed by Babel.

For some reason, Playwright used to revert the CJS transforms. However,
ESM loader and transforms are always active, so CJS should be too.
2024-07-31 13:17:09 -07:00
Yury Semikhatsky
edb89dcb66
chore: make sure error stack includes message as before #31691 (#31934)
This brings stack formatting to how it was prior to
1686e5174d
so that the ports can use it.
2024-07-31 10:58:37 -07:00
Dmitry Gozman
7c55b94280
fix(trace): make sure the correct attachment name is used for downloads (#31928)
When two attachments have the same content sha1, we used the first one's
name for the downloaded file, no matter which one the user clicked to
download. Now we pass the name explicitly.

References #31912.
2024-07-31 06:20:36 -07:00
Simon Knott
daca1681c0
refactor(ui): in splitview component, move sidebar and main from children into named properties (#31925)
Pulled out from https://github.com/microsoft/playwright/pull/31900

I stumbled over `React.Children`, because it's the first time I saw that
used. https://react.dev/reference/react/Children lists `React.Children`
it as "Legacy" and mentions it's uncommon. Also, the fact that SplitView
only displays its first two children, and all others are silently
discarded, can be a surprise to some.

By separating things out into `sidebar` and `main`, not only do we give
the two elements names (otherwise one needs to remember that sidebar is
always the first child), but we also prevent any "third children" from
being dropped.
2024-07-31 12:48:46 +02:00
Simon Knott
99724d0322
refactor(ui): some react refactorings (#31900)
Addresses https://github.com/microsoft/playwright/issues/31863. This PR
is chonky, but the individual commits should be easy to review. If
they're not, i'm happy to break them out into individual PRs.

There's two main things this does:

1. Remove some unused imports
2. Add a `clsx`-inspired helper function for classname templating

I wasn't able to replace `ReactDOM.render` with `ReactDOM.createRoot`.
This is the new recommended way starting with React 18, and the existing
one is going to be deprecated at some point. But it somehow breaks our
tests, i'll have to investigate that separately.
2024-07-31 12:12:06 +02:00
Dmitry Gozman
64fe245297
fix(trace viewer): attachment download (#31920)
- Update attachments tab margins.
- Make sure to pass `&download` in attachment urls. This makes them
downloadable, regressed in #28727.
- Do not additionally list image diffs as screenshots.

Fixes #31912.
2024-07-31 02:29:14 -07:00
Max Schmitt
55187207e4
chore: various roll fixes for .NET (#31914) 2024-07-30 19:09:20 +02:00
Simon Knott
b8b562888e
refactor(ui): synchronize settings via useSyncExternalStore instead of prop drilling (#31911)
Broken out from https://github.com/microsoft/playwright/pull/31900, part
of https://github.com/microsoft/playwright/issues/31863.

Synchronizes different `useSettings` calls via `useSyncExternalStore`.
This saves us from having to drill down settings props everywhere,
without the big refactoring that a `Context` would be.
2024-07-30 17:57:31 +02:00
Simon Knott
8412d973c0
fix(ui): added test in watched file should be run (#31842)
Closes https://github.com/microsoft/playwright/issues/22211

Currently, when the server notifies the UI about changed files, the UI
determines what files to re-run based on an old test list. By listing
tests before that, we make sure that the test list is up-to-date, and
that added tests are included in the next run.

I've also removed the `listChanged` event as discussed in the team sync.
The event isn't used anywhere and fires in exactly the same cases where
`testFilesChanged` fired, so i've folded them into one another. This allowed simplifying `Watcher`.
2024-07-30 14:17:41 +02:00
Playwright Service
947f925443
feat(webkit): roll to r2054 (#31910)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-30 12:24:14 +02:00
Max Schmitt
bd186640df
fix(client-certificates): use matching origin for connections on :443 (#31913)
Motivation: When using client-certificates on a website on port `443`,
we would normalise the user input with `new URL` but still generate a
"bad" representation of the "origin" internally, since the just do
concatenated "host:port".

(The origin doesn't contain the port in case of :443)

We use `clientCertificatesToTLSOptions` in two places:

a) for APIRequestContext, there we pass one from the URL constructor
over and
b) from the socks proxy, there we **now** also pass a "good one" over.

Test plan: We don't want to run the tests on port :443, so only manually
validated the fix.

Relates https://github.com/microsoft/playwright/issues/31906
2024-07-30 12:23:57 +02:00
Max Schmitt
44ce6096bb
feat(html-reporter): add Playwright logo as Favicon (#31908) 2024-07-30 12:02:06 +02:00
Pavel Feldman
58b0c76f20
chore: use soft event emitter (#31868) 2024-07-29 17:11:31 -07:00
Max Schmitt
7e7319da7d
fix(client-certificates): don't use proxy when using BrowserContext.request (#31898) 2024-07-29 16:44:53 +02:00
Dmitry Gozman
f232507afa
feat(ui mode): ui updates (#31894)
- Update copy to clipboard button.
- Reveal test source in the Source tab instead of external editor.
- New button to reveal in the external editor in the Source tab.
- Move the Pick Locator button next to snapshot tabs.
2024-07-29 07:32:13 -07:00
Max Schmitt
f45cf65921
chore: add maxRetries to APIRequestContext.delete (#31893) 2024-07-29 14:39:30 +02:00
Max Schmitt
cc313f3290
fix(client-certificates): error response body Content-Length calculation (#31897) 2024-07-29 14:39:14 +02:00
Playwright Service
1a7d6749da
feat(webkit): roll to r2053 (#31885)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-07-26 20:32:12 +02:00
Playwright Service
7690694677
feat(webkit): roll to r2052 (#31882) 2024-07-26 20:29:31 +02:00
Max Schmitt
e784e2df01
chore: mark 1.47.0-next (#31879) 2024-07-26 17:50:11 +02:00
Max Schmitt
6988194c97
test: unflake contextmenu recorder test (#31749) 2024-07-26 12:43:05 +02:00
Max Schmitt
b214941a01
chore: make it more clear that --only-changed is per file (#31874) 2024-07-26 12:41:33 +02:00
Max Schmitt
47e4e45bc2
chore: update WebKit version to 18.0 (#31873) 2024-07-26 11:32:51 +02:00
Max Schmitt
09581b615d
fix(client-certificates): return target errors on response when using http2 (#31867) 2024-07-26 11:28:45 +02:00
Max Schmitt
81b3c0c402
fix(client-certificates): include socks-certs in npm package (#31872) 2024-07-26 11:04:38 +02:00
Max Schmitt
a02ed38e60
chore: reduce file reads in client-certificates internal TLS server (#31865) 2024-07-25 22:36:25 +02:00
Dmitry Gozman
a41cebc1c9
feat(ui mode): introduce Testing Options and Settings (#31841)
Testing Options control tests, while Settings are UI mode settings.

<img width="298" alt="Screenshot 2024-07-25 at 10 54 22 AM"
src="https://github.com/user-attachments/assets/7b6f5fff-687b-48d1-80b3-d1e6f2a257e8">


These sections are separately expandable, collapsed by default.

<img width="294" alt="Screenshot 2024-07-24 at 2 06 25 PM"
src="https://github.com/user-attachments/assets/5d35ac8c-9289-46ca-aaa2-ebc5419fa0c4">

References #31520.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Simon Knott <info@simonknott.de>
2024-07-25 11:23:43 -07:00
Dmitry Gozman
d8d5289e86
fix(remote): make sure api calls reject before browser is closed (#31858)
Upon calling `browser.close()` or dropping remote connection, make sure
to reject api calls before resolving `browser.close()` and firing a
`disconnected` event.

This change aligns the order guarantee with non-remote case.
2024-07-25 09:57:34 -07:00
Max Schmitt
0c6ecf8df4
chore: use happy eyeballs for client-certificates (#31859) 2024-07-25 18:55:47 +02:00
Playwright Service
d3e2c6cbb2
feat(chromium-tip-of-tree): roll to r1244 (#31856)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-25 18:54:24 +02:00
Max Schmitt
90af289ba2
test: use managed http2 server for client-certificates (#31844) 2024-07-25 18:53:38 +02:00
Simon Knott
b06a95dd75
feat(trace viewer): show baseURL in Metadata pane (#31852)
Resolves https://github.com/microsoft/playwright/issues/31847 by adding
playwright config's `baseURL` value to the `context-options` trace
event, and showing that in the Trace Viewer.

Because the added property is optional, I didn't increment the trace
format version.

I've also considered pulling the `baseURL` from the existing
`browser.newContext` step to get around modifying the trace format, but
that felt pretty hacky.


https://github.com/user-attachments/assets/ecaef747-727d-4937-9ca3-1605ca9907b9

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-07-25 17:14:46 +02:00
Simon Knott
4d4ed2a5c4
chore: enforce single quotes in JSX (#31855)
Discovered in
https://github.com/microsoft/playwright/pull/31852#discussion_r1691133106:
We're not enforcing single quotes for JSX, and it shows! We need to
start enforcing it to prevent even greater damage from being done ;D
2024-07-25 13:06:26 +02:00
Playwright Service
bdbe4795f1
feat(chromium): roll to r1128 (#31848)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-25 09:42:53 +02:00
Max Schmitt
7570c25b3d
chore: remove glob from client-certificate matching (#31846)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-07-24 19:13:03 +02:00
Max Schmitt
c5b7ce86dc
feat(client-certificates): add http2 support (#31786) 2024-07-24 11:39:39 +02:00
Pavel Feldman
c74843a914
chore(fetch): pass flush and finishFlush options to brotli (#31833)
Fixes https://github.com/microsoft/playwright/issues/31814
2024-07-23 18:28:34 -07:00
Pavel Feldman
7735affef4
fix(ui): print the web server output in the ui mode (#31824)
Fixes https://github.com/microsoft/playwright/issues/31300
2024-07-23 16:52:32 -07:00
Yury Semikhatsky
1918ae5c4a
fix(webkit): reenable CrossOriginOpenerPolicy (#31765)
Depends on https://github.com/microsoft/playwright-browsers/pull/1160
Fixes: https://github.com/microsoft/playwright/issues/14043
2024-07-23 15:02:47 -07:00
Max Schmitt
c4862c022c
chore: client certificates api review (#31826) 2024-07-23 22:56:36 +02:00
Yury Semikhatsky
383e4b3c73
Revert "feat: introduce touchscreen.touch() for dispatching raw touch… (#31823)
… events (#31457)"

This reverts commit a3e31fd2c4.
2024-07-23 10:29:37 -07:00
Max Schmitt
b9c4b6bff0
chore: client certificates refactorings (#31822) 2024-07-23 19:18:31 +02:00
Simon Knott
f23d02a211
feat(test runner): --only-changed option (#31727)
Introduces an `--only-changed [base ref]` option.

`playwright test --only-changed` filters the test run to only run test
suites that have uncommitted changes.
`playwright test --only-changed=foo` runs only tests that were changed
since commit `foo`.

In pull request CI, this can be used to run changed tests first and fail
fast: `--only-changed=$GITHUB_BASE_REF`.
During local development, it can be used to quickly filter down to the
touched set of tests suites.
In some rare usecases, this can also help to cut down on CI usage for
pull requests. Tread with caution though.

File dependencies are taken into account to ensure that if you touched a
utility file, all relevant tests are still executed.

Closes https://github.com/microsoft/playwright/issues/15075
2024-07-23 18:04:17 +02:00
Simon Knott
2cc4e14756
fix(core): update maxRetries docs (#31810) 2024-07-23 08:27:27 -07:00
Dmitry Gozman
e86c8af599
chore: rename route fixture in ct (#31817)
Addresses review feedback.
2024-07-23 07:43:28 -07:00
Max Schmitt
526e4118fa
chore: use socks.Duplex constructor instead of extending (#31816) 2024-07-23 15:44:16 +02:00
Simon Knott
bbe5df3f5f
fix(ui): when --grep is used, UI should only show selected tests (#31815)
Closes https://github.com/microsoft/playwright/issues/31617.
2024-07-23 15:29:08 +02:00
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
f104e920e0
fix(client-certificates): pass TLS servername for SNI (#31761) 2024-07-19 12:55:20 +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
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
6a9e60d6a1
fix(ct): import ct* flavour types from ct-core and then from pwt (#31642) 2024-07-16 19:32:51 +02:00