fix(e2e): scope Create button locator to message-input-root
The unscoped getByRole("button", { name: "Create" }) matched sidebar
"Create a new workspace" buttons from other test suites. Scoping to
message-input-root targets only the Composer submit button.
This commit is contained in:
@@ -169,7 +169,9 @@ export async function clickNewWorkspaceButton(
|
||||
timeout: 30_000,
|
||||
});
|
||||
|
||||
const createButton = page.getByRole("button", { name: "Create" });
|
||||
const createButton = page
|
||||
.getByTestId("message-input-root")
|
||||
.getByRole("button", { name: "Create" });
|
||||
await expect(createButton).toBeVisible({ timeout: 30_000 });
|
||||
await createButton.click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user