Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(watch): global setup modifies files #21911

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/playwright-test/src/runner/uiMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { open } from '../utilsBundle';

class UIMode {
private _config: FullConfigInternal;
private _page!: Page;
private _page: Page | undefined;
private _testRun: { run: Promise<FullResult['status']>, stop: ManualPromise<void> } | undefined;
globalCleanup: (() => Promise<FullResult['status']>) | undefined;
private _testWatcher: { watcher: FSWatcher, watchedFiles: string[], collector: Set<string>, timer?: NodeJS.Timeout } | undefined;
Expand Down Expand Up @@ -148,7 +148,8 @@ class UIMode {
}

private _dispatchEvent(message: any) {
// eslint-disable-next-line no-console
if (!this._page)
return;
this._page.mainFrame().evaluateExpression(dispatchFuncSource, true, message).catch(e => this._originalStderr(String(e)));
}

Expand Down