Skip to content

Fix: [AEA-6243] - Add additional isSigningOut condition to loading page on select your role#1751

Merged
connoravo-nhs merged 21 commits intomainfrom
role-selection-no-access-bug
Feb 9, 2026
Merged

Fix: [AEA-6243] - Add additional isSigningOut condition to loading page on select your role#1751
connoravo-nhs merged 21 commits intomainfrom
role-selection-no-access-bug

Conversation

@connoravo-nhs
Copy link
Copy Markdown
Contributor

@connoravo-nhs connoravo-nhs commented Feb 5, 2026

Summary

  • Routine Change

Details

Add additional isSigningOut condition to loading page on select your role.
It will now show for the redirecting "current" condition, where a user has just logged in & the new condition, if a user clicks sign out, the isSigningOut state is set and respected.

This aims to prevent the 'no roles with access' screen from being shown temporarily, as a user logs out.

… sign out to avoid redirections

Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
…Auth state & redirection race condition

Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 5, 2026

This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:

AEA-6243

Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
* }
* mockUseAuth.mockReturnValue(authState)
*/
export const mockAuthState = {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A shared mock for AuthState that can be re-utilised and hydrated with the values any test needs. Rather than re-mocking in each test going forward.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just out of curiosity is there a tech debt ticket to refactor existing tests to use this?

@connoravo-nhs connoravo-nhs changed the title Condition the render of the role selection page Fix: [AEA-6243] - Add additional isSigningOut condition to loading page on select your role Feb 6, 2026
Signed-off-by: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 9, 2026

* }
* mockUseAuth.mockReturnValue(authState)
*/
export const mockAuthState = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just out of curiosity is there a tech debt ticket to refactor existing tests to use this?

@connoravo-nhs connoravo-nhs enabled auto-merge (squash) February 9, 2026 10:52
@connoravo-nhs connoravo-nhs merged commit 7e00c1c into main Feb 9, 2026
20 checks passed
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.

2 participants