fix(e2e): click agent tab before asserting composer visibility

Workspace setup may auto-open a setup tab that steals focus, hiding
the agent panel. Click the agent tab to ensure it's active before
checking the composer textbox.
This commit is contained in:
Mohamed Boudra
2026-04-14 13:16:34 +07:00
parent 612979f95f
commit 7652ee10ca
+5
View File
@@ -161,6 +161,11 @@ test.describe("New workspace flow", () => {
const agentTabs = page.locator('[data-testid^="workspace-tab-agent_"]');
await expect(agentTabs).toHaveCount(1, { timeout: 30_000 });
// Workspace setup may auto-open a setup tab that steals focus,
// hiding the agent panel (display:none removes it from the
// accessibility tree). Click the agent tab to ensure it's active.
await agentTabs.first().click();
const composer = page.getByRole("textbox", { name: "Message agent..." });
await expect(composer).toBeEditable({ timeout: 30_000 });
} finally {