Skip to content

Commit

Permalink
fix some tests and the docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
sfoster1 committed Jul 3, 2024
1 parent 586618d commit cbadbc1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/molecules/InterventionModal/DeckMapContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function DeckConfigStyleDeckMapContent({
'default'
)
React.useEffect(() => {
setSelectedLocation(selectedLocation)
setSelectedLocation != null && setSelectedLocation(selectedLocation)
}, [selectedLocation, setSelectedLocation])
return <>{DeckLocationSelect}</>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,20 @@ describe('useRunPausedSplash', () => {
)
})

it('returns true if on the ODD', () => {
const { result } = renderHook(() => useRunPausedSplash(true, true), {
wrapper,
const IS_WIZARD_SHOWN = [false, true]
IS_WIZARD_SHOWN.forEach(val => {
it(`returns ${!val} if on the ODD and showERWizard is ${val}`, () => {
const { result } = renderHook(() => useRunPausedSplash(true, val), {
wrapper,
})
expect(result.current).toEqual(!val)
})
it(`always returns false if on desktop and showERWizard is ${val}`, () => {
const { result } = renderHook(() => useRunPausedSplash(false, val), {
wrapper,
})
expect(result.current).toEqual(false)
})
expect(result.current).toEqual(true)
})
})

Expand Down

0 comments on commit cbadbc1

Please sign in to comment.