Skip to content

Commit

Permalink
Revert "fix: respect .only in --list mode" (#28770)
Browse files Browse the repository at this point in the history
This reverts commit 9a5bfc5.

As it breaks extension.

Reference #28709
  • Loading branch information
yury-s committed Dec 22, 2023
1 parent b62317c commit 5f14d42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/playwright/src/runner/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
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());
return taskRunner;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/playwright-test/list-mode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ test('should report errors', async ({ runInlineTest }) => {
expect(result.output).toContain('> 3 | oh = 2;');
});

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

Expand Down

0 comments on commit 5f14d42

Please sign in to comment.