Skip to content

Commit f90e554

Browse files
bloveclaude
andcommitted
ci: run the cockpit shell control-plane e2e, which nothing invoked
#921 added apps/cockpit/e2e/control-plane.spec.ts — 7 Playwright tests over the operational sidebar: the real Angular handshake without blank or unresponsive states, operational controls reachable at four viewports, forced colors preserving control boundaries and keyboard focus, and reduced motion disabling loader and drawer animation. Nothing ever ran it. The suite sits behind `nx e2e cockpit`, and the cockpit-e2e matrix only dispatches caps derived from walking cockpit/** — apps/cockpit is never a candidate. No other job named the target either: grepping every workflow for `nx e2e` returns examples-chat-angular, examples-ag-ui-angular, the cap matrix, and website. So this has been dead coverage for its whole life. Verified it actually passes before wiring it up — 7/7 in 24s locally. It goes in the existing `cockpit` job rather than a new one because it is cheap, it reuses that job's `npm ci`, the `cockpit` scope already gates the shell, and required-pr-checks already aggregates the job — so it becomes merge-blocking with no gate change. The playwright config already sets retries: 2 on CI. Found while auditing the tags I removed from apps/cockpit in #939. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 574a0c0 commit f90e554

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,23 @@ jobs:
232232
# actually execute. All three share the `scope:cockpit` tag, so ci-scope
233233
# already gates this job correctly for changes under either library.
234234
- run: npx nx run-many -t test --projects=cockpit,cockpit-docs,cockpit-registry --skip-nx-cache
235+
# apps/cockpit owns a real Playwright suite (e2e/control-plane.spec.ts)
236+
# behind `nx e2e cockpit` that nothing invoked: the cockpit-e2e matrix
237+
# only dispatches caps derived from cockpit/**, and no other job named
238+
# the target — so it had never run in CI since #921 added it. It lives
239+
# here rather than in its own job because it is cheap (7 tests, ~25s
240+
# once the dev servers are up) and reuses this job's `npm ci`; the
241+
# `cockpit` scope already gates the shell, and required-pr-checks
242+
# already aggregates this job.
243+
- name: Cache Playwright browsers
244+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
245+
with:
246+
path: ~/.cache/ms-playwright
247+
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
248+
restore-keys: |
249+
playwright-${{ runner.os }}-
250+
- run: npx playwright install --with-deps chromium
251+
- run: npx nx e2e cockpit --skip-nx-cache
235252

236253
cockpit-examples-build:
237254
name: Cockpit — build all examples

scripts/ci-workflow.spec.mjs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,9 @@ describe('CI workflow', () => {
373373
// hardcoded LIBS list that excludes both of these. If they are dropped
374374
// from this run-many their specs stop executing silently.
375375
const cockpitJob = readJobBlock(await readWorkflow(), 'cockpit');
376-
const runMany = cockpitJob.match(/npx nx run-many -t test --projects=(\S+)/);
376+
const runMany = cockpitJob.match(
377+
/npx nx run-many -t test --projects=(\S+)/
378+
);
377379

378380
assert.ok(runMany, 'cockpit job should run tests via nx run-many');
379381

@@ -386,6 +388,27 @@ describe('CI workflow', () => {
386388
}
387389
});
388390

391+
it('runs the cockpit shell control-plane e2e', async () => {
392+
// apps/cockpit owns a real Playwright suite (e2e/control-plane.spec.ts,
393+
// 7 tests, added by #921) behind `nx e2e cockpit`. Nothing invoked that
394+
// target: the cockpit-e2e matrix only dispatches caps derived from
395+
// cockpit/**, and no other job named it — so the suite had never run in
396+
// CI. It belongs in the `cockpit` job, whose `cockpit` scope already
397+
// gates the shell and is already aggregated by required-pr-checks.
398+
const cockpitJob = readJobBlock(await readWorkflow(), 'cockpit');
399+
400+
assert.match(
401+
cockpitJob,
402+
/npx nx e2e cockpit\b/,
403+
'cockpit job should run the shell control-plane e2e'
404+
);
405+
assert.match(
406+
cockpitJob,
407+
/npx playwright install/,
408+
'the control-plane e2e needs a browser installed'
409+
);
410+
});
411+
389412
it('lets the cockpit e2e summary inspect CI scope outputs', async () => {
390413
const cockpitE2eSummaryJob = await readCockpitE2eSummaryJob();
391414

0 commit comments

Comments
 (0)