playwright/tests
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
..
android fix(android): fix android tests (#8209) 2021-08-15 22:54:30 -07:00
assets feat(launch): connect to process.env.SELENIUM_REMOTE_URL instead of local launch (#9056) 2021-09-22 21:13:32 -07:00
chromium fix(connect): report all frames in existing page to the client (#8910) 2021-09-14 12:44:49 -07:00
config feat(launch): connect to process.env.SELENIUM_REMOTE_URL instead of local launch (#9056) 2021-09-22 21:13:32 -07:00
electron chore: bring in folio source (#6923) 2021-06-06 17:09:53 -07:00
emulation-focus.spec.ts-snapshots test: roll to folio@0.4.0-alpha28 (#6918) 2021-06-04 20:54:58 -07:00
firefox test: cleanup tests and configs after last folio update (#6463) 2021-05-08 17:45:04 -07:00
inspector fix(expect): produce "waiting for selector" log, corner cases (#9140) 2021-09-24 18:55:45 -07:00
page fix(expect): produce "waiting for selector" log, corner cases (#9140) 2021-09-24 18:55:45 -07:00
playwright-test feat(test runner): improve fixture typings for function fixtures (#9138) 2021-09-24 19:59:30 -07:00
screenshot.spec.ts-snapshots test: roll to folio@0.4.0-alpha28 (#6918) 2021-06-04 20:54:58 -07:00
snapshotter.spec.ts-snapshots fix(tracing): rewrite blob urls so that we can intercept them (#8423) 2021-08-24 17:05:26 -07:00
trace-viewer test: unflake a few tests (#9142) 2021-09-24 15:05:20 -07:00
beforeunload.spec.ts fix: make sure page.goto navigates away from pages with beforeunload (#8770) 2021-09-09 13:19:50 -07:00
browser.spec.ts test: prepare test to use options as passed (#6557) 2021-05-13 10:22:23 -07:00
browsercontext-add-cookies.spec.ts test: update sameSite cookie expectations on WebKit Win (#8138) 2021-08-11 10:27:41 -07:00
browsercontext-add-init-script.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
browsercontext-base-url.spec.ts test: add more baseURL tests for edge-cases (#7586) 2021-07-13 21:11:46 +02:00
browsercontext-basic.spec.ts Revert "feat: add defaultTimeout browser context configuration option (#6944)" (#7057) 2021-06-10 18:38:56 -07:00
browsercontext-clearcookies.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
browsercontext-cookies.spec.ts test: update sameSite cookie expectations on WebKit Win (#8138) 2021-08-11 10:27:41 -07:00
browsercontext-credentials.spec.ts test: prepare test to use options as passed (#6557) 2021-05-13 10:22:23 -07:00
browsercontext-csp.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
browsercontext-device.spec.ts test: roll to folio@0.4.0-alpha13 (#6570) 2021-05-15 07:42:35 -07:00
browsercontext-dsf.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
browsercontext-expose-function.spec.ts Revert "chore(eval): merge internal evaluate functions (#7517)" (#7535) 2021-07-09 16:19:42 +02:00
browsercontext-fetch.spec.ts feat(fetch): support options in playwright._newRequest (#9061) 2021-09-22 12:44:22 -07:00
browsercontext-locale.spec.ts feat(webkit): bump to 1492 (#6887) 2021-06-03 16:21:23 -07:00
browsercontext-network-event.spec.ts test: fix flaky 'should not fire events for favicon' test (#8738) 2021-09-07 13:05:29 +02:00
browsercontext-page-event.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
browsercontext-pages.spec.ts test: roll to folio@0.4.0-alpha16 (#6656) 2021-05-20 09:51:09 -07:00
browsercontext-proxy.spec.ts test: make borwsercontext-proxy tests use test proxy server (#8318) 2021-08-19 13:34:32 -07:00
browsercontext-route.spec.ts feat(routes): add support for the times option (#8399) 2021-08-24 20:45:50 +02:00
browsercontext-set-extra-http-headers.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
browsercontext-storage-state.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
browsercontext-strict.spec.ts fix: strict mode on page.* methods on context level (#8324) 2021-08-19 23:08:28 +02:00
browsercontext-timezone-id.spec.ts feat(webkit): bump to 1492 (#6887) 2021-06-03 16:21:23 -07:00
browsercontext-user-agent.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
browsercontext-viewport-mobile.spec.ts test: move all page tests to a subdirectory (#6427) 2021-05-05 19:10:28 -07:00
browsercontext-viewport.spec.ts test(drag): add high dpi drag test (#7412) 2021-07-12 17:20:08 -05:00
browsertype-basic.spec.ts test: prepare test to use options as passed (#6557) 2021-05-13 10:22:23 -07:00
browsertype-connect.spec.ts test: unflake "should timeout in socket while connecting" (#9093) 2021-09-22 17:08:49 -07:00
browsertype-launch-selenium.spec.ts feat(launch): connect to process.env.SELENIUM_REMOTE_URL instead of local launch (#9056) 2021-09-22 21:13:32 -07:00
browsertype-launch-server.spec.ts chore: simplify client-side browserType.connect routine (#8596) 2021-08-31 15:56:55 -07:00
browsertype-launch.spec.ts chore: remove isContextDestroyedError heuristic (#8456) 2021-08-26 18:44:49 -07:00
capabilities.spec.ts browser(firefox): enable SharedArrayBuffer in Firefox builds (#8610) 2021-09-01 12:27:37 +02:00
channels.spec.ts feat(fetch): introduce global fetch request (#8927) 2021-09-14 18:31:35 -07:00
component-parser.spec.ts feat: support props matching in react and vue selectors (#8104) 2021-08-10 17:10:14 -07:00
css-parser.spec.ts fix(css selector): absolutize relative CSS selectors (#9088) 2021-09-22 14:13:00 -07:00
defaultbrowsercontext-1.spec.ts test: update sameSite cookie expectations on WebKit Win (#8138) 2021-08-11 10:27:41 -07:00
defaultbrowsercontext-2.spec.ts feat: add forced-colors media query emulation (#6903) 2021-09-03 21:48:06 +02:00
download.spec.ts test: unflake "should close the context without awaiting the failed download" (#9094) 2021-09-22 17:28:17 -07:00
downloads-path.spec.ts fix: support relative downloadsPath directory for downloads (#6402) 2021-05-05 17:07:10 +02:00
emulation-focus.spec.ts test: prepare test to use options as passed (#6557) 2021-05-13 10:22:23 -07:00
favicon.spec.ts test: prepare test to use options as passed (#6557) 2021-05-13 10:22:23 -07:00
geolocation.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
global-fetch.spec.ts feat(fetch): support options in playwright._newRequest (#9061) 2021-09-22 12:44:22 -07:00
har.spec.ts feat(har): add _requestref (#8847) 2021-09-11 17:25:00 -07:00
headful.spec.ts feat(chromium): roll Chromium to M94 (#8047) 2021-08-09 13:57:17 -07:00
ignorehttpserrors.spec.ts fix(connect): respect timeout in all scenarios (#6762) 2021-05-26 15:18:52 -07:00
index.d.ts test: added tests for WebSocket over Socks proxy (#7235) 2021-06-24 18:50:16 +02:00
launcher.spec.ts fix: various test-related fixes (#6916) 2021-06-04 18:43:54 -07:00
logger.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
modernizr.spec.ts feat(webkit): roll WebKit to 1521 (#7798) 2021-07-23 09:13:57 -07:00
pdf.spec.ts test: prepare test to use options as passed (#6557) 2021-05-13 10:22:23 -07:00
permissions.spec.ts test: prepare test to use options as passed (#6557) 2021-05-13 10:22:23 -07:00
popup.spec.ts test: prepare test to use options as passed (#6557) 2021-05-13 10:22:23 -07:00
port-forwarding-server.spec.ts feat(firefox): roll to r1292 (#8731) 2021-09-06 22:57:26 +02:00
proxy.spec.ts test(webkit): mark web socket over socks test as failing on Win (#7631) 2021-07-14 21:06:00 -07:00
resource-timing.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
screenshot.spec.ts test: roll to folio@0.4.0-alpha16 (#6656) 2021-05-20 09:51:09 -07:00
selector-generator.spec.ts test: roll to folio@0.4.0-alpha6 (#6366) 2021-04-30 13:26:13 -07:00
selectors-register.spec.ts test: fix flaky 'should not fire events for favicon' test (#8738) 2021-09-07 13:05:29 +02:00
signals.spec.ts test: roll to folio@0.4.0-alpha16 (#6656) 2021-05-20 09:51:09 -07:00
slowmo.spec.ts test: cleanup bad usages of pageTest (#6430) 2021-05-06 07:08:22 -07:00
snapshotter.spec.ts fix(snapshot): render adoptedStyleSheets used in more than one node (#8886) 2021-09-16 09:37:38 -04:00
tap.spec.ts test: fix locator-misc-1 tests on Android (#7985) 2021-08-04 20:11:17 +02:00
tracing.spec.ts fix(tracing): retain script resources, but no body (#8758) 2021-09-07 15:23:13 -07:00
tsconfig.json test: added tests for WebSocket over Socks proxy (#7235) 2021-06-24 18:50:16 +02:00
video.spec.ts test: unflake a few tests (#9142) 2021-09-24 15:05:20 -07:00
web-socket.spec.ts fix(websockets): filter for text and binary frames (#7360) 2021-06-28 21:23:29 +02:00