Skip to content

Force custom menus in Integrated Browser smoke tests - #328969

Merged
benibenj merged 1 commit into
release/1.132from
benibenj/fix-stable-browser-smoke-menu
Aug 4, 2026
Merged

Force custom menus in Integrated Browser smoke tests#328969
benibenj merged 1 commit into
release/1.132from
benibenj/fix-stable-browser-smoke-menu

Conversation

@benibenj

@benibenj benibenj commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

The Integrated Browser smoke suite drives the browser toolbar overflow menu (Site Permissions) and the Add to Chat menu through HTML locators:

.monaco-menu-container:visible .action-menu-item

On macOS the default for window.menuStyle is quality dependent:

'default': product.quality !== 'stable' ? 'inherit' : (isMacintosh ? 'native' : 'inherit'),

So a stable build renders those menus as native OS menus, which never create a .monaco-menu-container element, while insiders renders custom HTML menus. Building both qualities from the same release/1.132 commit reproduces this: the suite passes on insiders and fails on stable with

locator.waitFor: Timeout 30000ms exceeded.
  - waiting for locator('.monaco-menu-container:visible .action-menu-item').filter({ hasText: 'Site Permissions' }).last()

The follow-on "after each" hook timeout is a cascade: the native menu stays open, so closing the browser page in afterEach never completes. Retries cannot help because the mismatch is deterministic per quality.

This pins window.menuStyle to custom for the suite so the menu-driving helpers hit the DOM menus they assert on, regardless of build quality. The suite covers browser actions, not native menu integration.

Validation runs in CI.

The suite drives the browser toolbar overflow and Add to Chat menus through HTML locators (.monaco-menu-container). On macOS, stable builds default window.menuStyle to 'native' while insiders default to 'inherit', so those menus render as native OS menus in stable and the locators never resolve.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 4, 2026 14:32
@benibenj
benibenj enabled auto-merge (squash) August 4, 2026 14:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Ensures Integrated Browser smoke tests consistently use DOM-rendered menus across build qualities.

Changes:

  • Batch-writes browser test settings.
  • Forces window.menuStyle to custom.
Show a summary per file
File Description
test/smoke/src/areas/browserView/browserView.test.ts Configures custom menus during suite setup.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 868a0535 Current: 7265de55

Changed (2)

chat/input/chatInput/VoiceModeConnecting/Dark
Before After
before after
chat/input/chatInput/VoiceModeConnecting/Light
Before After
before after

@benibenj
benibenj merged commit cc5405f into release/1.132 Aug 4, 2026
29 of 30 checks passed
@benibenj
benibenj deleted the benibenj/fix-stable-browser-smoke-menu branch August 4, 2026 14:58
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Aug 4, 2026
benibenj added a commit that referenced this pull request Aug 4, 2026
…ies (#328983)

The suite drives the browser toolbar overflow and Add to Chat menus through HTML locators (.monaco-menu-container). On macOS, stable defaults window.menuStyle to 'native' while insiders defaults to 'inherit', so those menus render as native OS menus in stable and the locators never resolve.

Pin the setting to 'custom' for the suite, seeded on disk before startup. Writing it at runtime instead would make SettingsChangeRelauncher pop a modal 'restart to take effect' dialog on Windows/Linux, blocking the workbench.

Ports #328969 and #328972 from release/1.132 to main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants