Skip to content

Fix Linux sanity UI test for Restricted-Mode-first workspace trust flow#321708

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-workspace-trust-dialog-issue
Draft

Fix Linux sanity UI test for Restricted-Mode-first workspace trust flow#321708
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-workspace-trust-dialog-issue

Conversation

Copilot AI commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

Since untrusted workspaces now open directly in Restricted Mode (workspace.trust.startupPrompt defaults to 'never'), the modal workspace-trust dialog is no longer shown on startup. The sanity UI harness still waited for the modal's "Yes, I trust the authors" button, so desktop-linux-x64 and server-web-linux-x64 timed out after 180s.

Updated test/sanity/src/uiTest.ts to grant trust via the new affordance instead of the removed modal:

  • Replaced dismissWorkspaceTrustDialog (waited for the modal button) with grantWorkspaceTrust.
  • grantWorkspaceTrust runs the Workspaces: Manage Workspace Trust command and clicks the Trust button in the workspace trust editor.
private async grantWorkspaceTrust(page: Page) {
	this.context.log('Granting workspace trust');
	await this.runCommand(page, 'Workspaces: Manage Workspace Trust');
	const trustButton = page.locator('.workspace-trust-buttons .monaco-button', { hasText: /^Trust$/ }).first();
	await trustButton.click();
	await page.waitForTimeout(500);
}

Copilot AI requested review from Copilot and removed request for Copilot June 17, 2026 01:31
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot June 17, 2026 01:37
Copilot AI changed the title [WIP] Fix workspace trust dialog issue in Linux sanity tests Fix Linux sanity UI test for Restricted-Mode-first workspace trust flow Jun 17, 2026
Copilot AI requested a review from dmitrivMS June 17, 2026 01:37
Comment thread test/sanity/src/uiTest.ts
this.context.log('Granting workspace trust');
await this.runCommand(page, 'Workspaces: Manage Workspace Trust');
const trustButton = page.locator('.workspace-trust-buttons .monaco-button', { hasText: /^Trust$/ }).first();
await trustButton.click();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot you will then need to click the "Close Modal Editor" to save it.

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.

Clicking Trust does not close the dialog?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, the Manage Trust full UI is different than the Modal.

@copilot - you will need to click "Close Modal Editor" (that's the hover text) after clicking the Trust button.

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