Skip to content

Commit

Permalink
More tweaks to waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang committed Sep 25, 2024
1 parent 9c0b679 commit 669998a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \
xvfb \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --no-cache-dir selenium
RUN pip3 install --no-cache-dir selenium requests

FROM selenium

Expand Down
23 changes: 5 additions & 18 deletions page_perf_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def import_published_history(self):
@clock_action("workflow_list_page_load")
def load_workflow_list(self):
# Request workflows list page
self.driver.get(f"{self.server}workflows/list_shared_with_me")
self.driver.get(f"{self.server}workflows/list_published")
# Wait for workflow page to load and import button to appear
self.wait.until(
expected_conditions.presence_of_element_located(
Expand Down Expand Up @@ -413,25 +413,12 @@ def run_workflow(self):
self.driver.find_element(By.ID, "run-workflow").click()

# wait for the running message to appear
self.wait.until(
expected_conditions.presence_of_element_located(
(
By.XPATH,
f"//div[@id='center']//div[@role='tabpanel']//div[@role='alert']//span[@data-description='loading message' and contains(., 'Waiting to complete invocation')]",
)
)
)
loading_xpath = "//div[@id='center']//div[@role='tabpanel']//div[@role='alert']//span[@data-description='loading message' and contains(., 'Waiting to complete invocation')]"
self.wait.until(expected_conditions.presence_of_element_located((By.XPATH, loading_xpath)))

# Wait for running message to disappear
with SeleniumCustomWait(self.driver, workflow_wait):
self.wait.until(
expected_conditions.invisibility_of_element_located(
(
By.XPATH,
f"//div[@id='center']//div[@role='tabpanel']//div[@role='alert']//span[@data-description='loading message' and contains(., 'Waiting to complete invocation')]",
)
)
)
custom_wait = WebDriverWait(self.driver, workflow_wait)
custom_wait.until(expected_conditions.invisibility_of_element_located((By.XPATH, loading_xpath)))

def run_test_sequence(self):
self.load_galaxy_login()
Expand Down

0 comments on commit 669998a

Please sign in to comment.