mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 17:41:51 +00:00
fix(ci): the lint ratchet, and SwiftPM's half-downloaded artifacts on the iOS runners
The import sheet no longer sets state from its preset effect and is below the complexity limit; the trip shell's splash tests await their timers. The iOS and watch builds resolve their Swift packages first on a clean artifact cache, up to three times: a failed download from GitHub left a partial Capacitor xcframework behind and every later attempt stopped on it.
This commit is contained in:
@@ -136,7 +136,7 @@ describe('MTripShell', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('FE-MOB-SHELL-001: while the trip loads the page transition holds, and only a slow load brings the splash', () => {
|
||||
it('FE-MOB-SHELL-001: while the trip loads the page transition holds, and only a slow load brings the splash', async () => {
|
||||
vi.useFakeTimers()
|
||||
try {
|
||||
const { container } = renderShell({ isLoading: true } as Partial<TripPlanner>)
|
||||
@@ -144,7 +144,9 @@ describe('MTripShell', () => {
|
||||
expect(screen.queryByText('Japan 2026')).not.toBeInTheDocument()
|
||||
expect(screen.queryByTestId('sheets')).not.toBeInTheDocument()
|
||||
|
||||
act(() => vi.advanceTimersByTime(TRIP_SPLASH_AFTER_MS))
|
||||
await act(async () => {
|
||||
await vi.advanceTimersByTimeAsync(TRIP_SPLASH_AFTER_MS)
|
||||
})
|
||||
expect(screen.getByText('Japan 2026')).toBeInTheDocument()
|
||||
expect(container.querySelector('[data-route-fallback]')).not.toBeInTheDocument()
|
||||
} finally {
|
||||
@@ -168,11 +170,13 @@ describe('MTripShell', () => {
|
||||
expect(container).toBeEmptyDOMElement()
|
||||
})
|
||||
|
||||
it('FE-MOB-SHELL-003b: the splash falls back to the brand name before the trip arrives', () => {
|
||||
it('FE-MOB-SHELL-003b: the splash falls back to the brand name before the trip arrives', async () => {
|
||||
vi.useFakeTimers()
|
||||
try {
|
||||
renderShell({ isLoading: true, trip: null } as Partial<TripPlanner>)
|
||||
act(() => vi.advanceTimersByTime(TRIP_SPLASH_AFTER_MS))
|
||||
await act(async () => {
|
||||
await vi.advanceTimersByTimeAsync(TRIP_SPLASH_AFTER_MS)
|
||||
})
|
||||
expect(screen.getByText('TREK')).toBeInTheDocument()
|
||||
} finally {
|
||||
vi.useRealTimers()
|
||||
|
||||
Reference in New Issue
Block a user