test(extension): cover browser_tabs close and select, extract tab-related suites#1553
Merged
yury-s merged 7 commits intomicrosoft:mainfrom Apr 16, 2026
Merged
test(extension): cover browser_tabs close and select, extract tab-related suites#1553yury-s merged 7 commits intomicrosoft:mainfrom
yury-s merged 7 commits intomicrosoft:mainfrom
Conversation
Close relies on Target.closeTarget handling added in microsoft/playwright#40249; the relay now needs chrome.tabs.remove in its allow-list to actually close the tab.
These tests (browser_tabs new/select/close, cmd+click, window.open) are v2-only. Grouping them in a dedicated file with a describe-level skip for v1 avoids repeating the skip on every test.
pavelfeldman
approved these changes
Apr 16, 2026
PM-Labs
pushed a commit
to PM-Labs/mcp-playwright
that referenced
this pull request
Apr 19, 2026
…ated suites (microsoft#1553) ## Summary - Add extension tests for `browser_tabs close` and `browser_tabs select` (v2 only). - Ship the matching relay fix via a playwright roll: the v2 relay now handles `Target.closeTarget` and includes `targetId` in `Target.detachedFromTarget` so `page.close()` resolves. - Refactor: extract tab-management, tab-grouping, and CLI tests into their own spec files, and move the shared connect-selector setup into a `connectAndNavigate` helper in `extension-fixtures.ts`. Closes the missing `chrome.tabs.remove` allow-list entry in the extension so the relay can actually close the tab.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
browser_tabs closeandbrowser_tabs select(v2 only).Target.closeTargetand includestargetIdinTarget.detachedFromTargetsopage.close()resolves.connectAndNavigatehelper inextension-fixtures.ts.Closes the missing
chrome.tabs.removeallow-list entry in the extension so the relay can actually close the tab.