Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Commit c5dbbf2

Browse files
authored
Merge pull request #10159 from mnadeem92/fix_plan_started_method
[1LP][RFR] Fixing multiple jenkins failures
2 parents c69b84e + 615591e commit c5dbbf2

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

widgetastic_manageiq/__init__.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5394,18 +5394,12 @@ def remove_conversion_host(self, hostname):
53945394
class MigrationProgressBar(Widget):
53955395
"""Represents in-progress plan widget for v2v migration"""
53965396

5397-
ROOT = (
5398-
'.//div[contains(@class,"plans-in-progress-list")] | '
5399-
'.//div[contains(@class,"migrations")]/div/div/div/div/div'
5400-
)
5397+
ROOT = './/div[contains(@class,"plans-in-progress-list")]'
54015398

5402-
ITEM_LOCATOR = (
5403-
'.//*[contains(@class,"plans-in-progress-list__list-item")] | '
5404-
'.//div[contains(@class,"card-pf-match-height")]'
5405-
)
5399+
ITEM_LOCATOR = './/tr[contains(@class,"plans-in-progress-list__list-item")]'
54065400
ITEM_TEXT_LOCATOR = './/div[contains(@class,"list-group-item-heading")]'
54075401
TITLE_LOCATOR = './/div[h3[contains(@class,"card-pf-title")]]'
5408-
TIMER_LOCATOR = './div/div[contains(@class,"active-migration-elapsed-time")]'
5402+
TIMER_LOCATOR = './/div[contains(@class,"active-migration-elapsed-time")]'
54095403
SIZE_LOCATOR = './/strong[contains(@id,"size-migrated")]'
54105404
VMS_LOCATOR = './/strong[contains(@id,"vms-migrated")]'
54115405
SPINNER_LOCATOR = './/div[contains(@class,"spinner")]'
@@ -5435,9 +5429,11 @@ def read(self):
54355429
return self.all_items
54365430

54375431
def _get_card_element(self, plan_name):
5438-
for el in self.browser.elements(self.ITEM_LOCATOR):
5439-
if plan_name in self.browser.text(el):
5440-
return el
5432+
# Hack the progress bar has changed to list in 5.11.6 which require to check root is_display
5433+
if self.is_displayed:
5434+
for el in self.browser.elements(self.ITEM_LOCATOR):
5435+
if plan_name in self.browser.text(el):
5436+
return el
54415437
raise ItemNotFound(f"No plan found with plan name : {plan_name}")
54425438

54435439
def get_clock(self, plan_name):
@@ -5483,7 +5479,7 @@ def is_plan_started(self, plan_name):
54835479
)
54845480
if error_displayed:
54855481
return False
5486-
if timer_displayed and not spinner_displayed:
5482+
if timer_displayed and spinner_displayed:
54875483
return True
54885484
return False
54895485

0 commit comments

Comments
 (0)