Commit graph

173 commits

Author SHA1 Message Date
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
Max Schmitt 3584e72223
chore: remove 'as *' imports because of esModuleInterop: true (#34854) 2025-02-19 15:32:12 +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
Adam Gastineau 0501f8c132
chore(html-report): make scrollbar gutter stable (#34732) 2025-02-12 05:55:36 -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
Pavel Feldman d5d47f2b6e
chore: organize imports in packages (#34681) 2025-02-07 14:44:00 -08: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
Pavel Feldman 7da3be4a1a
chrome: update eslint 9 (#34666) 2025-02-06 19:48:27 -08:00
Yury Semikhatsky 34d9d4fc33
chore(html-report): show run duration for each retry (#34647) 2025-02-06 13:30:25 -08:00
Dmitry Gozman 24f06ec1bf
feat(html report): show metadata (#34517) 2025-01-29 16:22:50 +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
Adam Gastineau 875436855e
chore(lint): Ensure EOL newlines (#34117) 2024-12-20 09:17:09 -08:00
Simon Knott 443b2a2bbc
fix: don't rely on requestAnimationFrame (#34065) 2024-12-18 11:41:48 +01:00
Max Schmitt 43e46d63dd
chore: use recorder/html types for exported shared types (#34056) 2024-12-17 20:26:56 +01:00
Simon Knott 512cb36c9b
feat(html): link from attachment step to attachment (#33267) 2024-12-16 15:25:32 +01:00
Max Schmitt 65688d623e
chore: update TypeScript to v5.7 (#33994) 2024-12-13 04:52:04 -08:00
Max Schmitt 21c456b2c1
chore: remove vite default scripts in package.json's (#33986) 2024-12-12 15:37:53 -08:00
Max Schmitt b12ede48fc
test: fix html-reporter tests after #33754 (#33966) 2024-12-11 17:49:16 -08:00
Simon Knott 6d424875e3
fix(html): remove filter clear button (#33754) 2024-12-11 15:16:21 +01:00
Simon Knott 89f4d4ce4f
chore(html): hmr report should survive reload (#33696) 2024-11-20 16:35:39 +01:00
Simon Knott 4979ce2b5d
chore(html): Reveal elements with Anchor abstraction (#33537) 2024-11-19 16:40:02 +01:00
Max Schmitt b91f609b14
chore: fix react attribute casing in TestErrorView (#33633) 2024-11-15 22:25:26 +01:00
Simon Knott 114884335d
chore(html): support HMR for local dev (#33511) 2024-11-12 11:11:50 +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 80bd246543
chore: use React.useId for a11y (#33402) 2024-11-01 13:38:16 -07: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 6f5c7b4358
feat(html): render prev/next test buttons (#33356) 2024-10-29 18:29:07 -07:00
Yury Semikhatsky 1e8884621a
chore: unify toHaveScreenshot error formatting (#33300) 2024-10-25 12:36:39 -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
Remigiusz Dudek 4c2d62a881
feat(html-reporter): recognize video attachment by the contentType (#33074)
Closes https://github.com/microsoft/playwright/issues/33073.

---------

Signed-off-by: Remigiusz Dudek <remigiusz_dudek@tlen.pl>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-14 05:16:19 -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 1b457b1ff8
fix(html reporter): render annotation newlines (#32948)
Closes https://github.com/microsoft/playwright/issues/32925. Before this
change, newlines in annotation descriptions weren't respected. This
change makes them shown. Here's how it looks for this annotation:

```ts
test.info().annotations.push({
  type: 'user story',
  description: '\n- user goes to the page\n- user clicks the button\n- user sees the result',
});
```

Before:

<img width="1071" alt="Screenshot 2024-10-04 at 09 55 15"
src="https://github.com/user-attachments/assets/89e74ff5-ea83-48da-a33b-833423916d95">

After:

<img width="1031" alt="Screenshot 2024-10-04 at 09 51 08"
src="https://github.com/user-attachments/assets/0f2914e8-bd88-4970-aa68-6a5a9828295c">
2024-10-04 14:18:38 +02: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 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
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
Max Schmitt 0d575b4ef6
chore: less 'as any' in html-reporter (#32117)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Simon Knott <info@simonknott.de>
2024-08-12 15:17:42 +02:00
Simon Knott c8cc4f9c8b
chore(ui): update to react 18 (#32079)
Part of https://github.com/microsoft/playwright/issues/31863. Updates
most of our React usage to React 18. `recorder` doesn't seem to like it
yet. I suspect that some of our code isn't compatible with concurrent
mode, i've investigated that in
https://github.com/microsoft/playwright/pull/32101.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-08-12 13:50:11 +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
Max Schmitt 44ce6096bb
feat(html-reporter): add Playwright logo as Favicon (#31908) 2024-07-30 12:02:06 +02:00
Simon Knott 4d4ed2a5c4
chore: enforce single quotes in JSX (#31855)
Discovered in
https://github.com/microsoft/playwright/pull/31852#discussion_r1691133106:
We're not enforcing single quotes for JSX, and it shows! We need to
start enforcing it to prevent even greater damage from being done ;D
2024-07-25 13:06:26 +02:00