playwright/tests/playwright-test
Dmitry Gozman 9cd704220c
reland(test runner): run hooks/modifiers as a part of the test (#12518)
Reland: worker.stop() before worker.run() was hanging because
`_runFinished` promise was not initially resolved.
---
This moves `beforeAll`, `afterAll` and some modifiers from running
as a separate entity into running inside a test.

Pros:
- All errors are reported as test errors.
- All artifacts are collected as test artifacts.
- Reporters support this out of the box.

Details:
- Each test computes the necessary hooks to run and runs them.
- Teardown is usually performed during the test (on test failure or worker stop).
- `skipRemaining` is added to `DonePayload` to preserve the behavior
  where `beforeAll` hook failure skips subsequent tests.
  This behavior can now be improved to only target tests affected by this hook.
2022-03-08 16:35:14 -08:00
..
assets fix(webServer): route output through reporters (#12198) 2022-02-18 07:54:01 -08:00
stable-test-runner chore: roll stable test-runner to ToT (#12472) 2022-03-02 23:47:55 +01:00
access-data.spec.ts feat(test-runner): introduce attachments (#7685) 2021-07-16 13:48:37 -07:00
babel.spec.ts chore: add support private methods in TS (#12051) 2022-02-11 14:46:49 -08:00
basic.spec.ts fix(test-fail): allow unhandled expects in test.fail (#11850) 2022-02-03 17:14:12 -08:00
command-line-filter.spec.ts chore: revert "fix(test-runner): escape backslashes in win cli (#11763)" (#12004) 2022-02-10 07:02:37 -08:00
config.spec.ts fix(reporters): normalize usage of isTTY, env.CI and debug env variables (#12295) 2022-02-24 12:39:28 -08:00
exit-code.spec.ts chore: don't throw on no testDir (#11950) 2022-02-08 15:27:05 -08:00
expect-soft.spec.ts feat(test-runner): support expect.soft (#11800) 2022-02-02 18:33:51 -08:00
expect.spec.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
fixture-errors.spec.ts reland(test runner): run hooks/modifiers as a part of the test (#12518) 2022-03-08 16:35:14 -08:00
fixtures.spec.ts reland(test runner): run hooks/modifiers as a part of the test (#12518) 2022-03-08 16:35:14 -08:00
gitignore.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
global-setup.spec.ts chore: allow opt-into the legacy global setup mode (#11888) 2022-02-07 10:41:56 -08:00
golden.spec.ts fix: explicitly ignore maxDiffPixels in toMatchSnapshot (#12570) 2022-03-07 16:55:35 -08:00
hooks.spec.ts reland(test runner): run hooks/modifiers as a part of the test (#12518) 2022-03-08 16:35:14 -08:00
list-mode.spec.ts fix(list mode): keep outputDir intact (#12291) 2022-02-22 12:50:26 -08:00
loader.spec.ts chore(test-runner): revert recent changes to fix tests (#12439) 2022-03-01 09:11:17 -08:00
match-grep.spec.ts test(test-runner): add tests to show that grep is case insensitive (#8091) 2021-08-09 14:05:51 -04:00
max-failures.spec.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
override-timeout.spec.ts test(test-runner): unflake override-timeout.spec.ts (#7869) 2021-07-29 13:34:46 -07:00
playwright-test-fixtures.ts feat(test-runner): implement expect(pageOrLocator).toHaveScreenshot (#12242) 2022-02-28 12:25:59 -08:00
playwright-test.config.ts devops: upload test-runner test results to flakiness dashboard (#12412) 2022-02-28 13:41:30 -08:00
playwright.artifacts.spec.ts reland(test runner): run hooks/modifiers as a part of the test (#12518) 2022-03-08 16:35:14 -08:00
playwright.expect.misc.spec.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
playwright.expect.text.spec.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
playwright.expect.true.spec.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
playwright.fetch.spec.ts test: add missing request tests (#9343) 2021-10-06 10:15:13 -07:00
playwright.spec.ts fix(test-runner): fix browser initialization in test modifiers (#11984) 2022-02-09 15:30:14 -08:00
playwright.trace.spec.ts chore: remove flaky-by-design test (#12434) 2022-03-01 08:52:52 -08:00
playwright.unhandled.spec.ts fix: do not mute route handler exceptions (#11555) 2022-01-22 22:19:32 +01:00
repeat-each.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
reporter-attachment.spec.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
reporter-base.spec.ts fix(test-runner): undefined body crash with manual attachments (#11995) 2022-02-10 12:33:38 -08:00
reporter-dot.spec.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
reporter-github.spec.ts feat(test-runner): support expect.soft (#11800) 2022-02-02 18:33:51 -08:00
reporter-html.spec.ts fix(reporters): normalize usage of isTTY, env.CI and debug env variables (#12295) 2022-02-24 12:39:28 -08:00
reporter-json.spec.ts fix(reporters): normalize usage of isTTY, env.CI and debug env variables (#12295) 2022-02-24 12:39:28 -08:00
reporter-junit.spec.ts feat(html): unhide html reporter (#9512) 2021-10-14 11:17:35 -07:00
reporter-line.spec.ts fix(reporters): normalize usage of isTTY, env.CI and debug env variables (#12295) 2022-02-24 12:39:28 -08:00
reporter-list.spec.ts fix(reporters): normalize usage of isTTY, env.CI and debug env variables (#12295) 2022-02-24 12:39:28 -08:00
reporter-raw.spec.ts fix(test runner): fixture teardown double error, testInfo.attach() (#11365) 2022-01-13 10:38:47 -08:00
reporter.spec.ts reland(test runner): run hooks/modifiers as a part of the test (#12518) 2022-03-08 16:35:14 -08:00
resolver.spec.ts fix(test loader): implement tsconfig paths through resolveFilename (#12357) 2022-02-25 15:43:58 -08:00
retry.spec.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
runner.spec.ts fix(test runner): shutdown redundant workers (#12062) 2022-02-14 10:57:15 -08:00
shard.spec.ts fix(test runner): disallow use(workerFixture) in describes (#8119) 2021-08-10 16:32:32 -07:00
stdio.spec.ts fix(reporters): normalize usage of isTTY, env.CI and debug env variables (#12295) 2022-02-24 12:39:28 -08:00
test-extend.spec.ts feat(test runner): make _extendTest experimental (#11210) 2022-01-05 15:54:00 -08:00
test-grep.spec.ts feat(test-runner): allow grepping in project (#12469) 2022-03-02 15:02:35 -08:00
test-ignore.spec.ts chore: revert "fix(test-runner): escape backslashes in win cli (#11763)" (#12004) 2022-02-10 07:02:37 -08:00
test-info.spec.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
test-modifiers.spec.ts reland(test runner): run hooks/modifiers as a part of the test (#12518) 2022-03-08 16:35:14 -08:00
test-output-dir.spec.ts reland(test runner): run hooks/modifiers as a part of the test (#12518) 2022-03-08 16:35:14 -08:00
test-parallel.spec.ts feat(test): introduce fully parallel mode (#12446) 2022-03-01 18:12:21 -08:00
test-serial.spec.ts feat(parallel): allow setting enclosing scope parallel mode (#11822) 2022-02-02 20:44:11 -08:00
test-step.spec.ts fix(stack): hide test runner stack frames (#9735) 2021-10-25 11:49:59 -07:00
test-use.spec.ts fix(test runner): improve error message for unexpected calls (#12240) 2022-02-18 18:25:18 -08:00
timeout.spec.ts fix(test runner): test.setTimeout whould not break debugging (#11004) 2021-12-17 15:17:48 -08:00
to-have-screenshot.spec.ts fix(toHaveScreenshot): round ratio up (#12540) 2022-03-04 18:55:48 -08:00
types-2.spec.ts feat(test runner): make _extendTest experimental (#11210) 2022-01-05 15:54:00 -08:00
types.spec.ts Revert "feat(test-runner): allow parametrized tests that don't extend base (#9301)" 2021-10-11 17:32:31 +02:00
web-server.spec.ts fix(webServer): route output through reporters (#12198) 2022-02-18 07:54:01 -08:00
worker-index.spec.ts feat(test runner): introduce TestInfo.parallelIndex (#9762) 2021-11-01 10:37:34 -07:00