Fixed permissions-2 inspect test (#2649)
Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user