diff --git a/portal-ui/src/screens/Console/Configurations/ConfigurationPanels/ConfigurationOptions.tsx b/portal-ui/src/screens/Console/Configurations/ConfigurationPanels/ConfigurationOptions.tsx index fef87b8c5..97a240fce 100644 --- a/portal-ui/src/screens/Console/Configurations/ConfigurationPanels/ConfigurationOptions.tsx +++ b/portal-ui/src/screens/Console/Configurations/ConfigurationPanels/ConfigurationOptions.tsx @@ -77,7 +77,7 @@ const ConfigurationOptions = ({ classes, match }: IConfigurationOptions) => { return ( - + @@ -124,7 +124,7 @@ const ConfigurationOptions = ({ classes, match }: IConfigurationOptions) => { } help={ diff --git a/portal-ui/src/screens/Console/valid-routes.ts b/portal-ui/src/screens/Console/valid-routes.ts index 3dab762f0..1c8f37499 100644 --- a/portal-ui/src/screens/Console/valid-routes.ts +++ b/portal-ui/src/screens/Console/valid-routes.ts @@ -212,6 +212,35 @@ export const validRoutes = ( }, ], }, + + { + component: NavLink, + to: IAM_PAGES.NOTIFICATIONS_ENDPOINTS, + name: "Notifications", + icon: LambdaIcon, + id: "lambda", + }, + { + component: NavLink, + to: IAM_PAGES.TIERS, + name: "Tiers", + icon: TiersIcon, + id: "tiers", + }, + { + component: NavLink, + to: IAM_PAGES.SITE_REPLICATION, + name: "Site Replication", + icon: RecoverIcon, + id: "sitereplication", + }, + { + component: NavLink, + to: IAM_PAGES.SETTINGS, + name: "Configurations", + id: "configurations", + icon: SettingsIcon, + }, { component: NavLink, to: IAM_PAGES.LICENSE, @@ -220,41 +249,6 @@ export const validRoutes = ( icon: LicenseIcon, forceDisplay: true, }, - { - name: "Settings", - id: "settings", - icon: SettingsIcon, - children: [ - { - component: NavLink, - to: IAM_PAGES.SETTINGS, - name: "Configurations", - id: "configurations", - icon: SettingsIcon, - }, - { - component: NavLink, - to: IAM_PAGES.NOTIFICATIONS_ENDPOINTS, - name: "Notifications", - icon: LambdaIcon, - id: "lambda", - }, - { - component: NavLink, - to: IAM_PAGES.TIERS, - name: "Tiers", - icon: TiersIcon, - id: "tiers", - }, - { - component: NavLink, - to: IAM_PAGES.SITE_REPLICATION, - name: "Site Replication", - icon: RecoverIcon, - id: "sitereplication", - }, - ], - }, { type: "item", component: NavLink, diff --git a/portal-ui/tests/permissions-1/notificationEndpoints.ts b/portal-ui/tests/permissions-1/notificationEndpoints.ts index d1fae0e3a..78dbbc433 100644 --- a/portal-ui/tests/permissions-1/notificationEndpoints.ts +++ b/portal-ui/tests/permissions-1/notificationEndpoints.ts @@ -16,10 +16,7 @@ import * as roles from "../utils/roles"; import * as elements from "../utils/elements"; -import { - notificationEndpointsElement, - settingsElement, -} from "../utils/elements-menu"; +import { notificationEndpointsElement } from "../utils/elements-menu"; fixture("For user with Notification Endpoints permissions") .page("http://localhost:9090") @@ -28,12 +25,7 @@ fixture("For user with Notification Endpoints permissions") }); test("Notification Endpoints sidebar item exists", async (t) => { - await t - .expect(settingsElement.exists) - .ok() - .click(settingsElement) - .expect(notificationEndpointsElement.exists) - .ok(); + await t.expect(notificationEndpointsElement.exists).ok(); }); test("Add Notification Target button exists", async (t) => { diff --git a/portal-ui/tests/permissions-2/settings.ts b/portal-ui/tests/permissions-2/settings.ts index 15d111e7b..9b417ca71 100644 --- a/portal-ui/tests/permissions-2/settings.ts +++ b/portal-ui/tests/permissions-2/settings.ts @@ -16,7 +16,7 @@ import * as roles from "../utils/roles"; import * as elements from "../utils/elements"; -import { configurationsElement, settingsElement } from "../utils/elements-menu"; +import { configurationsElement } from "../utils/elements-menu"; fixture("For user with Settings permissions") .page("http://localhost:9090") @@ -25,12 +25,7 @@ fixture("For user with Settings permissions") }); test("Settings sidebar item exists", async (t) => { - await t - .expect(settingsElement.exists) - .ok() - .click(settingsElement) - .expect(configurationsElement.exists) - .ok(); + await t.expect(configurationsElement.exists).ok(); }); test("Settings window exists in Settings page", async (t) => { diff --git a/portal-ui/tests/permissions-2/site-replication.ts b/portal-ui/tests/permissions-2/site-replication.ts index 5cadffa73..0cce58d47 100644 --- a/portal-ui/tests/permissions-2/site-replication.ts +++ b/portal-ui/tests/permissions-2/site-replication.ts @@ -15,13 +15,14 @@ // along with this program. If not, see . import * as roles from "../utils/roles"; -import { settingsElement } from "../utils/elements-menu"; import { IAM_PAGES } from "../../src/common/SecureComponent/permissions"; import { Selector } from "testcafe"; let testDomainUrl = "http://localhost:9090"; const screenUrl = `${testDomainUrl}${IAM_PAGES.SITE_REPLICATION}`; -const siteReplicationEl = Selector("span").withText("Site Replication"); +const siteReplicationEl = Selector(".MuiPaper-root") + .find("ul") + .child("#sitereplication"); export const addSitesBtn = Selector("button").withText("Add Sites"); /* Begin Local Testing config block */ @@ -36,12 +37,7 @@ fixture("Site Replication Status for user with Admin permissions") }); test("Site replication sidebar item exists", async (t) => { - await t - .expect(settingsElement.exists) - .ok() - .click(settingsElement) - .expect(siteReplicationEl.exists) - .ok(); + await t.expect(siteReplicationEl.exists).ok(); }); test("Add Sites button exists", async (t) => { diff --git a/portal-ui/tests/permissions-2/tiers.ts b/portal-ui/tests/permissions-2/tiers.ts index 42168f982..04aeb519a 100644 --- a/portal-ui/tests/permissions-2/tiers.ts +++ b/portal-ui/tests/permissions-2/tiers.ts @@ -16,7 +16,7 @@ import * as roles from "../utils/roles"; import * as elements from "../utils/elements"; -import { settingsElement, tiersElement } from "../utils/elements-menu"; +import { tiersElement } from "../utils/elements-menu"; fixture("For user with Tiers permissions") .page("http://localhost:9090") @@ -25,12 +25,7 @@ fixture("For user with Tiers permissions") }); test("Tiers sidebar item exists", async (t) => { - await t - .expect(settingsElement.exists) - .ok() - .click(settingsElement) - .expect(tiersElement.exists) - .ok(); + await t.expect(tiersElement.exists).ok(); }); test("Add Tier button exists", async (t) => { diff --git a/portal-ui/tests/permissions-3/admin.ts b/portal-ui/tests/permissions-3/admin.ts index 31204b9c3..5ee76850b 100644 --- a/portal-ui/tests/permissions-3/admin.ts +++ b/portal-ui/tests/permissions-3/admin.ts @@ -25,7 +25,6 @@ import { monitoringElement, notificationEndpointsElement, serviceAcctsElement, - settingsElement, supportElement, tiersElement, usersElement, @@ -58,9 +57,6 @@ test("All sidebar items exist", async (t) => { .ok() .expect(iamPoliciesElement.exists) .ok() - .expect(settingsElement.exists) - .ok() - .click(settingsElement) .expect(notificationEndpointsElement.exists) .ok() .expect(tiersElement.exists) diff --git a/portal-ui/tests/utils/elements-menu.ts b/portal-ui/tests/utils/elements-menu.ts index af36ff659..63dc713e8 100644 --- a/portal-ui/tests/utils/elements-menu.ts +++ b/portal-ui/tests/utils/elements-menu.ts @@ -14,7 +14,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -import * as constants from "./constants"; import { Selector } from "testcafe"; import { IAM_PAGES } from "../../src/common/SecureComponent/permissions"; @@ -69,20 +68,17 @@ export const iamPoliciesElement = sidebarItem.withAttribute( "/access/policies" ); -export const settingsElement = Selector(".MuiPaper-root") +export const configurationsElement = Selector(".MuiPaper-root") .find("ul") - .child("#settings"); -export const settingsChildren = Selector("#settings-children"); + .child("#configurations"); -export const configurationsElement = settingsChildren - .find("a") - .withAttribute("href", "/settings/configurations"); -export const notificationEndpointsElement = settingsChildren - .find("a") - .withAttribute("href", "/settings/notification-endpoints"); -export const tiersElement = settingsChildren - .find("a") - .withAttribute("href", "/settings/tiers"); +export const notificationEndpointsElement = Selector(".MuiPaper-root") + .find("ul") + .child("#lambda"); + +export const tiersElement = Selector(".MuiPaper-root") + .find("ul") + .child("#tiers"); export const supportElement = Selector(".MuiPaper-root") .find("ul")