Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 7a44c81

Browse files
Update tests to wait for Graph's internal svg to load
1 parent 6fca822 commit 7a44c81

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/test_integration.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def on_click(n_clicks):
541541

542542
# wait for tabs to be loaded after clicking
543543
WebDriverWait(self.driver, 10).until(
544-
EC.visibility_of_element_located((By.ID, "tabs-one"))
544+
EC.visibility_of_element_located((By.CSS_SELECTOR, "#graph-one .main-svg"))
545545
)
546546

547547
self.snapshot("Tabs 1 rendered ")
@@ -550,7 +550,7 @@ def on_click(n_clicks):
550550

551551
# wait for tabs to be loaded after clicking
552552
WebDriverWait(self.driver, 10).until(
553-
EC.visibility_of_element_located((By.ID, "tabs-two"))
553+
EC.visibility_of_element_located((By.CSS_SELECTOR, "#graph-two .main-svg"))
554554
)
555555

556556
self.snapshot("Tabs 2 rendered ")
@@ -638,9 +638,9 @@ def render_content(tab):
638638
self.snapshot("Tabs with Graph - initial (graph should not resize)")
639639
tab_two.click()
640640

641-
# wait for content to be loaded after clicking
641+
# wait for Graph's internal svg to be loaded after clicking
642642
WebDriverWait(self.driver, 10).until(
643-
EC.visibility_of_element_located((By.ID, "tabs-content-example"))
643+
EC.visibility_of_element_located((By.CSS_SELECTOR, "#graph-2-tabs .main-svg"))
644644
)
645645

646646
self.snapshot("Tabs with Graph - clicked tab 2 (graph should not resize)")
@@ -651,9 +651,9 @@ def render_content(tab):
651651

652652
tab_one.click()
653653

654-
# wait for content to be loaded after clicking
654+
# wait for Graph to be loaded after clicking
655655
WebDriverWait(self.driver, 10).until(
656-
EC.visibility_of_element_located((By.ID, "tabs-content-example"))
656+
EC.visibility_of_element_located((By.CSS_SELECTOR, "#graph-1-tabs .main-svg"))
657657
)
658658

659659
self.snapshot("Tabs with Graph - clicked tab 1 (graph should not resize)")

0 commit comments

Comments
 (0)