Skip to content

Commit

Permalink
chore: e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Jun 20, 2024
1 parent a67360c commit aa62c2b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions e2e/cypress/common/permissions/batchOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export function testBatchOperations(projectInfo: ProjectInfo) {
checkTargetLanguages(translateLanguageIds, projectInfo);
},
],
'Export translations': ['translations.view'],
'Add tags': ['keys.edit'],
'Remove tags': ['keys.edit'],
'Change namespace': ['keys.edit'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import {
} from '../../../common/permissions/main';

describe('Permissions per language 1', () => {
it('translations.state-edit', () => {
it('translations.view', () => {
visitProjectWithPermissions({
scopes: ['translations.view', 'translations.state-edit'],
stateChangeLanguageTags: ['de'],
scopes: ['translations.view'],
viewLanguageTags: ['en', 'de'],
}).then((projectInfo) => {
checkPermissions(projectInfo, {
'project-menu-item-dashboard': RUN,
Expand All @@ -19,11 +19,10 @@ describe('Permissions per language 1', () => {
});
});

it('combined translations.edit and translations.state-edit', () => {
it('translations.edit', () => {
visitProjectWithPermissions({
scopes: ['translations.edit', 'translations.state-edit'],
translateLanguageTags: ['cs'],
stateChangeLanguageTags: ['de'],
scopes: ['translations.edit'],
translateLanguageTags: ['de'],
}).then((projectInfo) => {
checkPermissions(projectInfo, {
'project-menu-item-dashboard': RUN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ export const BatchSelect = ({ value, onChange }: Props) => {
<React.Fragment key={o.id}>
{o.divider && <StyledSeparator />}
{o.enabled === false ? (
<ListItemButton data-cy="batch-select-item" disabled={true}>
<ListItem data-cy="batch-select-item" disabled={true}>
{o.label}
</ListItemButton>
</ListItem>
) : (
<ListItem {...props} data-cy="batch-select-item">
{o.label}
Expand Down

0 comments on commit aa62c2b

Please sign in to comment.