Skip to content

Commit

Permalink
ci: update e2e test to force click tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper573 committed Jul 4, 2024
1 parent a10fe08 commit 0b844ac
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions apps/dashboard/playwright/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@ test("can see the home page title", async ({ page }) => {
await expect(page.getByText(/yet another stack/i)).toBeVisible();
});

// Unfortunately the navigation tabs seem to require force clicks on iPhone 12.
// Without force clicks the tests fail because the tabs end up overlapping each
// other somehow and taking pointer events (without being actually visually overlapping).

test.describe("api tester", () => {
test.beforeEach(async ({ page }) => {
await page.goto("/");
await page.getByRole("link", { name: "Api Tester" }).click();
await page.getByRole("link", { name: "Api Tester" }).click({ force: true });
});

test.describe("trpc", () => {
test.beforeEach(async ({ page }) => {
await page.getByRole("link", { name: "TRPC" }).click();
await page.getByRole("link", { name: "TRPC" }).click({ force: true });
});

testApi();
});

test.describe("graphql", () => {
test.beforeEach(async ({ page }) => {
await page.getByRole("link", { name: "GraphQL" }).click();
await page.getByRole("link", { name: "GraphQL" }).click({ force: true });
});

testApi();
Expand Down

0 comments on commit 0b844ac

Please sign in to comment.