From 062716a2c0efd99f8ee1eff69c7b14f54e6e1e19 Mon Sep 17 00:00:00 2001 From: Dawei Wang Date: Fri, 21 Jul 2023 09:21:58 -0400 Subject: [PATCH 1/5] LG-10224: use same style for ipp and non-ipp. --- .../components/review-issues-step.tsx | 4 ++- .../components/review-issues-step-spec.jsx | 35 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/app/javascript/packages/document-capture/components/review-issues-step.tsx b/app/javascript/packages/document-capture/components/review-issues-step.tsx index f06d5ff1c95..001fc0742f6 100644 --- a/app/javascript/packages/document-capture/components/review-issues-step.tsx +++ b/app/javascript/packages/document-capture/components/review-issues-step.tsx @@ -124,7 +124,9 @@ function ReviewIssuesStep({ {remainingAttempts <= DISPLAY_ATTEMPTS && (

- {t('idv.failure.attempts_html', { count: remainingAttempts })} + {formatWithStrongNoWrap( + t('idv.failure.attempts_html', { count: remainingAttempts }), + )}

)} diff --git a/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx b/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx index 77d46ff741e..7f7bc1dbb5c 100644 --- a/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx +++ b/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx @@ -68,6 +68,41 @@ describe('document-capture/components/review-issues-step', () => { }), ).to.exist(); }); + it('renders initially with warning page and displays attempts remaining with IPP', () => { + const {getByRole, getByText, } = render( + + One attempt remaining', + other: '%{count} attempts remaining', + }, + }, + }) + } + > + + + , + ); + + expect(getByText('errors.doc_auth.throttled_heading')).to.be.ok(); + expect(getByText('3 attempts', { selector: 'strong' })).to.be.ok(); + expect(getByText('remaining')).to.be.ok(); + expect(getByRole('button', { name: 'idv.failure.button.try_online' })).to.be.ok(); + expect(getByRole('button', { name: 'in_person_proofing.body.cta.button' })).to.be.ok(); + + expect( + getByRole('link', { name: 'idv.troubleshooting.options.doc_capture_tips links.new_tab' }), + ).to.exist(); + expect( + getByRole('link', { + name: 'idv.troubleshooting.options.supported_documents links.new_tab', + }), + ).to.exist(); + }); it('renders warning page with error and displays one attempt remaining then continues on', async () => { const { getByRole, getByLabelText, getByText } = render( From bed7e3481075d0869eb3fbfb746c2d1a90fcc2a6 Mon Sep 17 00:00:00 2001 From: Dawei Wang Date: Fri, 21 Jul 2023 10:25:42 -0400 Subject: [PATCH 2/5] changelog: User-facing Improvements, Doc Authentication, remaining attempts text issue From 7c5a84d35313b66f96fbf717253dfbbfe75fea4f Mon Sep 17 00:00:00 2001 From: Dawei Wang Date: Fri, 21 Jul 2023 10:53:32 -0400 Subject: [PATCH 3/5] LG-10224: lint --- .../document-capture/components/review-issues-step-spec.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx b/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx index 7f7bc1dbb5c..908bf1bc7db 100644 --- a/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx +++ b/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx @@ -69,7 +69,7 @@ describe('document-capture/components/review-issues-step', () => { ).to.exist(); }); it('renders initially with warning page and displays attempts remaining with IPP', () => { - const {getByRole, getByText, } = render( + const { getByRole, getByText } = render( Date: Fri, 21 Jul 2023 10:54:51 -0400 Subject: [PATCH 4/5] changelog: User-Facing Improvements, Doc authentication, Remaining attempts text issue (LG-10224) From dde39e307026e60be0ff4ff6d2a8bd36ac09e958 Mon Sep 17 00:00:00 2001 From: Dawei Wang Date: Fri, 21 Jul 2023 11:07:05 -0400 Subject: [PATCH 5/5] LG-10224: address comment. --- .../components/review-issues-step-spec.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx b/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx index 908bf1bc7db..c2219499287 100644 --- a/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx +++ b/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx @@ -44,8 +44,8 @@ describe('document-capture/components/review-issues-step', () => { new I18n({ strings: { 'idv.failure.attempts_html': { - one: 'One attempt remaining', - other: '%{count} attempts remaining', + one: 'One attempt remaining', + other: '%{count} attempts remaining', }, }, }) @@ -56,7 +56,8 @@ describe('document-capture/components/review-issues-step', () => { ); expect(getByText('errors.doc_auth.throttled_heading')).to.be.ok(); - expect(getByText('3 attempts remaining')).to.be.ok(); + expect(getByText('3 attempts', { selector: 'strong' })).to.be.ok(); + expect(getByText('remaining')).to.be.ok(); expect(getByRole('button', { name: 'idv.failure.button.warning' })).to.be.ok(); expect( @@ -70,7 +71,7 @@ describe('document-capture/components/review-issues-step', () => { }); it('renders initially with warning page and displays attempts remaining with IPP', () => { const { getByRole, getByText } = render( - +