Skip to content

Commit

Permalink
Merge pull request #14005 from jmchilton/tour_testing_drop_jquery
Browse files Browse the repository at this point in the history
Update tour testing selector usage.
  • Loading branch information
jdavcs authored Mar 1, 2024
2 parents 4fdc7c6 + 17be2d6 commit b6dcf9c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/galaxy/selenium/navigates_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support import expected_conditions as ec

from galaxy.navigation.components import (
Component,
Expand Down Expand Up @@ -1985,19 +1986,19 @@ def run_tour(self, path, skip_steps=None, sleep_on_steps=None, tour_callback=Non
def tour_wait_for_clickable_element(self, selector):
timeout = self.timeout_for(wait_type=WAIT_TYPES.JOB_COMPLETION)
wait = self.wait(timeout=timeout)
timeout_message = self._timeout_message(f"sizzle (jQuery) selector [{selector}] to become clickable")
timeout_message = self._timeout_message(f"Tour CSS selector [{selector}] to become clickable")
element = wait.until(
sizzle.sizzle_selector_clickable(selector),
ec.element_to_be_clickable((By.CSS_SELECTOR, selector)),
timeout_message,
)
return element

def tour_wait_for_element_present(self, selector):
timeout = self.timeout_for(wait_type=WAIT_TYPES.JOB_COMPLETION)
wait = self.wait(timeout=timeout)
timeout_message = self._timeout_message(f"sizzle (jQuery) selector [{selector}] to become present")
timeout_message = self._timeout_message(f"Tour CSS selector [{selector}] to become present")
element = wait.until(
sizzle.sizzle_presence_of_selector(selector),
ec.presence_of_element_located((By.CSS_SELECTOR, selector)),
timeout_message,
)
return element
Expand Down

0 comments on commit b6dcf9c

Please sign in to comment.