Skip to content

Commit af93722

Browse files
gigaraclaude
andcommitted
fix(e2e): use try/catch for expandSection click instead of unconditional force
Unconditional force:true bypasses Playwright actionability checks and causes unexpected side-panel behavior on Linux CI (form shows description instead of opening). Try normal click first; fall back to force only when an overlay (macOS VS Code notification) blocks the element. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent df7b33b commit af93722

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • packages/ballerina-extension/e2e-test/e2e-playwright-tests/utils/pages

packages/ballerina-extension/e2e-test/e2e-playwright-tests/utils/pages/SidePanel.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ export class SidePanel {
5858
*/
5959
public async expandSection(sectionTitle: string): Promise<void> {
6060
const sectionContainer = this.getLocator().getByText(sectionTitle, { exact: true });
61-
await sectionContainer.click({ force: true });
61+
try {
62+
await sectionContainer.click({ timeout: 5000 });
63+
} catch {
64+
// Fall back to force click if a VS Code overlay (e.g. notification popup)
65+
// is blocking the element — this can occur on macOS but not on Linux CI.
66+
await sectionContainer.click({ force: true });
67+
}
6268
}
6369
}

0 commit comments

Comments
 (0)