diff --git a/setup.cfg b/setup.cfg index b5fa9edb1..53706087f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -44,12 +44,12 @@ dev = bumpver>=2023.1129 pgtest~=1.3 pre-commit>=3.5 - pytest~=8.2.0 + pytest~=8.3.0 pytest-cov~=5.0 - pytest-docker~=3.0 - pytest-selenium~=4.1 - pytest-timeout~=2.2 - selenium==4.20.0 + pytest-docker~=3.1.0 + pytest-selenium~=4.1.0 + pytest-timeout~=2.3.0 + selenium~=4.23.0 optimade = ipyoptimade~=0.1 eln = diff --git a/tests_notebooks/conftest.py b/tests_notebooks/conftest.py index 4a43da646..41dfe9d08 100644 --- a/tests_notebooks/conftest.py +++ b/tests_notebooks/conftest.py @@ -99,16 +99,20 @@ def _selenium_driver(nb_path): url, f"apps/apps/aiidalab-widgets-base/{nb_path}?token={token}" ) selenium.get(f"{url_with_token}") - # By default, let's allow selenium functions to retry for 10s + # By default, let's allow selenium functions to retry for 60s # till a given element is loaded, see: # https://selenium-python.readthedocs.io/waits.html#implicit-waits - selenium.implicitly_wait(30) + selenium.implicitly_wait(60) window_width = 800 window_height = 600 selenium.set_window_size(window_width, window_height) selenium.find_element(By.ID, "ipython-main-app") selenium.find_element(By.ID, "notebook-container") + selenium.find_element(By.ID, "appmode-busy") + # We wait until the appmode spinner disappears. However, + # this does not seem to be fully robust, as the spinner might flash + # while the page is still loading. So we add explicit sleep here as well. WebDriverWait(selenium, 240).until( ec.invisibility_of_element((By.ID, "appmode-busy")) )