Skip to content

fix: correct E2E test selectors for API docs tabs - #65

Merged
mmcintosh merged 2 commits into
mainfrom
fix/e2e-api-docs-selectors
Feb 25, 2026
Merged

mmcintosh merged 2 commits into
mainfrom
fix/e2e-api-docs-selectors

Conversation

@mmcintosh

Copy link
Copy Markdown
Owner

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 template id attribute)
  • [data-tab="interactive"] → #tab-interactive (matches template id attribute)
  • #interactive-content → #content-interactive (matches template container id)
  • Added test.slow() to Scalar CDN-dependent tests (triples default timeout for CI)
  • Increased Scalar wait timeout from 5s to 8s for test request button check

Root Cause

The template (admin-api-reference.template.ts) uses id="tab-endpoints" and id="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.ts tests 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.

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

codecov Bot commented Feb 24, 2026

Copy link
Copy Markdown

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
@mmcintosh
mmcintosh merged commit 21a61c5 into main Feb 25, 2026
8 checks passed

This branch was previously deployed

1 inactive deployment
internal — 6ddc3c43 Deployed Feb 25, 2026 by mmcintosh via authorize #377
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant