Skip to content

Commit

Permalink
Adapt tests for Patternfly v6
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Pupier <[email protected]>
  • Loading branch information
apupier committed Jan 16, 2025
1 parent 80ecda6 commit 8858cc0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions it-tests/BasicFlow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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-v6-c-dropdown pf-m-expanded'))
);
await (await driver.findElement(By.xpath("//*[@data-testid='context-menu-item-delete']"))).click();

Expand All @@ -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-v6-c-dropdown pf-m-expanded'))
);
await (await driver.findElement(By.xpath("//\*[@data-testid='context-menu-item-replace']"))).click();

Expand All @@ -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-v6-c-dropdown pf-m-expanded'))
);
await (await driver.findElement(By.xpath("//*[@data-testid='context-menu-item-replace']"))).click();

Expand Down
4 changes: 2 additions & 2 deletions it-tests/PropertyPanelLoading.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']"));
Expand All @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions it-tests/SwitchBetweenTabs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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'
}
}

Expand Down
12 changes: 6 additions & 6 deletions it-tests/settings/CatalogURLSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']`),
Expand Down

0 comments on commit 8858cc0

Please sign in to comment.