Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/sitrep-format.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { test, expect } from '@playwright/test';
test('SITREP supports scan, dependency-map navigation, summary, and full-evidence reading depths', async ({ page }) => {
await page.goto('/sitrep/');

await expect(page.getByRole('navigation', { name: 'Repository situation index' }).locator('a')).toHaveCount(5);
await expect(page.locator('.sitrep-card')).toHaveCount(5);
await expect(page.getByRole('navigation', { name: 'Repository situation index' }).locator('a')).toHaveCount(11);
await expect(page.locator('.sitrep-card')).toHaveCount(11);
Comment on lines +8 to +9

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow the committed SITREP fallback in browser counts

When refresh:sitrep enters its supported fallback path—for example, after a transient GitHub/control-plane failure or with OFFLINE=1—a clean checkout copies the committed last-known-good snapshot, which still contains five projects, so the template renders five navigation links and cards. The Pages and pull-request workflows run this browser suite after the build without rejecting SITREP fallback data, so these exact 11 assertions turn a recoverable refresh failure into a failed release check; derive the expectation from the rendered snapshot or ensure fallback data always projects all 11 members.

Useful? React with 👍 / 👎.

await expect(page.locator('.sitrep-reading-key > div')).toHaveCount(3);

const desktopColumns = await page.locator('.sitrep-dual').first().evaluate(element => getComputedStyle(element).gridTemplateColumns);
Expand Down Expand Up @@ -45,7 +45,7 @@ test('SITREP remains contained and sequential on a narrow viewport', async ({ pa
expect(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth)).toBeTruthy();

const index = page.getByRole('navigation', { name: 'Repository situation index' });
await expect(index.locator('a')).toHaveCount(5);
await expect(index.locator('a')).toHaveCount(11);
await expect(page.locator('.sitrep-reading-key > div')).toHaveCount(3);
await expect(page.locator('[data-sitrep-map] svg')).toBeVisible();
await expect(page.locator('.sitrep-metric').first()).toBeVisible();
Expand Down
Loading