playwright/tests/playwright-test
Simon Knott 201bad75d3
chore(test runner): rebase watch mode onto TestServerConnection (#32156)
Closes https://github.com/microsoft/playwright/issues/32076.

This PR rewrites `watchMode.ts` to use `TestServer` under the hood. It's
essentially a complete rewrite, so don't pay too much attention on the
old implementation. Note that there's no changes to tests, so all
behaviour we have specced out there still works.

To make this work without a superfluous WebSocket connection, I had to
refactor `TestServerConnection` a little. Originally, I pulled this into
a [separate PR](https://github.com/microsoft/playwright/pull/32132), but
then realised how small the refactoring is. So it's in this PR now. Let
me know if you'd like to land it separately.
2024-09-03 15:15:44 +02:00
..
__screenshots__/playwright.artifacts.spec.ts feat: allow options in automatic screenshots (#19143) 2022-12-07 08:45:33 -08:00
assets fix(ui): print the web server output in the ui mode (#31824) 2024-07-23 16:52:32 -07:00
stable-test-runner chore: roll stable test runner to 1.45.0-beta-1718411373000 (#31326) 2024-06-14 19:43:35 -07:00
access-data.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00
babel.spec.ts chore: allow marking scripts as external for transform (#23449) 2023-06-01 20:28:49 -07:00
basic.spec.ts chore: rewrite worker main through TestInfoImpl._runAsStage (#29644) 2024-03-04 19:36:58 -08:00
clear-cache.spec.ts chore: fix typos (#30645) 2024-05-08 19:40:03 +01:00
command-line-filter.spec.ts chore: remove unnecessary args in ttest (#21012) 2023-02-18 13:08:17 -08:00
config.spec.ts feat: TestProject.ignoreSnapshots (#30466) 2024-04-22 16:16:38 -07:00
decorators.spec.ts chore: allow ts decorators (#22080) 2023-03-29 20:43:08 -07:00
deps.spec.ts chore(test runner): do not produce some of the fake skipped test results (#27730) 2023-10-20 17:01:46 -07:00
esm.spec.ts feat(test runner): --tsconfig cli option (#31932) 2024-08-06 06:55:15 -07:00
exit-code.spec.ts feat: implement flag to fail flaky tests (#30618) 2024-05-15 09:10:10 -07:00
expect-configure.spec.ts chore: populate matcherResult in web assertions (#27133) 2023-09-16 14:24:10 -07:00
expect-poll.spec.ts fix(test runner): fix types to allow calling custom matchers on expect.poll (#32407) 2024-09-02 13:42:15 +02:00
expect-soft.spec.ts docs: do not call custom expect message an "error message" (#29390) 2024-02-06 12:12:45 -08:00
expect-to-pass.spec.ts feat: Support intervals arg for toPass (#30037) 2024-03-29 10:17:29 -07:00
expect.spec.ts fix(expect): throw unsupported error when using this.equals() in expect (#31723) 2024-07-17 13:22:00 +02:00
find-related-tests.spec.ts chore: rename find-related-tests to find-related-test-files (#29483) 2024-02-13 15:40:49 -08:00
fixture-errors.spec.ts feat: allow boxing and titling fixtures, simulate context fixture deps (#31423) 2024-06-24 21:43:43 -07:00
fixtures.spec.ts fix(test runner): make sure auto worker fixtures run before auto test fixtures (#27131) 2023-09-15 14:51:31 -07:00
gitignore.spec.ts feat(config): respectGitIgnore option (#30972) 2024-05-23 12:05:02 -07:00
global-setup.spec.ts chore: get rid of ConfigInWorker, use FullConfig instead (#30517) 2024-04-24 14:14:05 -07:00
golden.spec.ts fix(toHaveScreenshot): sanitize attachment names and paths (#31712) 2024-07-17 07:08:43 -07:00
hooks.spec.ts fix(test runner): timeout in fixture teardown should not prevent other slots (#32157) 2024-08-16 04:25:00 -07:00
list-files.spec.ts chore: implement server-based list files (#29633) 2024-02-23 08:29:44 -08:00
list-mode.spec.ts Revert "fix: respect .only in --list mode" (#28770) 2023-12-22 11:03:30 -08:00
loader.spec.ts fix(test runner): do not revert the transform (#31930) 2024-07-31 13:17:09 -07:00
match-grep.spec.ts fix(ui): when --grep is used, UI should only show selected tests (#31815) 2024-07-23 15:29:08 +02:00
max-failures.spec.ts chore(test runner): do not produce some of the fake skipped test results (#27730) 2023-10-20 17:01:46 -07:00
only-changed.spec.ts chore(test runner): rebase watch mode onto TestServerConnection (#32156) 2024-09-03 15:15:44 +02:00
override-timeout.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00
playwright-test-fixtures.ts fix(ui): added test in watched file should be run (#31842) 2024-07-30 14:17:41 +02:00
playwright.artifacts.spec.ts Revert "chore: move artifacts recording to TestLifecycleInstrumentation (#30935)" (#31686) 2024-07-15 07:01:51 -07:00
playwright.config.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00
playwright.config.ts chore: update flakiness metadata for better ui presentation (#31528) 2024-07-03 08:39:53 -07:00
playwright.connect.spec.ts Revert "feat(trace): record trace upon browser closure (#31563)" (#31677) 2024-07-15 01:08:51 -07:00
playwright.ct-build.spec.ts fix(ct): allow importing components from node_modules (#30493) 2024-04-24 12:32:28 -07:00
playwright.ct-react.spec.ts test: unflake should pass "key" attribute from JSX in variable (#31141) 2024-06-04 17:57:57 +02:00
playwright.fetch.spec.ts chore: hint at unroute for handle errors (#30949) 2024-05-22 08:54:19 -07:00
playwright.reuse.browser.spec.ts fix(connect): annotate internal api calls correctly (#31715) 2024-07-17 09:00:47 +02:00
playwright.reuse.spec.ts chore: do not close the reused context when video is on (#30807) 2024-05-15 09:05:06 -07:00
playwright.spec.ts fix(test runner): do not use @babel/plugin-transform-dynamic-import (#31285) 2024-06-13 06:18:44 -07:00
playwright.trace.spec.ts feat(test runner): record trace after a test-scoped fixture teardown times out (#32160) 2024-08-16 08:03:02 -07:00
playwright.unhandled.spec.ts fix(test runner): properly handle uncaught errors in test.fail() (#27734) 2023-10-23 09:14:31 -07:00
repeat-each.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00
reporter-attachment.spec.ts feat(reporter): links in attachment names, attachments name only (#31714) 2024-07-17 09:30:49 -07:00
reporter-base.spec.ts test: relax "should print if globalTimeout is reached" expectation (#30558) 2024-04-25 18:40:58 -07:00
reporter-blob.spec.ts fix(list reporter): print step ends in non-TTY mode (#31703) 2024-07-17 13:36:37 +02:00
reporter-dot.spec.ts chore: run more reporter tests through blob report, some fixes (#23765) 2023-06-16 21:30:55 -07:00
reporter-github.spec.ts chore: run more reporter tests through blob report, some fixes (#23765) 2023-06-16 21:30:55 -07:00
reporter-html.spec.ts feat(html reporter): open html attachments in new tab (#32389) 2024-09-02 08:35:53 +02:00
reporter-json.spec.ts feat(reporters): align and document environment variables (#30912) 2024-05-21 10:46:52 -07:00
reporter-junit.spec.ts chore: add common env vars for junit and json reporters (#30611) 2024-05-01 10:16:49 -07:00
reporter-line.spec.ts chore: trim multiline step titles to first line (#31269) 2024-06-12 08:24:12 -07:00
reporter-list.spec.ts fix(list reporter): print step ends in non-TTY mode (#31703) 2024-07-17 13:36:37 +02:00
reporter-markdown.spec.ts fix(merge): normalize path separators when merging across platforms (#28227) 2023-11-27 12:43:56 -08:00
reporter-onend.spec.ts feat(onEnd): allow overriding the exit code (#27010) 2023-09-12 13:37:30 -07:00
reporter.spec.ts test: unflake "should work with custom reporter" (#30526) 2024-04-24 20:03:39 -07:00
resolver.spec.ts fix(test runner): align with typescript behaviour for resolving index.js and package.json through path mapping (#32078) 2024-08-12 15:05:19 +02:00
retry.spec.ts fix(reporters): properly determine flaky status for serial mode (#30529) 2024-04-25 13:39:14 -07:00
runner.spec.ts Revert "fix: shut down workers before reporter.onEnd (#30329)" (#30551) 2024-04-25 14:21:54 -07:00
shard.spec.ts Fix various typos (Fixes #27396) (#27391) 2023-10-04 19:56:42 -07:00
snapshot-path-template.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00
stdio.spec.ts feat(test runner): do not mock tty in the worker process (#30107) 2024-03-25 15:31:58 -07:00
test-extend.spec.ts chore: composed->merge (#27555) 2023-10-11 13:56:27 -07:00
test-grep.spec.ts Fix various typos (Fixes #27396) (#27391) 2023-10-04 19:56:42 -07:00
test-ignore.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00
test-info.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00
test-modifiers.spec.ts fix(runner): do not run beforeEach hooks upon skip modifier (#31426) 2024-06-25 10:47:37 -07:00
test-output-dir.spec.ts chore: trim file names longer than 60 chars (was 100) (#29725) 2024-03-18 12:53:15 -07:00
test-parallel.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00
test-serial.spec.ts fix(reporters): properly determine flaky status for serial mode (#30529) 2024-04-25 13:39:14 -07:00
test-server-connection.spec.ts chore(ui): decouple TestServerConnection from websocket transport (#32274) 2024-08-23 14:58:34 +02:00
test-step.spec.ts chore(trace): do not nest API actions based on time (#31990) 2024-08-05 10:06:14 -07:00
test-tag.spec.ts chore: enforce tags format via typescript types (#32384) 2024-08-29 14:16:49 -07:00
test-use.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00
timeout.spec.ts fix(test runner): timeout in fixture teardown should not prevent other slots (#32157) 2024-08-16 04:25:00 -07:00
to-have-screenshot.spec.ts fix(toHaveScreenshot): attach "expected" when writing a missing expectation (#31745) 2024-07-18 02:42:44 -07:00
types-2.spec.ts feat(test runner): tags/annotations (#29248) 2024-02-07 16:31:25 -08:00
types.spec.ts fix(types): revert type changes made to support TS 5.5 (#32066) 2024-08-08 05:21:48 -07:00
ui-mode-fixtures.ts fix(tracing): speed up trace recording (#30946) 2024-05-22 15:19:32 -07:00
ui-mode-test-annotations.spec.ts test: ui mode annotations (#31965) 2024-08-01 14:47:50 -07:00
ui-mode-test-attachments.spec.ts feat(ui mode): linkify attachment names and content (#31960) 2024-08-01 09:27:45 -07:00
ui-mode-test-ct.spec.ts chore: automatically detect the dev server (#29176) 2024-01-25 11:46:47 -08:00
ui-mode-test-filters.spec.ts chore(ui): add test expectation that doesn't immediately pass on blank tree (#31850) 2024-07-25 12:21:24 +02:00
ui-mode-test-network-tab.spec.ts fix(ui-mode): format request body when headers are lower case (#32395) 2024-08-30 16:21:51 +02:00
ui-mode-test-output.spec.ts feat(ui mode): introduce Testing Options and Settings (#31841) 2024-07-25 11:23:43 -07:00
ui-mode-test-progress.spec.ts fix(test runner): make TestTracing responsible for trace management (#29181) 2024-01-26 15:52:25 -08:00
ui-mode-test-run.spec.ts chore(ui): update to react 18 (#32079) 2024-08-12 13:50:11 +02:00
ui-mode-test-screencast.spec.ts test: unflake various tests (#32014) 2024-08-05 08:29:13 -07:00
ui-mode-test-setup.spec.ts fix(ui): respect --output param (#32351) 2024-08-30 08:29:49 +02:00
ui-mode-test-shortcut.spec.ts chore: address UI Mode keyboard shortcut feedback (#30088) 2024-03-25 19:48:20 +01:00
ui-mode-test-source.spec.ts fix(dupe): render dupe test error indicator (#32303) 2024-08-23 14:33:37 -07:00
ui-mode-test-tree.spec.ts fix: rebuild project tree from scratch when listing tests (#30407) 2024-04-18 16:49:07 -07:00
ui-mode-test-update.spec.ts feat(ui mode): ui updates (#31894) 2024-07-29 07:32:13 -07:00
ui-mode-test-watch.spec.ts fix(ui): added test in watched file should be run (#31842) 2024-07-30 14:17:41 +02:00
ui-mode-trace.spec.ts fix(toHaveScreenshot): attach "expected" when writing a missing expectation (#31745) 2024-07-18 02:42:44 -07:00
watch.spec.ts chore(test runner): rebase watch mode onto TestServerConnection (#32156) 2024-09-03 15:15:44 +02:00
web-server.spec.ts fix(HEAD): revert GET->HEAD migration, net-effect was negative (#29738) 2024-02-29 09:02:05 -08:00
worker-index.spec.ts test: remove magic headers in ttest (#20867) 2023-02-14 19:20:56 -08:00