38 Commits

Author SHA1 Message Date
Simon Knott
43a086a8de
chore: render error context to copy prompt (#36123) 2025-05-30 15:43:55 +02:00
Adam Gastineau
9d2f64c8d4
chore(html): normalize header between views (#35804) 2025-05-05 11:40:09 -07:00
Adam Gastineau
9b59a6aea6
feat(html): allow setting a title to display (#35659) 2025-04-28 10:30:25 -07:00
Adam Gastineau
a98ad6f071
chore: restore useful annotation types removed by #35620 (#35623) 2025-04-23 05:16:58 -07:00
Pavel Feldman
7328524556
chore: account for the test id missing in the store (#35671) 2025-04-22 08:29:47 -07:00
Adam Gastineau
09529e9275
Revert "chore: add location named property to annotations (#35373)" (#35620) 2025-04-15 11:17:21 -07:00
Simon Knott
76ee48dc9d
chore: followup on static annotations (#35579)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-04-15 09:07:42 +02:00
Adam Gastineau
92c5d656ab
chore: add location named property to annotations (#35373) 2025-04-02 06:29:22 -07: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
Yury Semikhatsky
34d9d4fc33
chore(html-report): show run duration for each retry (#34647) 2025-02-06 13:30:25 -08:00
Simon Knott
512cb36c9b
feat(html): link from attachment step to attachment (#33267) 2024-12-16 15:25:32 +01:00
Simon Knott
4979ce2b5d
chore(html): Reveal elements with Anchor abstraction (#33537) 2024-11-19 16:40:02 +01:00
Pavel Feldman
3f8bd36a3a
fix(html): align prev/next with the group title (#33462) 2024-11-06 08:31:55 -08:00
Pavel Feldman
6f5c7b4358
feat(html): render prev/next test buttons (#33356) 2024-10-29 18:29:07 -07:00
Max Schmitt
c216c25a1d
feat(html-reporter): add file name copy button (#32652) 2024-09-17 15:54:22 +02:00
Anthony Roberts
71c43693ac
feat(reporter): add copy button for annotations (#31790)
Adds a copy-to-clipboard button for each annotation so that text can be
copied easily.
This re-uses the existing `CopyToClipboard` component and adds a `small`
variant that can be used inline. The icon size and colour have been
chosen to avoid being overwhelming when used inline.

Related to #30141 
I opted not to introduce the hover behaviour from #30749 as it's less
discoverable, but can understand why that might be favourable. Certainly
open to suggestions 😄

<img width="379" alt="Screenshot 2024-07-22 at 3 23 53 PM"
src="https://github.com/user-attachments/assets/3b9998cf-2e8d-40c9-9c8a-64eab3a9ed2e">
2024-09-16 07:57:11 -07:00
Simon Knott
b599335404
chore(ui): enable react/recommended lint rules (#32214)
Closes https://github.com/microsoft/playwright/issues/32159. I
originally set out to enable Strict Mode for our React UI, but found a
way better thing: Enabling the lint rules we had already installed!

`eslint-plugin-react` is already in of our `package.json`, and this PR
enables it and fixes some of the reported issues. Most of them are
around the `key` prop which is mostly about performance, but there's
also fixes for misspelled `data-testid` props.
2024-08-20 14:16:28 +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
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
Yury Semikhatsky
de39d227f7
chore: linkify urls in attachments body (#31673)
Reference: https://github.com/microsoft/playwright/issues/31284
2024-07-15 12:20:22 -07:00
Vitaliy Potapov
1e55a084bc
feat(html-reporter): hide annotations started with "_" (#31489)
Fixes: https://github.com/microsoft/playwright/issues/30179
2024-07-02 16:46:24 -07:00
Joe-Hendley
a62260a9f2
feat(html report): linkify test annotations (#31521) 2024-07-02 16:45:16 -07:00
Pavel Feldman
ef924c14e7
chore: do not use project id in telereporter (#29776) 2024-03-01 21:44:08 -08:00
Dmitry Gozman
3331a40647
feat(test runner): tags/annotations (#29248)
API changes:
- `test(title, details, body)` where details contain `tag` and
`annotation`.
- similar `details` property added to `test.skip`, `test.fail`,
`test.fixme`, `test.only`, `test.describe` and other `test.describe.*`
variations.
- `TestProject.tagFilter`/`TestConfig.tagFilter` that supports logical
tag expressions with `(`, `)`, `and`, `or` and `not`.
- `--tag` CLI option to filter by tags.
- New annotations are available in `TestInfo.annotations` and
`TestCase.annotations`.
- New tags are available in `TestCase.tags`.
    
Reporter changes:
- `json` reporter includes new tags in addition to old `@smoke`-style
tags. **Breaking**: tags are now listed with the leading `@` symbol.
- `html` reporter filters by old and new tags with the same `@smoke`
token.

Fixes #29229, fixes #23180.
2024-02-07 16:31:25 -08:00
Dmitry Gozman
27c15b705d
fix(blob): replace projectSuffix with reportName (#25017)
Always ensure unique project/test ids across blobs.
Show `reportName` as a label in the html report.

References #24451.
2023-08-07 13:38:09 -07:00
Pavel Feldman
37b2853b7b
chore: fix the test view mobile layout (#23061)
Fixes https://github.com/microsoft/playwright/issues/23036
2023-05-16 12:47:37 -07:00
Alex Neo
5bd5cea705
feat(html): describe labels (#22870) 2023-05-08 18:59:01 -07:00
Alex Neo
26cad0b31f
feat(html): matching labels with dash&spec symbol (#22709)
Fixes #22700
2023-05-01 09:13:30 -07:00
Max Schmitt
49c9284bc7
Revert "feat(html reporter): render multiple annotations of the same type together (#21580)" (#22466)
Fixes https://github.com/microsoft/playwright/issues/22323
2023-04-18 20:43:07 +02:00
Alex Neo
6947f47f05
feat(html): added labels to test cases and test files (#21468) 2023-03-22 14:35:58 -07:00
Alex Neo
9c8d0822d6
fix(html-reporter): annotations.size rendered 0 on UI (#21635)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-03-13 21:23:17 +01:00
Dmitry Gozman
21950bc8ce
feat(html reporter): render multiple annotations of the same type together (#21580)
Multiple annotations are rendered as comma-separated lists. Fixes
#21253.

![IMAGE 2023-03-10
14:24:10](https://user-images.githubusercontent.com/9881434/224439435-3bf8e4f4-d874-4595-931d-ea5ff33ea374.jpg)
2023-03-10 15:26:02 -08:00
Max Schmitt
f3a46f7405
feat(html): render annotations as links if needed (#21165)
Fixes https://github.com/microsoft/playwright/issues/20584
2023-02-23 21:57:02 +01:00
Pavel Feldman
df143031e7
chore: move protocol and trace types into the top-level packages (#17486) 2022-09-20 18:41:51 -07:00
Dmitry Gozman
7727ebe758
feat(html report): improve test list view (#15543)
- Two lines per test: title and location.
- Align project labels.
- Add trace badge that opens trace viewer.
- Add video and image diff badges that show scrolled test result view.
2022-07-11 19:47:15 -07:00
Pavel Feldman
8758cf8cbf
chore: migrate html reporter to vite (#13116) 2022-03-28 18:21:19 -07:00
Pavel Feldman
f579f9c806
chore: parse tsx tests (#10917) 2021-12-14 19:25:07 -08:00
Pavel Feldman
a82a3f1128
chore: move html report to package (#10898) 2021-12-13 16:38:26 -08:00