[quality] Guard tests/e2e spec registration: a misnamed spec is silently dropped from the Playwright run
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- testing
Research direction
Start in tests/playwright-config.test.mjs, especially the existing test around lines 99-108, and inspect playwright.config.js for testIgnore. Run node_modules/.bin/playwright test --list --reporter=json, compare its registered specs with the files in tests/e2e, and make the test fail for any unregistered file or declared ignore rule.
Written by the indexing model from the issue text.
Description
Finding
playwright.config.js sets testDir: 'tests/e2e' and declares neither testMatch nor testIgnore, so Playwright's default testMatch (**/*.@(spec|test).?(c|m)[jt]s?(x)) is what decides which files in that directory actually run.
tests/playwright-config.test.mjs:99-108 (points testDir at a directory that holds spec files) asserts only that the directory exists and contains at least one .spec.js file:
const specs = readdirSync(testDir).filter((entry) => entry.endsWith('.spec.js'));
assert.ok(specs.length > 0, `${config.testDir} contains no .spec.js files`);
Nothing asserts that every file in tests/e2e is registered. Consequences:
- A spec committed as
navigation.e2e.js,navigation-spec.js, ornavigationSpec.jslands intests/e2e/, is reviewed as e2e coverage, and is never executed. - A future
testIgnoreentry (or a narrowedtestMatch) inplaywright.config.jscan drop existing specs with no failing test.
In both cases the End-to-end tests CI job stays green while the assertions never run. The whole e2e safety net for this site lives in that one directory, so a silently-unregistered spec is a real regression risk: it removes coverage while looking like it adds coverage.
Evidence
Fresh clone of cncf/endusers at commit ff93581, npm ci:
npx playwright test --list --reporter=jsonregisters 19 spec files.ls tests/e2e | wc -lcounts 19 files on disk.
The sets match today, so this is a regression guard, not a present coverage gap. Unit coverage at the same revision (node tests/tools/coverage-report.mjs) reports src files 100.00% lines / 99.72% regions, and playwright.config.js is already exercised by tests/playwright-config.test.mjs — which is precisely why the missing assertion is easy to overlook.
Recommendation
Extend tests/playwright-config.test.mjs with an assertion that the set of files on disk under tests/e2e is exactly the set Playwright registers, resolved by asking Playwright itself rather than by re-implementing its glob:
- Run the locally installed
node_modules/.bin/playwright test --list --reporter=json(no browser download and no web server are required for--list; it completes in ~3s). - Compare the registered spec paths against
readdirSync('tests/e2e'), and fail naming any file that is present but unregistered. - Assert that
playwright.config.jsdeclares notestIgnore, so an ignore rule cannot quietly shrink the suite.
This scope is deliberately confined to tests/playwright-config.test.mjs and does not overlap the currently open hold-gated PRs (#866 scripts/lib/mdx-escape.mjs, #873 scripts/lib/svg-active-content.mjs, #868 tests/coverage-gate-thresholds.test.mjs, #871 tests/validate-architecture-assets.test.mjs, #875 tests/sitemap-exclusions.test.mjs).
Priority
- Impact: medium — no coverage is missing today, but the failure mode is silent loss of the entire e2e safety net
- Effort: low — one test in an existing file
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: ff93581
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 293
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
[quality] refresh-radar-reports.yml runs on ubuntu-latest while every other job pins ubuntu-24.04Openagent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
Add google analyticsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
NCAR/music-box-interactive#628 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
remotion-dev/remotion#11847 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
phoenixframework/phoenix_live_view#4456 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AllTheMods/ATM-10#4436 ·
Maintainers usually reply within 5 days