Skip to content

Commit a0cd918

Browse files
committed
fix: e2e tests with rate limit handler
1 parent 31ef948 commit a0cd918

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

e2e/pages/dashboard.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export class DashboardPage extends BasePage {
1717
await this.click('nav[aria-label="Main navigation"] button[aria-label="New Project"]');
1818
await this.click('button:has-text("Create from Scratch")');
1919
await this.fill('input[placeholder="Enter project name"]', randomatic("Aa", 8));
20-
await this.click('button:has-text("Create"):not([disabled])');
20+
const createButton = this.getByRole("button", { name: "Create", exact: true });
21+
await createButton.click();
2122

2223
await expect(this.page.getByRole("cell", { name: "program.py" })).toBeVisible();
2324
await expect(this.page.getByRole("tab", { name: "PROGRAM.PY" })).toBeVisible();
@@ -43,8 +44,10 @@ export class DashboardPage extends BasePage {
4344
await this.page.getByRole("button", { name: "Create Project From Template: HTTP" }).scrollIntoViewIfNeeded();
4445
await this.click('button:has-text("Create Project From Template: HTTP")');
4546
await this.fill('input[placeholder="Enter project name"]', projectName);
46-
await this.click('button:has-text("Create"):not([disabled])');
47-
await this.click('button:has-text("Close AI Chat")');
47+
const createButton = this.getByRole("button", { name: "Create", exact: true });
48+
await createButton.click();
49+
const closeAIButton = this.getByRole("button", { name: "Close AI Chat", exact: true });
50+
await closeAIButton.click();
4851

4952
try {
5053
await this.page.getByRole("button", { name: "Skip the tour", exact: true }).click({ timeout: 2000 });

0 commit comments

Comments
 (0)