From 328b672c8fd0a08127f4820763291d3dee029c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Thu, 16 Jan 2025 11:09:24 +0100 Subject: [PATCH] Adapt tests for Patternfly v6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Pupier --- it-tests/BasicFlow.test.ts | 6 +++--- it-tests/PropertyPanelLoading.test.ts | 4 ++-- it-tests/SwitchBetweenTabs.test.ts | 8 ++++---- it-tests/settings/CatalogURLSettings.test.ts | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/it-tests/BasicFlow.test.ts b/it-tests/BasicFlow.test.ts index 0a2b4999..d7e55d39 100644 --- a/it-tests/BasicFlow.test.ts +++ b/it-tests/BasicFlow.test.ts @@ -227,7 +227,7 @@ async function deleteDataMapperStep(driver: WebDriver, workspaceFolder: string) await driver.actions().contextClick(kaotoNodeConfigured).perform(); await driver.wait( - until.elementLocated(By.className('pf-v5-c-dropdown pf-m-expanded')) + until.elementLocated(By.className('pf-topology-context-menu__c-dropdown__menu')) ); await (await driver.findElement(By.xpath("//*[@data-testid='context-menu-item-delete']"))).click(); @@ -252,7 +252,7 @@ async function addActiveMQStep(driver: WebDriver) { await driver.actions().contextClick(canvasNode).perform(); await driver.wait( - until.elementLocated(By.className('pf-v5-c-dropdown pf-m-expanded')) + until.elementLocated(By.className('pf-topology-context-menu__c-dropdown__menu')) ); await (await driver.findElement(By.xpath("//\*[@data-testid='context-menu-item-replace']"))).click(); @@ -271,7 +271,7 @@ async function addDatamapperStep(driver: WebDriver) { await driver.actions().contextClick(canvasNode).perform(); await driver.wait( - until.elementLocated(By.className('pf-v5-c-dropdown pf-m-expanded')) + until.elementLocated(By.className('pf-topology-context-menu__c-dropdown__menu')) ); await (await driver.findElement(By.xpath("//*[@data-testid='context-menu-item-replace']"))).click(); diff --git a/it-tests/PropertyPanelLoading.test.ts b/it-tests/PropertyPanelLoading.test.ts index 07105368..8aef8fb2 100644 --- a/it-tests/PropertyPanelLoading.test.ts +++ b/it-tests/PropertyPanelLoading.test.ts @@ -33,7 +33,7 @@ describe('Property panel loading test', function () { await driver.wait(until.elementLocated(stepWhenXpath), 5_000); await (await driver.findElement(stepWhenXpath)).click(); await driver.wait( - until.elementLocated(By.className('pf-v5-c-card') + until.elementLocated(By.className('pf-v6-c-card') ), 5_000); const closeBtn = await driver.findElement(By.xpath("//button[@data-testid='close-side-bar']")); @@ -50,7 +50,7 @@ describe('Property panel loading test', function () { try { await driver.wait( - until.elementLocated(By.className('pf-v5-c-card') + until.elementLocated(By.className('pf-v6-c-card') ), 5_000); throw new Error('Property panel was not closed!') } catch (error) { diff --git a/it-tests/SwitchBetweenTabs.test.ts b/it-tests/SwitchBetweenTabs.test.ts index 72883ac8..92fc2ecc 100644 --- a/it-tests/SwitchBetweenTabs.test.ts +++ b/it-tests/SwitchBetweenTabs.test.ts @@ -10,11 +10,11 @@ describe('Switching between editor tabs', function () { const locators = { EditorTabs: { - tabsList: 'pf-v5-c-tabs__list', - tabsItem: 'pf-v5-c-tabs__item', + tabsList: 'pf-v6-c-tabs__list', + tabsItem: 'pf-v6-c-tabs__item', activeTabAttribute: 'aria-selected', tabLabelAttribute: 'aria-label', - tabText: 'pf-v5-c-tabs__item-text', + tabText: 'pf-v6-c-tabs__item-text', designTabLabel: 'Design canvas', beansTabLabel: 'Beans editor', dataMapperTabLabel: 'DataMapper', @@ -27,7 +27,7 @@ describe('Switching between editor tabs', function () { detailsView: 'metadata-editor-modal-details-view' }, DataMapper: { - howTo: 'pf-v5-l-bullseye datamapper-howto' + howTo: 'pf-v6-l-bullseye datamapper-howto' } } diff --git a/it-tests/settings/CatalogURLSettings.test.ts b/it-tests/settings/CatalogURLSettings.test.ts index 85070515..505ffc63 100644 --- a/it-tests/settings/CatalogURLSettings.test.ts +++ b/it-tests/settings/CatalogURLSettings.test.ts @@ -21,17 +21,17 @@ describe('User Settings', function () { selector: (label: string) => By.xpath(`//li[@data-testid='runtime-selector-${label}']`) }, RuntimeSelectorItems: { - list: By.className('pf-v5-c-menu__list'), - listItem: By.className('pf-v5-c-menu__list-item'), - label: By.className('pf-v5-c-menu__item-text') + list: By.className('pf-v6-c-menu__list'), + listItem: By.className('pf-v6-c-menu__list-item'), + label: By.className('pf-v6-c-menu__item-text') }, KaotoView: { catalogButton: By.xpath(`//button[@id='topology-control-bar-catalog-button']`), catalog: { window: By.xpath(`//div[@data-ouia-component-id='CatalogModal']`), - list: By.className('pf-v5-c-data-list'), - gallery: By.className('pf-v5-l-gallery pf-m-gutter'), - listItem: By.className('pf-v5-c-data-list__item-row'), + list: By.className('pf-v6-c-data-list'), + gallery: By.className('pf-v6-l-gallery pf-m-gutter'), + listItem: By.className('pf-v6-c-data-list__item-row'), listItemProvider: By.className('catalog-data-list-item__provider'), listButton: By.xpath(`//button[@id='toggle-layout-button-List']`), galleryButton: By.xpath(`//button[@id='toggle-layout-button-Gallery']`),