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( +