Skip to content

test(frontend): add e2e coverage for the GraphiQL playground page (#10345)#16771

Open
YAMRAJ13y wants to merge 1 commit into
OpenCTI-Platform:masterfrom
YAMRAJ13y:test/10345-graphiql-playground-e2e
Open

test(frontend): add e2e coverage for the GraphiQL playground page (#10345)#16771
YAMRAJ13y wants to merge 1 commit into
OpenCTI-Platform:masterfrom
YAMRAJ13y:test/10345-graphiql-playground-e2e

Conversation

@YAMRAJ13y

Copy link
Copy Markdown

Proposed changes

Adds Playwright end-to-end coverage for the public GraphQL playground page, as requested in #10345.

The test:

  • opens /public/graphql while unauthenticated (per the maintainer note on the issue, the playground is a public route and must render without a session),
  • asserts the playground title and the GraphiQL editor are visible,
  • asserts the error-boundary fallback (An unknown error occurred…) is not displayed.

Files added

  • tests_e2e/playground/playground.spec.ts — the spec (unauthenticated via test.use({ storageState: { cookies: [], origins: [] } }))
  • tests_e2e/model/playground.pageModel.ts — page model following the existing model/ convention

Related issues

Closes #10345

How to test

From opencti-platform/opencti-front with the platform running:

yarn test:e2e --grep "GraphQL playground"

The playground is enabled by default (app:graphql:playground:enabled), so no extra configuration is required.

…enCTI-Platform#10345)

Add a Playwright test that opens the public /public/graphql playground while
unauthenticated and asserts the GraphiQL editor renders without hitting the
error boundary fallback.

Closes OpenCTI-Platform#10345
Copilot AI review requested due to automatic review settings June 23, 2026 13:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Playwright E2E coverage for the public GraphQL playground route (/public/graphql) in opencti-front, ensuring the page renders correctly while unauthenticated and without triggering the global error-boundary fallback.

Changes:

  • Added an unauthenticated E2E spec that loads /public/graphql and asserts key UI elements are visible.
  • Introduced a dedicated Playwright page model for the playground (route navigation + stable locators).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
opencti-platform/opencti-front/tests_e2e/playground/playground.spec.ts New E2E test that opens the public playground unauthenticated and asserts it renders without error fallback.
opencti-platform/opencti-front/tests_e2e/model/playground.pageModel.ts New page model encapsulating navigation and locators for the GraphiQL playground page.

@aHenryJard aHenryJard added the community Contribution from the community. label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Contribution from the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add e2e test coverage on the GraphiQL playground page

3 participants