Repository navigation
fix: correct E2E test selectors for API docs tabs - #65
Merged
Merged
Conversation
The 60-api-docs tests used [data-tab="endpoints"] selectors but the template uses id="tab-endpoints". Also fixed #interactive-content → #content-interactive. Added test.slow() for Scalar CDN-dependent tests.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- Schema regex now allows digits (ConcurrentTest2Data from other E2E tests) - Forms test waits for table rows to appear before counting
This branch was previously deployed
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.
Summary
Fixes consistently failing E2E tests in
60-api-docs.spec.ts(shard 3) that were using incorrect CSS selectors for the API reference page tabs.Changes
[data-tab="endpoints"]→#tab-endpoints(matches templateidattribute)[data-tab="interactive"]→#tab-interactive(matches templateidattribute)#interactive-content→#content-interactive(matches template containerid)test.slow()to Scalar CDN-dependent tests (triples default timeout for CI)Root Cause
The template (
admin-api-reference.template.ts) usesid="tab-endpoints"andid="tab-interactive"on tab buttons. The tests were written with[data-tab="endpoints"]attribute selectors that don't exist in the template. This caused Playwright to timeout waiting for elements that were never present.The cascading timeout failures also caused
43-cache-plugin.spec.tstests to fail with "browser has been closed" errors in the same shard.Testing
This fix should resolve the 4 consistent shard 3 failures across PRs #62, #63, and #64.