diff --git a/tests/runner-e2e/catalog-overview.test.ts b/tests/runner-e2e/catalog-overview.test.ts index e8c7da68ff2..d390c3a55a1 100644 --- a/tests/runner-e2e/catalog-overview.test.ts +++ b/tests/runner-e2e/catalog-overview.test.ts @@ -73,6 +73,10 @@ describe("display-only catalog overview", () => { expect(doc.querySelector('.summary')!.textContent).toContain('25Recorded feature-work passes'); expect(() => parseCatalogOverview({...data,accounting:{...data.accounting,exhaustedFinals:104}})).toThrow('Inconsistent catalog accounting'); }); + it("rejects unknown allowance when execution is positively known never-run", () => { + const data=fixture(); data.rows[169]!.allowance="unknown"; + expect(() => parseCatalogOverview(data)).toThrow('Inconsistent recorded execution scope'); + }); it("shows a later candidate pass without promoting the recorded main failure", () => { const data=fixture(); data.rows[25]!.latestCandidateOutcome="passed"; const doc=new JSDOM(page(data)).window.document,row=doc.getElementById('catalog-'+data.rows[25]!.scenarioId)!; diff --git a/tests/runner-e2e/catalog-overview.ts b/tests/runner-e2e/catalog-overview.ts index a3dbcd4c26b..5779ab8e2be 100644 --- a/tests/runner-e2e/catalog-overview.ts +++ b/tests/runner-e2e/catalog-overview.ts @@ -55,7 +55,7 @@ export function parseCatalogOverview(value: unknown): CatalogOverview { }); if (new Set(rows.map(row => row.scenarioId)).size !== 244 || new Set(rows.map(row => row.scenarioId.split(".")[0])).size !== 35) throw new Error("Duplicate or incomplete catalog metadata"); for (const row of rows) { - if ((row.mainOutcome !== "unmeasured") !== (row.executionRecord === "main-measured") || (row.allowance !== "unknown" && (row.allowance === "unused-initial") !== (row.executionRecord === "never-run")) + if ((row.mainOutcome !== "unmeasured") !== (row.executionRecord === "main-measured") || (row.allowance === "unused-initial") !== (row.executionRecord === "never-run") || (row.latestCandidateOutcome !== undefined && ["never-run", "unknown"].includes(row.executionRecord))) throw new Error("Inconsistent recorded execution scope"); } const measured = rows.filter(row => row.mainOutcome !== "unmeasured").length;