mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-07 11:46:42 +03:00
chore: do not run setup tasks on test run via server (#30202)
This commit is contained in:
parent
cc881fdb1f
commit
6e799fdfa8
@ -295,20 +295,7 @@ export class TestTree {
|
|||||||
}
|
}
|
||||||
|
|
||||||
collectTestIds(treeItem?: TreeItem): Set<string> {
|
collectTestIds(treeItem?: TreeItem): Set<string> {
|
||||||
const testIds = new Set<string>();
|
return treeItem ? collectTestIds(treeItem) : new Set();
|
||||||
if (!treeItem)
|
|
||||||
return testIds;
|
|
||||||
|
|
||||||
const visit = (treeItem: TreeItem) => {
|
|
||||||
if (treeItem.kind === 'case')
|
|
||||||
treeItem.tests.map(t => t.id).forEach(id => testIds.add(id));
|
|
||||||
else if (treeItem.kind === 'test')
|
|
||||||
testIds.add(treeItem.id);
|
|
||||||
else
|
|
||||||
treeItem.children?.forEach(visit);
|
|
||||||
};
|
|
||||||
visit(treeItem);
|
|
||||||
return testIds;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,4 +336,18 @@ export function sortAndPropagateStatus(treeItem: TreeItem) {
|
|||||||
treeItem.status = 'passed';
|
treeItem.status = 'passed';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function collectTestIds(treeItem: TreeItem): Set<string> {
|
||||||
|
const testIds = new Set<string>();
|
||||||
|
const visit = (treeItem: TreeItem) => {
|
||||||
|
if (treeItem.kind === 'case')
|
||||||
|
treeItem.tests.map(t => t.id).forEach(id => testIds.add(id));
|
||||||
|
else if (treeItem.kind === 'test')
|
||||||
|
testIds.add(treeItem.id);
|
||||||
|
else
|
||||||
|
treeItem.children?.forEach(visit);
|
||||||
|
};
|
||||||
|
visit(treeItem);
|
||||||
|
return testIds;
|
||||||
|
}
|
||||||
|
|
||||||
export const statusEx = Symbol('statusEx');
|
export const statusEx = Symbol('statusEx');
|
||||||
|
@ -85,7 +85,6 @@ export function createTaskRunnerForWatch(config: FullConfigInternal, reporter: R
|
|||||||
|
|
||||||
export function createTaskRunnerForTestServer(config: FullConfigInternal, reporter: ReporterV2): TaskRunner<TestRun> {
|
export function createTaskRunnerForTestServer(config: FullConfigInternal, reporter: ReporterV2): TaskRunner<TestRun> {
|
||||||
const taskRunner = new TaskRunner<TestRun>(reporter, 0);
|
const taskRunner = new TaskRunner<TestRun>(reporter, 0);
|
||||||
addGlobalSetupTasks(taskRunner, config);
|
|
||||||
taskRunner.addTask('load tests', createLoadTask('out-of-process', { filterOnly: true, failOnLoadErrors: false, doNotRunDepsOutsideProjectFilter: true }));
|
taskRunner.addTask('load tests', createLoadTask('out-of-process', { filterOnly: true, failOnLoadErrors: false, doNotRunDepsOutsideProjectFilter: true }));
|
||||||
addRunTasks(taskRunner, config);
|
addRunTasks(taskRunner, config);
|
||||||
return taskRunner;
|
return taskRunner;
|
||||||
|
Loading…
Reference in New Issue
Block a user