Skip to content

Commit

Permalink
ci: fix permissions test on audit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Apr 17, 2024
1 parent 65a2d3c commit c54ca92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/tests/functional/user-permissions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ Object.entries(userGroups).forEach(([userGroup, userGroupData]) => {

Object.entries(testObjectsData).forEach(([objectPage, objectData], index) => {
test.describe(`${objectData.displayName.toLowerCase()} permissions`, () => {
const userCanView = userFromUserGroupHasPermission(userGroup, 'view', objectData.displayName);
const userCanCreate = userFromUserGroupHasPermission(userGroup, 'add', objectData.displayName);
const userCanUpdate = userFromUserGroupHasPermission(userGroup, 'change', objectData.displayName);
const userCanDelete = userFromUserGroupHasPermission(userGroup, 'delete', objectData.displayName);
const userCanView = userFromUserGroupHasPermission(userGroup, 'view', objectData.permName ?? objectData.displayName);
const userCanCreate = userFromUserGroupHasPermission(userGroup, 'add', objectData.permName ?? objectData.displayName);
const userCanUpdate = userFromUserGroupHasPermission(userGroup, 'change', objectData.permName ?? objectData.displayName);
const userCanDelete = userFromUserGroupHasPermission(userGroup, 'delete', objectData.permName ?? objectData.displayName);

test.beforeAll(async ({pages}) => {
await pages[objectPage].goto();
Expand Down
1 change: 1 addition & 0 deletions frontend/tests/utils/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ export class TestContent {
},
assetsPage: {
displayName: 'Assets',
permName: 'complianceassessment',
build: {
name: vars.assetName,
description: vars.description,
Expand Down

0 comments on commit c54ca92

Please sign in to comment.