playwright/packages/playwright-test/src
Dmitry Gozman 47045ba48d
chore(test runner): run hooks/modifiers as a part of the test (#12329)
chore(test runner): run hooks/modifiers as a part of the test

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-02-28 11:42:47 -08:00
..
matchers chore: refactor toMatchSnapshot once again (#12313) 2022-02-23 13:17:37 -08:00
reporters chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
third_party chore: move comparator logic to playwright-core (#12232) 2022-02-18 14:39:17 -08:00
cli.ts chore: revert "fix(test-runner): escape backslashes in win cli (#11763)" (#12004) 2022-02-10 07:02:37 -08:00
dispatcher.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
expect.ts feat(test-runner): support expect.soft (#11800) 2022-02-02 18:33:51 -08:00
experimentalLoader.ts fix(test loader): implement tsconfig paths through resolveFilename (#12357) 2022-02-25 15:43:58 -08:00
fixtures.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
globals.ts chore(test runner): extract TestInfoImpl (#11725) 2022-01-28 17:39:42 -08:00
index.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
ipc.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
loader.ts chore: parse-skip .tsx (#12143) 2022-02-16 15:45:35 -08:00
profiler.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
project.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
runner.ts fix(reporters): normalize usage of isTTY, env.CI and debug env variables (#12295) 2022-02-24 12:39:28 -08:00
test.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
testInfo.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
testType.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
transform.ts fix(test loader): implement tsconfig paths through resolveFilename (#12357) 2022-02-25 15:43:58 -08:00
tsxTransform.ts chore: parse-skip .tsx (#12143) 2022-02-16 15:45:35 -08:00
types.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
util.ts chore: refactor toMatchSnapshot once again (#12313) 2022-02-23 13:17:37 -08:00
webServer.ts fix(webServer): route output through reporters (#12198) 2022-02-18 07:54:01 -08:00
worker.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00
workerRunner.ts chore(test runner): run hooks/modifiers as a part of the test (#12329) 2022-02-28 11:42:47 -08:00