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 (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PageHeader label={"Settings"} />
|
<PageHeader label={"Configurations"} />
|
||||||
|
|
||||||
<PageLayout>
|
<PageLayout>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
@@ -124,7 +124,7 @@ const ConfigurationOptions = ({ classes, match }: IConfigurationOptions) => {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12} sx={{ paddingTop: "15px" }}>
|
<Grid item xs={12} sx={{ paddingTop: "15px" }}>
|
||||||
<HelpBox
|
<HelpBox
|
||||||
title={"Learn more about SETTINGS"}
|
title={"Learn more about CONFIGURATIONS"}
|
||||||
iconComponent={<SettingsIcon />}
|
iconComponent={<SettingsIcon />}
|
||||||
help={
|
help={
|
||||||
<Fragment>
|
<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,
|
component: NavLink,
|
||||||
to: IAM_PAGES.LICENSE,
|
to: IAM_PAGES.LICENSE,
|
||||||
@@ -220,41 +249,6 @@ export const validRoutes = (
|
|||||||
icon: LicenseIcon,
|
icon: LicenseIcon,
|
||||||
forceDisplay: true,
|
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",
|
type: "item",
|
||||||
component: NavLink,
|
component: NavLink,
|
||||||
|
|||||||
@@ -16,10 +16,7 @@
|
|||||||
|
|
||||||
import * as roles from "../utils/roles";
|
import * as roles from "../utils/roles";
|
||||||
import * as elements from "../utils/elements";
|
import * as elements from "../utils/elements";
|
||||||
import {
|
import { notificationEndpointsElement } from "../utils/elements-menu";
|
||||||
notificationEndpointsElement,
|
|
||||||
settingsElement,
|
|
||||||
} from "../utils/elements-menu";
|
|
||||||
|
|
||||||
fixture("For user with Notification Endpoints permissions")
|
fixture("For user with Notification Endpoints permissions")
|
||||||
.page("http://localhost:9090")
|
.page("http://localhost:9090")
|
||||||
@@ -28,12 +25,7 @@ fixture("For user with Notification Endpoints permissions")
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("Notification Endpoints sidebar item exists", async (t) => {
|
test("Notification Endpoints sidebar item exists", async (t) => {
|
||||||
await t
|
await t.expect(notificationEndpointsElement.exists).ok();
|
||||||
.expect(settingsElement.exists)
|
|
||||||
.ok()
|
|
||||||
.click(settingsElement)
|
|
||||||
.expect(notificationEndpointsElement.exists)
|
|
||||||
.ok();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Add Notification Target button exists", async (t) => {
|
test("Add Notification Target button exists", async (t) => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import * as roles from "../utils/roles";
|
import * as roles from "../utils/roles";
|
||||||
import * as elements from "../utils/elements";
|
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")
|
fixture("For user with Settings permissions")
|
||||||
.page("http://localhost:9090")
|
.page("http://localhost:9090")
|
||||||
@@ -25,12 +25,7 @@ fixture("For user with Settings permissions")
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("Settings sidebar item exists", async (t) => {
|
test("Settings sidebar item exists", async (t) => {
|
||||||
await t
|
await t.expect(configurationsElement.exists).ok();
|
||||||
.expect(settingsElement.exists)
|
|
||||||
.ok()
|
|
||||||
.click(settingsElement)
|
|
||||||
.expect(configurationsElement.exists)
|
|
||||||
.ok();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Settings window exists in Settings page", async (t) => {
|
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/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import * as roles from "../utils/roles";
|
import * as roles from "../utils/roles";
|
||||||
import { settingsElement } from "../utils/elements-menu";
|
|
||||||
import { IAM_PAGES } from "../../src/common/SecureComponent/permissions";
|
import { IAM_PAGES } from "../../src/common/SecureComponent/permissions";
|
||||||
import { Selector } from "testcafe";
|
import { Selector } from "testcafe";
|
||||||
|
|
||||||
let testDomainUrl = "http://localhost:9090";
|
let testDomainUrl = "http://localhost:9090";
|
||||||
const screenUrl = `${testDomainUrl}${IAM_PAGES.SITE_REPLICATION}`;
|
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");
|
export const addSitesBtn = Selector("button").withText("Add Sites");
|
||||||
|
|
||||||
/* Begin Local Testing config block */
|
/* 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) => {
|
test("Site replication sidebar item exists", async (t) => {
|
||||||
await t
|
await t.expect(siteReplicationEl.exists).ok();
|
||||||
.expect(settingsElement.exists)
|
|
||||||
.ok()
|
|
||||||
.click(settingsElement)
|
|
||||||
.expect(siteReplicationEl.exists)
|
|
||||||
.ok();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Add Sites button exists", async (t) => {
|
test("Add Sites button exists", async (t) => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import * as roles from "../utils/roles";
|
import * as roles from "../utils/roles";
|
||||||
import * as elements from "../utils/elements";
|
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")
|
fixture("For user with Tiers permissions")
|
||||||
.page("http://localhost:9090")
|
.page("http://localhost:9090")
|
||||||
@@ -25,12 +25,7 @@ fixture("For user with Tiers permissions")
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("Tiers sidebar item exists", async (t) => {
|
test("Tiers sidebar item exists", async (t) => {
|
||||||
await t
|
await t.expect(tiersElement.exists).ok();
|
||||||
.expect(settingsElement.exists)
|
|
||||||
.ok()
|
|
||||||
.click(settingsElement)
|
|
||||||
.expect(tiersElement.exists)
|
|
||||||
.ok();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Add Tier button exists", async (t) => {
|
test("Add Tier button exists", async (t) => {
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import {
|
|||||||
monitoringElement,
|
monitoringElement,
|
||||||
notificationEndpointsElement,
|
notificationEndpointsElement,
|
||||||
serviceAcctsElement,
|
serviceAcctsElement,
|
||||||
settingsElement,
|
|
||||||
supportElement,
|
supportElement,
|
||||||
tiersElement,
|
tiersElement,
|
||||||
usersElement,
|
usersElement,
|
||||||
@@ -58,9 +57,6 @@ test("All sidebar items exist", async (t) => {
|
|||||||
.ok()
|
.ok()
|
||||||
.expect(iamPoliciesElement.exists)
|
.expect(iamPoliciesElement.exists)
|
||||||
.ok()
|
.ok()
|
||||||
.expect(settingsElement.exists)
|
|
||||||
.ok()
|
|
||||||
.click(settingsElement)
|
|
||||||
.expect(notificationEndpointsElement.exists)
|
.expect(notificationEndpointsElement.exists)
|
||||||
.ok()
|
.ok()
|
||||||
.expect(tiersElement.exists)
|
.expect(tiersElement.exists)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
// You should have received a copy of the GNU Affero General Public License
|
// 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/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import * as constants from "./constants";
|
|
||||||
import { Selector } from "testcafe";
|
import { Selector } from "testcafe";
|
||||||
import { IAM_PAGES } from "../../src/common/SecureComponent/permissions";
|
import { IAM_PAGES } from "../../src/common/SecureComponent/permissions";
|
||||||
|
|
||||||
@@ -69,20 +68,17 @@ export const iamPoliciesElement = sidebarItem.withAttribute(
|
|||||||
"/access/policies"
|
"/access/policies"
|
||||||
);
|
);
|
||||||
|
|
||||||
export const settingsElement = Selector(".MuiPaper-root")
|
export const configurationsElement = Selector(".MuiPaper-root")
|
||||||
.find("ul")
|
.find("ul")
|
||||||
.child("#settings");
|
.child("#configurations");
|
||||||
export const settingsChildren = Selector("#settings-children");
|
|
||||||
|
|
||||||
export const configurationsElement = settingsChildren
|
export const notificationEndpointsElement = Selector(".MuiPaper-root")
|
||||||
.find("a")
|
.find("ul")
|
||||||
.withAttribute("href", "/settings/configurations");
|
.child("#lambda");
|
||||||
export const notificationEndpointsElement = settingsChildren
|
|
||||||
.find("a")
|
export const tiersElement = Selector(".MuiPaper-root")
|
||||||
.withAttribute("href", "/settings/notification-endpoints");
|
.find("ul")
|
||||||
export const tiersElement = settingsChildren
|
.child("#tiers");
|
||||||
.find("a")
|
|
||||||
.withAttribute("href", "/settings/tiers");
|
|
||||||
|
|
||||||
export const supportElement = Selector(".MuiPaper-root")
|
export const supportElement = Selector(".MuiPaper-root")
|
||||||
.find("ul")
|
.find("ul")
|
||||||
|
|||||||
Reference in New Issue
Block a user