test: update e2e tracer count-line assertions for task 0033
All checks were successful
CI / test (pull_request) Successful in 55s
CI / test (push) Successful in 56s

The state-aware count line from task 0033 (1166a48) renders
`count: N open of M total`, and the unit tests were updated to match, but
the three e2e tracer assertions still expected the old bare
`count: N of M total`. They are skipped without GITEA_AXI_E2E_URL, so the
staleness only surfaced in CI, where the e2e tier runs. Update them to the
state-qualified form the shipped code already produces — default `open`,
`--state closed` → `closed`. The code was correct; the tests were stale.
This commit was merged in pull request #36.
This commit is contained in:
2026-07-17 22:52:13 -04:00
parent 040daed39d
commit a557745e59

View File

@@ -40,7 +40,7 @@ describe.skipIf(!E2E_URL)("end-to-end: tracer command set", () => {
expect(exitCode).toBe(0); expect(exitCode).toBe(0);
const lines = stdout.split("\n"); const lines = stdout.split("\n");
expect(lines[0]).toBe("count: 3 of 3 total"); expect(lines[0]).toBe("count: 3 open of 3 total");
expect(lines[1]).toBe("issues[3]{number,title,state,author,created}:"); expect(lines[1]).toBe("issues[3]{number,title,state,author,created}:");
for (const title of instance.openTitles) { for (const title of instance.openTitles) {
expect(stdout).toContain(title); expect(stdout).toContain(title);
@@ -58,7 +58,7 @@ describe.skipIf(!E2E_URL)("end-to-end: tracer command set", () => {
}); });
expect(exitCode).toBe(0); expect(exitCode).toBe(0);
expect(stdout).toContain("count: 1 of 1 total"); expect(stdout).toContain("count: 1 closed of 1 total");
expect(stdout).toContain(instance.closedTitle); expect(stdout).toContain(instance.closedTitle);
expect(stdout).toContain(",closed,"); expect(stdout).toContain(",closed,");
}); });
@@ -69,7 +69,7 @@ describe.skipIf(!E2E_URL)("end-to-end: tracer command set", () => {
}); });
expect(exitCode).toBe(0); expect(exitCode).toBe(0);
expect(stdout).toContain("count: 1 of 3 total"); expect(stdout).toContain("count: 1 open of 3 total");
expect(stdout).toContain("issues[1]{number,title,state,author,created}:"); expect(stdout).toContain("issues[1]{number,title,state,author,created}:");
expect(stdout).toContain("issue list --limit <n>"); expect(stdout).toContain("issue list --limit <n>");
}); });