Skip to content

Commit

Permalink
improve ProjectZoneView ui test fix (#1732)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Aug 2, 2023
1 parent 372537c commit c9a2bbd
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions landingzones/tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ def _assert_btn_enabled(self, element, expected=True):

def _wait_for_status_update(self):
"""Wait for JQuery landing zone status updates to finish"""
max_retries = 5
retry = 0
while (
not self.selenium.execute_script('return window.zoneStatusUpdated')
and retry < max_retries
):
for i in range(0, 5):
if self.selenium.execute_script('return window.zoneStatusUpdated'):
return
time.sleep(0.5)
retry += 1

def setUp(self):
super().setUp()
Expand Down Expand Up @@ -363,9 +359,12 @@ def test_zone_locked_buttons_superuser(self):
By.CLASS_NAME, 'sodar-lz-zone-tr-existing'
)[0]
dropdown_div = zone.find_element(By.CLASS_NAME, 'sodar-lz-zone-buttons')
attr = dropdown_div.find_element(
By.CLASS_NAME, 'sodar-list-dropdown'
).get_attribute('disabled')
try:
attr = dropdown_div.find_element(
By.CLASS_NAME, 'sodar-list-dropdown'
).get_attribute('disabled')
except AssertionError:
attr = None
self.assertIsNone(attr)
self.assertNotIn(
'text-muted',
Expand Down

0 comments on commit c9a2bbd

Please sign in to comment.