Move Tiers, Notifications and Site Replication out of Settings Menu (#1975)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -77,7 +77,7 @@ const ConfigurationOptions = ({ classes, match }: IConfigurationOptions) => {
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<PageHeader label={"Settings"} />
|
||||
<PageHeader label={"Configurations"} />
|
||||
|
||||
<PageLayout>
|
||||
<Grid item xs={12}>
|
||||
@@ -124,7 +124,7 @@ const ConfigurationOptions = ({ classes, match }: IConfigurationOptions) => {
|
||||
</Grid>
|
||||
<Grid item xs={12} sx={{ paddingTop: "15px" }}>
|
||||
<HelpBox
|
||||
title={"Learn more about SETTINGS"}
|
||||
title={"Learn more about CONFIGURATIONS"}
|
||||
iconComponent={<SettingsIcon />}
|
||||
help={
|
||||
<Fragment>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -15,13 +15,14 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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) => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user