Commit Graph

3054 Commits

Author SHA1 Message Date
Pavel Feldman
eb8cbbbf62
fix(ct): resolve paths before detecting JS (#29308) 2024-02-01 21:06:31 -08:00
Rui Figueira
b88a008a87
feat(codegen): slider support (#29087) 2024-02-01 13:45:19 -08:00
Pavel Feldman
020a39860d
chore: polish network panel highlight (#29299)
Fixes https://github.com/microsoft/playwright/issues/29287
2024-02-01 13:44:26 -08:00
Pavel Feldman
4784139bb0
fix(test): do not allow mixing tests from different types (#29284)
Fixes https://github.com/microsoft/playwright/issues/29282
2024-02-01 11:59:56 -08:00
Yury Semikhatsky
a89dbe3813
devops: custom blob report name for test runner tests (#29280)
Otherwise uploaded reports all have clashing names report-1.zip and
report-2.zip.
2024-02-01 09:17:48 -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
Yury Semikhatsky
b5082e10fd
fix: do not retry missing snapshot errors (#29272)
When `updateSnapshots === 'missing'` we generate new expectations on the
first attempt and don't retry the test afterwards instead of trying it
retries-1 times and only writing new expectation on the last attempt.
This logic infects all serial mode suites that contain the test with
missing expectations, so they also will not be retried.

Reference https://github.com/microsoft/playwright/issues/29073
2024-01-31 15:33:38 -08:00
Tanay Vardhan
e9a8fc944c
fix: Add support for exif jpeg file formats (#29208) 2024-01-29 14:58:13 -08:00
Max Schmitt
cf70a01836
test: should serialize storageState with lone surrogates (#29089)
https://github.com/microsoft/playwright-dotnet/issues/2819
2024-01-29 19:22:33 +01:00
Dmitry Gozman
acc72c2663
fix(codegen): assertValue works with disabled input (#29205)
Also add tests for new codegen functionality.

Fixes #29161.
2024-01-27 14:54:22 -08:00
Dmitry Gozman
5ee7179b13
fix(test runner): make TestTracing responsible for trace management (#29181)
... instead of a fixture.

Fixes #29133, fixes #28733, fixes #28476.
2024-01-26 15:52:25 -08:00
Yury Semikhatsky
32034728ad
test: request overrides and routeFromHar (#29200)
Test that modifications from `route.fallback()` apply to the requests
before reading from/writing to HAR.

Reference https://github.com/microsoft/playwright/issues/29190
2024-01-26 15:19:01 -08:00
Max Schmitt
f741f08b3b test: fix itest (follow up to #28932) 2024-01-25 23:55:24 +01:00
Yury Semikhatsky
0113e8455b
fix: make TeleSuite.project work for all suites (#29177)
Fixes https://github.com/microsoft/playwright/issues/29173
2024-01-25 13:44:08 -08:00
Max Schmitt
4c4789c740
chore: validate deps during install (#28932)
Motivation: On Windows we call around 50 times `PrintDeps.exe` which
takes on a very fast machine 500+ms. On Linux we do it around 120 times
(`ldd`) which takes around 150ms.

This change validates the dependencies once on browser install (`npx
playwright install`). In case its failing, it will emit a warning, in
case of a success, it will create a marker file that the binary has been
validated. For future `launch()` calls, we'll read this file and if
exists, we'll not validate again. Otherwise we'll validate again.

Note: If the marker file is older than 30 days, the browser will be
validated again.
2024-01-25 20:55:53 +01:00
Pavel Feldman
6a14b1dc51
chore: automatically detect the dev server (#29176) 2024-01-25 11:46:47 -08:00
Dmitry Gozman
f5de6e5538
feat(codegen): generate multiple selectors to choose from (#29154)
When possible, "pick locator" generates:
- default locator;
- locator without any text;
- locator without css `#id`.

Fixes #27875, fixes #5178.
2024-01-25 07:35:58 -08:00
Dmitry Gozman
bc83d7084c
fix(chromium): emulate navigator.userAgentData along with UA (#29159)
Fixes #28989, fixes #29139.
2024-01-25 07:34:11 -08:00
Pavel Feldman
cec2ff1772
chore: split cli processing into cli endpoint and program (#29131) 2024-01-23 15:22:09 -08:00
Dmitry Gozman
8e607d509f
fix(recorder): disallow external imports (#29129)
Previously, new `Recorder` instance was given an existing
`InjectedScript`. However, we built a separate source for
`InjectedScript` vs `Recorder`, and both bundles contain their own copy
of all helper modules, e.g. `roleUtils`.

This resulted in two copies of helper modules, which is troublesome for
any module-level globals like a top-level cache. Depending on whether
`Recorder` or `InjectedScript` called into the helper, they would access
the different value of a module global, which lead to bugs.

To prevent this, we force any external dependencies to be imported
through the `InjectedScript.utils`.
2024-01-23 11:29:40 -08:00
Pavel Feldman
41c15cb176
chore: move vite root dir into template folder (#29081) 2024-01-23 09:40:05 -08:00
Yury Semikhatsky
fbf87ef904
fix: test.fail wrapper method (#29112)
Fixes https://github.com/microsoft/playwright/issues/29104
2024-01-22 19:47:27 -08:00
Yury Semikhatsky
b2de9bc865
fix: mock safari.pushNotification (#29107)
Fixes https://github.com/microsoft/playwright/issues/29032
2024-01-22 15:44:13 -08:00
Pavel Feldman
d61f99034a
fix(ct-react): do not reset mount hooks upon update (#29072)
Fixes https://github.com/microsoft/playwright/issues/29058
2024-01-19 12:55:36 -08:00
Dmitry Gozman
f3fac6f4e9
feat: page.handleLocator that closes any interstitial pages/dialogs (#29029) 2024-01-19 12:35:00 -08:00
Pavel Feldman
71a48c2562
chore: migrate ct to vite5 (#29033)
Closes https://github.com/microsoft/playwright/issues/28607
2024-01-19 11:13:03 -08:00
Max Schmitt
e551506c9e
Revert "feat(codegen): add range input recording support (#28767)" (#29069) 2024-01-19 19:47:59 +01:00
Pavel Feldman
4010940315
chore: move off babel proposals to plugins (#29053) 2024-01-18 17:50:52 -08:00
Dmitry Gozman
b7d22b64e8
feat(merge): prepend bot name to global errors (#29055)
This way one can figure out where does the error come from.

An example merged report that exhibits the issue:
https://mspwblobreport.z1.web.core.windows.net/run-7563628632-1-2328b83af75801ab76bb06c214fee483cf5bc07c/index.html#?q=s%3Afailed%20s%3Aflaky
2024-01-18 15:11:32 -08:00
Yury Semikhatsky
c76f5294ce
fix: quote trace file path when printing error message (#29052)
Fixes https://github.com/microsoft/playwright/issues/29039
2024-01-18 14:23:12 -08:00
Pavel Feldman
ee3960529e
fix(ct): allow passing date, url, bigint as properties (#29031)
Closes: https://github.com/microsoft/playwright/issues/29028,
https://github.com/microsoft/playwright/issues/29027
2024-01-17 20:43:28 -08:00
Pavel Feldman
2328b83af7
test: add a props.children test (#29026)
Closes https://github.com/microsoft/playwright/issues/29023
2024-01-17 12:53:01 -08:00
Pavel Feldman
c82919859c
chore: add an image import component test (#29016)
Closes: https://github.com/microsoft/playwright/issues/22657
2024-01-17 09:06:02 -08:00
Pavel Feldman
1db18711a2
fix(ct): move import list into the compilation cache data (#28986) 2024-01-16 19:31:19 -08:00
Dmitry Gozman
e6d51cf7bd
chore: refactor actionability check to go through node-side retry (#28982)
This allows to inject a checkpoint in between the actionability checks.

Drive-by: cleanup `InjectedScriptPoll`-related code.
2024-01-16 19:11:41 -08:00
Dmitry Gozman
d023829dd5
fix(locator parser): allow escaped quotes in the digest function (#29012)
This supports mixed quotes locators in JavaScript where we are not sure
what quote is the correct one, so we normalize to unescaped single quote
when comparing with the original.

Drive-by: we were allowing single quotes in Python, Java and .NET, but
these are actually not allowed.

Regressed in #27718.
Fixes #28630.
2024-01-16 16:06:02 -08:00
Dmitry Gozman
9b657b54fb
fix(launcher): unregister global process handlers when all browser are closed (#29011)
Otherwise, we forever block SIGTERM and SIGHUP by registering a handler
that does not do anything (due to no browsers to close) and prevents
default handler that exits from running.

Fixes #28091.
2024-01-16 14:41:26 -08:00
Dmitry Gozman
775ef30e43
fix(test runner): make TestCase.id not depend on the path separator (#29010)
Fixes #28991.
2024-01-16 13:32:47 -08:00
Max Schmitt
7721f910b2
chore: roll stable-test-runner to 1.41.0-beta-1705101589000 (#28993) 2024-01-16 08:59:55 -08:00
jonghoonpark
4c0a972b69
feat(expect): Make toPass's option configurable by TestConfig (#28231)
Co-authored-by: jonghoon.park <jonghoon.park@lucentblock.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-01-16 12:28:38 +01:00
Pavel Feldman
92ad1b385c
chore: refactor import processing in ct (#28975) 2024-01-12 20:02:27 -08:00
Dmitry Gozman
48317af1cc
feat(trace): preserve noscript when javascript is disabled (#28971)
Closes #27504, closes #27532.
2024-01-12 12:11:39 -08:00
Yury Semikhatsky
8936885a67
fix(chromium): preserve header overrides in redirects (#28962)
Reference https://github.com/microsoft/playwright/issues/28758
2024-01-12 08:55:20 -08:00
Pavel Feldman
a0750b7854
chore: network panel polish (#28924) 2024-01-10 15:28:33 -08:00
Dmitry Gozman
3851d9b897
test: make sure asLocator works with has+hasText at the same time (#28937) 2024-01-10 12:42:55 -08:00
Max Schmitt
0f3bd9835f
test: update 'proxy' dependency to v2 (#28895)
This won't fix it yet, but prepare for a smaller version bump once the
upstream fix has been merged.
https://github.com/microsoft/playwright/issues/28701.
2024-01-08 19:57:46 +01:00
Max Schmitt
1d8c6d4760
test: unflake 'android.launchServer' WS leak test (#28891)
This test was flaky all the time. The problem was that we were sending
messages on a WS connection which wasn't ready yet, so we lost some.
2024-01-08 19:07:06 +01:00
Yury Semikhatsky
1617779f3e
test: page.reload should return 304 status (#28881)
Test for https://github.com/microsoft/playwright/issues/28779
2024-01-05 13:49:45 -08:00
Sander
eebb69121e
fix(ct): vue update slots (#28835)
Due to [Vue 3.4](https://blog.vuejs.org/posts/vue-3-4): _"refactored
reactivity system that makes effect triggering more accurate and
efficient"_

closes: https://github.com/microsoft/playwright/issues/28830
2024-01-03 20:48:41 +01:00
Max Schmitt
58fa4fce74
fix: use logger in default context with connectOverCDP (#28838)
Fixes https://github.com/microsoft/playwright/issues/28813
2024-01-03 19:49:47 +01:00