Yury Semikhatsky
7ed60ccf7f
feat(test): step.fail and step.fixme modifiers ( #34042 )
2024-12-17 11:17:22 -08:00
Yury Semikhatsky
76bb01d77c
chore: rephrase suggestion for slow test files ( #34012 )
2024-12-16 13:35:19 -08:00
Simon Knott
512cb36c9b
feat(html): link from attachment step to attachment ( #33267 )
2024-12-16 15:25:32 +01:00
Dmitry Gozman
aa1fe61cc9
fix(list reporter): do not print step location instead of test location ( #34022 )
2024-12-16 10:15:52 +00:00
Max Schmitt
91d4b82dfb
fix(pwt): custom fixture titles in UI Mode / HTML Reporter ( #34009 )
2024-12-13 12:31:38 -08:00
Dmitry Gozman
258881bea1
test: fix should not transform external for newer Node versions ( #34006 )
2024-12-13 17:17:49 +00:00
Simon Knott
dd36de7809
fix(html): encode all stdio attachments ( #33950 )
2024-12-13 12:01:20 +01:00
Pavel Feldman
a25bda6950
chore: allow storing aria snapshots in files ( #33919 )
2024-12-10 11:45:16 -08:00
Dmitry Gozman
0937d2f7b9
fix(types): update types for test.extend ( #33784 )
2024-12-09 08:59:01 -08:00
Simon Knott
4fb6c4ed4c
fix(trace): in indexTree check isVisible before adding to result ( #33797 )
2024-11-28 14:04:34 +01:00
Pavel Feldman
35dd3dd104
chore: use diff for snapshot delta ( #33739 )
2024-11-23 11:39:04 -08:00
Pavel Feldman
971b5da741
chore: introduce update-source-method ( #33738 )
2024-11-22 18:30:35 -08:00
Pavel Feldman
66d9f3acbe
chore: introduce update-snapshots=changed ( #33735 )
2024-11-22 17:41:31 -08:00
Pavel Feldman
e0f0996bbd
chore: climb file tree to git root for patches ( #33722 )
2024-11-21 17:32:07 -08:00
Simon Knott
f1ddd379f3
fix(html): don't conflate file names ( #33600 )
2024-11-20 10:16:33 +01:00
Dmitry Gozman
50c8fbf750
fix(ui mode): do not render anonymous describe ( #33675 )
2024-11-20 00:51:31 -08:00
Simon Knott
5e8b469c1c
fix(test): hide response.* calls from reports ( #33620 )
2024-11-18 13:59:40 +01:00
Max Schmitt
d7d8ab62a2
chore: roll stable-test-runner to 1.49.0-beta-1731772650000 ( #33648 )
2024-11-18 10:21:48 +01:00
Rui Figueira
82c77a5e9e
fix(ui-mode): prevent websocket connection leaks on reload ( #33643 )
2024-11-18 01:03:21 -08:00
Dmitry Gozman
77dee44984
fix(rebase): do not apply multiple rebaselines to the same assertion ( #33629 )
2024-11-15 09:08:31 -08:00
Dmitry Gozman
eaf3536014
fix(trace): afterAll hook should not break tracing with reused context ( #33616 )
2024-11-14 13:24:02 -08:00
Yury Semikhatsky
5203c780ae
feat: step timeout option ( #33560 )
2024-11-13 11:17:54 -08:00
Max Schmitt
eab6447ad9
test: add 'should show errors with causes in the error tab' ( #33577 )
2024-11-13 17:32:32 +01:00
Pavel Feldman
d685763c49
chore: use diff instead of diffmatchpatch ( #33550 )
2024-11-12 14:46:29 -08:00
Dmitry Gozman
33f9c8279c
chore: more aria snapshot fixes ( #33534 )
2024-11-12 02:26:54 -08:00
Pengoose
a501232bf0
fix(expect): adjust normalization for regex values in toHaveText matcher ( #33533 )
2024-11-11 17:19:04 -08:00
Pavel Feldman
649e0e0235
chore: nicer cm widgets for aria ( #33524 )
2024-11-11 09:40:50 -08:00
Max Schmitt
d5ebe285c1
fix(transform): allow import attributes always ( #33527 )
2024-11-11 10:26:13 +01:00
Dmitry Gozman
c29f573243
fix(aria snapshot): assorted fixes ( #33512 )
2024-11-08 10:25:05 -08:00
Yury Semikhatsky
50775698ae
fix: parent step for API calls inside waitForEvent callback ( #33409 )
2024-11-06 17:35:16 -08:00
Yury Semikhatsky
523e50088a
test: do not rely on http://localhost2 dns resolution failure ( #33479 )
2024-11-06 14:20:38 -08:00
Pavel Feldman
2f8a14c6e2
test: cover more aria escaping edge cases ( #33463 )
2024-11-06 08:31:32 -08:00
Simon Knott
f554f42b82
feat(trace viewer): link from attach action to attachment tab ( #33265 )
2024-11-06 10:22:15 +01:00
Pavel Feldman
d4ad520a9b
chore: fix more aria escaping edge cases ( #33460 )
2024-11-05 16:22:02 -08:00
Pavel Feldman
9d94ad152e
chore: dedupe tags in base reporter title ( #33461 )
2024-11-05 16:18:10 -08:00
Pavel Feldman
a655b0bfb3
chrome: aria api review ( #33458 )
2024-11-05 15:23:38 -08:00
Dmitry Gozman
9b2ca93a50
chore: followup to tracing.group ( #33450 )
2024-11-05 04:45:54 -08:00
Simon Knott
8e140a4873
fix(global setup): simplify ordering ( #33444 )
2024-11-05 10:36:29 +01:00
Simon Knott
26a7dd4dd4
chore(reporter): add another surrogate pair test case ( #33428 )
2024-11-05 07:55:17 +01:00
Pavel Feldman
fc0ce7046b
chore: perform e2e rebase test ( #33390 )
2024-11-01 12:25:05 -07:00
Yury Semikhatsky
c95feccce4
chore: support reverse in ansi2html, drop ansi-to-html ( #33389 )
2024-10-31 21:42:06 -07:00
Pavel Feldman
26c2049d5a
chore: treat input value as text in templates ( #33388 )
2024-10-31 20:41:52 -07:00
Pavel Feldman
135ed28740
chore: more yaml escaping tests ( #33387 )
2024-10-31 17:14:11 -07:00
Pavel Feldman
c462e29e73
chore(aria): generate single patch for all baselines ( #33384 )
2024-10-31 15:34:17 -07:00
Pavel Feldman
a2e901e080
chore: generate aria name regex when possible ( #33373 )
2024-10-31 11:25:38 -07:00
Pavel Feldman
676f014b5f
chore: use objects for string aria template notes ( #33371 )
2024-10-30 17:25:51 -07:00
Pavel Feldman
a43b99368e
chore: support aria snapshots in tsx ( #33369 )
2024-10-30 17:25:30 -07:00
Simon Knott
64802fc284
fix(line reporter): wrap chinese characters correctly ( #33322 )
2024-10-30 13:29:31 +01:00
Pavel Feldman
9ce401d44a
chore: suggest aria snapshots w/ regex ( #33334 )
2024-10-29 16:19:08 -07:00
Max Schmitt
9eb4fe5546
feat(pwt): serialize and expose Error.cause from Worker process ( #32833 )
2024-10-29 00:01:59 +01:00
Max Schmitt
19e863191c
test: use 'chrome' for UI mode tests ( #33329 )
2024-10-28 21:56:46 +01:00
Pavel Feldman
4b7c8d8a20
chore: use stable library along with the test runner in ttest ( #33312 )
2024-10-25 23:15:10 -07:00
Pavel Feldman
74e5e5560f
chore: update missing snapshots by default ( #33311 )
2024-10-25 16:13:38 -07:00
Yury Semikhatsky
1e8884621a
chore: unify toHaveScreenshot error formatting ( #33300 )
2024-10-25 12:36:39 -07:00
Pavel Feldman
9707e97867
chore: revert #33228 - it needs a proper review ( #33284 )
2024-10-25 09:36:03 +02:00
Pavel Feldman
ff5f1628dc
chore: allow aria snapshot rebaselines ( #33256 )
2024-10-24 16:49:10 -07:00
Dmitry Gozman
67471cb3c5
test: make a few tests headed/headless agnostic ( #33268 )
2024-10-24 06:03:36 -07:00
Simon Knott
3641e5984f
chore: HMR for Trace Viewer ( #33228 )
2024-10-24 14:34:59 +02:00
Dmitry Gozman
2e01154bb5
feat: screenshot:on-first-failure ( #33266 )
2024-10-24 04:41:35 -07:00
Max Schmitt
0d12fbe002
fix: have more friendly playwright-report error when opening TV via file:// ( #33239 )
2024-10-23 12:19:29 +02:00
Pavel Feldman
2a3d67195d
chore: use aria snapshots in some ui mode tests ( #33212 )
2024-10-21 21:54:06 -07:00
Pavel Feldman
97d26e8166
chore: add aria attribute tests ( #33184 )
2024-10-19 14:23:08 -07:00
Max Schmitt
b1fb4f16a7
chore: hide 'markdown' reporter ( #33140 )
2024-10-18 23:00:05 +02:00
Pavel Feldman
2e8e7a66cd
chore: implement tree w/o list ( #33169 )
2024-10-18 13:50:43 -07:00
Simon Knott
0d63df4875
feat(test runner): allow multiple global setups ( #32955 )
...
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-18 11:03:00 +02:00
Pavel Feldman
29c84a33c3
chore: compute aria text consistently with the role accumulated text ( #33157 )
2024-10-17 17:06:18 -07:00
Pavel Feldman
623a8916f9
chore: implement tree w/o list ( #33167 )
2024-10-17 16:57:45 -07:00
Dmitry Gozman
aa952c1b03
fix(html report): generate test snippets when test dir is non-root ( #33162 )
2024-10-17 08:33:15 -07:00
Pengoose
d10a5e5693
feat(testType): add support for test.fail.only method ( #33001 )
2024-10-16 06:47:23 -07:00
Dmitry Gozman
ecd147ce43
fix(test runner): when sharding with beforeAll, use shards total instead of workers ( #33083 )
...
Otherwise, we might split the `beforeAll`-grouped test group into
`workers` parts instead of `shard.total` parts as the user would expect.
Fixes #33077 .
2024-10-14 13:46:06 -07:00
Yury Semikhatsky
b9cce598dd
fix(screenshot): show image diff inline in errors list ( #32997 )
...
The diff is now shown inline in the errors list.
There are 2 possible failures of toHaveScreenshot
* Previous and actual snapshot mismatch. In this case html report will
show diff between Actual/Previous and have Expected as a separate
screenshot.
* Actual/Previous are equal but they differ from the expected. In this
case html report only contains Actual/Expected images and the diff.
Reference: https://github.com/microsoft/playwright/issues/32341
<img width="1039" alt="image"
src="https://github.com/user-attachments/assets/b458f986-cc25-4721-862c-0cc2c1b01a42 ">
2024-10-10 16:49:17 -07:00
Dmitry Gozman
25dd9b5cd4
feat: config.build.tsconfig ( #33026 )
...
Allows to specify `tsconfig` in the configuration file, which applies to
test files but not the config file itself.
Fixes #32808 .
2024-10-10 01:37:46 -07:00
Simon Knott
892d67ffef
feat(test runner): allow stopping testrun with escape ( #32584 )
...
Closes https://github.com/microsoft/playwright/issues/32579
2024-10-08 11:39:54 -07:00
Max Schmitt
d0f2170e21
Revert "fix(test): do not allow mixing tests from different types ( #29284 )" ( #33002 )
...
This reverts commit 4784139bb0 .
Closes https://github.com/microsoft/playwright/issues/29734
2024-10-08 16:00:40 +02:00
Max Schmitt
47a889ac48
chore: roll stable-test-runner to 1.48.0-beta-1728384960000 ( #33008 )
2024-10-08 14:01:45 +02:00
Dmitry Gozman
814f7eb556
test: fix/fixme/update a few tests ( #33006 )
2024-10-08 03:59:35 -07:00
Mark
04bf425268
feat(base-reporter): Add tags to test output ( #32930 )
2024-10-07 17:14:46 -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
Max Schmitt
dfa4ab8726
test: speed up only-changed CT test ( #32947 )
2024-10-04 10:06:56 +02: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
Simon Knott
c67a7335ab
chore(ui): ensure that --ignore-snapshots is respected ( #32875 )
...
Closes https://github.com/microsoft/playwright/issues/32868 .
The actual fix was already delivered in
https://github.com/microsoft/playwright/pull/32798/files#diff-98ff2ff92b08ca7e8b274abb3ba6b2eec9bab332e340d062cc18ad1dfe505bf2R299 ,
this PR adds a test to ensure we don't regress.
2024-09-30 15:12:37 +02:00
Yury Semikhatsky
728b4814b4
test: fix recently added junit tests ( #32844 )
2024-09-26 19:32:54 -07:00
Yury Semikhatsky
5b85c71722
fix(junit): env variable should take precedence over config ( #32842 )
...
Fixes https://github.com/microsoft/playwright/issues/32826
2024-09-26 15:29:09 -07:00
Dmitry Gozman
6465f0b1bd
test: make sure custom asymmetric matchers work ( #32829 )
...
This adds a test for a regression introduced by #32366 and fixed by
#32795 .
2024-09-26 06:27:37 -07:00
Dmitry Gozman
ff954b58eb
fix(test runner): cleanup DEBUG_COLORS usage ( #32764 )
...
`DEBUG_COLORS` we default to `1`, but we should not do that when it is
already defined to some value supplied by the user.
Closes #32543 .
2024-09-26 03:15:46 -07:00
Yury Semikhatsky
b6783bb18b
fix(ui-mode): respect --tsconfig option ( #32798 )
...
Fixes https://github.com/microsoft/playwright/issues/32797
2024-09-24 19:59:15 -07:00
Pavel Feldman
755edfba5b
chore: fallback expect.extend to legacy ( #32795 )
2024-09-24 14:00:13 -07:00
Max Schmitt
8557b98aee
test: fix CR/LF warning on only-changed tests ( #32772 )
2024-09-24 01:32:36 +02:00
Dmitry Gozman
b3a82bef46
feat: do not record route calls in the trace ( #32723 )
...
These are represented in the network pane instead.
2024-09-21 10:17:59 -07:00
Dmitry Gozman
ace8cb2427
fix(test runner): page.pause() should enable debug mode ( #32714 )
...
Fixes #32706 .
2024-09-20 00:41:16 -07:00
Max Schmitt
2b2a57abad
chore: enable @babel/plugin-syntax-import-attributes all the time ( #32713 )
2024-09-19 16:51:35 +02:00
Max Schmitt
48030a4eff
test: fix test expecations after Node.js 22.9.0 ( #32695 )
2024-09-19 10:52:29 +02:00
Max Schmitt
523ec83cad
chore: move Location type from testReporter.d.ts to test.d.ts ( #32687 )
2024-09-18 16:57:11 +02:00
Simon Knott
443f72dcbe
feat(watch): hide show-report prompt ( #32666 )
...
Closes https://github.com/microsoft/playwright/issues/32665
2024-09-18 08:17:13 +02:00
오소현
8761dafc73
feat(test runner): allow to pass arbitrary location to test.step ( #32504 )
...
Fixes https://github.com/microsoft/playwright/issues/30160
### Description:
This pull request introduces the ability to specify custom locations for
test steps in Playwright. By enabling the provision of arbitrary
locations to the test.step method, it resolves the limitation where
helper methods obfuscate the original call site, providing more accurate
and meaningful location data in test reports.
### Motivation:
To enhance the utility and clarity of test reports in Playwright.
Specifically, it addresses the need to trace test steps back to their
precise location in the code, which is especially important when steps
are abstracted in helper functions. This feature is crucial for
maintaining accurate documentation and facilitating debugging processes.
### Changes:
Added functionality to pass a custom location object to test.step.
### Expected Outcome:
This PR is expected to significantly improve the precision and
usefulness of diagnostic data in test reports by allowing specific
locations within helper functions to be accurately documented. It
facilitates better tracking of test executions and simplifies the
debugging process, making it easier for developers to understand and
address issues within complex tests.
### References:
Closes https://github.com/microsoft/playwright/issues/30160 -
"[Feature]: allow to pass arbitrary location to test.step"
**Code Check**
I conducted tests on this new feature by integrating it into some
existing test codes, and it worked well. I will attach the code used for
testing and a screenshot showing the successful outcome.
<details>
<summary>toggle dropdown</summary>
<div markdown="1">
```
import type { Location } from '../../../packages/playwright/types/testReporter'
...
test('should respect the back button', async ({ page }) => {
await page.locator('.todo-list li .toggle').nth(1).check();
await checkNumberOfCompletedTodosInLocalStorage(page, 1);
...
await test.step('Showing active items', async () => {
await page.getByRole('link', { name: 'Active' }).click();
}, {location});
```
<img width="1109" alt="image"
src="https://github.com/user-attachments/assets/359feafa-0949-4c71-9426-46debef21bdd ">
</div>
</details>
2024-09-17 08:11:21 -07:00
Simon Knott
f6219e6e79
Revert "feat(tracing): add .pwtrace to trace file extension" ( #32648 )
...
Reverts microsoft/playwright#32581
Relates
https://github.com/microsoft/playwright/issues/32226#issuecomment-2351164727
2024-09-17 15:32:30 +02:00
Simon Knott
ec2ae1ed2d
feat(watch mode): buffer mode ( #32631 )
...
Closes https://github.com/microsoft/playwright/issues/32578 .
Adds a buffer mode that can be toggled by pressing <kbd>b</kbd>. When
engaged, changed test files are collected and shown on screen. The test
run is then kicked off by pressing <kbd>Enter</kbd>.
This changes the signal to start a test run from <kbd>Cmd+s</kbd> to a
<kbd>Enter</kbd> press in the test terminal. It should help users with
auto-save and make it easier to run on long-running tests. It feels very
similar to running `npx playwright test`, but without having to write a
filter.
https://github.com/user-attachments/assets/71e16139-9427-4e90-b523-8d218f09ed9d
2024-09-17 08:45:44 +02:00
Dmitry Gozman
268357238a
fix(expect): respect custom message in expect.poll ( #32603 )
...
Fixes #32582 .
2024-09-16 00:10:06 -07:00
Simon Knott
aeb4d182f7
feat(tracing): add .pwtrace to trace file extension ( #32581 )
...
Closes https://github.com/microsoft/playwright/issues/32226
I've updated every mention of `.trace.zip` except for the release notes.
2024-09-14 10:17:07 +02:00
Simon Knott
9bb1c86f93
feat(test runner): don't run tests on --watch start ( #32583 )
...
Closes https://github.com/microsoft/playwright/issues/32580 .
2024-09-13 17:24:38 +02:00