mirror of https://github.com/portainer/portainer
chore(tests): update AccessControlForm snapshots [EE-2348] (#6361)
parent
5362e15624
commit
c24d8fab0f
|
@ -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"`;
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
"rc-slider": "^9.7.5",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-query": "^3.34.3",
|
||||
"react-is": "^17.0.2",
|
||||
"react-select": "^5.2.1",
|
||||
"react-table": "^7.7.0",
|
||||
|
@ -214,7 +215,6 @@
|
|||
"postcss": "7",
|
||||
"postcss-loader": "4",
|
||||
"prettier": "^2.5.1",
|
||||
"react-query": "^3.34.3",
|
||||
"react-test-renderer": "^17.0.2",
|
||||
"source-map-loader": "^3.0.0",
|
||||
"speed-measure-webpack-plugin": "^1.5.0",
|
||||
|
@ -247,4 +247,4 @@
|
|||
"pre-commit": "lint-staged"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue