Skip to content

Conversation

@Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Nov 17, 2025

Mirrors microsoft/playwright-vscode#706 into UI mode.

@Skn0tt Skn0tt requested a review from dgozman November 17, 2025 09:50
@Skn0tt Skn0tt self-assigned this Nov 17, 2025
@Skn0tt
Copy link
Member Author

Skn0tt commented Nov 17, 2025

The second commit is a breaking change for the VS Code extension, so we can only merge it after the update to the extension was released.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Skn0tt
Copy link
Member Author

Skn0tt commented Nov 17, 2025

Looks like a problem with windows paths.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

});
}, [projectFilters, isRunningTest, testModel, testServerConnection, updateSnapshots, singleWorker]);

const runVisibleTests = React.useCallback(() => runTests('bounce-if-busy', visibleTestIds, new Set(queryParams.args)), [runTests, visibleTestIds]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure how queryParams.args integrates here. Could you please explain? I'd assume we always use collectTestIds() when running tests, and use queryParams.args when listing to filter things, but I'm not exactly sure.

Copy link
Member Author

@Skn0tt Skn0tt Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wanted to make it as much of a mechanical refactoring as possible, so I didn't think too closely about the meaning here. We passed queryParams.args into locations before, and we used visibleTestIds here for reasons unbeknownst to me. So I kept it the same.

I refactored it now and was able to remove a bunch of code, so that's great!

@github-actions

This comment has been minimized.

@Skn0tt Skn0tt requested a review from dgozman November 18, 2025 11:10
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

}, [filterText, testModel, statusFilters, projectFilters, runningState, isRunningTest, mergeFiles]);

const runTests = React.useCallback((mode: 'queue-if-busy' | 'bounce-if-busy', testIds: Set<string>) => {
const runTests = React.useCallback((mode: 'queue-if-busy' | 'bounce-if-busy', testTree: TestTree, testItems: Iterable<TreeItem>) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that we pass TestTree here, especially when it differs from testTree declared on the line 249. Can we pass testIds + locations instead? Perhaps introduce a type for this pair.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

config.cliListOnly = false;
config.cliPassWithNoTests = true;
config.cliArgs = params.locations || [];
config.cliArgs = params.locations;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not backwards-compatible, so older VSCode extension won't be able to run tests. We should update the extension first.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally agree! #38235 (comment)

@Skn0tt Skn0tt requested a review from dgozman November 20, 2025 13:51
Copy link
Contributor

@dgozman dgozman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. Can we add tests similar to VSCode ones, where we run tests defined in a helper, outside of testDir, etc?

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/init-page.spec.ts:21 › --init-page @mcp-windows-latest

2431 passed, 116 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

Test results for "tests 1"

2 failed
❌ [playwright-test] › runner.spec.ts:118 › should ignore subprocess creation error because of SIGINT @macos-latest-node18-2
❌ [installation tests] › playwright-electron-should-work.spec.ts:31 › electron should work with special characters in path @package-installations-windows-latest

4 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1079 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-library] › library/inspector/cli-codegen-pick-locator.spec.ts:35 › should update locator highlight `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104 › should work with strict CSP policy `@firefox-ubuntu-22.04-node18`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:154 › should show snapshots for steps `@windows-latest-node18-2`

40291 passed, 787 skipped


Merge workflow run.

@Skn0tt
Copy link
Member Author

Skn0tt commented Nov 21, 2025

that actually caught a bug! please take another look.

@Skn0tt Skn0tt requested a review from dgozman November 21, 2025 12:49
@Skn0tt Skn0tt merged commit 0b48735 into microsoft:main Nov 24, 2025
30 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants