Skip to content

Commit

Permalink
Adapt UI test to new attributes
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Pupier <apupier@redhat.com>
  • Loading branch information
apupier committed Dec 20, 2024
1 parent 9e1bd86 commit 4138c0b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions it-tests/settings/NodeLabelSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ describe('User Settings', function () {

const locators = {
TimerComponent: {
timer: `g[data-id^='timer'][data-kind='node']`,
timer_2_3: `g[data-id^='timer'][data-kind='node']`,
timer_2_4: `g[data-nodelabel='timerID']`,
label: `.custom-node__label`,
}
}
Expand Down Expand Up @@ -63,8 +64,12 @@ describe('User Settings', function () {

it(`Check 'id' Node Label is used instead of default 'description'`, async function () {
this.timeout(60_000);

const timer = await driver.findElement(By.css(`${locators.TimerComponent.timer} ${locators.TimerComponent.label}`));
let timer;
try {
timer = await driver.findElement(By.css(`${locators.TimerComponent.timer_2_3} ${locators.TimerComponent.label}`));
} catch {
timer = await driver.findElement(By.css(`${locators.TimerComponent.timer_2_4} ${locators.TimerComponent.label}`));
}
const label = await timer.getText();

expect(label.split('\n')).to.contains('timerID');
Expand Down

0 comments on commit 4138c0b

Please sign in to comment.