Skip to content

Commit fe6e8c0

Browse files
committed
add test for closed work account onboarding error
1 parent baeeff1 commit fe6e8c0

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

tests/ui/WorkEmailOnboarding.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,28 @@ describe('OnboardingWorkEmailValidation Page', () => {
453453
await waitForBatchedUpdatesWithAct();
454454
});
455455

456+
it('should display onboarding closed account screen content correctly', async () => {
457+
await TestHelper.signInWithTestUser();
458+
459+
await act(async () => {
460+
await Onyx.merge(ONYXKEYS.ONBOARDING_ERROR_MESSAGE_TRANSLATION_KEY, 'onboarding.mergeBlockScreen.workAccountClosedSubtitle');
461+
await Onyx.merge(ONYXKEYS.NVP_ONBOARDING, {
462+
isMergingAccountBlocked: true,
463+
});
464+
});
465+
466+
const {unmount} = renderOnboardingWorkEmailValidationPage(SCREENS.ONBOARDING.WORK_EMAIL_VALIDATION, {backTo: ''});
467+
468+
await waitForBatchedUpdatesWithAct();
469+
470+
await waitFor(() => {
471+
expect(screen.getByText(TestHelper.translateLocal('onboarding.mergeBlockScreen.workAccountClosedSubtitle'))).toBeOnTheScreen();
472+
});
473+
474+
unmount();
475+
await waitForBatchedUpdatesWithAct();
476+
});
477+
456478
it('should navigate to Onboarding purpose page when skip is pressed and there is no signupQualifier', async () => {
457479
await TestHelper.signInWithTestUser();
458480

0 commit comments

Comments
 (0)