55 Commits

Author SHA1 Message Date
Pavel Feldman
c9d329155d
chore: remove Step prefix from trace and reports (#36149) 2025-06-02 13:40:22 -07:00
Simon Knott
43a086a8de
chore: render error context to copy prompt (#36123) 2025-05-30 15:43:55 +02:00
Simon Knott
4cb2431c33
chore: trim error context and make it singular (#36117) 2025-05-28 15:10:24 +02:00
Pavel Feldman
9a53dc2d07
chore: two-line trace view (4) (#36070) 2025-05-23 16:03:50 -07:00
Pavel Feldman
e0365747ce
chore: two-line trace view (2) (#36055) 2025-05-22 14:50:54 -07:00
Pavel Feldman
6a2a70619a
chore: two-line trace view (1) (#36025) 2025-05-22 09:49:37 -07:00
Max Schmitt
400f466957
test: unflake 'Copy Prompt' tests (#35714) 2025-04-23 19:27:38 +02:00
Adam Gastineau
26b9441d86
fix(uimode): show trace failure and any error messages on missing trace (#35344) 2025-04-03 11:13:19 -07:00
Yury Semikhatsky
6c5f3bbe39
chore: show snapshot for test.step (#35445)
We don't take before/after snapshot for `test.step`. To approximate the snapshots we could take either snapshots from the nested actions or from the outer ones. The current logic is the following:

**beforeSnapshot:**
- `beforeSnapshot` is always taken from the last finished action before the step. It also works nice for the actions without nested actions, such as simple `expect(1).toBe(1);`

**afterSnapshot:**
- We always use `afterSnapshot` from a "nested" action, if there is one. It is exactly what we want for `test.step` and it is acceptable for other actions.
- If there are no "nested" actions, use the `beforeSnapshot` 
  -  works best for simple `expect(a).toBe(b);` case
  - `test.step` without children with snapshot is likely a step with a bunch of `expect(a).toBe(b);` and the same logic as for single expect applies.

Fixes https://github.com/microsoft/playwright/issues/35285
2025-04-02 13:22:16 -07: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
Simon Knott
f44cd3050b
chore(ui): hide top-level attach actions (#35040) 2025-03-05 15:37:25 +01:00
Pavel Feldman
78fa911756
chore: improve prompt to use code frame and inline error (#35032) 2025-03-04 19:28:03 -08:00
Simon Knott
88623ae3c2
refactor: store copy prompt contents in attachment (#34995) 2025-03-04 17:20:36 +01: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
44712fb8eb
test: windows clipboard contains \r\n (#34966) 2025-02-28 09:37:48 +01: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
Simon Knott
1f1e2acf9b
chore: rename prompt button (#34851) 2025-02-19 14:32:58 -08:00
Simon Knott
0672f1ce67
feat(ui): "fix with ai" button (#34708) 2025-02-10 17:47:27 +01: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
04a3574f80
feat(reporter): report TestStep#attachments (#34037) 2025-01-02 17:48:59 +01:00
Simon Knott
67bc484d8b
chore(ui): test that UI works behind proxy, take 2 (#33771) 2024-12-18 12:39:08 +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
4fb6c4ed4c
fix(trace): in indexTree check isVisible before adding to result (#33797) 2024-11-28 14:04:34 +01: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
623a8916f9
chore: implement tree w/o list (#33167) 2024-10-17 16:57:45 -07:00
Dmitry Gozman
056997c41f
fix(toHaveScreenshot): attach "expected" when writing a missing expectation (#31745)
Previously, only the "actual" attachment was created, pointing to the
file in `test-results`. Now, the "expected" attachment pointing to the
file in `__screenshots__` is also created. This will help any reporters
that would like to know the "expected" path, for example to do a manual
accept/decline of the baseline.

Fixes #30693.
2024-07-18 02:42:44 -07:00
Yury Semikhatsky
2734a05342
feat(trace-viewer): show nework request source id (#30810)
<img width="1392" alt="image"
src="https://github.com/microsoft/playwright/assets/9798949/dcfd4d71-4a41-48ac-9f24-2996200f966a">

Fixes https://github.com/microsoft/playwright/issues/28903
2024-05-15 16:29:26 -07:00
Dmitry Gozman
d214778548
chore(test runner): move timeout handling to the top, stop inheriting runnable (#29857) 2024-03-08 15:19:36 -08:00
Dmitry Gozman
cf6549687c
fix(trace viewer): reveal error location when it comes from the test (#29268)
Errors coming from the test runner do not have an associated `action`,
but have a `stack` that we can reveal.
2024-02-01 08:23:07 -08:00
Pavel Feldman
fc5f34369a
chore: only highlight uncaught errors in source (#28772) 2023-12-22 14:19:53 -08:00
Pavel Feldman
f5c57d0e98
chore: reuse image diff component in trace/html (#28727)
Fixes https://github.com/microsoft/playwright/issues/28685
2023-12-22 10:17:35 -08:00
Pavel Feldman
022b36332d
chore: do not add to the internal action logs (#28365)
Fixes https://github.com/microsoft/playwright/issues/28319
2023-11-27 16:43:47 -08:00
Pavel Feldman
47733b04fb
chore: do not select after hooks automatically (#27805) 2023-10-25 17:05:06 -07:00
Pavel Feldman
167c35ca66
chore: store scroll positions in trace viewer (#26938) 2023-09-07 17:14:39 -07:00
Andrey Lushnikov
3c0fab489b
chore: miscellaneous trace viewer fixes (#23695)
- properly annotate continued requests
- nest `attach` steps inside the related `expect` step
- fix primary-id-to-non-primary-id mapping
- make sure images in trace are not draggable

Fixes #23693

---------

Signed-off-by: Andrey Lushnikov <aslushnikov@gmail.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-06-14 09:37:19 -07:00
Dmitry Gozman
6b687b6d69
fix(toHaveScreenshot): attach newly created missing expectations (#23528)
Fixes #23090.
2023-06-05 14:57:06 -07:00
Pavel Feldman
d1666d2dde
chore: include test-end-screenshot in a trace (#23457)
Fixes https://github.com/microsoft/playwright/issues/23222
2023-06-01 20:29:32 -07:00
Pavel Feldman
fd75b85510 Revert "chore: more tree gardening (#23119)"
This reverts commit e6bc32b0222d628db6191602ff85ff9801a5a7ec.
2023-05-23 12:04:44 -07:00
Pavel Feldman
b814e8a5f1
chore: bring back per test artifacts (#23153) 2023-05-23 09:36:35 -07:00
Pavel Feldman
2697e93663
chore: do not annotate actions after failed ones as timed out (#23148) 2023-05-18 15:52:44 -07:00
Pavel Feldman
2501bbb715
test(ui-mode): make retries (#23136) 2023-05-18 11:28:28 -07:00
Andrey Lushnikov
e6bc32b022
chore: more tree gardening (#23119)
https://github.com/microsoft/playwright/issues/23114
https://github.com/microsoft/playwright/issues/23115
https://github.com/microsoft/playwright/issues/23116
https://github.com/microsoft/playwright/issues/23117
https://github.com/microsoft/playwright/issues/23118
2023-05-17 18:57:35 -07:00
Pavel Feldman
4c4085e105
chore: partially hide built-in fixture steps (#23005) 2023-05-12 19:15:31 -07:00
Pavel Feldman
5e0574dc44
chore: list attachments in the trace (#22919)
Fixes https://github.com/microsoft/playwright/issues/22736
2023-05-09 17:53:01 -07:00
Pavel Feldman
0bf297f523
fix(trace): merge step hierarchies (#22916) 2023-05-09 14:50:28 -07:00
Pavel Feldman
9771b1ee74
chore: show steps for fixtures (#22860)
Fixes https://github.com/microsoft/playwright/issues/22565
2023-05-06 10:25:32 -07:00
Pavel Feldman
efad19b332
chore: render test steps in the trace (#22837) 2023-05-05 15:12:18 -07:00
Pavel Feldman
2a675026de
chore: add image diff test to ui mode (#22637) 2023-04-28 14:18:46 -07:00
Pavel Feldman
bbc47ba315
chore: ensure web assertions are merged in trace (#22544) 2023-04-21 10:07:23 -07:00