Skip to content

test(extension): cover browser_tabs close and select, extract tab-related suites#1553

Merged
yury-s merged 7 commits intomicrosoft:mainfrom
yury-s:feat-tab-close-tests
Apr 16, 2026
Merged

test(extension): cover browser_tabs close and select, extract tab-related suites#1553
yury-s merged 7 commits intomicrosoft:mainfrom
yury-s:feat-tab-close-tests

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented Apr 16, 2026

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.

yury-s added 6 commits April 16, 2026 10:47
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.
@yury-s yury-s merged commit a2b2d99 into microsoft:main Apr 16, 2026
6 checks passed
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.
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