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:
@@ -161,6 +161,11 @@ test.describe("New workspace flow", () => {
|
|||||||
const agentTabs = page.locator('[data-testid^="workspace-tab-agent_"]');
|
const agentTabs = page.locator('[data-testid^="workspace-tab-agent_"]');
|
||||||
await expect(agentTabs).toHaveCount(1, { timeout: 30_000 });
|
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..." });
|
const composer = page.getByRole("textbox", { name: "Message agent..." });
|
||||||
await expect(composer).toBeEditable({ timeout: 30_000 });
|
await expect(composer).toBeEditable({ timeout: 30_000 });
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user