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..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( @@ -68,6 +69,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(