Repository navigation
test: cover CaseStudies' two empty-corpus arms with a variant build - #1133
Merged
Merged
Conversation
src/components/CaseStudies/index.js branches on two document-level fields of data/case-studies.json that the shipped corpus never produces: SyncStatus's `if (!data.generatedAt) return null` at line 46, and the `|| []` fallback at line 64 that supplies the list the page sorts, filters, counts and maps. Both are document-level on the one file the one /resources/case-studies page reads, so clearing them in the ordinary coverage build would swap which arm is covered rather than add a case -- it would trade the provenance line and all 215 rows, including the two undated studies the additive overlay in tests/e2e/fixtures/data/case-studies.json exists to render. They go in the variant build instead, as RadarReports' equivalent arms did in #1098. Closes #1132 Signed-off-by: quality <quality@hive.kubestellar.io> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will keep the |
mrbobbytables
added a commit
that referenced
this pull request
Oct 7, 2026
case-studies.json gained a variant overlay in #1133, and members.json gains one in #1104; the architectures catalog is the remaining data file the ordinary coverage build overlays and the variant build does not. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
mrbobbytables
added a commit
to mrbobbytables/endusers
that referenced
this pull request
Oct 8, 2026
…cncf#1113) * test: cover GroupLinkStatus's plural arms and invalid-checkedAt guard src/components/GroupLinkStatus/index.js is the lowest-covered file in the end-to-end report at 60% of regions. Three of its four uncovered regions are reachable, and all three need a second build: * line 7, formatDate's Number.isNaN guard, needs a checkedAt that does not parse, which the real file never carries; * lines 32-33, the plural arms of the drift warning, need two groups drifting at once, while the ordinary coverage overlay appends exactly one archived group. Clearing checkedAt or emptying the list in the ordinary coverage build would swap which arm renders rather than add a case, so the overlay goes in tests/e2e/fixtures/data-variants/ and the variant site is asserted beside the real one. The appended group drifts through reachable:false rather than archived:true so the filter's second operand decides it, as a link-check run that cannot reach a repository produces. tests/e2e-data-fixtures.test.mjs used community-groups.json as the contrast case for a file with no variant overlay, which this makes false. case-studies.json takes that role: members.json is the other base-only overlay, but open PR cncf#1104 adds a members.json variant, so it would stop being a contrast as soon as that lands. Verified by building both sites locally with npm run build:e2e:coverage and reading the rendered HTML. build/community: verification line dated "September 23, 2026", singular "has an archived or unreachable upstream repository", one group named, no plural. build/e2e-coverage-variant/ community: no verification line and no "Invalid Date", plural "have archived or unreachable upstream repositories", both groups named. The Playwright run itself was not executed here -- this sandbox has no browser (chrome-headless-shell cannot load libglib-2.0.so.0 and there is no root to install it), so CI is the first place the spec runs. Line 23's `|| []` is deliberately left uncovered: reaching it means clearing `groups` entirely, which stops the warning rendering at all. Signed-off-by: quality <quality@hive.kubestellar.io> * test: move the no-variant contrast case to architectures/catalog.json case-studies.json gained a variant overlay in cncf#1133, and members.json gains one in cncf#1104; the architectures catalog is the remaining data file the ordinary coverage build overlays and the variant build does not. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> --------- Signed-off-by: quality <quality@hive.kubestellar.io> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: quality <quality@hive.kubestellar.io> Co-authored-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Test Improvement
src/components/CaseStudies/index.jsbranches on two document-level fields ofdata/case-studies.jsonthat the shipped corpus never produces, so neither armruns in a browser:
The e2e report on
mainnames both:src/components/CaseStudies/index.js | 100.00 | 96.55 | | 46 64(artifacte2e-coverageid11383321728, jobEnd-to-end coverage,mainat7ab301e). The unit suite has them — this isa browser-coverage gap, not an untested path.
tests/e2e/fixtures/data-variants/case-studies.json(new) — clearsgeneratedAtandcaseStudies. It goes in the variant directory ratherthan beside the existing additive overlay at
tests/e2e/fixtures/data/case-studies.json: both fields are document-level onthe one file the one
/resources/case-studiespage reads, so clearing them inthe ordinary coverage build would swap which arm is covered, trading the
provenance line and all 215 rows — including the two undated studies that
additive overlay exists to render — for these two. The variant site is served
beside the real one, so one Playwright run reaches both and neither displaces
the other. Same shape, and same remedy, as
RadarReportsin #1098.tests/e2e/case-studies-variant.spec.js(new) — two cases. The real routeis asserted alongside the variant one on purpose: on its own, "the variant page
has no provenance line and no rows" passes just as well when the page failed to
build, so the pair is what makes it evidence the arms switched. Counts are
read from the corpus through
loadSiteDatarather than hard-coded, so an editedoverlay fails here instead of leaving a test that asserts nothing.
Verification
npm run test:unit— 1966 passed, 0 failed at7ab301e+ this diff.That includes
tests/e2e-data-fixtures.test.mjs's "every committed overlaystill applies to its data file", which picks the new overlay up with no edit
to its hardcoded
caseslists.npm run build:e2e:coverage— succeeds, and the two builds render oppositearms:
build/resources/case-studies/build/e2e-coverage-variant/resources/case-studies/Mirrored fromprovenance line<th scope=row>rowsShowing 215 of 215Showing 0 of 0No case studies match those filters.<option>in the three selectsAll …each)<th scope=col>Every locator the spec uses was checked against that markup.
loadSiteData('case-studies.json', …)returnsgeneratedAt: 2026-09-24…with 215 studies for the coverage build and
generatedAt: null,caseStudies: nullfor the variant build.npx prettier --checkon both new files — clean.The Playwright spec itself could not be executed here: the sandbox has no
root, so
npx playwright install-deps chromiumcannot run andchrome-headless-shellaborts witherror while loading shared libraries: libglib-2.0.so.0. CI'sEnd-to-end coveragejob is the first real execution — the same limitationtest: let data overlays patch a root-level JSON array with setWhere #1110 records.
What this does not do
It does not move lines 46 and 64 off the uncovered-region list.
getRegionCoverageintests/tools/e2e-coverage-report.mjskeys a region onits exact original
line:column:endLine:endColumn, and the two builds'generated code maps back to different coordinates, so the union keeps the real
build's zeros. That was measured on this identical shape in #1097 and is
tracked as #1066 / #1079; once the union folds the coordinates, these arms fold
with no change here. The spec is therefore stated as behaviour rather than as a
coverage claim, and the region gate (
--check-source-regions 80) is unaffected.Coordination
Touches only the two new files above. It does not edit
tests/e2e-data-fixtures.test.mjs(#1110, #1113),tests/e2e/data-fixtures.spec.js/tests/tools/e2e-data-fixtures.cjs/tests/e2e/fixtures/data/architectures/catalog.json(#1110),tests/e2e/fixtures/data-variants/metrics.json(#1117),tests/e2e/fixtures/data-variants/community-groups.json(#1113),tests/e2e/fixtures/data-variants/members.json(#1104),tests/e2e-coverage-report.test.mjs(#1114),tests/e2e-coverage-scripts.test.mjs(#1128), or any workflow file.src/components/CaseStudies/index.jsis claimed by no open PR.Related Issue
Closes #1132
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88