From 688be8aaf7216de0bd204320717db1e66ab21b6f Mon Sep 17 00:00:00 2001 From: Neilhamza Date: Wed, 27 Sep 2023 12:17:13 +0300 Subject: [PATCH 1/2] [RFR] adapt migration-waves filter test Signed-off-by: Neilhamza --- cypress/e2e/views/common.view.ts | 2 +- cypress/e2e/views/migration-wave.view.ts | 2 +- cypress/utils/utils.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/views/common.view.ts b/cypress/e2e/views/common.view.ts index 776245dc1..7dd5dd2e4 100644 --- a/cypress/e2e/views/common.view.ts +++ b/cypress/e2e/views/common.view.ts @@ -51,7 +51,7 @@ export const closeSuccessNotification = "button[aria-label^='Close Success alert export const divHeader = "[id^=pf-random-id-]"; export const divBottom = "#tags-pagination-bottom"; export const selectFilter = "div.pf-m-toggle-group.pf-m-filter-group.pf-m-show"; -export const itemsSelectInsideDialog = "div[role='dialog'] button[aria-label='Select']"; +export const itemsSelectInsideDialog = "div[role='dialog'] button[class='pf-v5-c-menu-toggle__button']"; export const nameHelperBusiness = "#business-service-name-helper"; export const nameHelperStakeholderGroup = "#-helper"; export const actionMenuItem = "span.pf-v5-c-menu__item-text"; diff --git a/cypress/e2e/views/migration-wave.view.ts b/cypress/e2e/views/migration-wave.view.ts index e3949cf2e..1b2ffb0b7 100644 --- a/cypress/e2e/views/migration-wave.view.ts +++ b/cypress/e2e/views/migration-wave.view.ts @@ -9,7 +9,7 @@ export enum MigrationWaveView { endDateInput = "input[aria-label='endDateStr']", stakeHoldersInput = "#stakeholders-toggle-select-multi-typeahead-typeahead", stakeHolderGroupsInput = "#stakeholder-groups-toggle-select-multi-typeahead-typeahead", - actionsButton = "button[aria-label='Actions']", + actionsButton = "button[aria-label='row actions dropdown toggle']", waveStatusColumn = "td[data-label='Status']", yearInput = "input[aria-label='Select year']", migrationWavesTable = "table[aria-label='Migration waves table']", diff --git a/cypress/utils/utils.ts b/cypress/utils/utils.ts index 980bd6b55..219b4bbef 100644 --- a/cypress/utils/utils.ts +++ b/cypress/utils/utils.ts @@ -331,8 +331,8 @@ export function selectFilter(filterName: string, identifiedRisk?: boolean, value .eq(value) .within(() => { cy.get("#filtered-by").click(); - cy.get("ul.pf-v5-c-dropdown__menu").within(() => { - clickByText("a", filterName); + cy.get("div.pf-v5-c-menu__content").within(() => { + clickByText("span", filterName); }); }); } From 4cb0ecc88863bbff9087347b2b3dcc8d8b26ad98 Mon Sep 17 00:00:00 2001 From: Neilhamza Date: Wed, 27 Sep 2023 12:27:08 +0300 Subject: [PATCH 2/2] prettier Signed-off-by: Neilhamza --- cypress/e2e/views/common.view.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/views/common.view.ts b/cypress/e2e/views/common.view.ts index 7dd5dd2e4..2015515e2 100644 --- a/cypress/e2e/views/common.view.ts +++ b/cypress/e2e/views/common.view.ts @@ -51,7 +51,8 @@ export const closeSuccessNotification = "button[aria-label^='Close Success alert export const divHeader = "[id^=pf-random-id-]"; export const divBottom = "#tags-pagination-bottom"; export const selectFilter = "div.pf-m-toggle-group.pf-m-filter-group.pf-m-show"; -export const itemsSelectInsideDialog = "div[role='dialog'] button[class='pf-v5-c-menu-toggle__button']"; +export const itemsSelectInsideDialog = + "div[role='dialog'] button[class='pf-v5-c-menu-toggle__button']"; export const nameHelperBusiness = "#business-service-name-helper"; export const nameHelperStakeholderGroup = "#-helper"; export const actionMenuItem = "span.pf-v5-c-menu__item-text";