Skip to content

Conversation

@mark-r-bjss
Copy link
Contributor

Description

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@mark-r-bjss mark-r-bjss requested a review from a team as a code owner December 23, 2025 11:49

return (
<ErrorSummary ref={errorSummaryRef}>
<ErrorSummary ref={errorSummaryRef} tabIndex={-1}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

<div
class="nhsuk-grid-row nhsuk-grid-column-two-thirds"
>
<div
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is for the validation being triggered so I'm not convinced the error summary should be removed from the snapshot?

<div
class="nhsuk-grid-row nhsuk-grid-column-two-thirds"
>
<div
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

expect(scrollIntoViewMock).not.toHaveBeenCalled();
});

test('Renders NhsNotifyErrorSummary correctly with empty error state', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think based on your changes, might also be worth adding tests for errorState object having formError/fieldError keys but with falsy values, since component also won't render in those scenarios either now?

} from '@aws-sdk/client-cognito-identity-provider';
import { logger } from '@/src/utils/logger';

export const INTERNAL_ID_ATTRIBUTE = 'custom:nhs_notify_user_id';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ticket mentions username but I'm guessing this is what we're using instead?

@@ -1 +0,0 @@
*.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have something similar in the new dir?

if (error instanceof ConditionalCheckFailedException) {
return 'lock-failure';
}
logger.error(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you not want one of these error logs before your lock-failure return?

// act
let caughtError;
try {
await discoverUserPoolId('nonexistent');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not something to change but an FYI you canw write this as

await expect(discoverUserPoolId('nonexistent')).rejects.toThrowError('User pool nhs-notify-nonexistent-app not found')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants