mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-06 03:16:17 +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> {
|
||||
const testIds = new Set<string>();
|
||||
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;
|
||||
return treeItem ? collectTestIds(treeItem) : new Set();
|
||||
}
|
||||
}
|
||||
|
||||
@ -349,4 +336,18 @@ export function sortAndPropagateStatus(treeItem: TreeItem) {
|
||||
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');
|
||||
|
@ -85,7 +85,6 @@ export function createTaskRunnerForWatch(config: FullConfigInternal, reporter: R
|
||||
|
||||
export function createTaskRunnerForTestServer(config: FullConfigInternal, reporter: ReporterV2): TaskRunner<TestRun> {
|
||||
const taskRunner = new TaskRunner<TestRun>(reporter, 0);
|
||||
addGlobalSetupTasks(taskRunner, config);
|
||||
taskRunner.addTask('load tests', createLoadTask('out-of-process', { filterOnly: true, failOnLoadErrors: false, doNotRunDepsOutsideProjectFilter: true }));
|
||||
addRunTasks(taskRunner, config);
|
||||
return taskRunner;
|
||||
|
Loading…
Reference in New Issue
Block a user