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
Pavel Feldman
241411ad42
chore: render expect in trace viewer ( #9141 )
2021-09-27 09:19:59 -07:00
Max Schmitt
4573ce0cf8
chore(test-runner): launch -> webServer ( #9167 )
2021-09-27 11:32:57 +02: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
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
0908dc98c8
chore: migrate expect(locator).toMatchText to protocol ( #9117 )
2021-09-23 16:46:46 -07:00
Dmitry Gozman
1fb9d21223
test: unflake "should have correct snapshot size" ( #9099 )
2021-09-23 11:40:55 -07:00
Yury Semikhatsky
26bca47a47
test: add failing WebKit navigation test ( #9097 )
2021-09-23 08:45:40 -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
Dmitry Gozman
e6f5404621
test: unflake "should timeout in socket while connecting" ( #9093 )
2021-09-22 17:08:49 -07:00
Dmitry Gozman
568ec05a97
fix(junit): produce a single system-out entry ( #9091 )
...
Instead of multiple `system-out` entries we produce a single one
with concatenated content. This is compatible with various junit xml
parsers in the wild.
2021-09-22 15:28:57 -07:00
Dmitry Gozman
f0d23b5d4d
fix(css selector): absolutize relative CSS selectors ( #9088 )
...
Selectors like `> div` are replaced by `:scope > div`,
which is useful for combining them with parent selectors.
This is a part of CSS Level 4 spec.
2021-09-22 14:13:00 -07:00
Yury Semikhatsky
79eb7744bc
feat(fetch): support options in playwright._newRequest ( #9061 )
2021-09-22 12:44:22 -07:00
Dmitry Gozman
e85a3a5a41
fix(page.content): throw a nice error when navigation intervenes ( #9080 )
2021-09-22 10:40:15 -07:00
Max Schmitt
449a593050
fix(fetch): be compatible with a 0 timeout ( #9071 )
2021-09-22 10:30:56 -07:00
Dmitry Gozman
018467911b
test: introduce some common test fixtures ( #9060 )
2021-09-21 16:24:48 -07:00
Max Schmitt
d354d14fb9
chore: move Frame.waitForTimeout to the server side ( #9053 )
2021-09-21 22:06:14 +02:00
Max Schmitt
f9c5279c3a
fix(test-runner): toHaveURL respect baseURL ( #9050 )
2021-09-21 21:41:24 +02:00
Yury Semikhatsky
9b0e0c2273
fix: restore support for slowmo connect option ( #9038 )
2021-09-21 09:12:44 -07:00
Dmitry Gozman
7ec1035b98
test: improve child process utilities in tests ( #9036 )
2021-09-20 17:17:12 -07:00
Dmitry Gozman
b575c0e2e6
fix(actions): do not throw evaluate protocol errors from actions ( #8997 )
...
When using `evaluate` or `evaluateHandle` internally during actions
like `click`, we can sometimes get protocol errors if page
navigates. In this case, we throw the protocol error right away.
Instead, we can treat such a protocol error similar to "detached"
error and retry in the new execution context.
2021-09-17 22:18:00 -07:00
Yury Semikhatsky
cc15227327
fix: do not dedup header values ( #8998 )
2021-09-17 17:19:13 -07:00
Pavel Feldman
63ff405e6e
fix(inspector): stop on all snapshottable actions ( #8990 )
2021-09-17 15:24:15 -07:00
Yury Semikhatsky
43a690c204
feat(fetch): set content-length header if post data is present ( #8979 )
2021-09-17 09:00:18 -07:00
Yury Semikhatsky
806a71a4f0
feat(fetch): support form data and json encodings ( #8975 )
2021-09-16 17:48:43 -07:00
Dmitry Gozman
43213614a1
fix(test runner): after hooks step should not be nested ( #8969 )
2021-09-16 15:51:27 -07:00
Joel Einbinder
eafba43e15
fix(snapshot): render adoptedStyleSheets used in more than one node ( #8886 )
...
.
2021-09-16 09:37:38 -04:00
Dmitry Gozman
5379b2dcba
fix(test runner): account for errors with inconsistent stack/message ( #8950 )
2021-09-15 21:28:36 -07:00
Yury Semikhatsky
2380b07f30
feat(fetch): introduce FetchRequest.dispose, fulfill with global fetch ( #8945 )
2021-09-15 14:02:55 -07:00
Darrell Breeden
d82cb9a2ff
feat: addition of tags to JSON reporter output ( #8920 )
2021-09-15 12:30:22 -07:00
Pavel Feldman
14bc663742
chrome: don't nest pw:api steps ( #8932 )
2021-09-15 11:34:23 -07:00
Dmitry Gozman
b8a46580dd
fix(expect): toHaveText, toContainText and toHaveTitle normalize whitespace ( #8929 )
2021-09-14 19:24:29 -07:00
Yury Semikhatsky
c58f34fb2e
feat(fetch): introduce global fetch request ( #8927 )
2021-09-14 18:31:35 -07:00
Pavel Feldman
5253a7eb54
feat(html): restore trace, video, screenshot ( #8925 )
2021-09-14 16:26:31 -07:00
Yury Semikhatsky
5141407c6b
fix(fetch): prefix request with underscore ( #8922 )
2021-09-14 12:56:09 -07:00
Yury Semikhatsky
bdea9c74c4
fix(connect): report all frames in existing page to the client ( #8910 )
2021-09-14 12:44:49 -07:00
Joel Einbinder
afae5bef5d
feat(mouse): page.mouse.wheel ( #8690 )
2021-09-14 15:22:52 -04:00
Will 保哥
db1c8b2693
fix(codegen): NUnit's Equal API should be Assert.AreEqual ( #8859 )
2021-09-13 21:19:21 -07:00
Pavel Feldman
aa76cb5610
fix(tracing): fix tests via tracking context close state ( #8906 )
2021-09-13 21:12:36 -07:00
Pavel Feldman
16baaa317d
chore: remove stale html experiments ( #8905 )
2021-09-13 20:34:46 -07:00
Pavel Feldman
a1adc15ea3
tests: mark win32/webkit cookie multivalue test as failing
2021-09-13 20:13:25 -07:00
Pavel Feldman
1925c85dfb
feat(report): render attachment as a part of failure ( #8903 )
2021-09-13 18:07:40 -07:00