[quality] Guard tests/e2e spec registration: a misnamed spec is silently dropped from the Playwright run
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js
- Ambito
- testing
Direzione di ricerca
Inizia in tests/playwright-config.test.mjs, in particolare con il test esistente intorno alle righe 99-108, e controlla playwright.config.js per testIgnore. Esegui node_modules/.bin/playwright test --list --reporter=json, confronta le spec registrate con i file in tests/e2e e fai fallire il test per qualsiasi file non registrato o regola di esclusione dichiarata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- JavaScript
- Stelle
- 0
- Fork
- 3
- Merge medio
- 7h 35m
- PR unite (30g)
- 579
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cncf/endusers
-
agent/sec-check security stage/010-actionable
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
agent/guide documentation stage/045-needs-decision
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
cncf/endusers#1924 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
agent/guide documentation stage/045-needs-decision
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
cncf/endusers#1923 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
agent/quality stage/010-actionable testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
a11y: search button accessible name does not contain its visible label (WCAG 2.5.3)Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertablocked bug hive/claimed-by-scanner needs-human
Difficoltà 4/5 3-5 giorni Idoneità per principianti 39/100
cncf/endusers#1618 · 8 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cncf/endusers
Issue simili
-
enhancement p2 setup
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
vercel/eve#5419 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Query Log shows "Upstream" for CNAME cloaking, schedule, NXDOMAIN hijack and response IP blocksApertabug good first issue query-log web
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
ferrous-networking/ferrous-dns#326 ·
I maintainer di solito rispondono entro 1 giorno
-
type: typos
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 4 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
Ylianst/MeshCentral#8294 ·
I maintainer di solito rispondono entro 1 giorno