aa3fe2062d
github/actions/ci GitHub Actions CI finished: success
Add separate UI Lab scenarios for true first-run onboarding and post-update What's New checks. Keep empty-library fixtures reusable across mock data, tagger readiness, worker pause defaults, and launch-time version state so browser verification can exercise the real flows.
42 lines
1.0 KiB
TypeScript
42 lines
1.0 KiB
TypeScript
export type MockScenario =
|
|
| 'rich'
|
|
| 'empty'
|
|
| 'busy'
|
|
| 'duplicates'
|
|
| 'album'
|
|
| 'errors'
|
|
| 'huge'
|
|
| 'extreme'
|
|
| 'unready'
|
|
| 'joytag-unready'
|
|
| 'new-user'
|
|
| 'just-updated'
|
|
|
|
const SCENARIOS = new Set<MockScenario>([
|
|
'rich',
|
|
'empty',
|
|
'busy',
|
|
'duplicates',
|
|
'album',
|
|
'errors',
|
|
'huge',
|
|
'extreme',
|
|
'unready',
|
|
'joytag-unready',
|
|
'new-user',
|
|
'just-updated',
|
|
])
|
|
|
|
// Scenarios that start with no folders or media. 'empty' is a bare library
|
|
// with onboarding already behind it; 'new-user' is the true first run and
|
|
// additionally opens the onboarding tour with no tagger model downloaded.
|
|
export function isEmptyLibraryScenario(scenario: MockScenario): boolean {
|
|
return scenario === 'empty' || scenario === 'new-user'
|
|
}
|
|
|
|
export function getMockScenario(): MockScenario {
|
|
if (typeof window === 'undefined') return 'rich'
|
|
const value = new URLSearchParams(window.location.search).get('scenario')
|
|
return value && SCENARIOS.has(value as MockScenario) ? (value as MockScenario) : 'rich'
|
|
}
|