Rework command center for race weekends

This commit is contained in:
2026-05-25 11:51:16 -04:00
parent a0f135aac1
commit 79b0b9f469
21 changed files with 1030 additions and 484 deletions

View File

@@ -3,13 +3,13 @@ import { test, expect } from '@playwright/test'
const FULL_SESSION = 9472
test.describe('Command Center', () => {
test('loads as default route with local coverage summary', async ({ page }) => {
test('loads as default route with weekend identity band', async ({ page }) => {
await page.goto('/')
await expect(page.getByTestId('command-center')).toBeVisible()
await expect(page.getByText('Command Center')).toBeVisible()
await expect(page.getByTestId('cc-focus')).toBeVisible()
await expect(page.getByTestId('cc-session-9472')).toBeVisible()
await expect(page.getByTestId('cc-actions')).toBeVisible()
})
test('nav link reaches command center from race hub', async ({ page }) => {
@@ -19,7 +19,7 @@ test.describe('Command Center', () => {
await expect(page.getByTestId('command-center')).toBeVisible()
})
test('quick action opens race hub for default session', async ({ page }) => {
test('open analysis action opens race hub for the focus session', async ({ page }) => {
await page.goto('/')
await expect(page.getByTestId('cc-action-race-hub')).toContainText(String(FULL_SESSION))
await page.getByTestId('cc-action-race-hub').click()
@@ -31,7 +31,7 @@ test.describe('Command Center', () => {
await page.goto(`/race-hub?session_key=${FULL_SESSION}`)
await expect(page.getByText('Final Classification')).toBeVisible()
await page.goto('/data-library')
await page.goto('/admin')
await expect(page.getByTestId('data-library')).toBeVisible()
await page.goto('/live')

View File

@@ -2,11 +2,12 @@ import { test, expect } from '@playwright/test'
const FULL_SESSION = 9472
test.describe('Data Library', () => {
test('shows local coverage and ingest commands', async ({ page }) => {
await page.goto('/data-library')
test.describe('Admin · Data Health', () => {
test('shows local coverage and ingest commands at /admin', async ({ page }) => {
await page.goto('/admin')
await expect(page.getByTestId('data-library')).toBeVisible()
await expect(page.getByRole('heading', { name: 'Data Health' })).toBeVisible()
await expect(page.getByTestId('dl-meeting-1229')).toBeVisible()
await expect(page.getByTestId('meeting-detail')).toBeVisible()
await expect(page.getByTestId('cli-commands').first()).toBeVisible()
@@ -14,15 +15,22 @@ test.describe('Data Library', () => {
await expect(page.getByText('box-box --ingest-session 9472', { exact: true })).toBeVisible()
})
test('nav link reaches data library from race hub', async ({ page }) => {
test('legacy /data-library route still renders the same page', async ({ page }) => {
await page.goto('/data-library')
await expect(page.getByTestId('data-library')).toBeVisible()
await expect(page.getByRole('heading', { name: 'Data Health' })).toBeVisible()
await expect(page.getByTestId('dl-meeting-1229')).toBeVisible()
})
test('admin nav link reaches data health from race hub', async ({ page }) => {
await page.goto('/race-hub')
await page.getByRole('link', { name: 'Data Library' }).click()
await expect(page).toHaveURL(/\/data-library/)
await page.getByRole('link', { name: 'Admin', exact: true }).click()
await expect(page).toHaveURL(/\/admin/)
await expect(page.getByTestId('data-library')).toBeVisible()
})
test('race hub link from data library footer works', async ({ page }) => {
await page.goto('/data-library')
test('race hub link from data health footer works', async ({ page }) => {
await page.goto('/admin')
await page.getByRole('link', { name: /Open Race Hub/i }).click()
await expect(page).toHaveURL(/\/race-hub/)
})

View File

@@ -17,7 +17,15 @@ test.describe('Production serving (Go + built React)', () => {
await expect(page.locator('.drv-code', { hasText: 'VER' })).toBeVisible()
})
test('serves data library route', async ({ page }) => {
test('serves admin / data health route', async ({ page }) => {
await page.goto('/admin')
await expect(page.getByTestId('data-library')).toBeVisible()
await expect(page.getByRole('heading', { name: 'Data Health' })).toBeVisible()
await expect(page.getByTestId('dl-meeting-1229')).toBeVisible()
})
test('legacy /data-library route still works', async ({ page }) => {
await page.goto('/data-library')
await expect(page.getByTestId('data-library')).toBeVisible()
@@ -36,10 +44,10 @@ test.describe('Production serving (Go + built React)', () => {
await page.locator('.app-nav').getByRole('link', { name: 'Race Hub' }).click()
await expect(page).toHaveURL(/\/race-hub/)
await page.locator('.app-nav').getByRole('link', { name: 'Data Library' }).click()
await expect(page).toHaveURL(/\/data-library/)
await page.locator('.app-nav').getByRole('link', { name: 'Admin', exact: true }).click()
await expect(page).toHaveURL(/\/admin/)
await page.getByRole('link', { name: 'Live' }).click()
await page.getByRole('link', { name: 'Live', exact: true }).click()
await expect(page).toHaveURL(/\/live/)
await expect(page.getByTestId('live-empty')).toBeVisible()
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View File

@@ -30,7 +30,7 @@ export async function gotoRaceHubReady(page: Page, sessionKey = FULL_SESSION): P
}
export async function gotoDataLibraryReady(page: Page): Promise<void> {
await page.goto('/data-library')
await page.goto('/admin')
await expect(page.getByTestId('data-library')).toBeVisible()
await expect(page.getByTestId('dl-meeting-1229')).toBeVisible()
await expect(page.getByTestId('meeting-detail')).toBeVisible()