From c957f67ab61fd4a4364abeba26f750e500ba4722 Mon Sep 17 00:00:00 2001 From: Saqib Date: Fri, 11 Sep 2026 18:02:54 +0530 Subject: [PATCH] fix: allow 30s for waits that depend on a backend round-trip The post-create Metadata-tab wait (10s) and select_combobox_option's option wait (default 15s) both wait on the backend: a create mutation plus navigation, or an option list populated by a GraphQL query on page load. select_sdg_goals already allows 30s for exactly this kind of option list. Both timed out repeatedly in deploy-pipeline smoke runs while the target host was under concurrent load from three suites. --- pages/base_page.py | 5 +++-- pages/provider/my_dashboard_page.py | 4 ++-- pages/provider/organizations_page.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pages/base_page.py b/pages/base_page.py index f3aef65..9b38f96 100644 --- a/pages/base_page.py +++ b/pages/base_page.py @@ -113,9 +113,10 @@ def select_combobox_option(self, input_locator, option_text): combo.clear() combo.send_keys(option_text) - # Wait for dropdown option to appear + # Options are often populated by a GraphQL query on page load, so allow + # the same 30s select_sdg_goals already uses for its option list. xpath = f"//div[@role='option' and normalize-space(.)='{option_text}']" - opt = self.wait.until(EC.element_to_be_clickable((By.XPATH, xpath))) + opt = self.wait_with_timeout(30).until(EC.element_to_be_clickable((By.XPATH, xpath))) try: opt.click() diff --git a/pages/provider/my_dashboard_page.py b/pages/provider/my_dashboard_page.py index 6f43a93..c64f9d0 100644 --- a/pages/provider/my_dashboard_page.py +++ b/pages/provider/my_dashboard_page.py @@ -91,7 +91,7 @@ def click_add_new_dataset(self) -> CreateDatasetPage: create_btn.click() # Wait for the metadata tab to confirm we're inside the creation form - self.wait_with_timeout(10).until( + self.wait_with_timeout(30).until( EC.visibility_of_element_located((By.XPATH, CreateDatasetLocators.TAB_METADATA)), message="Timed out waiting for Metadata tab to appear after creating dataset" ) @@ -128,7 +128,7 @@ def click_add_new_prompt_dataset(self) -> CreateDatasetPage: ) create_btn.click() - self.wait_with_timeout(10).until( + self.wait_with_timeout(30).until( EC.visibility_of_element_located((By.XPATH, CreateDatasetLocators.TAB_METADATA)), message="Timed out waiting for Metadata tab after creating prompt dataset" ) diff --git a/pages/provider/organizations_page.py b/pages/provider/organizations_page.py index db29f31..e3240b0 100644 --- a/pages/provider/organizations_page.py +++ b/pages/provider/organizations_page.py @@ -102,7 +102,7 @@ def click_add_new_dataset(self): create_btn.click() # Wait for metadata tab - self.wait_with_timeout(10).until( + self.wait_with_timeout(30).until( EC.visibility_of_element_located((By.XPATH, CreateDatasetLocators.TAB_METADATA)), message="Timed out waiting for Metadata tab to appear after creating dataset" ) @@ -141,7 +141,7 @@ def click_add_new_prompt_dataset(self): ) create_btn.click() - self.wait_with_timeout(10).until( + self.wait_with_timeout(30).until( EC.visibility_of_element_located((By.XPATH, CreateDatasetLocators.TAB_METADATA)), message="Timed out waiting for Metadata tab after creating prompt dataset" )