Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(app): add and use deck map component in interventionmodal #15570

Merged
merged 9 commits into from
Jul 5, 2024
Next Next commit
fix a logic error that prevented recovery from running
  • Loading branch information
sfoster1 committed Jul 5, 2024
commit ecd32952cdccd460a850f4ea19e5d63024c1e4c3
2 changes: 1 addition & 1 deletion app/src/organisms/ErrorRecoveryFlows/RunPausedSplash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function useRunPausedSplash(
showERWizard: boolean
): boolean {
// Don't show the splash when desktop ER wizard is active.
return !(!isOnDevice && showERWizard)
return isOnDevice && !showERWizard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

}

type RunPausedSplashProps = ERUtilsResults & {
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