fix(e2e): submit creation form in new-workspace test
clickNewWorkspaceButton now completes the full user flow: after clicking the sidebar button, waits for the /new route, then clicks the Create button to submit the empty form and trigger workspace creation + redirect.
This commit is contained in:
@@ -164,6 +164,14 @@ export async function clickNewWorkspaceButton(
|
||||
const button = page.getByTestId(`sidebar-project-new-worktree-${input.projectKey}`).first();
|
||||
await expect(button).toBeVisible({ timeout: 30_000 });
|
||||
await button.click();
|
||||
|
||||
await expect(page).toHaveURL(/\/h\/[^/]+\/new(?:\?.*)?$/, {
|
||||
timeout: 30_000,
|
||||
});
|
||||
|
||||
const createButton = page.getByRole("button", { name: "Create" });
|
||||
await expect(createButton).toBeVisible({ timeout: 30_000 });
|
||||
await createButton.click();
|
||||
}
|
||||
|
||||
export async function assertNewWorkspaceSidebarAndHeader(
|
||||
|
||||
Reference in New Issue
Block a user