Revert "fix: respect .only in --list mode" (#28770)
This reverts commit 9a5bfc54e5.
As it breaks extension.
Reference #28709
This commit is contained in:
parent
b62317c056
commit
5f14d42723
|
|
@ -102,7 +102,7 @@ function addRunTasks(taskRunner: TaskRunner<TestRun>, config: FullConfigInternal
|
||||||
|
|
||||||
export function createTaskRunnerForList(config: FullConfigInternal, reporter: ReporterV2, mode: 'in-process' | 'out-of-process', options: { failOnLoadErrors: boolean }): TaskRunner<TestRun> {
|
export function createTaskRunnerForList(config: FullConfigInternal, reporter: ReporterV2, mode: 'in-process' | 'out-of-process', options: { failOnLoadErrors: boolean }): TaskRunner<TestRun> {
|
||||||
const taskRunner = new TaskRunner<TestRun>(reporter, config.config.globalTimeout);
|
const taskRunner = new TaskRunner<TestRun>(reporter, config.config.globalTimeout);
|
||||||
taskRunner.addTask('load tests', createLoadTask(mode, { ...options, filterOnly: true }));
|
taskRunner.addTask('load tests', createLoadTask(mode, { ...options, filterOnly: false }));
|
||||||
taskRunner.addTask('report begin', createReportBeginTask());
|
taskRunner.addTask('report begin', createReportBeginTask());
|
||||||
return taskRunner;
|
return taskRunner;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -152,8 +152,7 @@ test('should report errors', async ({ runInlineTest }) => {
|
||||||
expect(result.output).toContain('> 3 | oh = 2;');
|
expect(result.output).toContain('> 3 | oh = 2;');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should respect .only', async ({ runInlineTest }) => {
|
test('should ignore .only', async ({ runInlineTest }) => {
|
||||||
test.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/28709' });
|
|
||||||
const result = await runInlineTest({
|
const result = await runInlineTest({
|
||||||
'a.test.js': `
|
'a.test.js': `
|
||||||
const { test, expect } = require('@playwright/test');
|
const { test, expect } = require('@playwright/test');
|
||||||
|
|
@ -168,8 +167,9 @@ test('should respect .only', async ({ runInlineTest }) => {
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(0);
|
||||||
expect(result.output).toContain([
|
expect(result.output).toContain([
|
||||||
`Listing tests:`,
|
`Listing tests:`,
|
||||||
|
` a.test.js:3:7 › example1`,
|
||||||
` a.test.js:6:12 › example2`,
|
` a.test.js:6:12 › example2`,
|
||||||
`Total: 1 test in 1 file`
|
`Total: 2 tests in 1 file`
|
||||||
].join('\n'));
|
].join('\n'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue