fix(race-hub): consume canonical weekend context for #75 review
Address PR #82 review blockers: drop the competing /weekend default_analysis_session resolver, land bare /race-hub via /api/v1/weekend-context, derive Live/preparing/partial/unavailable from authoritative context with a moving clock, hide Local Coverage behind Diagnostics, isolate the future-session fixture from the shared seed, and strengthen return-to-Weekend context coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
@@ -1,4 +1,5 @@
|
||||
import { expect, type Locator, type Page } from '@playwright/test'
|
||||
import { FUTURE_SESSION, mockFutureRaceHubSession } from '../fixtures/future-session'
|
||||
|
||||
export const VIEWPORTS = {
|
||||
desktop: { width: 1280, height: 800 },
|
||||
@@ -7,7 +8,7 @@ export const VIEWPORTS = {
|
||||
} as const
|
||||
|
||||
export const FULL_SESSION = 9472
|
||||
export const FUTURE_SESSION = 9600
|
||||
export { FUTURE_SESSION }
|
||||
|
||||
/** Wait for web fonts and layout to settle before screenshots. */
|
||||
export async function waitForScreenshotReady(page: Page): Promise<void> {
|
||||
@@ -38,6 +39,7 @@ export async function gotoRaceHubFutureReady(
|
||||
page: Page,
|
||||
sessionKey = FUTURE_SESSION,
|
||||
): Promise<void> {
|
||||
await mockFutureRaceHubSession(page)
|
||||
await page.goto(`/race-hub?session_key=${sessionKey}`)
|
||||
await expect(page.getByTestId('race-hub')).toBeVisible()
|
||||
await expect(page.getByTestId('rh-presession')).toBeVisible()
|
||||
|
||||