Commit Graph

4285 Commits

Author SHA1 Message Date
Playwright Service
a968b2a5f6
feat(firefox-beta): roll to r1451 (#30958)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-23 10:30:15 +02:00
Playwright Service
14d98aaaf7
feat(firefox): roll to r1451 (#30950) 2024-05-23 10:30:06 +02:00
Playwright Service
7645d293f0
feat(chromium-tip-of-tree): roll to r1223 (#30966)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-23 09:29:15 +02:00
Playwright Service
2d448ec2a0
feat(webkit): roll to r2011 (#30971)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-23 09:24:04 +02:00
Mathias Leppich
825e0e466e
feat(test runner): shuffle order of tests with sharding seed (#30817) 2024-05-22 16:22:09 -07:00
Dmitry Gozman
eed6a10f3f
fix(tracing): speed up trace recording (#30946)
This includes two major changes:
- reuse `SerializedFS` for live test runner tracing;
- merge scheduled `appendFile` operations into a single `fs` call.

In some cases, this improves performance of UI mode by 61% and
performance of `trace: on` mode by 38%. Note that performance
improvement on the average test will not be as noticeable.

References #30875, #30635.
2024-05-22 15:19:32 -07:00
Max Schmitt
cfc9623a79
fix(vscode): keep config order in vscode extension project dropdown (#30954)
Relates https://github.com/microsoft/playwright/issues/30936
2024-05-22 22:18:03 +02:00
Pavel Feldman
964fe66ccc
chore: hint at unroute for handle errors (#30949) 2024-05-22 08:54:19 -07:00
Olaf Alders
5b00ce1594
docs: fix typo in ConsoleMessage class (#30857) 2024-05-22 13:31:14 +02:00
Pavel Feldman
e7a11c0ca2
fix: propagate close reason to api context (#30945) 2024-05-21 18:05:58 -07:00
Pavel Feldman
7b27fc3916
chore: pass outputDir to uimode (#30941)
Fixes https://github.com/microsoft/playwright/issues/30886
2024-05-21 14:36:31 -07:00
Yury Semikhatsky
148d759a4c
fix(chromium): do not fetch intercepted request body from network (#30938)
Fixes https://github.com/microsoft/playwright/issues/30760
2024-05-21 12:49:47 -07:00
오소현
165ecac5df
feat(test): add URL field to annotations for hyperlink display (#30665) 2024-05-21 12:46:38 -07:00
Joel Einbinder
d0644f5444
fix(electron): flaky startup if stderr comes in too fast (#30855)
Chromium's `DevTools listening on` message sometimes arrives before
Playwright is finished connecting to Node. Without this patch, it would
miss the message and fail to connect.
2024-05-21 12:15:05 -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
Max Schmitt
a93ad3dade
fix(fetch): allow UTF-8 in Location header (#30904) 2024-05-21 09:15:33 +02:00
Yury Semikhatsky
042896472b
fix: route.continue should not change multipart form data body (#30863)
The bug was fixed in https://github.com/microsoft/playwright/pull/30734.
This PR adds a test and updates interception logic to not send post data
when it is not modified.

Fixes https://github.com/microsoft/playwright/issues/30788
2024-05-20 16:36:57 -07:00
Lukas Bockstaller
437b14a903
fix: relative url path for ui mode (#29924)
This is a follow up #29564 

I did a deep dive on a redirect issue I observed in my infrastructure
and originally attributed to some configuration mistakes on my part.
I have code hosted on `example.com/code` and use subdomain proxying.
This leads to the uimode being exposed on
`example.com/code/proxy/{{port}}`.

Clicking on the open uimode link shown by vscode redirected with a 302
to `example.com/proxy/{{port}}`

The absolute redirect url overruled the relative path handling reverse
proxies rely on.

This PR turns the absolute into a relative url to avoid this issue.
2024-05-20 10:18:08 -07:00
Max Schmitt
162c18f586
feat(roll): roll Firefox to r1450 (#30865)
Fixes
https://github.com/microsoft/playwright/actions/runs/9120975643/job/25079367394
2024-05-19 16:28:32 +02:00
Playwright Service
b6a7d0a17e
feat(chromium): roll to r1119 (#30879)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-17 19:06:11 +02:00
Yury Semikhatsky
dcaded5255
chore(trace-viewer): format negative duration as - (#30840) 2024-05-17 09:32:57 -07:00
Yury Semikhatsky
b375f10778
fix: fulfill with unassigned status codes (#30856)
Fixes https://github.com/microsoft/playwright/issues/30773
2024-05-17 09:32:40 -07:00
Dmitry Gozman
4ad94c1a8c
chore: print friendly localhost address from http server (#30853) 2024-05-17 08:55:12 -07:00
Playwright Service
c9df73bc59
feat(webkit): roll to r2010 (#30861)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-17 09:45:16 +02:00
Playwright Service
4efb788f99
feat(chromium-tip-of-tree): roll to r1222 (#30859)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-16 23:23:47 +02:00
Max Schmitt
1526f1b522
chore: freeze webkit on macOS-12 (#30854) 2024-05-16 20:10:27 +02: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
89cdf3d56e
feat: env.PLAYWRIGHT_FORCE_TTY to control reporters' tty (#30834)
Previously, terminal reporters consulted `process.stdout.isTTY`. Now it
is possible to control the tty behavior:
- `PLAYWRIGHT_FORCE_TTY=0` or `PLAYWRIGHT_FORCE_TTY=false` to disable
TTY;
- `PLAYWRIGHT_FORCE_TTY=1` or `PLAYWRIGHT_FORCE_TTY=true` to enable TTY,
defaults to 100 columns when real columns are unavailable;
- `PLAYWRIGHT_FORCE_TTY=<number>` to force enable TTY and set the
columns.

Fixes #29422.
2024-05-15 15:01:52 -07:00
Playwright Service
3370f37e7b
feat(webkit): roll to r2009 (#30833) 2024-05-15 23:24:42 +02:00
Pavel Feldman
8dec672121
chore(testServer): accept video parameter when running tests (#30832) 2024-05-15 12:45:57 -07:00
Dmitry Gozman
5fa0583dcb
fix(test runner): regular worker termination finishes long fixtures (#30769)
Previously, terminating worker always had a 30 seconds force exit.

Now, regular worker termination assumes that process will eventually
finish tearing down all the fixtures and exits. However, the
self-destruction routine keeps the 30 seconds timeout to avoid zombies.

Fixes #30504.
2024-05-15 10:37:36 -07:00
Max Schmitt
90765a226f
fix(electron): allow launching with spaces in path (#30820)
Fixes https://github.com/microsoft/playwright/issues/30755
2024-05-15 18:20:00 +02:00
Joe-Hendley
6ae5cd3824
feat: implement flag to fail flaky tests (#30618)
Implements feature requested in
https://github.com/microsoft/playwright/issues/30457

The test runner treats flaky tests as failures when the flag is enabled,
but still reports flaky tests as flaky in the reporting interface. It
feels like something worth discussing as this behaviour makes sense to
me, but looked a bit odd to @BJSS-russell-pollock when I ran this past
him.

Closes #30457.
2024-05-15 09:10:10 -07:00
Pavel Feldman
7a588e6c72
chore: do not close the reused context when video is on (#30807)
Fixes https://github.com/microsoft/playwright/issues/30779
2024-05-15 09:05:06 -07:00
Playwright Service
fda9051c75
feat(webkit): roll to r2008 (#30818)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-05-15 11:34:39 +02: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
Sander
9ce41fa1b0
fix(ct): mount then unmount then mount (#30657)
closes https://github.com/microsoft/playwright/issues/30628
2024-05-14 11:03:46 -07:00
Max Schmitt
b06c1dfff1
Revert "fix(highlight): highlight Top Layer elements (#30001)" (#30800)
This reverts commit a932222662.

Closes https://github.com/microsoft/playwright/pull/30797 - maybe there
is a better way to get the page height?
`document.documentElement.scrollHeight` seems to not work on Firefox.
Relates https://github.com/microsoft/playwright/issues/30770
2024-05-14 17:23:52 +01:00
Yury Semikhatsky
873f3a03ac
chore(trace): add context create event for test runner (#30697)
Adding metadata event to the test.trace to simplify time computation
logic.
2024-05-14 09:00:33 -07:00
Playwright Service
f56f965461
feat(chromium-tip-of-tree): roll to r1221 (#30786)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-14 13:44:29 +01:00
Playwright Service
07ccd5ed7f
feat(webkit): roll to r2007 (#30776)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-05-14 10:33:00 +01:00
Dmitry Gozman
776b04e5ea
feat: APIRequestContext dispose reason (#30765)
Similarly to page.close, we pass test-runner specific reason to
facilitate better error messages.

```
  1) a.test.ts:10:11 › test

    Error: apiRequestContext.fetch: Fixture { request } from beforeAll cannot be reused in a test.
      - Recommended fix: use a separate { request } in the test.
      - Alternatively, manually create APIRequestContext in beforeAll and dispose it in afterAll.
    See https://playwright.dev/docs/api-testing#sending-api-requests-from-ui-tests for more details.

       9 |
      10 |       test('test', async () => {
    > 11 |         await context.fetch('http://example.com');
         |                       ^
      12 |       });
      13 |
```

Closes #29260.
2024-05-13 18:51:30 -07:00
Dmitry Gozman
8334191b94
fix(selector generator): properly escape re used in has-text (#30767)
Fixes #30499.
2024-05-13 12:40:46 -07:00
Yury Semikhatsky
64b4ac1732
fix(electron): record har file (#30748)
Fixes https://github.com/microsoft/playwright/issues/30747
2024-05-10 15:32:01 -07:00
Yury Semikhatsky
e728e90944
docs: waitForResponse method predicate example (#30739)
Fixes https://github.com/microsoft/playwright/issues/30731
2024-05-10 09:22:59 -07:00
Yury Semikhatsky
00bf7ea815
chore(trace-viewer): more clear classification of trace contexts (#30737) 2024-05-09 17:28:39 -07:00
Yury Semikhatsky
a50cd30519
chore: use monotonic time for sorting (#30735)
* Use only monotonicTime for sorting, do not use wallTime for that
* Since test runner and the library can be running on different
machines, those machines may have clocks which are not synchronized. To
avoid problems in such cases we compute delta between test runner and
and library contexts based on a start time of action that exists in both
contexts.
2024-05-09 15:31:23 -07:00
Dmitry Gozman
0d004c9f3c
fix(chromium): concat all post data entries for request.postData() (#30734)
This already works in Firefox, but does not work in WebKit.
2024-05-09 14:08:38 -07:00
Yury Semikhatsky
1a22e06062
chore: only patch callIds when there are multiple trace files (#30721) 2024-05-09 09:33:16 -07:00
Playwright Service
cfde97b0a0
feat(chromium): roll to r1118 (#30728)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-09 17:06:43 +01:00