Commit graph

3435 commits

Author SHA1 Message Date
Simon Knott 9a32dad948
pull writeFiles into tests 2024-07-23 11:02:49 +02:00
Simon Knott 6ec936f808
address most of the review 2024-07-23 11:02:48 +02:00
Simon Knott ffc3f7fc99
revert some more unneeded changes 2024-07-23 11:02:48 +02:00
Simon Knott 38a16c5738
remove windows crlf change and mark tests as slow 2024-07-23 11:02:47 +02:00
Simon Knott f530806c93
try setting it locally 2024-07-23 11:02:27 +02:00
Simon Knott 226e00b61c
CRLF on windows 2024-07-23 11:02:26 +02:00
Simon Knott 93983476f8
understand nested dependencies 2024-07-23 11:02:26 +02:00
Simon Knott b618a613ea
fix it 2024-07-23 11:02:23 +02:00
Simon Knott 76e63c4bc6
refactor 2024-07-23 11:01:32 +02:00
Simon Knott a11e7fb071
write down plan 2024-07-23 11:01:32 +02:00
Simon Knott fbcfdb5df2
show that component dependencies aren't yet understood 2024-07-23 11:01:31 +02:00
Simon Knott 5bdeb38a80
disallow --only-changed in UI mode 2024-07-23 11:01:31 +02:00
Simon Knott a5d7ca17ae
remove CI smartypants 2024-07-23 11:01:30 +02:00
Simon Knott ab05bbf9c8
untracked and tracked files need to be treated differently 2024-07-23 11:01:29 +02:00
Simon Knott 359edf9c0f
treat edge case of calling it in subdirectory 2024-07-23 11:01:29 +02:00
Simon Knott f672d6dcf1
add test about component tests 2024-07-23 11:01:28 +02:00
Simon Knott 822c4cb2ad
remove BASE_REF in CI 2024-07-23 11:01:28 +02:00
Simon Knott 9fb7f13bfc
set local commit identity 2024-07-23 11:01:28 +02:00
Simon Knott 5d2da71fb8
also check CI env var 2024-07-23 11:01:27 +02:00
Simon Knott 5b758230d4
add nice error message 2024-07-23 11:01:27 +02:00
Simon Knott 5cb24de3ac
add test for watch mode 2024-07-23 11:01:26 +02:00
Simon Knott 0cbfd3470a
test more complex dependency graph 2024-07-23 11:01:26 +02:00
Simon Knott 72d7c86290
make it understand dependency structure 2024-07-23 11:01:26 +02:00
Simon Knott 824bea2aa0
refactor tests 2024-07-23 11:01:25 +02:00
Simon Knott d907883518
detect base ref from environment variables 2024-07-23 11:01:25 +02:00
Simon Knott 2d9a299d66
allow comparison against base commit 2024-07-23 11:01:24 +02:00
Simon Knott 30447b14f4
support changed files 2024-07-23 11:01:24 +02:00
Simon Knott da65da5d79
feat(test runner): --only-changed 2024-07-23 11:01:22 +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
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
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
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
Max Schmitt 708def8804
fix(client-certificates): keep ignoreHTTPSErrors false by default (#31760) 2024-07-18 22:37:11 +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 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
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