From e6a07dee45b774c9738bb5604e03320975d3bb00 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Fri, 25 Oct 2024 05:11:14 -0400 Subject: [PATCH] feat: removed some time.sleep usages --- tests/functional/test_create_community_gis_ui.py | 7 +------ tests/functional/ui_feature_testcase_base.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/functional/test_create_community_gis_ui.py b/tests/functional/test_create_community_gis_ui.py index 5a5c030b4..3dc6a166f 100644 --- a/tests/functional/test_create_community_gis_ui.py +++ b/tests/functional/test_create_community_gis_ui.py @@ -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() @@ -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 @@ -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() @@ -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() diff --git a/tests/functional/ui_feature_testcase_base.py b/tests/functional/ui_feature_testcase_base.py index b98d32408..2548bb92c 100644 --- a/tests/functional/ui_feature_testcase_base.py +++ b/tests/functional/ui_feature_testcase_base.py @@ -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