Commit Graph

1707 Commits

Author SHA1 Message Date
Pavel Feldman 319f4630de
chore: do not compute git diff on PRs (#35062) 2025-03-05 20:43:27 -08:00
Pavel Feldman 1423d0f8a7
chore: rename to copy prompt (#35057) 2025-03-05 13:07:52 -08:00
Simon Knott f44cd3050b
chore(ui): hide top-level attach actions (#35040) 2025-03-05 15:37:25 +01:00
Dmitry Gozman 3773a73855
chore: roll stable test runner to 1.51.0-beta-1741166263000 (#35042) 2025-03-05 13:18:58 +00:00
Pavel Feldman 78fa911756
chore: improve prompt to use code frame and inline error (#35032) 2025-03-04 19:28:03 -08:00
Adam Gastineau d6a4c1cda4
chore: restore to.have.url matching via injected script (#35027) 2025-03-04 11:52:59 -08:00
Simon Knott 88623ae3c2
refactor: store copy prompt contents in attachment (#34995) 2025-03-04 17:20:36 +01:00
Pavel Feldman ee2a5264ad
chore: do not show other metadata in html report (#35001) 2025-03-03 15:28:18 -08:00
Pavel Feldman 85c6405093
chore: differentiate test.skip and step.skip (#35002) 2025-03-03 15:27:56 -08:00
Christopher Tangonan c22c10f7d8
feat(json-reporter): added parallelIndex to TestResult (#34740) 2025-02-28 10:00:51 -08:00
Pavel Feldman e033e5aa11
chore: move captureGitInfo back into config (#34961) 2025-02-28 07:33:03 -08:00
Simon Knott 6dcb7d2bf5
chore: remove pageSnapshot option (#34962)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-02-28 13:16:58 +01:00
Simon Knott 2573a80893
chore: change recommended snapshot extension to .aria.yml (#34963) 2025-02-28 10:03:39 +01:00
Simon Knott 44712fb8eb
test: windows clipboard contains \r\n (#34966) 2025-02-28 09:37:48 +01:00
Adam Gastineau 67d6f7f603
chore: temporarily disable floating promise warning messages (#34957) 2025-02-27 12:45:30 -08:00
Simon Knott a1146fd4a3
chore: copy as prompt in ui should have codeframe (#34943)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-02-27 15:50:46 +01:00
Pavel Feldman 58db3f7e3f
chore: restore pr title in html report (#34937) 2025-02-26 19:22:31 -08:00
Pavel Feldman cd23a224f6
chore: another iteration on gitCommit/gitDiff props (#34926) 2025-02-26 08:40:30 -08:00
Simon Knott 17c4d8e5ec
chore: change generated filename for `toMatchAriaSnapshot` from `.yml` to `.snapshot.yml` (#34931)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-02-26 16:29:56 +01:00
Simon Knott a04a93c1fd
chore: change pageSnapshot extension to `.snapshot.yml` (#34930) 2025-02-26 14:27:17 +01:00
Yury Semikhatsky aaac9923fd
fix: disable global timeout when debugging (#34922) 2025-02-25 11:33:15 -08:00
Pavel Feldman 411f938296
chore: clean up git commit metadata props and UI (#34867) 2025-02-25 09:21:17 -08:00
Simon Knott 9e38473309
fix(runner): hide `APIResponse.*` calls from results (#34909) 2025-02-25 14:26:54 +01:00
Pavel Feldman 325fe71bb9
chore: minor html report polish (#34864) 2025-02-21 13:49:23 -08:00
Max Schmitt 132d93151c
test: replace setTimeout with builtinSetTimeout in UI mode test (#34885) 2025-02-21 07:38:24 -08:00
Max Schmitt 428f196036
test: have typed RunResult.results (#34883) 2025-02-21 14:22:59 +01:00
Adam Gastineau 33c0a1b0ca
chore: add floating promise warning to hooks (#34861) 2025-02-20 10:46:49 -08:00
Simon Knott bb8e914294
feat(ui): collapse repeating console lines (#34857) 2025-02-20 14:48:20 +01:00
Simon Knott aca3fb275b
fix(runner): validate `config.tsconfig` (#34849) 2025-02-20 09:11:50 +01:00
Simon Knott 1f1e2acf9b
chore: rename prompt button (#34851) 2025-02-19 14:32:58 -08:00
Adam Gastineau f5b8cca1eb
feat: Warn on floating promises (#34845) 2025-02-19 10:11:04 -08:00
Simon Knott a3e8788b9c
chore: hide llm chat (#34852) 2025-02-19 14:14:18 +01:00
Max Schmitt 081031f50e
chore: bump vite to v6 (#34663) 2025-02-18 13:29:16 +01:00
Max Schmitt 1af4e367f4
fix(testServer): pass use options to listFiles command (#34832) 2025-02-18 00:33:45 +01:00
Simon Knott fe0b327770
feat(ui): llm conversation about error (#34750) 2025-02-14 16:59:26 +01:00
Dmitry Gozman e6b405c012
chore: show gha pull request title instead of a merge commit (#34781) 2025-02-14 09:32:06 +00:00
Pavel Feldman 3d760b657b
chore: move debug, env and user agent from utils/ (#34766) 2025-02-12 19:27:24 -08:00
Pavel Feldman 0eeba380f2
chore: move crypto to server/util/ (#34759) 2025-02-12 14:43:52 -08:00
Pavel Feldman f54478a23e
chore: move utils that are user in server to server/utils (3) (#34739) 2025-02-12 09:34:01 -08:00
Dmitry Gozman 8eb816b363
fix(trace): do not save trace on failure after success in test+hooks (#34724) 2025-02-12 15:41:16 +00:00
Simon Knott 1ad7aad5fb
fix: prompt should mention contents (#34746) 2025-02-12 15:44:45 +01:00
Simon Knott b7785e1662
feat(runner): enable gitCommitInfo by default on GH Actions (#34743) 2025-02-12 14:51:00 +01:00
Pavel Feldman bd74fc4964
chore: move utils that are user in server to server/utils (2) (#34736) 2025-02-11 17:19:27 -08:00
Simon Knott 8ed2f4319e
chore: add pageSnapshot option (#34669) 2025-02-11 11:04:57 -08:00
Udaiveer Pradhan d2e7e8acdb
fix(ui-mode): Watch mode button doesn't show active when test selected (#34581) 2025-02-11 10:32:39 -08:00
Adam Gastineau 91f46bb5d0
chore(html-report): clean up git metadata display (#34713) 2025-02-11 05:16:46 -08:00
Adam Gastineau aeed1f5909
fix(runner): display no projects error across all `test` modes (#34676) 2025-02-10 12:52:53 -08:00
Simon Knott 0672f1ce67
feat(ui): "fix with ai" button (#34708) 2025-02-10 17:47:27 +01:00
Simon Knott 2f8d448dbb
feat(html): "copy prompt" button (#34670) 2025-02-10 15:02:19 +01:00
Simon Knott bc8d6ce344
feat: provide commit diff to HTML reporter (#34653)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2025-02-07 10:39:08 +01:00
Simon Knott fd24521f2e
chore: add page snapshot on test end (#34573)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2025-02-07 09:02:20 +01:00
Yury Semikhatsky 7f09ba7fa4
feat: step.attach() (#34614) 2025-02-05 12:27:44 -08:00
Yury Semikhatsky f1a392f844
chore: do not store empty step.attachments[] in trace (#34579) 2025-02-05 08:30:03 -08:00
Adam Gastineau cb208836b5
fix: display error when project is not found (#34577) 2025-02-05 06:58:02 -08:00
Yury Semikhatsky fb3e8ed114
fix: reset APIRequestContext network trace between chunks (#34616) 2025-02-05 08:00:04 +00:00
Simon Knott ebf82b0854
test: ensure that attachments are available in onStepEnd (#34590) 2025-02-03 13:54:28 +01:00
Yury Semikhatsky a1451c75f8
feat: conditional step.skip() (#34578) 2025-01-31 15:45:57 -08:00
Dmitry Gozman ab62ef2dbb
fix(toMatchAriaSnapshot): fail test run when updating missing snapshot (#34556) 2025-01-30 19:18:07 +00:00
Pavel Feldman 4b5b326478
chore: do not show steps in line reporter without tty (#34529) 2025-01-29 12:41:09 -08:00
Dmitry Gozman ba650161a8
feat: per-assertion snapshot path template in config (#34537) 2025-01-29 18:47:20 +00:00
Dmitry Gozman 24f06ec1bf
feat(html report): show metadata (#34517) 2025-01-29 16:22:50 +00:00
Vitaliy Potapov 61d595ae48
feat: add new config prop populateGitInfo (#34329)
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2025-01-28 07:54:31 +00:00
ReaZzy eaaef29dbd
fix: add validations to --shard cli parameter (#34463) (#34479) 2025-01-27 14:31:14 -08:00
Pavel Feldman 245f4b5b86
fix: allow changed to be passed in config (#34473) 2025-01-24 15:42:58 -08:00
Adam Gastineau f65dc0cee4
feat: toHaveURL predicate matcher (#34413) 2025-01-24 06:00:17 -08:00
Dmitry Gozman ab3b4b8cd0
fix(test runner): respect updateSourceMethod from the config (#34442) 2025-01-23 12:11:26 +00:00
Adam Gastineau a06600aee9
chore: roll stable-test-runner to: 1.50.0-beta-1737557690000 (#34433) 2025-01-22 12:46:25 -08:00
Dmitry Gozman cf90c0f122
fix(aria snapshot): make rebase work when options are specified (#34409) 2025-01-22 07:53:53 +00:00
Dmitry Gozman 888feb06be
fix(list reporter): do not break after output without trailing eol (#34410) 2025-01-21 18:30:09 +00:00
Dmitry Gozman 333e994e7d
fix(step.skip): show a skipped indicator in UI mode (#34407) 2025-01-21 18:28:41 +00:00
Simon Knott 99fb188cb4
chore: move attachment link back to tree item, make it flash yellow (#34353) 2025-01-20 09:06:01 +01:00
Yury Semikhatsky 372d4196d7
chore: step timeout improvements (#34386) 2025-01-17 21:15:47 -08:00
Pavel Feldman 9970446f51
chore: remove toMatchAriaSnapshot.path (#34379) 2025-01-17 14:35:15 -08:00
Pavel Feldman b339d457e3
chore: dogfood jest-style aria snapshots (#34365) 2025-01-17 10:17:26 -08:00
Dmitry Gozman be6caed8df
chore: remove expectZone (#34312) 2025-01-16 18:53:32 +00:00
Yury Semikhatsky 275f334b58
chore(step): remove step.fail and step.fixme, add step.skip (#34326) 2025-01-14 17:43:47 -08:00
Simon Knott a33659f2a8
chore: move attachments link to step body (#34196) 2025-01-13 10:07:54 +01:00
Dmitry Gozman f0a3a15e93
chore: explicitly reset apiZone instead of everything (#34265) 2025-01-10 20:15:05 +00:00
Adam Gastineau a2e2dfd446
feat: Enable snapshots for most remaining public commands (#34072) 2025-01-10 05:04:44 -08:00
Pavel Feldman 4e8c83055f
chore: split output clients by capabilities and base dir (#34135) 2025-01-06 11:03:35 -08:00
Simon Knott 6bdd2694ee
feat(webserver): customize shutdown with new `gracefulShutdown` option (#34130)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-01-03 11:34:34 +01:00
Simon Knott 04a3574f80
feat(reporter): report `TestStep#attachments` (#34037) 2025-01-02 17:48:59 +01:00
Dmitry Gozman cd32d1b08c
fix(test runner): apply `--last-failed` after sharding (#34166) 2024-12-30 18:45:49 +00:00
Adam Gastineau 875436855e
chore(lint): Ensure EOL newlines (#34117) 2024-12-20 09:17:09 -08:00
Simon Knott 67bc484d8b
chore(ui): test that UI works behind proxy, take 2 (#33771) 2024-12-18 12:39:08 +01:00
Simon Knott 443b2a2bbc
fix: don't rely on requestAnimationFrame (#34065) 2024-12-18 11:41:48 +01:00
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
Simon Knott ef4be6afff
feat(test runner): make `expect.extend` immutable (#32366)
Changes `expect.extend` behaviour so that it doesn't mutate the global
instance and behaves closer to what users expect. This is formally a
breaking change, and I had to remove a test that asserts the breaking
behaviour.

TODO:
- [x] decide wether this is a separate method or a flag for
`expect.extend`
- [x] figure out if we need to change docs
2024-09-12 19:56:38 +02:00
Max Schmitt 7458c3292c
fix(test-runner): do not consider retries for maxFailures (#32533)
Fixes https://github.com/microsoft/playwright/issues/26350
2024-09-11 20:35:26 +02:00
Pavel Feldman 6d5889a52c
chore: revert the matcherResult in API (#32524) 2024-09-09 16:44:32 -07:00
Dmitry Gozman ae118674b8
fix(test runner): allow directory imports with path mapping (#32491)
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-09 14:01:20 -07:00
Dmitry Gozman 6bb005db85
fix(test runner): improve error message when not able to parse tsconfig (#32526) 2024-09-09 14:01:02 -07:00
Dmitry Gozman e6c5b6054d
test: fix project filter test (#32525)
It was erroneously passing projects separate by comma, which never
worked.
2024-09-09 14:00:51 -07:00
Pavel Feldman 9a313eecc9
chore: roll expect and move it to third party (#32458) 2024-09-09 13:12:20 -07:00
Dmitry Gozman 1402dee9e6
Revert "fix(test runner): align with typescript behaviour for resolving `index.js` and `package.json` through path mapping (#32078)" (#32492)
This reverts commit effb1ae234.

This broke path mapping into directories in ESM mode. References #32480.
2024-09-06 12:08:10 -07:00
Simon Knott 0e3f4736cc
fix(test runner): always show all projects in selection (#32450)
Follow-up to
https://github.com/microsoft/playwright/pull/32156#discussion_r1741628770,
alternative solution to
https://github.com/microsoft/playwright/pull/32425.

Ensures we always show all projects in the watch mode project selector
by performing the initial `listTests` without any filters, and using its
result for the project selector.
2024-09-06 11:35:20 +02:00
Pavel Feldman a52eb0c9a0
chore: expose matcherResult on TestError (#32455) 2024-09-05 21:36:51 -07:00
Dmitry Gozman 1ba3db6864
chore: implement clear-cache through plugins (#32471)
Also switches it to task runner.
2024-09-05 13:50:16 -07:00
Dmitry Gozman d4c77ce260
chore: make find-related-test-files work through plugins (#32465)
Also switches it to the task runner.
2024-09-05 06:52:11 -07:00
Simon Knott 29f1541b14
chore: roll stable test runner to 1.47 beta (#32469) 2024-09-05 13:44:22 +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