Skip to content

Commit

Permalink
tests: add GraphQL E2E test
Browse files Browse the repository at this point in the history
Fixes #506
  • Loading branch information
vincentchalamon committed Feb 28, 2025
1 parent 1619518 commit c380550
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pwa/tests/GraphQL.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { expect, test } from "@playwright/test";

test.describe("GraphQL", () => {
test("Check GraphQL playground @read", async ({ page }) => {
await page.goto("/graphql");
await expect(page.getByTestId("#graphiql-container")).toBeVisible();

Check failure on line 6 in pwa/tests/GraphQL.spec.ts

View workflow job for this annotation

GitHub Actions / E2E Tests (@read)

[chromium] › tests/GraphQL.spec.ts:4:7 › GraphQL › Check GraphQL playground @read

1) [chromium] › tests/GraphQL.spec.ts:4:7 › GraphQL › Check GraphQL playground @READ ───────────── Error: Timed out 10000ms waiting for expect(locator).toBeVisible() Locator: getByTestId('#graphiql-container') Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 10000ms - waiting for getByTestId('#graphiql-container') 4 | test("Check GraphQL playground @READ", async ({ page }) => { 5 | await page.goto("/graphql"); > 6 | await expect(page.getByTestId("#graphiql-container")).toBeVisible(); | ^ 7 | }); 8 | }) 9 | at /home/runner/work/demo/demo/pwa/tests/GraphQL.spec.ts:6:59

Check failure on line 6 in pwa/tests/GraphQL.spec.ts

View workflow job for this annotation

GitHub Actions / E2E Tests (@read)

[chromium] › tests/GraphQL.spec.ts:4:7 › GraphQL › Check GraphQL playground @read

1) [chromium] › tests/GraphQL.spec.ts:4:7 › GraphQL › Check GraphQL playground @READ ───────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 10000ms waiting for expect(locator).toBeVisible() Locator: getByTestId('#graphiql-container') Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 10000ms - waiting for getByTestId('#graphiql-container') 4 | test("Check GraphQL playground @READ", async ({ page }) => { 5 | await page.goto("/graphql"); > 6 | await expect(page.getByTestId("#graphiql-container")).toBeVisible(); | ^ 7 | }); 8 | }) 9 | at /home/runner/work/demo/demo/pwa/tests/GraphQL.spec.ts:6:59
});
})

0 comments on commit c380550

Please sign in to comment.