Skip to content

Commit 5f14d42

Browse files
authored
Revert "fix: respect .only in --list mode" (#28770)
This reverts commit 9a5bfc5. As it breaks extension. Reference #28709
1 parent b62317c commit 5f14d42

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/playwright/src/runner/tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function addRunTasks(taskRunner: TaskRunner<TestRun>, config: FullConfigInternal
102102

103103
export function createTaskRunnerForList(config: FullConfigInternal, reporter: ReporterV2, mode: 'in-process' | 'out-of-process', options: { failOnLoadErrors: boolean }): TaskRunner<TestRun> {
104104
const taskRunner = new TaskRunner<TestRun>(reporter, config.config.globalTimeout);
105-
taskRunner.addTask('load tests', createLoadTask(mode, { ...options, filterOnly: true }));
105+
taskRunner.addTask('load tests', createLoadTask(mode, { ...options, filterOnly: false }));
106106
taskRunner.addTask('report begin', createReportBeginTask());
107107
return taskRunner;
108108
}

tests/playwright-test/list-mode.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ test('should report errors', async ({ runInlineTest }) => {
152152
expect(result.output).toContain('> 3 | oh = 2;');
153153
});
154154

155-
test('should respect .only', async ({ runInlineTest }) => {
156-
test.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/28709' });
155+
test('should ignore .only', async ({ runInlineTest }) => {
157156
const result = await runInlineTest({
158157
'a.test.js': `
159158
const { test, expect } = require('@playwright/test');
@@ -168,8 +167,9 @@ test('should respect .only', async ({ runInlineTest }) => {
168167
expect(result.exitCode).toBe(0);
169168
expect(result.output).toContain([
170169
`Listing tests:`,
170+
` a.test.js:3:7 › example1`,
171171
` a.test.js:6:12 › example2`,
172-
`Total: 1 test in 1 file`
172+
`Total: 2 tests in 1 file`
173173
].join('\n'));
174174
});
175175

0 commit comments

Comments
 (0)