Skip to content

Commit

Permalink
Tour selectors no longer jQuery, now CSS I believe - update tour test…
Browse files Browse the repository at this point in the history
…ing to reflect.
  • Loading branch information
jmchilton committed Jan 25, 2024
1 parent 726e648 commit 1913b64
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/galaxy/selenium/navigates_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
import requests
import yaml
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
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 @@ -1972,19 +1974,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 1913b64

Please sign in to comment.