Skip to content

Commit

Permalink
FAT-18063: test updated
Browse files Browse the repository at this point in the history
  • Loading branch information
zentestuken committed Jan 15, 2025
1 parent 0b398bf commit 376597d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 34 deletions.
28 changes: 0 additions & 28 deletions cypress/e2e/eureka/settings/settings-permission-sets-absent.cy.js

This file was deleted.

43 changes: 43 additions & 0 deletions cypress/e2e/eureka/settings/settings-permission-tabs-absent.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import SettingsPane from '../../../support/fragments/settings/settingsPane';
import TopMenu from '../../../support/fragments/topMenu';

describe('Eureka', () => {
describe('Settings', () => {
const usersSubTabsPresent = ['Patron groups', 'Owners', 'Conditions'];
const permissionSetsSubTab = 'Permission sets';
const usersTabName = 'Users';
const developerTabName = 'Developer';
const developerSubTabsPresent = [
'Configuration',
'I can haz capabilities?',
'Stripes inspector',
];
const developerSubTabsAbsent = ['I can haz endpoint?', 'Permissions inspector'];

before(() => {
cy.loginAsAdmin({
path: TopMenu.settingsUserPath,
waiter: SettingsPane.waitLoading,
});
});

it(
'C633353 [UID-151] "Permissions" tabs are not shown in Settings > Users, Settings > Developer (eureka)',
{ tags: ['smoke', 'eureka', 'eurekaPhase1', 'C633353'] },
() => {
usersSubTabsPresent.forEach((presentSubTab) => {
SettingsPane.checkTabPresentInSecondPane(usersTabName, presentSubTab);
});
SettingsPane.checkTabPresentInSecondPane(usersTabName, permissionSetsSubTab, false);

SettingsPane.selectSettingsTab(developerTabName);
developerSubTabsPresent.forEach((presentSubTab) => {
SettingsPane.checkTabPresentInSecondPane(developerTabName, presentSubTab);
});
developerSubTabsAbsent.forEach((absentSubTab) => {
SettingsPane.checkTabPresentInSecondPane(developerTabName, absentSubTab, false);
});
},
);
});
});
6 changes: 6 additions & 0 deletions cypress/support/fragments/settings/settingsPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
including,
or,
NavListItem,
Link,
} from '../../../../interactors';
import deleteModal from './tenant/modals/deleteModal';

Expand Down Expand Up @@ -177,4 +178,9 @@ export default {
cy.wait(1000);
cy.do(NavListItem(settingsTab).click());
},

checkTabPresentInSecondPane: (secondPaneName, tabName, isPresent = true) => {
if (isPresent) cy.expect(Pane(secondPaneName).find(Link(tabName)).exists());
else cy.expect(Pane(secondPaneName).find(Link(tabName)).absent());
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
including,
Pane,
NavListItem,
Link,
} from '../../../../../interactors';

const rootSection = Section({ id: 'controlled-vocab-pane' });
Expand Down Expand Up @@ -49,9 +48,4 @@ export default {
checkUserSectionOptionAbsent: (option) => {
cy.expect(usersPane.find(NavListItem({ label: option })).absent());
},

checkUsersPaneTabPresent: (tabName, isPresent = true) => {
if (isPresent) cy.expect(usersPane.find(Link(tabName)).exists());
else cy.expect(usersPane.find(Link(tabName)).absent());
},
};

0 comments on commit 376597d

Please sign in to comment.