Commit Graph

5898 Commits

Author SHA1 Message Date
Dmitry Gozman
5633520f45
fix(selenium connect): register in gracefullyCloseAll for driver cleanup (#9218)
Otherwise, killing the driver does not cleanup sessions in the grid.
2021-09-29 14:54:24 -07:00
Pavel Feldman
f78302e8dd
fix(toBeHidden): return true to missing elements (#9205) 2021-09-28 17:11:04 -07:00
Max Schmitt
55ddc553a5
chore: fix PlaywrightClient disconnection logic (#9149) 2021-09-29 01:54:10 +02:00
Dmitry Gozman
0a690778e4
fix(expect): beautiful expect stacks (#9204)
We now mark our wrapper as `__PWTRAP__[expect.toHaveText]` and
find it later in the stack trace.

Added trace/inspector tests to ensure this behavior in the future.
2021-09-28 16:02:34 -07:00
Yury Semikhatsky
b93718daea
feat(fetch): support ignoreHTTPSErrors option (#9206) 2021-09-28 15:33:36 -07:00
Pavel Feldman
2b055b3092
feat(api): introduce locator.waitFor (#9200) 2021-09-28 13:57:11 -07:00
Yury Semikhatsky
64657c3b65
feat(fetch): send Playwright as default user-agent for global fetch (#9195) 2021-09-28 13:01:35 -07:00
Dmitry Gozman
ed9b42a92d
feat(test runner): collect test error from worker teardown (#9190)
When the test fails (usually with timeout), we wait until all hooks are run
and worker scope is teared down before reporting test end result.

This allows us to collect any error details populated by teardown
in addition to the "timed out" message.
2021-09-28 10:56:50 -07:00
Yury Semikhatsky
ebe4e41606
test: add tests for Cross-Origin-Opener-Policy navigation (#9184) 2021-09-28 09:56:07 -07:00
Yury Semikhatsky
962547e716
test: get response body for COOP responses (#9196) 2021-09-28 09:54:05 -07:00
Dmitry Gozman
9a94ccaf0f
chore(test runner): remove DonePayload.failedTestId (#9186)
We now track failed tests on the dispatcher side.
This is a preparation for capturing more errors from
afterAll and worker teardown and attributing them to the last test.
2021-09-27 21:38:19 -07:00
Yury Semikhatsky
563652cc1d
browser(webkit): disable COOP support (#9185) 2021-09-27 16:40:46 -07:00
Dmitry Gozman
fa536786f2
fix(test runner): proper serial mode with beforeAll/afterAll failures (#9183) 2021-09-27 15:58:26 -07:00
Pavel Feldman
37ff9db7a0
chore: remove browserType.connect from .net - not yet ready (#9182) 2021-09-27 14:45:42 -07:00
Yury Semikhatsky
6be908d959
test: canvas updates are reflected on screenshots (#9180) 2021-09-27 13:45:03 -07:00
Pavel Feldman
c4c6efe7c7
chore: dedupe return types in the dotnet api generator (#9181) 2021-09-27 13:25:07 -07:00
Szymon Marczak
44c3b0270e
docs: mention empty string in userDataDir (#9069) 2021-09-27 12:50:35 -07:00
Dmitry Gozman
8dc8777ab4
feat(expect): toContainText(array) (#9160)
This matches when each expected item from the array
is matched to one of the resolved elements, in order.
Note this performs both "sub-array" and "substring" matching.

Drive-by: documentation fixes.
Drive-by: added "selector resolved to 3 elements" log line
when expecting arrays.
2021-09-27 11:14:35 -07:00
Max Schmitt
cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
github-actions[bot]
03376ed44b
feat(chromium): roll to r925110 (#9175)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-27 18:26:09 +02:00
Pavel Feldman
241411ad42
chore: render expect in trace viewer (#9141) 2021-09-27 09:19:59 -07:00
Max Schmitt
1a2aa0e2e5 devops: use Node.js 16 when rolling browsers 2021-09-27 15:32:07 +02:00
Kumar Aditya
3394bec364
docs(python): add docs about threading (#8829)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-09-27 12:22:16 +02:00
github-actions[bot]
83910a9469
browser(chromium): roll to r925110 (#9171)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-27 12:06:06 +02:00
Max Schmitt
4573ce0cf8
chore(test-runner): launch -> webServer (#9167) 2021-09-27 11:32:57 +02:00
Dmitry Gozman
0801a8c486
docs: cleanup test.describe.parallel.only doc (#9159) 2021-09-26 21:30:11 -07:00
Dmitry Gozman
ee25fefb62
chore: remove FatalDOMError (#9119)
We can now throw stackless errors instead.
Also fixed stackless errors on Firefox.
2021-09-24 20:51:09 -07:00
Dmitry Gozman
d22dd4a4e7
feat(test runner): improve fixture typings for function fixtures (#9138)
When fixture value `R` is a function, TypeScript sometimes confuses
function `R` and function `async ({}, use) => {}`. This leads to
`any` types in the latter because it could be either of the functions
as TS thinks.

The solution is to only accept the second syntax, assuming that noone
passes fixture value that is a function as is:

```js
// This will stop working.
test.extend<{ foo: (x: number) => number }>({
  foo: x => 2 * x,
});

// This will get inferred types and autocomplete.
test.extend<{ foo: (x: number) => number }>({
  foo: async ({}, use) => {
    await use(x => 2 * x);
  },
});
```
2021-09-24 19:59:30 -07:00
Dmitry Gozman
f4aaebfba0
fix(expect): produce "waiting for selector" log, corner cases (#9140) 2021-09-24 18:55:45 -07:00
Yury Semikhatsky
45b365d958
fix: increase recent logs buffer (#9143) 2021-09-24 17:28:06 -07:00
Dmitry Gozman
418ce9c17e
test: unflake a few tests (#9142) 2021-09-24 15:05:20 -07:00
Pavel Feldman
db6c55af51
chore: add a test for the log scale polling (#9136) 2021-09-24 12:54:33 -07:00
Pavel Feldman
1db41c330a
chore: migrate remaining expect to protocol (#9121) 2021-09-24 11:06:30 -07:00
Max Schmitt
4eede61f79
feat(chromium): roll to 924544 (#9131) 2021-09-24 18:13:12 +02:00
Max Schmitt
3632231cc1 chore: fix utils/roll_browser.js after #9078 2021-09-24 17:09:54 +02:00
Anže Vodovnik
6723a42544
docs(dotnet): add Null for dotnet in forced colors enum (#9051) 2021-09-24 16:31:53 +02:00
github-actions[bot]
231bf36029
browser(chromium): roll to r924544 (#9124)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-24 12:10:52 +02:00
Pavel Feldman
0908dc98c8
chore: migrate expect(locator).toMatchText to protocol (#9117) 2021-09-23 16:46:46 -07:00
Max Schmitt
d0a4480cf7
browser(webkit): fix text padding (#9114) 2021-09-23 12:08:07 -07:00
Dmitry Gozman
1fb9d21223
test: unflake "should have correct snapshot size" (#9099) 2021-09-23 11:40:55 -07:00
Max Schmitt
89aace688f
fix: make Serializable type any (#9059) 2021-09-23 11:06:34 -07:00
Joel Einbinder
40ae28e3bb
feat(test runner): add some fixture debugging (#8918) 2021-09-23 11:56:39 -04:00
Joel Einbinder
219d00d17b
chore(typescript): bump typescript to v4.4.3 (#9087) 2021-09-23 11:55:44 -04:00
Yury Semikhatsky
26bca47a47
test: add failing WebKit navigation test (#9097) 2021-09-23 08:45:40 -07:00
Pavel Feldman
e03db79682
fix(firefox): use global eval in injected script (#9101) 2021-09-22 21:49:14 -07:00
Dmitry Gozman
2afe76d86d
feat(launch): connect to process.env.SELENIUM_REMOTE_URL instead of local launch (#9056) 2021-09-22 21:13:32 -07:00
Dmitry Gozman
1bebbc31b2
test: unflake "should close the context without awaiting the failed download" (#9094) 2021-09-22 17:28:17 -07:00
Pavel Feldman
de4aa50d55
chore: simplify dom tasks (#9089) 2021-09-22 17:17:49 -07:00
Dmitry Gozman
d7901ea9ff
test: unflake inspector/pause.spec.ts (#9096) 2021-09-22 17:09:09 -07:00
Dmitry Gozman
b978ce33cb
test: unflake "should fail when frame detaches" (#9095) 2021-09-22 17:09:02 -07:00