mirror of
https://github.com/portainer/portainer.git
synced 2025-08-09 15:55:23 +02:00
chore(tests): update AccessControlForm snapshots [EE-2348] (#6361)
This commit is contained in:
parent
5362e15624
commit
c24d8fab0f
3 changed files with 6 additions and 16 deletions
|
@ -2,11 +2,7 @@ import { server, rest } from '@/setup-tests/server';
|
|||
import { ResourceControlOwnership as RCO } from '@/portainer/models/resourceControl/resourceControlOwnership';
|
||||
import { UserContext } from '@/portainer/hooks/useUser';
|
||||
import { UserViewModel } from '@/portainer/models/user';
|
||||
import {
|
||||
renderWithQueryClient,
|
||||
within,
|
||||
waitFor,
|
||||
} from '@/react-tools/test-utils';
|
||||
import { renderWithQueryClient, within } from '@/react-tools/test-utils';
|
||||
import { Team } from '@/portainer/teams/types';
|
||||
import { ResourceControlViewModel } from '@/portainer/models/resourceControl/resourceControl';
|
||||
import { createMockTeams } from '@/react-tools/test-mocks';
|
||||
|
@ -310,11 +306,9 @@ async function renderComponent(
|
|||
</UserContext.Provider>
|
||||
);
|
||||
|
||||
await waitFor(async () =>
|
||||
expect(
|
||||
await renderResult.findByLabelText(/Enable access control/)
|
||||
).toBeVisible()
|
||||
);
|
||||
await expect(
|
||||
renderResult.findByLabelText(/Enable access control/)
|
||||
).resolves.toBeVisible();
|
||||
|
||||
return renderResult;
|
||||
}
|
||||
|
|
|
@ -4,10 +4,6 @@ exports[`when access control is enabled, ownership is restricted and no teams or
|
|||
|
||||
exports[`when access control is enabled, ownership is restricted and no teams or users, should be invalid 2`] = `"You must specify at least one team"`;
|
||||
|
||||
exports[`when access control is enabled, ownership is restricted and no teams or users, should be valid 1`] = `"You must specify at least one team"`;
|
||||
|
||||
exports[`when access control is enabled, ownership is restricted and no teams or users, should be valid 2`] = `"You must specify at least one team"`;
|
||||
|
||||
exports[`when access control is enabled, ownership is restricted, user is admin but no users, should be valid 1`] = `"You must specify at least one user."`;
|
||||
|
||||
exports[`when only access control is enabled, should be invalid 1`] = `"ownership is a required field"`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue