diff --git a/libs/e2e-harness/src/test-helpers.spec.ts b/libs/e2e-harness/src/test-helpers.spec.ts deleted file mode 100644 index 4c90d300..00000000 --- a/libs/e2e-harness/src/test-helpers.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -import { describe, it, expect } from 'vitest'; -import type { SendPromptAndWaitOptions } from './test-helpers'; - -// The helper itself is integration-level (drives a real Playwright page); -// per-example specs exercise it. This file just locks in the type contract. - -describe('SendPromptAndWaitOptions', () => { - it('accepts an empty options object', () => { - const opts: SendPromptAndWaitOptions = {}; - expect(opts.path).toBeUndefined(); - }); - - it('accepts a path override', () => { - const opts: SendPromptAndWaitOptions = { path: '/embed' }; - expect(opts.path).toBe('/embed'); - }); -}); diff --git a/libs/e2e-harness/src/test-helpers.ts b/libs/e2e-harness/src/test-helpers.ts index 47d11495..de8e844d 100644 --- a/libs/e2e-harness/src/test-helpers.ts +++ b/libs/e2e-harness/src/test-helpers.ts @@ -1,4 +1,20 @@ // SPDX-License-Identifier: MIT +// +// Testing strategy for the helpers in this file: +// +// These helpers orchestrate Playwright `Page` APIs — `goto`, `getByRole`, +// `locator`, `click`, `expect.toBeAttached/toBeVisible`. Unit-testing them +// with a mock Page would mostly verify our wiring of Playwright's API, not +// real behavior. +// +// Authoritative behavioral coverage lives in the cockpit cap aimock e2es +// (24 specs across cockpit/{chat,langgraph,deep-agents}/*/angular/e2e/), +// each of which exercises one of these helpers against a real Playwright +// page driving the cap's UI through aimock-replayed responses. If any of +// these helpers regress, the matrix lights up red across many caps. +// +// `aimock-runner.spec.ts` (in this same directory) covers `startAimock` +// directly — it's the only helper testable without a real Page. import { expect, type Locator, type Page } from '@playwright/test'; /**