mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-07 19:56:18 -04:00
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>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user