Skip to content

Commit

Permalink
Use different selector for user perspective menu toggle
Browse files Browse the repository at this point in the history
Signed-off-by: Nandini Chandra <[email protected]>
  • Loading branch information
nachandr committed Sep 6, 2024
1 parent 2416513 commit 4333297
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ export class AssessmentQuestionnaire {
public static open() {
cy.url().then(($url) => {
if ($url != AssessmentQuestionnaire.fullUrl) {
cy.get("span.pf-v5-c-menu-toggle__text").then(($ele) => {
if (!$ele.text().includes("Administration"))
selectUserPerspective("Administration");
});
selectUserPerspective("Administration");
clickByText(navMenu, assessmentQuestionnaires);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class Application {
const itemsPerPage = 100;
if (forceReload) {
cy.visit(Application.fullUrl, { timeout: 35 * SEC }).then((_) => {
cy.get("h1", { timeout: 75 * SEC }).should("contain", applicationInventory);
cy.get("h1", { timeout: 100 * SEC }).should("contain", applicationInventory);
selectItemsPerPage(itemsPerPage);
});
return;
Expand Down
4 changes: 2 additions & 2 deletions cypress/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1373,8 +1373,8 @@ export function goToPage(page: number): void {
}

export function selectUserPerspective(userType: string): void {
cy.get(commonView.optionMenu).click();
cy.get(commonView.actionMenuItem).contains(userType).click();
cy.get("button.pf-v5-c-menu-toggle.pf-m-full-width").click({ force: true });
cy.get(commonView.actionMenuItem).contains(userType).click({ force: true });
}

export function selectWithinModal(selector: string): void {
Expand Down

0 comments on commit 4333297

Please sign in to comment.