diff --git a/web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts b/web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts index 8e72bf07ab..1cb8b99d9a 100644 --- a/web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts +++ b/web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts @@ -255,9 +255,9 @@ const mountComponent = (props: Record = {}) => { template: '', }, UModal: { - props: ['open', 'ui', 'title', 'description'], + props: ['open', 'ui', 'title', 'description', 'dismissible', 'close'], template: ` -
+
{{ title }}
{{ description }}
@@ -584,6 +584,20 @@ describe('OnboardingSummaryStep', () => { }); }); + it('only allows closing the apply result dialog via the OK button', async () => { + const { wrapper, onComplete } = mountComponent(); + + await clickApply(wrapper); + + const vm = getSummaryVm(wrapper); + expect(vm.showApplyResultDialog).toBe(true); + expect(onComplete).not.toHaveBeenCalled(); + + vm.handleApplyResultConfirm(); + expect(vm.showApplyResultDialog).toBe(false); + expect(onComplete).toHaveBeenCalledOnce(); + }); + it.each([ { caseName: 'switches to en_US directly without language pack install', diff --git a/web/src/components/Onboarding/steps/OnboardingSummaryStep.vue b/web/src/components/Onboarding/steps/OnboardingSummaryStep.vue index c09e6c2fab..86a1e89625 100644 --- a/web/src/components/Onboarding/steps/OnboardingSummaryStep.vue +++ b/web/src/components/Onboarding/steps/OnboardingSummaryStep.vue @@ -1386,6 +1386,8 @@ const handleBack = () => { { ? 'z-50 w-[calc(100vw-2rem)] max-w-3xl' : 'z-50 max-w-md', }" - @update:open="showApplyResultDialog = $event" >