Skip to content

Commit 8346fe4

Browse files
authored
Fixed permissions-2 inspect test (#2649)
Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
1 parent d1b8d72 commit 8346fe4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

portal-ui/tests/permissions-2/inspect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import { Role, Selector } from "testcafe";
1818
import { readFileSync } from "fs";
1919
import { IAM_PAGES } from "../../src/common/SecureComponent/permissions";
20-
import { monitoringElement } from "../utils/elements-menu";
20+
import { inspectElement, monitoringElement } from "../utils/elements-menu";
2121

2222
const data = readFileSync(__dirname + "/../constants/timestamp.txt", "utf-8");
2323
const $TIMESTAMP = data.trim();
@@ -96,7 +96,7 @@ test("Inspect page can be opened", async (t) => {
9696
});
9797

9898
test("Inspect link exists in Menu list", async (t) => {
99-
await t.expect(inspectEl.exists).ok();
99+
await t.useRole(inspectAllowedRole).expect(inspectElement.exists).ok();
100100
});
101101

102102
test("Form Input states verification", async (t) => {

portal-ui/tests/utils/elements-menu.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,9 @@ export const performanceElement = Selector(".MuiPaper-root")
9191
export const profileElement = Selector(".MuiPaper-root")
9292
.find("ul")
9393
.child("#profile");
94+
export const inspectElement = sidebarItem.withAttribute(
95+
"href",
96+
"/support/inspect"
97+
);
9498

9599
export const licenseElement = sidebarItem.withAttribute("href", "/license");

0 commit comments

Comments
 (0)