Skip to content

Commit

Permalink
chore: fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Sep 20, 2024
1 parent ec4b31c commit e2f64ec
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion e2e/cypress/common/permissions/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function testKeys(info: ProjectInfo) {
!scopes.includes('translations.edit') &&
scopes.includes('translations.view')
) {
getCell('Czech text 1').click();
getCell('German text 1').click();
cy.gcy('global-editor').should('not.exist');
}

Expand Down
34 changes: 34 additions & 0 deletions e2e/cypress/e2e/projects/permissions/permissionsTask.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import {
checkPermissions,
RUN,
visitProjectWithPermissions,
} from '../../../common/permissions/main';

describe('Permissions task', () => {
it('tasks.view', () => {
visitProjectWithPermissions({ scopes: ['tasks.view'] }).then(
(projectInfo) => {
checkPermissions(projectInfo, {
'project-menu-item-dashboard': RUN,
'project-menu-item-translations': RUN,
'project-menu-item-export': RUN,
'project-menu-item-integrate': RUN,
});
}
);
});

it('tasks.edit', () => {
visitProjectWithPermissions({ scopes: ['tasks.edit'] }).then(
(projectInfo) => {
checkPermissions(projectInfo, {
'project-menu-item-dashboard': RUN,
'project-menu-item-translations': RUN,
'project-menu-item-import': RUN,
'project-menu-item-export': RUN,
'project-menu-item-integrate': RUN,
});
}
);
});
});

0 comments on commit e2f64ec

Please sign in to comment.