diff --git a/cypress/e2e/eureka/settings/settings-permission-sets-absent.cy.js b/cypress/e2e/eureka/settings/settings-permission-sets-absent.cy.js deleted file mode 100644 index 689f85b347..0000000000 --- a/cypress/e2e/eureka/settings/settings-permission-sets-absent.cy.js +++ /dev/null @@ -1,28 +0,0 @@ -import SettingsPane from '../../../support/fragments/settings/settingsPane'; -import UsersSettingsGeneral from '../../../support/fragments/settings/users/usersSettingsGeneral'; -import TopMenu from '../../../support/fragments/topMenu'; - -describe('Eureka', () => { - describe('Settings', () => { - const tabsPresent = ['Patron groups', 'Owners', 'Conditions']; - const permissionSetsTab = 'Permission sets'; - - before(() => { - cy.loginAsAdmin({ - path: TopMenu.settingsUserPath, - waiter: SettingsPane.waitLoading, - }); - }); - - it( - 'C468196 "Permission sets" tab is NOT shown in "Settings" -> "Users" (eureka)', - { tags: ['smoke', 'eureka', 'eurekaPhase1', 'C468196'] }, - () => { - tabsPresent.forEach((presentTab) => { - UsersSettingsGeneral.checkUsersPaneTabPresent(presentTab); - }); - UsersSettingsGeneral.checkUsersPaneTabPresent(permissionSetsTab, false); - }, - ); - }); -}); diff --git a/cypress/e2e/eureka/settings/settings-permission-tabs-absent.cy.js b/cypress/e2e/eureka/settings/settings-permission-tabs-absent.cy.js new file mode 100644 index 0000000000..a9bdab38f8 --- /dev/null +++ b/cypress/e2e/eureka/settings/settings-permission-tabs-absent.cy.js @@ -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); + }); + }, + ); + }); +}); diff --git a/cypress/support/fragments/settings/settingsPane.js b/cypress/support/fragments/settings/settingsPane.js index 808fe560b4..3207595fc6 100644 --- a/cypress/support/fragments/settings/settingsPane.js +++ b/cypress/support/fragments/settings/settingsPane.js @@ -14,6 +14,7 @@ import { including, or, NavListItem, + Link, } from '../../../../interactors'; import deleteModal from './tenant/modals/deleteModal'; @@ -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()); + }, }; diff --git a/cypress/support/fragments/settings/users/usersSettingsGeneral.js b/cypress/support/fragments/settings/users/usersSettingsGeneral.js index 59ce7cbbec..2d7355add0 100644 --- a/cypress/support/fragments/settings/users/usersSettingsGeneral.js +++ b/cypress/support/fragments/settings/users/usersSettingsGeneral.js @@ -8,7 +8,6 @@ import { including, Pane, NavListItem, - Link, } from '../../../../../interactors'; const rootSection = Section({ id: 'controlled-vocab-pane' }); @@ -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()); - }, };