playwright/tests
Ross Wollman 854f321532
feat(api): add explicit async testInfo.attach (#10121)
feat(api): add explicit async testInfo.attach

We add an explicit async API for attaching file paths (and Buffers) to
tests that can be awaited to help users ensure they are attaching files
that actually exist at both the time of the invocation and later when
reporters (like the HTML Reporter) run and package up test artifacts.

This is intended to help surface attachment issues as soon as possible
so you aren't silently left with a missing attachment
minutes/days/months later when you go to debug a suddenly breaking test
expecting an attachment to be there.

NB: The current implemntation incurs an extra file copy compared to
manipulating the raw attachments array. If users encounter performance
issues because of this, we can consider an option parameter that uses
rename under the hood instead of copy. However, that would need to be
used with care if the file were to be accessed later in the test.
2021-11-23 09:30:53 -08:00
..
android test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
assets test: goto finishes on window.stop() (#10070) 2021-11-05 16:51:22 -07:00
chromium test(chromium): ensure that arguments can be passed with spaces (#10057) 2021-11-23 02:59:56 -05:00
config feat(test runner): replace declare/define with "options" (#10293) 2021-11-18 15:45:52 -08:00
electron test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -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: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
inspector codegen: use import instead of require for codegen tests (#10104) 2021-11-05 19:01:54 -07:00
page test(wheel): add test for scrolling while emulating mobile (#10224) 2021-11-23 02:59:32 -05:00
playwright-test feat(api): add explicit async testInfo.attach (#10121) 2021-11-23 09:30:53 -08:00
screenshot.spec.ts-snapshots test: add screenshot test with hanging main resource (#9972) 2021-11-02 16:55:32 +01:00
trace-viewer chore(zones): prepare to remove wrapApiCall, introduce zones (#10427) 2021-11-18 22:30:09 -08:00
beforeunload.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browser.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-add-cookies.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -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: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browsercontext-basic.spec.ts test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
browsercontext-clearcookies.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-cookies.spec.ts fix: support cookies with empty value (#9376) 2021-10-07 15:37:47 -07:00
browsercontext-credentials.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-csp.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-device.spec.ts test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
browsercontext-dsf.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-expose-function.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-fetch.spec.ts chore: fix API name capitalisation with APIRequestContext (#10240) 2021-11-11 08:46:17 -08:00
browsercontext-locale.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-network-event.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-page-event.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-pages.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-proxy.spec.ts test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
browsercontext-route.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-set-extra-http-headers.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-storage-state.spec.ts fix: support cookies with empty value (#9376) 2021-10-07 15:37:47 -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 chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-user-agent.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-viewport-mobile.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-viewport.spec.ts test: newContext works when both screen and viewport specified (#9520) 2021-10-18 10:45:47 -07:00
browsertype-basic.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browsertype-connect.spec.ts fix: support even older node 12 (#9718) 2021-10-22 15:59:52 -04:00
browsertype-launch-selenium.spec.ts test: move grid tests to installation-tests (#10418) 2021-11-18 15:32:09 -08:00
browsertype-launch-server.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browsertype-launch.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
capabilities.spec.ts feat(firefox): roll to r1296 (#9494) 2021-10-14 11:35:39 +02:00
channels.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
component-parser.spec.ts fix(monorepo): explicitly list package.json exports instead of using glob patterns (#9584) 2021-10-19 12:28:02 -04:00
css-parser.spec.ts fix(monorepo): explicitly list package.json exports instead of using glob patterns (#9584) 2021-10-19 12:28:02 -04:00
defaultbrowsercontext-1.spec.ts feat: mark PlaywrightClient's connection as remote (#9477) 2021-10-14 10:41:03 -07:00
defaultbrowsercontext-2.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
download.spec.ts feat(firefox): roll to r1299 (#9932) 2021-11-02 00:23:16 +01:00
downloads-path.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
emulation-focus.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
favicon.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
geolocation.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
global-fetch-cookie.spec.ts chore(fetch): rename ApiRequest* to APIRequest* (#9606) 2021-10-19 07:38:27 -07:00
global-fetch.spec.ts fix: API response to string (#10364) 2021-11-16 15:42:35 -08:00
har.spec.ts fix: support even older node 12 (#9718) 2021-10-22 15:59:52 -04:00
headful.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
hit-target.spec.ts fix(click): account for detached elements and iframe overlays (#10206) 2021-11-10 12:14:06 -08:00
ignorehttpserrors.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
index.d.ts test: added tests for WebSocket over Socks proxy (#7235) 2021-06-24 18:50:16 +02:00
launcher.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
logger.spec.ts chore(zones): prepare to remove wrapApiCall, introduce zones (#10427) 2021-11-18 22:30:09 -08:00
modernizr.spec.ts feat(webkit): roll to r1578 (#10323) 2021-11-15 08:43:51 -08:00
pdf.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
permissions.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
popup.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
port-forwarding-server.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
proxy.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -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: add screenshot test with hanging main resource (#9972) 2021-11-02 16:55:32 +01:00
selector-generator.spec.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
selectors-register.spec.ts chore(zones): prepare to remove wrapApiCall, introduce zones (#10427) 2021-11-18 22:30:09 -08:00
signals.spec.ts fix: do not show taskkill.exe output (#10244) 2021-11-11 18:32:22 +01:00
slowmo.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
snapshotter.spec.ts fix(trace-viewer): redirect, time and missing snapshot bugfixes (#10055) 2021-11-08 18:03:10 -08:00
tap.spec.ts feat(input): perform hit target check during input (#9546) 2021-11-05 17:31:28 -07:00
tracing.spec.ts chore: align internal test harness w/ @playwright/test (#9796) 2021-10-26 13:45:53 -07:00
tsconfig.json fix: support even older node 12 (#9718) 2021-10-22 15:59:52 -04:00
video.spec.ts tests: disable video tests on Firefox + Tracing (#10096) 2021-11-05 15:15:46 -07:00
web-socket.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00