use wait_for_selector from utils module in test_dashboard_nav

M Pacer 8 years ago
parent e0ed2c475f
commit c220215aa8

@ -5,6 +5,7 @@ from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from notebook.utils import url_path_join
from notebook.tests.selenium.utils import wait_for_selector
pjoin = os.path.join
@ -40,7 +41,6 @@ def get_list_items(browser):
'element': a,
} for a in browser.find_elements_by_class_name('item_link')]
def only_dir_links(browser):
"""Return only links that point at other directories in the tree
@ -49,12 +49,6 @@ def only_dir_links(browser):
return [i for i in items
if url_in_tree(browser, i['link']) and i['label'] != '..']
def wait_for_selector(browser, selector, timeout=10):
wait = WebDriverWait(browser, timeout)
return wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, selector)))
def test_items(authenticated_browser):
visited_dict = {}
# Going down the tree to collect links

Loading…
Cancel
Save