From fbcdad0ef07a7f54f2b80b7344ebd22c19c6c5c0 Mon Sep 17 00:00:00 2001 From: Kevin Foong Date: Wed, 10 Jul 2024 18:51:27 +0800 Subject: [PATCH] feat: test modal popup --- .../public-form/PublicFormPage.stories.tsx | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/frontend/src/features/public-form/PublicFormPage.stories.tsx b/frontend/src/features/public-form/PublicFormPage.stories.tsx index b4fb3c042f..9255c55158 100644 --- a/frontend/src/features/public-form/PublicFormPage.stories.tsx +++ b/frontend/src/features/public-form/PublicFormPage.stories.tsx @@ -443,6 +443,52 @@ CorppassSingleSubmissionFailuredMessage.parameters = { ], } +export const SgIdSingleSubmissionFailureModalAfterSubmit = Template.bind({}) +SgIdSingleSubmissionFailureModalAfterSubmit.storyName = + 'SGID/Single Submission Per NRIC/FIN/UEN Failure Modal After Submit' +SgIdSingleSubmissionFailureModalAfterSubmit.parameters = { + msw: [ + ...envHandlers, + getPublicFormResponse({ + delay: 0, + overrides: { + form: { + title: 'SGID login form', + authType: FormAuthType.SGID, + isSingleSubmission: true, + }, + spcpSession: { + userName: 'S1234567A', + }, + hasSingleSubmissionValidationFailure: true, + }, + }), + ], +} + +export const CpSingleSubmissionFailureModalAfterSubmit = Template.bind({}) +CpSingleSubmissionFailureModalAfterSubmit.storyName = + 'CP/Single Submission Per NRIC/FIN/UEN Failure Modal After Submit' +CpSingleSubmissionFailureModalAfterSubmit.parameters = { + msw: [ + ...envHandlers, + getPublicFormResponse({ + delay: 0, + overrides: { + form: { + title: 'CP login form', + authType: FormAuthType.CP, + isSingleSubmission: true, + }, + spcpSession: { + userName: 'uen-123456789A', + }, + hasSingleSubmissionValidationFailure: true, + }, + }), + ], +} + export const VerifiedFieldsExpiry = Template.bind({}) VerifiedFieldsExpiry.parameters = { msw: [