Commit Graph

104 Commits

Author SHA1 Message Date
Pavel Feldman
710cec80a0
feat(test-runner): render step titles (#8270) 2021-08-17 16:41:36 -07:00
Pavel Feldman
97ba4f22f3
feat(test-runner): report nested steps (#8266) 2021-08-17 13:57:26 -07:00
Dmitry Gozman
2aff06ec73
fix(test runner): make sure tracing is not running on non-retries (#8232)
When sharing a context between tests and using `'on-first-retry'` we
could end up with tracing still running in non-retried tests. That's
extra overhead without a reason.
2021-08-16 16:46:35 -07:00
Dmitry Gozman
d32d50a906 fix(test runner): make sure we always teardown all fixtures (#8158)
Even if one of the fixtures throws, we should teardown all of them
so that we can run afterAll hooks.
2021-08-12 09:08:56 -07:00
Pavel Feldman
d2d71c4cdb
fix(reporter): group fixture initialization under before hooks (#8072) 2021-08-12 07:58:00 -07:00
Dmitry Gozman
44cdda43fe
feat(test runner): show stdio for failures in terminal reporters (#8150) 2021-08-11 16:44:19 -07:00
Dmitry Gozman
052e0e197c
fix(types): allow specifying scope when overriding fixtures (#8139)
Otherwise it show a confusing error.
2021-08-11 10:44:15 -07:00
Dmitry Gozman
a5e0965087
feat(test runner): implement test.describe.serial (#8132) 2021-08-10 21:26:45 -07:00
Joel Einbinder
64da74fba8
feat(test-runner): allow non-ascii characters in the output dir path (#8093) 2021-08-10 21:24:35 -07:00
Dmitry Gozman
c9c1ea6546
fix(test runner): disallow use(workerFixture) in describes (#8119)
Using a worker fixture forces a new worker. This might be unexpected
when part of the test file runs in one worker, and another runs
in another worker. Top-level use of worker fixtures is still fine.
2021-08-10 16:32:32 -07:00
Dmitry Gozman
9d6c7cdf20
fix(test runner): ensure we run after hooks after failures (#8102) 2021-08-10 10:54:05 -07:00
Dmitry Gozman
2744cd6c9a
feat(test runner): remove createContext fixture (#8109)
We can now use `browser.newContext()` or `browser.newPage()` instead.
2021-08-10 09:26:36 -07:00
Dmitry Gozman
3bf3318350
fix(test runner): make sure options, trace and screenshot apply to all contexts (#8083)
- Uses some auto fixtures to set default options and instrumentation on BrowserType.
- Moves screenshot, trace and video to worker-scoped fixtures.
- Throws in page/context when used from beforeAll/afterAll.
- Plumbs around BrowserType to be accessible from Browser and BrowserContext.
2021-08-09 18:09:11 -07:00
Dmitry Gozman
e638c4597f
fix(test runner): do not swallow afterAll failure (#8099) 2021-08-09 14:21:53 -07:00
Dmitry Gozman
87548f94c1
feat(test runner): support test fixtures in beforeAll/afterAll (#8082)
Each hook gets its own test scope. This is not too useful for
object fixtures like `page` (although one can use a page in
`beforeAll` to save storage state), but much more useful for option
fixtures like `viewport`.
2021-08-09 13:26:33 -07:00
Dmitry Gozman
41949e559e
Revert "feat(test runner): file scope fixtures (#7969)" (#8081)
This reverts commit 1bbf86d060,
leaving small improvements around.
2021-08-09 12:33:16 -07:00
Joel Einbinder
91394b257c
test(test-runner): add tests to show that grep is case insensitive (#8091) 2021-08-09 14:05:51 -04:00
Pavel Feldman
290f601dae
feat(expect): introduce explicit default async expect timeout (#8071) 2021-08-07 22:08:56 -07:00
Pavel Feldman
3424f59e67
chore(expect): polish matcher names, remote arguable ones (#8060) 2021-08-06 16:58:42 -07:00
Dmitry Gozman
5f297b6894
feat(junit reporter): add attachments to stdout (#8059)
`JUnitReporter` follows the common format for attachments in JUnit reports,
recognized by GitLab and Jenkins among others.
2021-08-06 15:47:54 -07:00
Dmitry Gozman
d846c05619
fix(test runner): make obtainWorker() resolve with null when stopping (#8018)
This ensures that we properly exit from `Dispatcher.run()`, print
epilogue and set the right exit code.
2021-08-05 15:00:00 -07:00
Dmitry Gozman
1bbf86d060
feat(test runner): file scope fixtures (#7969)
These are reset after running tests from a single file.
2021-08-04 21:11:02 -07:00
Dmitry Gozman
ea4f42b7ed
feat(report): add video to attachments (#7976) 2021-08-03 17:07:57 -07:00
Max Schmitt
385d489b35
feat(test-runner): re-enable web server (#7906)
Co-authored-by: Joel Einbinder <joel.einbinder@gmail.com>
2021-08-03 23:24:14 +02:00
Pavel Feldman
3b34e57ee4
feat(test-runner): introduce test.step (#7956) 2021-08-02 22:11:37 -07:00
Pavel Feldman
5803035c1b
feat(test-runner): introduce steps (#7952) 2021-08-02 17:17:20 -07:00
Pavel Feldman
af30d267b6
feat(test-runner): experiemental expect plumbing (#7926) 2021-07-30 16:07:02 -07:00
Dmitry Gozman
081b8683a3
feat(test runner): expect(locator) matchers to show a nice error on timeout (#7935) 2021-07-30 13:12:49 -07:00
Dmitry Gozman
5a3ebfc9f9
fix(test runner): dot reporter incorrectly splits by 80 (#7925) 2021-07-30 01:34:28 -07:00
Pavel Feldman
4163cec93b
feat(test-runner): introduce actionTimeout and navigationTimeout (#7919) 2021-07-29 21:03:50 -07:00
Dmitry Gozman
34c0c342fa
fix(test runner): make test order stable when fixtures are changing (#7923)
We used to sort based on workerHash, and that changes depending on
the exact worker fixtures list. Now we replace workerHash with
an ordinal when constructing the TestGroup list to preserve the
natural order.
2021-07-29 18:27:47 -07:00
Dmitry Gozman
40901e8b9a
feat(test runner): test.skip(title, testFunction) syntax (#7922) 2021-07-29 14:33:37 -07:00
Dmitry Gozman
dd0b089d13
feat(test runner): createContext fixture for multi-context scenarios (#7779) 2021-07-29 14:03:58 -07:00
Joel Einbinder
626dd23ce1
test(test-runner): unflake override-timeout.spec.ts (#7869) 2021-07-29 13:34:46 -07:00
Dmitry Gozman
82d2ec0b2d
test: unflake "max-failures should stop workers" (#7918) 2021-07-29 13:32:44 -07:00
Pavel Feldman
1807142eb7
feat(expect): even more matchers (#7902) 2021-07-29 07:33:19 -07:00
Pavel Feldman
3187ffdebf
feat(expect): add more matchers (#7891) 2021-07-28 15:44:44 -07:00
Dmitry Gozman
3f0485486d
feat(test runner): show errors from interrupted tests when available (#7874)
This shows the exact operation that is timing out (like click) when
user hits Ctrl+C.
2021-07-28 15:43:37 -07:00
Pavel Feldman
49e9f8c15e
feat(expect): add text and true matchers (#7873) 2021-07-28 12:07:11 -07:00
Pavel Feldman
b8dc0b9156
feat(expect): implement toMatchText (#7871) 2021-07-27 20:26:12 -07:00
Dmitry Gozman
da9b488d0d
fix(test-runner): sharding tests does not show a lot of skips (#7708) 2021-07-27 11:04:38 -07:00
Dmitry Gozman
cb978848d9
test(test runner): check custom reporter with .only tests (#7862) 2021-07-27 10:37:18 -07:00
Dmitry Gozman
cf886b3829
fix(test runner): align shard info to be one-based everywhere (#7859)
We used to treat shard from cli and shard from config differently.
2021-07-27 09:13:04 -07:00
Dmitry Gozman
bf6482a58d
fix(test runner): do not override browserName when using without --browser (#7806) 2021-07-23 09:04:20 -07:00
Dmitry Gozman
03ebe21323
faet(test runner): help when describe() is misused (#7753) 2021-07-22 12:34:37 -07:00
Joel Einbinder
483b7d6a0d
feat(test-runner): mark launch as experimental (#7757) 2021-07-21 09:51:27 -05:00
Joel Einbinder
20ba7c3a96
feat(test-runner): use require.resolve for globalSetup and globalTeardown (#7752) 2021-07-20 15:13:40 -05:00
Joel Einbinder
051dc332a6
feat(test-runner): use require to resolve reporters (#7749) 2021-07-20 15:03:01 -05:00
Max Schmitt
c84c5c8c9b
fix(test-runner): do not list tests to stdout when JSON reporter is used (#7730) 2021-07-20 01:10:43 +02:00
Joel Einbinder
0cf9cf0829
fix(test-runner): set expand: false for expect. (#7722) 2021-07-19 11:59:53 -05:00