mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: show global setup errors in ui mode (#21942)
Fixes: [21941](https://github.com/microsoft/playwright/issues/21941)
This commit is contained in:
parent
900f9deb4f
commit
5ff8c5f782
@ -66,7 +66,7 @@ class UIMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async runGlobalSetup(): Promise<FullResult['status']> {
|
async runGlobalSetup(): Promise<FullResult['status']> {
|
||||||
const reporter = await createReporter(this._config, 'watch');
|
const reporter = await createReporter(this._config, 'run');
|
||||||
const taskRunner = createTaskRunnerForWatchSetup(this._config, reporter);
|
const taskRunner = createTaskRunnerForWatchSetup(this._config, reporter);
|
||||||
reporter.onConfigure(this._config);
|
reporter.onConfigure(this._config);
|
||||||
const context: TaskRunnerState = {
|
const context: TaskRunnerState = {
|
||||||
@ -75,6 +75,7 @@ class UIMode {
|
|||||||
phases: [],
|
phases: [],
|
||||||
};
|
};
|
||||||
const { status, cleanup: globalCleanup } = await taskRunner.runDeferCleanup(context, 0);
|
const { status, cleanup: globalCleanup } = await taskRunner.runDeferCleanup(context, 0);
|
||||||
|
await reporter.onExit({ status });
|
||||||
if (status !== 'passed') {
|
if (status !== 'passed') {
|
||||||
await globalCleanup();
|
await globalCleanup();
|
||||||
return status;
|
return status;
|
||||||
@ -151,7 +152,7 @@ class UIMode {
|
|||||||
clearCompilationCache();
|
clearCompilationCache();
|
||||||
reporter.onConfigure(this._config);
|
reporter.onConfigure(this._config);
|
||||||
const status = await taskRunner.run(context, 0);
|
const status = await taskRunner.run(context, 0);
|
||||||
reporter.onExit({ status });
|
await reporter.onExit({ status });
|
||||||
|
|
||||||
const projectDirs = new Set<string>();
|
const projectDirs = new Set<string>();
|
||||||
for (const p of this._config.projects)
|
for (const p of this._config.projects)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user