Skip to content

Commit d68f6c9

Browse files
authored
Merge pull request #513 from materialsproject/test_fix
Test fix
2 parents 3733834 + c6af5bc commit d68f6c9

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from selenium.webdriver.chrome.options import Options
2+
3+
4+
def pytest_setup_options():
5+
options = Options()
6+
7+
options.add_argument("--use-angle=swiftshader")
8+
options.add_argument("--enable-webgl")
9+
10+
return options

crystal_toolkit/apps/examples/tests/test_diffraction.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ def test_diffraction(dash_duo: DashDuo) -> None:
1616
dash_duo.clear_storage()
1717

1818
# make sure the XRD component was mounted and is a node with class 'dash-graph'
19+
# node = dash_duo.find_element("#CTXRayDiffractionComponent_xrd-plot")
20+
# assert "dash-graph" in node.get_attribute("class")
21+
22+
dash_duo.wait_for_element("#CTXRayDiffractionComponent_xrd-plot", timeout=10)
1923
node = dash_duo.find_element("#CTXRayDiffractionComponent_xrd-plot")
2024
assert "dash-graph" in node.get_attribute("class")
2125

crystal_toolkit/apps/examples/tests/test_fermi_surface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def test_diffraction(dash_duo: DashDuo) -> None:
2121
dash_duo.clear_storage()
2222

2323
# make sure the FS component was mounted and is a node with class 'dash-graph'
24+
dash_duo.wait_for_element("#CTfermi_surface_fermi-surface-graph", timeout=10)
2425
node = dash_duo.find_element("#CTfermi_surface_fermi-surface-graph")
2526
assert "dash-graph" in node.get_attribute("class")
2627

0 commit comments

Comments
 (0)