184 Commits

Author SHA1 Message Date
Simon Knott
bc0d2c57e5
fix(html): falsy description shouldnt crash (#35470) 2025-04-03 11:44:22 +02:00
Mark Skelton
3d603d1e5c
feat(html): add NOT filtering to HTML reporter (#35390) 2025-03-31 14:18:13 +01:00
Chris
fbf519c5a5
feat(html-reporter): Add extra space after any special token (#35365) 2025-03-28 14:47:08 +01:00
Simon Knott
8896454cdf
fix(prompt): take snapshot for unclosed contexts as well (#35387)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-03-27 16:25:46 +01:00
Simon Knott
febb95a638
chore: highlight "view trace" on failing tests (#35342) 2025-03-26 16:27:48 +01:00
Simon Knott
45fa3d17fc
feat: split up static and dynamic annotations (#35292)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-03-26 11:33:18 +01:00
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
Pavel Feldman
ee2a5264ad
chore: do not show other metadata in html report (#35001) 2025-03-03 15:28:18 -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
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
Pavel Feldman
411f938296
chore: clean up git commit metadata props and UI (#34867) 2025-02-25 09:21:17 -08:00
Pavel Feldman
325fe71bb9
chore: minor html report polish (#34864) 2025-02-21 13:49:23 -08:00
Simon Knott
1f1e2acf9b
chore: rename prompt button (#34851) 2025-02-19 14:32:58 -08:00
Dmitry Gozman
e6b405c012
chore: show gha pull request title instead of a merge commit (#34781) 2025-02-14 09:32:06 +00:00
Simon Knott
1ad7aad5fb
fix: prompt should mention contents (#34746) 2025-02-12 15:44:45 +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
Adam Gastineau
91f46bb5d0
chore(html-report): clean up git metadata display (#34713) 2025-02-11 05:16:46 -08: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
Yury Semikhatsky
7f09ba7fa4
feat: step.attach() (#34614) 2025-02-05 12:27:44 -08:00
Yury Semikhatsky
a1451c75f8
feat: conditional step.skip() (#34578) 2025-01-31 15:45:57 -08: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
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
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
Simon Knott
04a3574f80
feat(reporter): report TestStep#attachments (#34037) 2025-01-02 17:48:59 +01:00
Simon Knott
443b2a2bbc
fix: don't rely on requestAnimationFrame (#34065) 2024-12-18 11:41:48 +01:00
Simon Knott
512cb36c9b
feat(html): link from attachment step to attachment (#33267) 2024-12-16 15:25:32 +01:00
Max Schmitt
91d4b82dfb
fix(pwt): custom fixture titles in UI Mode / HTML Reporter (#34009) 2024-12-13 12:31:38 -08:00
Simon Knott
dd36de7809
fix(html): encode all stdio attachments (#33950) 2024-12-13 12:01:20 +01:00
Pavel Feldman
35dd3dd104
chore: use diff for snapshot delta (#33739) 2024-11-23 11:39:04 -08:00
Simon Knott
f1ddd379f3
fix(html): don't conflate file names (#33600) 2024-11-20 10:16:33 +01:00
Yury Semikhatsky
c95feccce4
chore: support reverse in ansi2html, drop ansi-to-html (#33389) 2024-10-31 21:42:06 -07:00
Yury Semikhatsky
1e8884621a
chore: unify toHaveScreenshot error formatting (#33300) 2024-10-25 12:36:39 -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
Dmitry Gozman
aa952c1b03
fix(html report): generate test snippets when test dir is non-root (#33162) 2024-10-17 08:33:15 -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
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
cf8c14f884
feat(html reporter): open html attachments in new tab (#32389)
Closes https://github.com/microsoft/playwright/issues/32281.

HTML attachments get a linkified name that opens the attachment in a new
tab.
2024-09-02 08:35:53 +02: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
Pavel Feldman
f46ae15500
test(clock): fix clock mode bots (#31472) 2024-06-28 11:46:28 -07:00
amankagithub
0e0b426e47
feat(html): filter test cases by annotation text in HTML report (#30751) 2024-05-24 13:12:16 -07:00
Dmitry Gozman
6290af3a08
feat(reporters): align and document environment variables (#30912)
- Documents `PLAYWRIGHT_FORCE_TTY` and `FORCE_COLOR` across terminal
reporters.
- New `PLAYWRIGHT_LIST_PRINT_STEPS`. Removes undocumented test-only
`PW_TEST_DEBUG_REPORTERS_PRINT_STEPS`.
- Replaces `PLAYWRIGHT_HTML_REPORT` with `PLAYWRIGHT_HTML_OUTPUT_DIR`
and `PW_TEST_HTML_REPORT_OPEN` with `PLAYWRIGHT_HTML_OPEN` for
consistency, supports older versions for backwards compatibility.
- New `PLAYWRIGHT_HTML_HOST`, `PLAYWRIGHT_HTML_PORT` and
`PLAYWRIGHT_HTML_ATTACHMENTS_BASE_URL`.
- New `PLAYWRIGHT_JUNIT_STRIP_ANSI` and
`PLAYWRIGHT_JUNIT_INCLUDE_PROJECT_IN_TEST_NAME`.
- Removes `PW_HTML_REPORT` that was set for unknown reason.
2024-05-21 10:46:52 -07:00
Dmitry Gozman
4ad94c1a8c
chore: print friendly localhost address from http server (#30853) 2024-05-17 08:55:12 -07:00
Yury Semikhatsky
fb319e6d3d
fix: match client step and server action by explicit stepId (#30641)
Matching bu `apiName@wallTime` fails when two actions start at the same
time, e.g. two parallel api requests. Moreover, it results in trace
actions that have parent set to themselves, which in turn causes
infinite loop in the trace viewer. To avoid this problems we write
stepId explicitly to the library trace and use those step ids to find
corresponding test runner steps.

The stepId is passed via zone in case of expect, because the protocol
step is quite deep in the call chain after or explicitly in case of API
call steps created by the test runner instrumentation.
2024-05-14 12:10:46 -07:00
jonghoonpark
a6488c4a28
fix(html-reporter): add filter for anonymous describe (#30621)
related issue: https://github.com/microsoft/playwright/issues/30475

## Motivation:
On https://github.com/microsoft/playwright/issues/30475, we found that
anonymous describe is rendered in html report

## Modification:
Make filter for anonymous describe

## Result:
anonymous describe will be filtered out.
Not render empty describe
Close https://github.com/microsoft/playwright/issues/30475 issue
2024-05-02 09:54:44 -07:00