Skip to content

Commit

Permalink
feat: removed some time.sleep usages
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-hd committed Oct 25, 2024
1 parent 8a003ed commit e6a07de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions tests/functional/test_create_community_gis_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def navigate_to_upload_shapefile_page(self):
self.accept_cookies()

self.fill_out_and_submit_account_creation_form()
time.sleep(5) # wait for response
time.sleep(5) # wait for response

# verify user is on select add boundary method page
assert self.select_add_boundary_method_path in self.get_current_url()
Expand Down Expand Up @@ -149,7 +149,6 @@ def test_select_native_land_digital_territory_without_share_publicly(self):
self.py.get("#community-boundary-continue-btn").click()

# verify user is on the confirm community page
time.sleep(5) # wait for ajax call to finish
assert self.dashboard in self.get_current_url()

# verify community and boundary exists with the expected values
Expand Down Expand Up @@ -199,8 +198,6 @@ def test_select_shapefile_with_share_publicly(self):
# navigate to next page
self.py.get("#community-boundary-continue-btn").click()

# wait for ajax call
time.sleep(4)
# verify user is on the dashbaord page
assert self.dashboard in self.get_current_url()

Expand Down Expand Up @@ -228,8 +225,6 @@ def test_select_shapefile_without_share_publicly(self):
# navigate to next page
self.py.get("#community-boundary-continue-btn").click()

# wait for ajax call
time.sleep(4)
# verify user is on the dashbaord page
assert self.dashboard in self.get_current_url()

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/ui_feature_testcase_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def login(self,):
# submit login
self.py.get("[class~='signin-btn']").click()

def get_current_url(self, wait_seconds: int = 8) -> str:
def get_current_url(self, wait_seconds: int = 5) -> str:
"""
* Switches to the most recent window
* Waits for a couple of seconds to make sure preexisting
Expand Down

0 comments on commit e6a07de

Please sign in to comment.