Skip to content

Commit 27bfeae

Browse files
toklumppclaude
andcommitted
fix(gen-ai): Re-query server row after modal close to avoid stale reference
After saving tool selection and closing the modal in the auto-unlock test, re-query the server row before clicking the tools button again. This prevents stale element references that can cause flaky test failures when the DOM updates after modal interactions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent e86dd6a commit 27bfeae

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/gen-ai/frontend/src/__tests__/cypress/cypress/tests/mocked/playground

packages/gen-ai/frontend/src/__tests__/cypress/cypress/tests/mocked/playground/mcpTab.cy.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,9 @@ describe('Playground - MCP Servers', () => {
424424
mcpToolsModal.find().should('not.exist');
425425

426426
cy.step('Re-open tools modal to verify persistence');
427-
freshServerRow.findToolsButton().click();
427+
// Re-query server row after modal closes to avoid stale reference
428+
const reopenServerRow = playgroundPage.mcpTab.getServerRow(serverName, serverUrl);
429+
reopenServerRow.findToolsButton().click();
428430
mcpToolsModal.find().should('be.visible');
429431

430432
cy.step('Verify tool selection persisted (2 tools deselected)');

0 commit comments

Comments
 (0)