test(frontend): add e2e coverage for the GraphiQL playground page (#10345)#16771
Open
YAMRAJ13y wants to merge 1 commit into
Open
test(frontend): add e2e coverage for the GraphiQL playground page (#10345)#16771YAMRAJ13y wants to merge 1 commit into
YAMRAJ13y wants to merge 1 commit into
Conversation
…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
Contributor
There was a problem hiding this comment.
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/graphqland 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Adds Playwright end-to-end coverage for the public GraphQL playground page, as requested in #10345.
The test:
/public/graphqlwhile unauthenticated (per the maintainer note on the issue, the playground is a public route and must render without a session),An unknown error occurred…) is not displayed.Files added
tests_e2e/playground/playground.spec.ts— the spec (unauthenticated viatest.use({ storageState: { cookies: [], origins: [] } }))tests_e2e/model/playground.pageModel.ts— page model following the existingmodel/conventionRelated issues
Closes #10345
How to test
From
opencti-platform/opencti-frontwith 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.