Skip to content

[PRMP-1478] Add user restrictions management page #1165

Open
NogaNHS wants to merge 2 commits intomainfrom
PRMP-1478
Open

[PRMP-1478] Add user restrictions management page #1165
NogaNHS wants to merge 2 commits intomainfrom
PRMP-1478

Conversation

@NogaNHS
Copy link
Contributor

@NogaNHS NogaNHS commented Mar 10, 2026

Overview

Jira ticket: PRMP-1478

Checklist

Tasks for all changes:

  • 1. I have linked this PR to its Jira ticket.
  • 2. I have run git pre-commits. (WIP)
  • 3. I have added and/or updated relevant tests.
  • 4. I have updated relevant documentation.
  • 5. I have considered the cross-team impact (and have PR approval from both Core & Demographics if necessary).
  • 6. I have successfully deployed this change to a sandbox and witnessed unit, e2e and smoke tests passing:

Additional tasks for UI changes (delete if not applicable):

  • 1. I have added evidence (to this PR) e.g. screenshots/gifs of all visual changes.
image image image

@github-actions
Copy link

Code security issues found

View full details here.

@sonarqubecloud
Copy link

@NogaNHS NogaNHS marked this pull request as ready for review March 10, 2026 14:17
@NogaNHS NogaNHS requested review from a team as code owners March 10, 2026 14:17
Comment on lines +43 to +78
it('renders the page heading', (): void => {
renderWithFlag();
expect(
screen.getByRole('heading', {
name: 'Restrict staff from accessing patient records',
}),
).toBeInTheDocument();
});

it('renders the Add a restriction card', (): void => {
renderWithFlag();
expect(screen.getByTestId('add-user-restriction-btn')).toBeInTheDocument();
expect(screen.getByTestId('add-user-restriction-btn')).toHaveTextContent(
'Add a restriction',
);
expect(
screen.getByText('Restrict a staff member from accessing a patient record.'),
).toBeInTheDocument();
});

it('renders the View and remove a restriction card', (): void => {
renderWithFlag();
expect(screen.getByTestId('view-user-restrictions-btn')).toBeInTheDocument();
expect(screen.getByTestId('view-user-restrictions-btn')).toHaveTextContent(
'View and remove a restriction',
);
expect(
screen.getByText('View and remove restrictions for staff at your practice.'),
).toBeInTheDocument();
});

it('renders the back button', (): void => {
renderWithFlag();
expect(screen.getByTestId('user-restrictions-back-btn')).toBeInTheDocument();
});
});
Copy link
Contributor

Choose a reason for hiding this comment

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

one test?

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