Commit Graph

784 Commits

Author SHA1 Message Date
Max Schmitt
421872f130
test: rewrite 'should fulfill json' test (#23735) 2023-06-15 18:46:19 +02:00
Dmitry Gozman
c80a23842b
fix(css): relative-to-scope selectors work (#23665)
Chained selectors where the second part starts with a scope did not work
before:

```ts
page.locator('div').locator(':scope + span')
page.locator('div >> +span')
```
2023-06-13 10:27:25 -07:00
Dmitry Gozman
dd417d83d9
fix(locators): escape >> inside a regular expression (#23631)
To avoid selector being parsed as a chain.

Fixes #23540.
2023-06-12 10:34:37 -07:00
Dmitry Gozman
5cfd6d9fe9
fix(cr network): emit sw-handled requests when routing is enabled (#23589)
Previously, such requests were skipped because they never receive
`Fetch.requestPaused` as there was no real network.

Also cleanup some redundant tests and move them from chromium-only file.

Fixes #23424.
2023-06-08 10:33:28 -07:00
Max Schmitt
3c2a8fa306
chore: enable no-floating-promises ESLint rule for tests (#23376)
https://github.com/microsoft/playwright/issues/23339
2023-06-02 21:59:12 +02:00
Dmitry Gozman
1d5add6d99
test: fix should not fulfill with redirect status (#23459) 2023-06-01 23:11:03 -07:00
Dmitry Gozman
6bb5c0a549
fix: make evaluate not wait for scheduled navigations (#23402)
Fixes #23141.
2023-05-31 14:08:44 -07:00
Dmitry Gozman
2505d48b32
test: skip and unflake tests (#23399)
- `should respect tracesDir and name` does not work with service mode;
- `isVisible during navigation should not throw` had a short timeout.
2023-05-31 10:52:29 -07:00
João Neves
7e6e5f0706
feat: Support React forwards refs and memo (#23262)
This PR fixes the react selector behavior to support components that are
wrapped by the memo or forwardRef React builtin functions.

Previously these components couldn't be selected. This PR fixes that
behavior, enabling selecting those components.

Current behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> undefined
```

Fixed behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> <div id ="foo_component" />
```
2023-05-30 17:14:47 -07:00
Max Schmitt
2710fd8d6f
fix: should be able to upload multiple large files (#23360)
Fixes https://github.com/microsoft/playwright/issues/23258
2023-05-30 18:41:09 +02:00
Dmitry Gozman
00b34dddb2
chore: move TestServer under test/ (#23287) 2023-05-25 15:11:16 -07:00
Yury Semikhatsky
e0600f4799
test: enable passing request type test (#23273)
Fixes #22812
2023-05-25 09:43:41 -07:00
Jasiel Guillén
700062c836
feat(screenshot): Add customizable color option for masked elements (#23185)
I added a new option to the screenshot method to customize the color of
the box when we want to mask some elements for the screenshot.

The default color is pink `#FF00FF`, but with this new option you can
specify the color you like the most, like a nice green `#00FF00`:

```js
await page.screenshot({
  mask: [page.locator('div').nth(5)],
  maskColor: "#00FF00",
})
```


![ss](https://github.com/microsoft/playwright/assets/23271049/05f754de-0ba6-47a3-ae3e-769720d3da3b)

---------

Signed-off-by: Jasiel Guillén <darkensses@gmail.com>
2023-05-22 18:44:44 -07:00
Yury Semikhatsky
33f3a6002d
test: xhr request type for main resource url (#23174) 2023-05-19 17:59:17 -07:00
Dmitry Gozman
be7984bdc9
fix(unroute): do not compare regexp instances (#23101)
References #23092.
2023-05-17 16:27:32 -07:00
Playwright Service
aa6eb41466
feat(webkit): roll to r1848 (#23032)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-05-16 12:13:58 +02:00
Max Schmitt
17ab777db5
chore: set min viewport for WK on Win to 250x240 (#22969)
Follow-up for https://github.com/microsoft/playwright/pull/22956.
2023-05-14 16:59:15 +02:00
Playwright Service
ba0c4951c3
feat(firefox-beta): roll to r1408 (#22978)
Fixes https://github.com/microsoft/playwright/issues/21760

---------

Signed-off-by: Andrey Lushnikov <aslushnikov@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-05-12 09:27:08 -07:00
Dmitry Gozman
f2ad5bbfbb
fix(isVisible): return false during navigation (#22943)
Instead of throwing "Execution context was destroyed" error.

Drive-by: improve internal error messages for `ScopedRace` errors.

Fixes #22925.
2023-05-10 16:56:59 -07:00
Dmitry Gozman
80f46892cd
fix(getByLabel): ignore empty aria-label (#22935)
Accessible name computation ignores empty aria-label, and so should
getByLabel.

Fixes #22915.
2023-05-10 10:38:46 -07:00
Alexander Sorokin
cbf4f39957
fix: React selectors should work after unmount (#22750)
Fixes #22729
2023-05-10 06:18:01 -07:00
Pavel Feldman
2ead6e530f
docs: remove the networkidle mentions (#22906)
Fixes https://github.com/microsoft/playwright/issues/22897
2023-05-09 09:34:57 -07:00
Pavel Feldman
5fb426e7db
fix(webkit): do not update console counter on unhandled rejections (#22890)
Fixes https://github.com/microsoft/playwright/issues/22886
2023-05-08 18:50:40 -07:00
Dmitry Gozman
160888df99
feat(locators): reland locator.and(locator) (#22850)
Removed in #22223.
Fixes #22585.
2023-05-05 11:14:01 -07:00
Dmitry Gozman
42328478ea
feat: make console/dialog events based on subscription (#22835)
This way we do not send events from the server unless the client is
interested.

Fixes #22621.
2023-05-05 11:12:33 -07:00
Andrey Lushnikov
99d4887053
feat(firefox): roll to r1403 (#22540)
Fixes https://github.com/microsoft/playwright/issues/22082
Fixes https://github.com/microsoft/playwright/issues/20993
2023-04-21 21:45:41 -07:00
Max Schmitt
f6aa9f49ce
chore: make evaluate work with busted Array.prototype.map/push (#22528)
Fixes https://github.com/microsoft/playwright/issues/22460

Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2023-04-21 19:52:13 +02:00
☃ Elliot Shepherd
106fa45f50
feat(route): accept timeout to fetch (#22475)
Fixes: #22474
2023-04-20 08:41:33 -07:00
Pavel Feldman
d45efe881f
chore: don't leak from waitFor (#22465)
Fixes https://github.com/microsoft/playwright/issues/22458
2023-04-18 11:11:46 -07:00
Andrey Lushnikov
b7d06d4d24
test: worker network attribution is still not fixed in Firefox 113 (#22390)
We'll need to wait until it is fixed upstream.

References https://github.com/microsoft/playwright/issues/21760
2023-04-13 13:36:17 -07:00
Playwright Service
a5749c033d
feat(firefox): roll to r1396 (#22327)
Fixes https://github.com/microsoft/playwright/issues/21995
2023-04-11 08:49:44 -07:00
Andrey Lushnikov
8b8385b6cb
test: remove faulty test (#22321)
Turns out we cannot guarantee order of events in Firefox: it might
close the page before we get a response from renderer.

Thus removing a faulty test.

References https://github.com/microsoft/playwright/issues/20093
2023-04-10 20:12:39 -07:00
Yury Semikhatsky
8d2502ee62
test: make page-leaks tests pass in electron (#22277)
They've been failing
https://devops.playwright.dev/flakiness.html#filter_spec=page%2Fpage-leaks.spec.ts&test_parameter_filters=%5B%5D&timestamp=1680901928195
2023-04-07 17:20:49 -07:00
Dmitry Gozman
08cef43e82
feat(locator): remove locator.and and locator.not (#22223)
Not shipping for now, after API review.
2023-04-05 16:28:13 -07:00
Dmitry Gozman
35afb056ea
feat(locator): filter({ hasNotText }) (#22222)
The opposite of `filter({ hasText })`.
2023-04-05 14:13:28 -07:00
Andrey Lushnikov
29643a7bff
test: add regression tests for clicking (#22221)
https://github.com/microsoft/playwright/issues/21995
2023-04-05 13:20:39 -07:00
Dmitry Gozman
bc1de5f28d
feat(locator): filter({ hasNot }) (#22219)
This is the opposite of `filter({ has })`.
2023-04-05 12:45:46 -07:00
Playwright Service
8dd431745d
feat(firefox): roll to r1394 (#22199)
Fixes https://github.com/microsoft/playwright/issues/21621

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-04-05 11:39:23 -07:00
Dmitry Gozman
8bc7ed0469
test: remove element being dragged before drop (#22177)
This scenario hangs in Firefox, waiting for response to `mouseup` event.

References #21621.
2023-04-03 18:42:29 -07:00
Dmitry Gozman
ab85b23e67
fix(expect): report expect "Timed out" when it actually does (#22174)
Previously, it would say "Timed out" when page was closed at test
timeout, or not say "Timed out" when at least one element matched.

Fixes #21664.
2023-04-03 15:06:13 -07:00
Dmitry Gozman
26c00a97a5
fix(expect): do not produce logs twice (#22171) 2023-04-03 15:05:40 -07:00
Pavel Feldman
3b9e62432d
chore: do not leak on clicks (#22129)
Fixes #22115
2023-03-31 18:18:45 -07:00
Pavel Feldman
0d9ec60dc7
chore: implement jsHandle._objectCount in chromium (#22127) 2023-03-31 15:52:01 -07:00
MarcNum
fbdafc5fe3
feat: Adding trace option 'on-all-retries' (#21985)
Fixes: #21860
2023-03-31 13:04:24 -07:00
Max Schmitt
47c669caf2
test: fix service tests (#22111)
<img width="805" alt="image"
src="https://user-images.githubusercontent.com/17984549/229117984-1c70541b-7941-40e2-950d-a699e0fc4cc4.png">
2023-03-31 10:58:08 -07:00
Dmitry Gozman
a95ced0fef
fix(waitFor): when frameLocator does not match, resolve hidden/detached states (#22119)
Fixes #21879.
2023-03-31 10:54:07 -07:00
Dmitry Gozman
539d9873c2
feat: rename Locator.filter(locator) to Locator.and (#22101) 2023-03-30 14:41:30 -07:00
Dmitry Gozman
e6148bb725
feat: Locator.not(locator) (#22066) 2023-03-30 08:52:30 -07:00
Pavel Feldman
968abd27d5
chore: do not use attributes for trace target annotation (#22075)
Fixes: https://github.com/microsoft/playwright/issues/22004
2023-03-29 23:17:17 -07:00
Dmitry Gozman
548e4a0c0f
fix(role): account for unslotted elements being hidden for aria (#22070)
When element is not assigned to any slot in the shadow root, it is not
rendered and is considered hidden for ARIA in all browsers.

In Chromium/Firefox we use `Element.checkVisibility` that already
handles this, but in WebKit we have to check it manually.

Fixes #21487.
2023-03-29 17:08:05 -07:00
Dmitry Gozman
6929214dbf
feat(expect): expect(locator).toBeAttached() (#22067)
Fixes #13467.
2023-03-29 11:09:17 -07:00
Andrey Lushnikov
0b170ddc12
test: enable some of the previously disabled tests (#22047)
Fixes https://github.com/microsoft/playwright/issues/21549
2023-03-29 10:52:55 -07:00
Playwright Service
d8f5a3f2ce
feat(firefox-beta): roll to r1394 (#22052)
References https://github.com/microsoft/playwright/issues/21760

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-03-29 10:47:31 -07:00
Dmitry Gozman
525097d465
feat: Locator.filter(locator) (#21975)
Produces a locator that matches both locators.
Implemented through `internal:and` selector.

Fixes #19551.
2023-03-27 14:29:30 -07:00
Dmitry Gozman
d10fac4f6a
feat: Locator.or(locator) (#21884) 2023-03-22 15:28:59 -07:00
Yury Semikhatsky
e7d670e27b
test: waitFor(hidden) should succeed when frame is not in dom (#21880)
Failing test for https://github.com/microsoft/playwright/issues/21879
2023-03-22 08:56:50 -07:00
Dmitry Gozman
8accabdb59
test: gardening (#21814)
Notable changes:
- `page-event-crash` is not a page test, moving out of page/.
- One of the expect tests is directly covered by another, merging them.
2023-03-20 12:52:52 -07:00
Yury Semikhatsky
98befd8a16
test: run crash tests in separate worker (#21759)
Running crash tests in its own worker should ensure that the browser
logs from different tests are not interleaved:

<img width="1088" alt="image"
src="https://user-images.githubusercontent.com/9798949/225965857-9152a88e-a775-4935-955a-dd7e6b88409a.png">
2023-03-17 10:36:01 -07:00
Andrey Lushnikov
f192a74c5d
test: reenable screenshot test on firefox (#21738)
Fixes #20522
2023-03-17 01:37:39 -07:00
Pavel Feldman
c45d8749b0
chore: split trace events into phases (#21696) 2023-03-15 22:33:40 -07:00
Yury Semikhatsky
716d451be5
test: use toHaveURL in the new test (#21667) 2023-03-14 09:23:00 -07:00
Yury Semikhatsky
c691d1f436
test: skip "should respect the drop effect" in headed (#21648)
https://github.com/microsoft/playwright/issues/21646
2023-03-13 19:04:09 -07:00
Yury Semikhatsky
6b3e7faad5
test: url bar navigation vs js redirect (#21640)
The tests document current behavior when url bar navigation competes
with a js redirect.

Fixes #20749
2023-03-13 17:53:39 -07:00
Playwright Service
4e807f9824
feat(firefox): roll to r1390 (#21591) 2023-03-13 16:43:49 -07:00
Andrey Lushnikov
8abe9fcf22
tree gardening: disable & assign failing tests (#21575)
References https://github.com/microsoft/playwright/issues/21574
References https://github.com/microsoft/playwright/issues/21549
2023-03-10 12:04:25 -08:00
Andrey Lushnikov
870edd1aae
feat(firefox): roll Firefox to 1387 (#21542)
Fixes #21109
Fixes #21430
2023-03-10 09:25:54 -08:00
Andrey Lushnikov
7a1c5b2aa3
test: make the tree green (#21551)
References https://github.com/microsoft/playwright/issues/20522
References https://github.com/microsoft/playwright/issues/20993
References https://github.com/microsoft/playwright/issues/21435
References https://github.com/microsoft/playwright/issues/21512
References https://github.com/microsoft/playwright/issues/21549
References https://github.com/microsoft/playwright/issues/21550
2023-03-09 16:56:29 -08:00
Max Schmitt
77c9641215
test: make Android bots green (#21450) 2023-03-07 17:53:39 +01:00
Max Schmitt
41dc45d471
test: add test for page.goto with hash at the end (#21437)
https://github.com/microsoft/playwright/issues/21430
2023-03-07 17:53:30 +01:00
Dmitry Gozman
0c5d46bb94
feat: allow chaining locators with Locator.locator(anotherLocator) (#21391) 2023-03-03 14:50:53 -08:00
Andrey Lushnikov
bfc895787f
fix(firefox): fix reload with hash URLs (#21322)
Fixes #21145
2023-03-01 18:56:30 -08:00
Andrey Lushnikov
4d3b056f27
test: add more tests for reload (#21296)
Make sure `page.reload()` doesn't reload a related popup and
only reloads target page.
2023-03-01 10:52:55 -08:00
Andrey Lushnikov
b607c92651
test: add a regression test for reload bug in firefox (#21282)
References https://github.com/microsoft/playwright/issues/20791
2023-02-28 16:05:12 -08:00
Dmitry Gozman
27027658dc
chore: fix all Proxy() to account for symbol properties (#21272)
Fixes #20940.
2023-02-28 12:45:14 -08:00
Andrey Lushnikov
dd9a8da901
test: fix retargeting test on firefox (#21157)
The test was regressed in
https://github.com/microsoft/playwright/pull/21124

Fixes #21141
2023-02-23 07:35:58 -08:00
Max Schmitt
8b8444dacc
test: page.reload() on a page with a hash (#21152)
https://github.com/microsoft/playwright/issues/21145
2023-02-23 13:22:22 +01:00
Andrey Lushnikov
434fa470e3
test: fix page.goto test on Firefox (#21132)
Turns out Firefox can yield either of the two errors, depending
on the stage of the pending navigation.
2023-02-22 19:18:49 -08:00
Yury Semikhatsky
f61d02e46f
test: update selection expectations after roll (#21124)
https://github.com/microsoft/playwright/issues/20820
2023-02-22 17:24:04 -08:00
Andrey Lushnikov
3ff3567c89
test: update context menu tests (#21126)
It turns out these new contextmenu-based tests do not work on
Chromium-based browsers on Windows.

We consider context menu support a best-effort, so we skip them
for now.
2023-02-22 17:22:56 -08:00
Yury Semikhatsky
2bb6bc7ad0
test: mark new test as failing in ff (#21122)
The test is failing for overridden Date in Firefox.

#21109
2023-02-22 16:36:39 -08:00
Yury Semikhatsky
d6dae8ea1f
fix: eval serialization w/ overridden URL/RegExp/Date (#21112)
Fixes #21109
2023-02-22 15:45:42 -08:00
Pavel Feldman
3f8f2a0fdd
chore: do not use library stack capturer in test runner (#21075) 2023-02-21 19:24:17 -08:00
Andrey Lushnikov
07bb483156
test: add tests for input with open context menu (#21081)
These might be failing on certain platforms and browsers.

References #20823
2023-02-21 15:57:29 -08:00
Pavel Feldman
06fc72b6ed
revert(#12706): also fix related bugs it introduced (#21070) 2023-02-21 14:15:11 -08:00
Andrey Lushnikov
72942e81d5
chore: fixes to toBeInViewport (#20870) 2023-02-13 15:21:40 -08:00
Dmitry Gozman
6b69d23f44
fix(actions): ignore indeterminate for isChecked api (#20834)
Fixes #20190.
2023-02-10 18:56:45 -08:00
Dmitry Gozman
789b1c75e6
fix(expect): report received when timedOut during oneShot (#20806) 2023-02-10 14:59:21 -08:00
Pavel Feldman
6920a82f50
test: add fixme's (#20826)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-02-10 19:54:00 +01:00
Andrey Lushnikov
68e170ef89
feat: implement expect(locator).toBeInViewport() (#20668)
The method accepts a `ratio` option to assert the ratio
of the element in viewport. `ratio` defaults to `Number.MIN_VALUE`.

NOTE: this reverts commit d950f5b6ee and
adds `ratio` option support + does the rename.

Fixes #8740
2023-02-10 04:33:22 -08:00
Pavel Feldman
0678b6575f
chore(watch): allow toggling browser (#20738) 2023-02-08 08:36:02 -08:00
Dmitry Gozman
edfff8cd8c
test: run more tests in 'service' mode (#20734) 2023-02-07 18:25:33 -08:00
Dmitry Gozman
2d3e4027e7
fix(chromium): do not pre-populate non-preflight OPTIONS requests (#20684)
Fixes #20469.
2023-02-07 15:10:44 -08:00
Dmitry Gozman
fbccc8ef64
fix(role): closed <details> are considered hidden (#20726)
Fixes #20610.
2023-02-07 15:10:18 -08:00
Andrey Lushnikov
852b4bee0c
test: add a test for a button that closes popup (#20672)
References #20093

Signed-off-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-02-06 14:25:21 -08:00
Andrey Lushnikov
b736b0cc2d
test: add test with wheel events and opened popup (#20620)
This should be merged once Firefox Stable 1376 is rolled in.

References #19685
2023-02-06 14:23:14 -08:00
Andrey Lushnikov
1120b82ba2
feat(firefox): roll Firefox & Firefox Beta (#20670)
Fixes #19685 
Fixes #20093
2023-02-06 14:08:32 -08:00
Yury Semikhatsky
9303dd552d
test: enable span scroll in webkit (#20681)
Fixes #20165
2023-02-06 12:29:58 -08:00
Yury Semikhatsky
492e9f6d7c
test: scroll into view span element (#20628)
https://github.com/microsoft/playwright/issues/20165
2023-02-04 10:32:53 -08:00
Andrey Lushnikov
9c6a1a6ff0
fix: make sure screenshots work when main page context is tampered (#20615)
This patch has 2 fixes:
- screenshot code was accidentally using main page context to fetch
  page layout metrics instead of a utility context
- Avoid usage of `self.eval` inside utility context since it escapes
Firefox sandbox. This turns out to be an upstream bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1814898

Fixes #20434
2023-02-03 10:01:23 -08:00
Yury Semikhatsky
cf76d47e22
test: update 'should handle custom dataTransfer' expectation (#20595)
Headless linux was fixed by recent webkit roll, but it turns out the
test has been failing on webkit windows too.

#18013
2023-02-02 10:26:47 -08:00
Playwright Service
f56d29709e
feat(firefox-beta): roll to r1377 (#20516)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-02-02 07:14:18 -08:00
Yury Semikhatsky
8f229fac9e
test: custom dataTransfer type (#20571)
#18013
2023-02-01 17:18:58 -08:00
Dmitry Gozman
6ad4687f4d
feat(route): add maxRedirects option to Route.fetch (#20567)
References #20501.
2023-02-01 14:43:21 -08:00
Dmitry Gozman
c27ad35299
fix(locators): properly escape slash inside attributes (#20510)
Fixes #20471.
2023-01-30 13:27:41 -08:00
Yury Semikhatsky
cffe7b65e3
fix: do not hang on submitting target=_blank form (#20458)
Fixes #18392
2023-01-30 11:13:56 -08:00
Yury Semikhatsky
03b15f6550
test: submit form with target=_blank (#20462)
#18392
2023-01-30 08:37:05 -08:00
chimurai
f72d400952
chore: fix typos (#20473) 2023-01-30 09:53:28 +01:00
Dmitry Gozman
821949d580
test: update stale test expectations (#20423) 2023-01-27 21:52:34 -08:00
Yury Semikhatsky
bb01d99458
test: enable "intercept css variable with url" (#20455)
Fixes #19158
2023-01-27 11:09:40 -08:00
Dmitry Gozman
ead4989947
fix(api): Response.finished() throws when target closes (#20453) 2023-01-27 10:42:43 -08:00
Andrey Lushnikov
2af31edadd
feat: roll Firefox and Firefox-Beta to latest builds (#20449)
These builds initiate browser-side navigation for `page.goto` command.

Drive-by: add a minimal file URL test.
2023-01-27 09:31:45 -08:00
Andrey Lushnikov
9ca9b08d90
fix: better formatting for sparse arrays (#20379)
Right now arrays preview yields all array elements. In case
of a sparse array with a single element on index 10000000,
this results in a large string that OOM Node.js.

This patch changes pretty-printing. For example:

```ts
// Given this array
const a = [];
a[10] = 1;
// Before this patch, pretty printing will yield:
"[,,,,,,,,1]"
// With this patch, pretty printing yields:
"[empty x 9, 1]"
```

The new array pretty-printing is equal to what Chrome DevTools
do to render sparse arrays.

Fixes #20347
2023-01-27 05:07:55 -08:00
Yury Semikhatsky
0a9cf85653
test: intercept request from css variable (#20422)
#19158
2023-01-26 14:20:24 -08:00
Yury Semikhatsky
e8a1c91c52
test: enable test on webkit (#20404)
The fix is included into the recent webkit roll.

Fixes #20079
2023-01-26 10:13:21 -08:00
Playwright Service
d7366cfc7c
feat(chromium-tip-of-tree): roll to r1080 (#20323)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-01-25 10:23:12 +01:00
Playwright Service
00edf587d5
feat(webkit): roll to r1773 (#20342)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2023-01-25 10:03:50 +01:00
Yury Semikhatsky
7fcec1a06b
test: file input triggers input event only once (#20306)
#20079
2023-01-23 17:56:02 -08:00
Dmitry Gozman
d950f5b6ee
chore: remove toIntersectViewport for the next release (#20232)
Mostly reverts #19901.
2023-01-19 15:04:09 -08:00
Andrey Lushnikov
1b8b20dc25
chore: drop locator.viewportRatio() method (#20131)
As per API review discussion, we'd like to refrain from
exposing this method.
2023-01-19 08:46:45 -08:00
Andrey Lushnikov
780e64f2c6
test: fix toIntersectViewport test on WebKit @ Ubuntu 22.04 (#20132)
For some reason scrolling inline element into view doesn't
always work.
2023-01-16 00:11:33 -08:00
Pavel Feldman
d1c161ce99
chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
Dmitry Gozman
bd4efa9dc1
test: update tests for waituntil:commit (#20042)
Instead of never finishing the response which works differently across
browsers, stall the required script.
This makes "DOMContentLoaded" to never fire and properly tests the
"commit" signal.
2023-01-11 10:16:51 -08:00
Andrey Lushnikov
2a49c5e498
feat(expect): introduce expect(locator).toIntersectViewport() (#19901)
This is a new web-first assertion that should be used like this:

```ts
test('should work', async ({ page }) => {
  const locator = page.locator('body');
  // New web-first assertion.
  await expect(locator).toIntersectViewport();
  // The same functionality.
  await expect.poll(() => locator.viewportRatio()).toBeGreaterThan(0);
});
```

Fixes #8740
2023-01-06 16:56:24 -08:00
Andrey Lushnikov
1385007185
test: fix locator.viewportRatio() tests (#19931)
Drive-by: make sure `locator.viewportRatio()` returns `0`
for non-existing element.
2023-01-06 16:55:38 -08:00
Max Schmitt
4359111289
test: unskip wk test (#19903) 2023-01-05 22:51:08 +01:00
Andrey Lushnikov
3883799d68
feat: introduce locator.viewportRatio (#19761)
References #8740
2023-01-05 10:49:32 -08:00
Playwright Service
abe901d598
feat(chromium-tip-of-tree): roll to r1074 (#19853)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-01-05 19:04:20 +01:00
Andrey Lushnikov
caec93ef42
test: enable ssim-cie94 image comparison algorithm for our tests (#19313) 2022-12-29 23:48:28 -08:00
Dmitry Gozman
c1b9a56079
chore: migrate waitForSelector to not use rerunnable task (#19715) 2022-12-27 13:39:35 -08:00
Dmitry Gozman
24f2ccb4ca
feat(getByLabel): support aria-label (#19726)
References #19284.
2022-12-27 12:43:55 -08:00
Dmitry Gozman
0087bfac23
fix(role): update allowsNameFromContent to closer align with blink/gecko (#19692) 2022-12-27 09:06:46 -08:00
Pavel Feldman
7f5cd0aa8b
test(events): ensure events are dispatched in individual tasks (#19687)
Test for https://github.com/microsoft/playwright/issues/19685
2022-12-27 08:59:03 -08:00
Dmitry Gozman
cce29215f9
chore: make input actions not use rerunnable task (#19638) 2022-12-24 10:40:36 -08:00
Dmitry Gozman
eaae8ebbf3
chore: throw InvalidSelectorError from selector parser, add some tests (#19636) 2022-12-21 14:27:35 -08:00
Pavel Feldman
3afd83c8cc
chore: withdraw locator.enumerate (#19484) 2022-12-15 10:13:56 -08:00
Playwright Service
091234e57f
feat(firefox-beta): roll to r1372 (#19466)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-12-15 09:00:50 -08:00
Pavel Feldman
17a0074459
feat(api): introduce Locator.all, enumerate (#19461) 2022-12-14 16:42:50 -08:00
Dmitry Gozman
a27f1f744f
feat(getByLabel): support aria-labelledby (#19456)
Testing library also treats them equally.

Fixes #19284.
2022-12-14 13:51:05 -08:00
Max Schmitt
d418539309 test: make webview2 green 2022-12-14 09:47:42 +01:00
Pavel Feldman
d1559a0fcc
chore: route.fetch(postData) (#19436) 2022-12-13 14:01:39 -08:00
Pavel Feldman
6cadc56ea3
feat(api): allow getByTestId(regex) (#19419) 2022-12-13 08:43:13 -08:00
Max Schmitt
7b4ae20305
test: make webview2 green (#19429) 2022-12-13 08:39:16 -08:00
Pavel Feldman
7aa3935dcc
chore: match selected options by both value and label (#19316) 2022-12-07 09:04:32 -08:00
Fernando Garcia Llorente
cd4ccdfa29
feat: allow options in automatic screenshots (#19143)
Closes #9983 

Allowing Automatic Screenshots in `PlaywrightTestConfig` to have
`fullPage` & `omitBackground` as optional parameters.
2022-12-07 08:45:33 -08:00
Dmitry Gozman
4784dae10f
fix(role): accessibleName computation should walk the flat dom tree (#19301)
- When visiting `<slot>` element, descend into assigned nodes.
- When node has `assignedSlot`, skip it during regular traversal.

Fixes #18989.
2022-12-06 09:31:26 -08:00
Dmitry Gozman
81c8620bfe
chore: upgrade internal types to support TypeScript 4.9.3 (#19280)
Fixes https://github.com/microsoft/TypeScript/issues/51619

Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-12-05 17:22:25 -08:00
Max Schmitt
3565d97a36
feat(recorder): make it work with [contenteditable] (#19066)
https://github.com/microsoft/playwright/issues/19029
2022-12-01 12:41:03 -08:00
Playwright Service
dbe4362b9c
feat(firefox): roll to r1366 (#19185)
Fixes https://github.com/microsoft/playwright/issues/18307.

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>
2022-11-30 19:13:11 -08:00
Pavel Feldman
f0e8d8f074
feat(api): introduce route.fetch and route.fulfill(json) (#19184) 2022-11-30 17:26:19 -08:00
Pavel Feldman
5ac426b3d5
chore: expose utility script to inner evaluates (#19147) 2022-11-29 16:57:11 -08:00