Fixed permissions-2 inspect test (#2649)

Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
This commit is contained in:
jinapurapu
2023-02-08 16:13:01 -08:00
committed by GitHub
parent d1b8d7240e
commit 8346fe4bd6
2 changed files with 6 additions and 2 deletions

View File

@@ -17,7 +17,7 @@
import { Role, Selector } from "testcafe";
import { readFileSync } from "fs";
import { IAM_PAGES } from "../../src/common/SecureComponent/permissions";
import { monitoringElement } from "../utils/elements-menu";
import { inspectElement, monitoringElement } from "../utils/elements-menu";
const data = readFileSync(__dirname + "/../constants/timestamp.txt", "utf-8");
const $TIMESTAMP = data.trim();
@@ -96,7 +96,7 @@ test("Inspect page can be opened", async (t) => {
});
test("Inspect link exists in Menu list", async (t) => {
await t.expect(inspectEl.exists).ok();
await t.useRole(inspectAllowedRole).expect(inspectElement.exists).ok();
});
test("Form Input states verification", async (t) => {

View File

@@ -91,5 +91,9 @@ export const performanceElement = Selector(".MuiPaper-root")
export const profileElement = Selector(".MuiPaper-root")
.find("ul")
.child("#profile");
export const inspectElement = sidebarItem.withAttribute(
"href",
"/support/inspect"
);
export const licenseElement = sidebarItem.withAttribute("href", "/license");