Skip to content

Commit 2da4f47

Browse files
bloveclaude
andauthored
test(e2e-harness): delete broken test-helpers.spec.ts; document strategy (#499)
The spec imported `SendPromptAndWaitOptions` which was removed in PR #472 (harness helper consolidation), leaving a tsc error in the lint target that has been silently failing the Library — lint gate. The chat-sidenav- scrim no-output-native noise (resolved by #485) was masking it; subsequent admin-merges let it through. Two-part fix: 1. Delete the spec. Its original purpose ("locks in the type contract") was already covered by tsc itself; the deleted type meant the spec was just verifying a removed API. 2. Document the testing strategy in a header block on test-helpers.ts so future contributors know the absence of unit tests is intentional: - The 3 Playwright-dependent helpers are exercised end-to-end by the 24 cockpit cap aimock e2es in the matrix. - `startAimock` (the only helper testable without a Page) has its own aimock-runner.spec.ts in the same directory. Identified during the post-Task-#4 e2e audit (item #8). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7aeb2eb commit 2da4f47

2 files changed

Lines changed: 16 additions & 18 deletions

File tree

libs/e2e-harness/src/test-helpers.spec.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

libs/e2e-harness/src/test-helpers.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
// SPDX-License-Identifier: MIT
2+
//
3+
// Testing strategy for the helpers in this file:
4+
//
5+
// These helpers orchestrate Playwright `Page` APIs — `goto`, `getByRole`,
6+
// `locator`, `click`, `expect.toBeAttached/toBeVisible`. Unit-testing them
7+
// with a mock Page would mostly verify our wiring of Playwright's API, not
8+
// real behavior.
9+
//
10+
// Authoritative behavioral coverage lives in the cockpit cap aimock e2es
11+
// (24 specs across cockpit/{chat,langgraph,deep-agents}/*/angular/e2e/),
12+
// each of which exercises one of these helpers against a real Playwright
13+
// page driving the cap's UI through aimock-replayed responses. If any of
14+
// these helpers regress, the matrix lights up red across many caps.
15+
//
16+
// `aimock-runner.spec.ts` (in this same directory) covers `startAimock`
17+
// directly — it's the only helper testable without a real Page.
218
import { expect, type Locator, type Page } from '@playwright/test';
319

420
/**

0 commit comments

Comments
 (0)