import { expect, test } from './fixtures.js' test('boots into the shell with the Focus screen', async ({ app, window }) => { await app.expectLoaded() await expect(window.getByText('Reginald', { exact: true })).toBeVisible() await expect(window.getByRole('heading', { name: 'Morning service' })).toBeVisible() await app.screenshot('shell-light') }) test('Focus shows Now/Next/Later cards and the burn-up cone', async ({ window }) => { for (const slot of ['Now', 'Next', 'Later']) { await expect(window.getByText(slot, { exact: true })).toBeVisible() } await expect(window.getByText('Fix lifecycle inference on merge events')).toBeVisible() await expect(window.getByText(/scope ยท 42 issues/)).toBeVisible() await expect(window.getByText(/80% this lands/)).toBeVisible() }) test('Standup renders the drift / plan / nag letter', async ({ app, window }) => { await app.nav('Standup').click() await expect(window.getByRole('heading', { name: 'Morning standup' })).toBeVisible() await expect(window.getByText('Overnight drift')).toBeVisible() await expect(window.getByText("Today's plan")).toBeVisible() await expect(window.getByText('Stephen', { exact: true })).toBeVisible() await expect(window.getByText(/Four days is a long steep/)).toBeVisible() await app.screenshot('standup') }) test('rail navigation switches the main view', async ({ app, window }) => { await app.nav('The pot').click() await expect(window.getByRole('heading', { name: 'The pot' })).toBeVisible() await app.nav('States').click() await expect(window.getByRole('heading', { name: 'States' })).toBeVisible() await expect(window.getByText('The pot is empty')).toBeVisible() await app.screenshot('shell-states') }) test('Evening service toggle flips the document theme', async ({ app, window }) => { await window.getByText('Evening service', { exact: true }).click() await expect(window.locator('html')).toHaveAttribute('data-theme', 'dark') await expect(window.getByRole('switch', { name: 'Evening service' })).toBeChecked() await app.screenshot('shell-dark') }) test('offline sim shows the banner and disables the composer', async ({ window }) => { await window.getByRole('button', { name: /Connection/ }).click() await expect(window.getByText(/Gitea isn.t answering/)).toBeVisible() await expect(window.getByRole('textbox')).toBeDisabled() }) test('chat composer echoes a canned reply (fixture)', async ({ window }) => { await window.getByRole('textbox').fill('Push pilots first') await window.keyboard.press('Enter') await expect(window.getByText('Push pilots first')).toBeVisible() await expect(window.getByText(/Noted and logged as a directive/)).toBeVisible() }) test('issue drill-in from a Focus card and back-stack of one', async ({ window }) => { await window.getByRole('link', { name: 'Fix lifecycle inference on merge events' }).click() await expect(window.getByRole('heading', { name: 'Issue' })).toBeVisible() await window.getByRole('button', { name: 'Back' }).click() await expect(window.getByRole('heading', { name: 'Morning service' })).toBeVisible() }) test('exposes the commitea preload API', async ({ app }) => { const api = await app.preloadApi() expect(api).toBeDefined() expect(api).toHaveProperty('platform') })