Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions tests/e2e-playwright/tests/tip/test_ti_personalized_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ def _log_simulation_progress(simulator_iframe: FrameLocator) -> None:
)
def _wait_for_simulation_complete(setup_button: Locator, simulator_iframe: FrameLocator) -> None:
_log_simulation_progress(simulator_iframe)
icon_class = setup_button.locator("i").first.evaluate("el => el.className")
try:
icon_class = setup_button.locator("i").first.evaluate("el => el.className")
except PlaywrightError:
logging.info("Setup button icon not found — simulation likely completed")
return
Comment thread
odeimaiz marked this conversation as resolved.
if "fa-spinner" in icon_class:
msg = f"Simulation still running: {icon_class=}"
raise ValueError(msg)
Expand All @@ -155,7 +159,11 @@ def _wait_for_simulation_complete(setup_button: Locator, simulator_iframe: Frame
)
def _wait_for_export_simulation_results(export_button: Locator) -> None:
# Wait for the export to complete, spinner is on the button while exporting
icon_class = export_button.locator("i").first.evaluate("el => el.className")
try:
icon_class = export_button.locator("i").first.evaluate("el => el.className")
except PlaywrightError:
logging.info("Export button icon not found — export likely completed")
return
Comment thread
odeimaiz marked this conversation as resolved.
if "fa-spinner" in icon_class:
msg = f"Simulation is being exported: {icon_class=}"
raise ValueError(msg)
Expand Down
Loading