Skip to content

Commit

Permalink
test_navigation: wait for backend to be available
Browse files Browse the repository at this point in the history
avoid element not interactable error in github actions
  • Loading branch information
masenf committed Apr 25, 2024
1 parent 5c07531 commit fbe861d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion integration/test_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from reflex.testing import AppHarness

from .utils import poll_for_navigation
from .utils import SessionStorage, poll_for_navigation


def NavigationApp():
Expand Down Expand Up @@ -66,6 +66,10 @@ async def test_navigation_app(navigation_app: AppHarness):
assert navigation_app.app_instance is not None, "app is not running"
driver = navigation_app.frontend()

ss = SessionStorage(driver)
token = AppHarness._poll_for(lambda: ss.get("token") is not None)
assert token is not None

internal_link = driver.find_element(By.ID, "internal")

with poll_for_navigation(driver):
Expand Down

0 comments on commit fbe861d

Please # to comment.