Dmitry Gozman
b41b802662
fix(test runner): avoid dependency tracking colliding between esm and cjs ( #29994 )
...
When collecting dependencies both from CJS loader and from ESM loader,
the latter would overwrite the dependencies set instead of appending.
Also make sure cts/cjs/mts/mjs are all supported equally.
References #29747 .
2024-03-18 17:17:58 -07:00
Max Schmitt
a6d1fb93de
fix(trace-viewer): encode attachment filenames as UTF-8 ( #29993 )
...
Fixes https://github.com/microsoft/playwright/issues/29967
Tested in Firefox, Chromium, and Safari. This now leads to "good
attachment names" in Chromium and Safari, for Firefox, it won't produce
attachments, it will open them inline, but this is not a regression, was
before like that already.
See here for the spec:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#filename_2
---------
Signed-off-by: Max Schmitt <max@schmitt.mx>
2024-03-18 21:26:45 +01:00
Yury Semikhatsky
35db70ea1d
chore: trim file names longer than 60 chars (was 100) ( #29725 )
...
Test-specific output dir and snapshot names are trimmed to 60 chars
instead of just 100. The snapshot names are still trimmed at 100 chars
for backwards compatibility.
Reference https://github.com/microsoft/playwright/issues/29719
2024-03-18 12:53:15 -07:00
Pavel Feldman
ef4438ee99
chore: prepare to reuse test server from ui mode (2) ( #29966 )
2024-03-18 09:59:02 -07:00
Max Schmitt
048d6669fd
fix(reuse): reset Origin Private File System API ( #29921 )
...
Fixes https://github.com/microsoft/playwright/issues/29901
This clears the Origin Private File System API when using VSCode
extension.
2024-03-15 17:40:46 +01:00
Yury Semikhatsky
166d2d4fde
chore: separate results for repeated snapshot names ( #29880 )
...
Reference #29719
2024-03-12 16:10:43 -07:00
Yury Semikhatsky
59228f19ce
fix: tty.WriteStream method stubs for process.stdout/stderr ( #29865 )
...
Fixes #29839
2024-03-11 10:11:16 -07:00
Yury Semikhatsky
7f6f17d1c3
chore: simplify toMatchSnapshot names calculation ( #29862 )
...
Reference https://github.com/microsoft/playwright/issues/29719
2024-03-10 11:11:35 -07:00
Dmitry Gozman
d214778548
chore(test runner): move timeout handling to the top, stop inheriting runnable ( #29857 )
2024-03-08 15:19:36 -08:00
Dmitry Gozman
006ee7f3b0
feat: separate timeout for after hooks ( #29828 )
...
Instead of sharing the timeout with the test, and then extending it when
test times out, we give after hooks a separate timeout.
2024-03-06 12:31:54 -08:00
Sarkis Matinyan
0c3f60e95e
fix(ui): show stack frames in ui mode ( #29560 )
...
#29558 , #29500
2024-03-06 12:29:35 -08:00
Lukas Bockstaller
425f737eb6
feat: exposes tags in testInfo ( #29794 )
...
Fixes #29793 .
---------
Signed-off-by: Lukas Bockstaller <lukas.bockstaller@everest-erp.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-03-06 08:33:06 -08:00
Dmitry Gozman
1d4bdc6898
chore(test runner): make runAsStage throw and catch errors explicitly ( #29814 )
2024-03-05 16:35:11 -08:00
Dmitry Gozman
a3ed799cd5
fix(tsconfig): when extending, retain pathsBasePath from the original config ( #29822 )
...
This fixes a case where we incorrectly used the final config's base path
when resolving relative path mappings in the absence of the baseUrl.
Fixes #29816 .
2024-03-05 16:34:39 -08:00
Dmitry Gozman
abfd2c4e66
feat(ui mode): text filter should filter by explicit tags ( #29821 )
...
Fixes #29815 .
2024-03-05 10:58:55 -08:00
Dmitry Gozman
5eb8fea616
chore: rewrite worker main through TestInfoImpl._runAsStage ( #29644 )
2024-03-04 19:36:58 -08:00
Pavel Feldman
ef924c14e7
chore: do not use project id in telereporter ( #29776 )
2024-03-01 21:44:08 -08:00
Pavel Feldman
bbcc3c1238
chore: remove private config usage from telereporter ( #29771 )
2024-03-01 13:14:12 -08:00
Pavel Feldman
baf2cdf936
fix(ct): stop-gap for shared file import ( #29744 )
...
Fixes: https://github.com/microsoft/playwright/issues/29739
2024-02-29 19:13:32 -08:00
Pavel Feldman
d9a00342c8
fix(HEAD): revert GET->HEAD migration, net-effect was negative ( #29738 )
...
Fixes: https://github.com/microsoft/playwright/issues/29732
2024-02-29 09:02:05 -08:00
Stevan Freeborn
52b803ecf5
feat(trace mode): add on-first-failure mode for traces ( #29647 )
...
Implements the changes suggested in #29531
2024-02-28 14:39:18 -08:00
Yury Semikhatsky
d8c16c1edf
chore: roll stable runner to 1.42.0-beta-1708998235000 ( #29675 )
2024-02-27 08:36:03 -08:00
Yury Semikhatsky
1c8e8bea7e
chore: roll stable test runner to 1.42.0-beta-1708994059000 ( #29672 )
2024-02-26 17:39:25 -08:00
Pavel Feldman
9d0430fa26
chore: strengthen linting ( #29669 )
2024-02-26 16:52:28 -08:00
Pavel Feldman
a3aea813bc
chore: implement server-based list files ( #29633 )
2024-02-23 08:29:44 -08:00
Dmitry Gozman
f9aebda5db
fix(fixtures): attribute teardown step to the right TestInfo instance ( #29523 )
2024-02-20 12:35:43 -08:00
Yury Semikhatsky
f3fde992eb
chore: remove --project-grep, add wildcard support ( #29537 )
...
Reference #15128
2024-02-16 19:18:00 -08:00
Dmitry Gozman
269a293ba1
chore(test runner): allow TestInfoImpl without a TestCase ( #29534 )
...
This will be useful to run `beforeAll`/`afterAll` hooks with a separate
`TestInfo` instance, as well as run use helpers like
`_runAndFailOnError()` during scope teardown.
2024-02-16 12:43:13 -08:00
Dmitry Gozman
dc9cddde95
chore: do not rely on zones for predefined steps ( #29485 )
...
This fixes some edge cases where fixtures and steps inside them were
attached to the wrong parent (see the new test).
This will also allow to replace some `runAsStep` calls with a flat list
of tasks to do that do not rely on lexical scope.
2024-02-15 12:49:08 -08:00
Dmitry Gozman
08afb34c14
chore(test runner): make timeout error an Error ( #29515 )
2024-02-15 11:38:13 -08:00
Dmitry Gozman
bd5403dcad
chore: remove --tag
and tagFilter
( #29468 )
...
This makes new tags filtered by the `grep`. New `TestCase.tags` API now
includes both old and new tags.
2024-02-15 11:37:16 -08:00
Dmitry Gozman
bc2d4302f5
test: fix a broken reporter test ( #29514 )
...
It failed to print an error with missing stack, e.g. a timeout error.
2024-02-15 09:45:48 -08:00
Pavel Feldman
217c0618df
chore: rename find-related-tests to find-related-test-files ( #29483 )
2024-02-13 15:40:49 -08:00
Pavel Feldman
7aef5249d8
chore: pass the private data to the runner via config ( #29467 )
2024-02-13 09:34:03 -08:00
Dmitry Gozman
f605a5009b
fix(esmLoader): do not serialize the whole compilation cache after each import ( #29464 )
...
Instead, send the newly created cache entry only.
References #29418 .
2024-02-12 16:39:53 -08:00
Yury Semikhatsky
7834beb932
chore: extract --project-grep option for matching with regex ( #29445 )
...
Reference https://github.com/microsoft/playwright/issues/15128
2024-02-10 11:19:00 -08:00
Pavel Feldman
586d14f02c
chore: add find-related-tests command ( #29439 )
2024-02-09 19:02:42 -08:00
Yury Semikhatsky
7a86bf4af6
chore: delete store.ts ( #29423 )
2024-02-08 12:55:18 -08:00
Pavel Feldman
84dea09cb9
fix(ct): resolve components used in tests during the vite build ( #29407 )
2024-02-07 20:39:45 -08:00
Dmitry Gozman
3331a40647
feat(test runner): tags/annotations ( #29248 )
...
API changes:
- `test(title, details, body)` where details contain `tag` and
`annotation`.
- similar `details` property added to `test.skip`, `test.fail`,
`test.fixme`, `test.only`, `test.describe` and other `test.describe.*`
variations.
- `TestProject.tagFilter`/`TestConfig.tagFilter` that supports logical
tag expressions with `(`, `)`, `and`, `or` and `not`.
- `--tag` CLI option to filter by tags.
- New annotations are available in `TestInfo.annotations` and
`TestCase.annotations`.
- New tags are available in `TestCase.tags`.
Reporter changes:
- `json` reporter includes new tags in addition to old `@smoke`-style
tags. **Breaking**: tags are now listed with the leading `@` symbol.
- `html` reporter filters by old and new tags with the same `@smoke`
token.
Fixes #29229 , fixes #23180 .
2024-02-07 16:31:25 -08:00
Dmitry Gozman
9e285ce919
docs: do not call custom expect message an "error message" ( #29390 )
...
Fixes #29378 .
2024-02-06 12:12:45 -08:00
Pavel Feldman
4bafe71eb1
chore: unconflict ct test ports ( #29332 )
2024-02-05 16:47:39 -08:00
Pavel Feldman
5f5e058e96
fix(fixtures): tear down base fixture after error in derived ( #29337 )
...
Fixes https://github.com/microsoft/playwright/issues/29325
2024-02-05 16:47:15 -08:00
Max Schmitt
8c007fd3fc
fix(toHaveScreenshot): stylePath as first arg ( #29372 )
2024-02-05 22:52:16 +01:00
Pavel Feldman
dd0ef72cd8
feat(tsconfig): respect tsconfig references ( #29330 )
...
Fixes https://github.com/microsoft/playwright/issues/29256
2024-02-02 16:18:44 -08:00
Dmitry Gozman
b9565ea26e
chore(test runner): refactor beforeAll/afterAll hooks and modifiers ( #29309 )
...
- Modifiers that only depend on the worker fixtures are implemented as
`beforeAll` hooks.
- Modifiers that depend on test fixtures are implemented as `beforeEach`
hooks.
- Pushed `_runAndFailOnError` down the stack, wrapping individual hooks
instead of the whole "before hooks" section.
- Reused the same code to run `beforeAll` and `afterAll` hooks and
modifiers.
**Behavior change**: `test.skip()` inside a `beforeAll` now skips the
hook and all tests in the suite.
2024-02-02 14:25:46 -08:00
Max Schmitt
a6e0af6767
feat: parse projects option as RegExp ( #29327 )
...
Fixes https://github.com/microsoft/playwright/issues/15128
Relates https://github.com/microsoft/playwright/pull/17244
---------
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2024-02-02 23:05:20 +01:00
Pavel Feldman
fcd3c7b523
Revert "fix(ct): resolve paths before detecting JS" ( #29312 )
...
Reverts microsoft/playwright#29308
2024-02-01 21:11:30 -08:00
Pavel Feldman
eb8cbbbf62
fix(ct): resolve paths before detecting JS ( #29308 )
2024-02-01 21:06:31 -08:00
Pavel Feldman
4784139bb0
fix(test): do not allow mixing tests from different types ( #29284 )
...
Fixes https://github.com/microsoft/playwright/issues/29282
2024-02-01 11:59:56 -08:00