Skip to content

Commit

Permalink
fix test flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Dec 26, 2024
1 parent ac66e83 commit 75cd5a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion e2e/api.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test, expect } from "@playwright/test";
import { expect, test } from "@playwright/test";

let privateKey = null;
let publicKey = null;
Expand Down
10 changes: 0 additions & 10 deletions e2e/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,14 @@ test("logout and back in login", async ({ page }) => {

await page.waitForLoadState("networkidle");

// logout
await page.getByTestId("account-sidebar-item").click();
await page.getByTestId("logout-button").click();

await page.waitForURL("**/login*");

// log back in
await page.getByPlaceholder("Your email").click();
await page.getByPlaceholder("Your email").fill("[email protected]");

// const promise = page.waitForResponse((resp) => {
// return resp.url().includes("/method");
// });

// await page.getByTestId("continue-button").click();

// await promise;

await page.getByPlaceholder("Your password").click();
await page.getByPlaceholder("Your password").fill("testtest");

Expand Down
7 changes: 3 additions & 4 deletions e2e/projects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ test("create new project, rename it and delete it", async ({ page }) => {
await page.getByRole("button", { name: "Project #12" }).click();
await page.goto("/settings");

// await page.getByTestId("delete-project-button").click();
// await page.getByTestId("delete-project-popover-button").click();
await page.getByTestId("delete-project-button").click();
await page.getByTestId("delete-project-popover-button").click();

// If the project was deleted successfully, it redirects to the analytics page
// await page.waitForURL("**/dashboards");
await page.waitForURL("**/dashboards/**");
});

0 comments on commit 75cd5a7

Please sign in to comment.