Skip to content

Commit 6a2f519

Browse files
Merge pull request #7202 from folio-org/FAT-24126-lists-permission-denied-message
FAT-24126 Automate manual test case C540397
2 parents 156b302 + ada3aed commit 6a2f519

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import Permissions from '../../../support/dictionary/permissions';
2+
import { Lists } from '../../../support/fragments/lists/lists';
3+
import TopMenu from '../../../support/fragments/topMenu';
4+
import Users from '../../../support/fragments/users/users';
5+
6+
describe('Lists', () => {
7+
describe('Permissions', () => {
8+
let userData = {};
9+
10+
before('Create test data', () => {
11+
cy.getAdminToken();
12+
cy.createTempUser([Permissions.listsEnable.gui, Permissions.inventoryAll.gui]).then(
13+
(userProperties) => {
14+
userData = userProperties;
15+
},
16+
);
17+
});
18+
19+
after('Delete test data', () => {
20+
cy.getAdminToken();
21+
Users.deleteViaApi(userData.userId);
22+
});
23+
24+
it(
25+
'C540397 Verify that displays proper validation message when the user does not have permission to do the action (corsair)',
26+
{ tags: ['extendedPath', 'corsair', 'C540397'] },
27+
() => {
28+
cy.login(userData.username, userData.password, {
29+
path: TopMenu.listsPath,
30+
waiter: Lists.waitLoading,
31+
});
32+
33+
cy.get('body').type('{alt}N');
34+
Lists.verifyCalloutMessage('User does not have permission to take this action');
35+
},
36+
);
37+
});
38+
});

0 commit comments

Comments
 (0)