Skip to content

Commit

Permalink
improve usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Jul 23, 2024
1 parent 94a5ac6 commit 81897d5
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tests/e2e-playwright/tests/tip/test_ti_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
MINUTE,
SECOND,
app_mode_trigger_next_app,
expected_service_running,
wait_for_service_running,
)

Expand Down Expand Up @@ -158,9 +159,7 @@ def test_tip( # noqa: PLR0915
else _JLAB_MAX_STARTUP_MAX_TIME
),
) as ws_info:
# NOTE: separated calls, but dangerous as we could miss some socket event (which is highly unlikely though as the calls are one after the other)
app_mode_trigger_next_app(page)
ti_iframe = wait_for_service_running(
with expected_service_running(
page=page,
node_id=node_ids[1],
websocket=log_in_and_out,
Expand All @@ -170,7 +169,11 @@ def test_tip( # noqa: PLR0915
else _JLAB_MAX_STARTUP_MAX_TIME
),
press_start_button=False,
)
) as service_running:
app_mode_trigger_next_app(page)
ti_iframe = service_running.iframe_locator
assert ti_iframe

jlab_websocket = ws_info.value

with (
Expand Down Expand Up @@ -209,9 +212,7 @@ def test_tip( # noqa: PLR0915
page.get_by_test_id("outputsBtn").get_by_text(text_on_output_button).click()

with log_context(logging.INFO, "Exposure Analysis step"):
# NOTE: separated calls, but dangerous as we could miss some socket event (which is highly unlikely though as the calls are one after the other)
app_mode_trigger_next_app(page)
s4l_postpro_iframe = wait_for_service_running(
with expected_service_running(
page=page,
node_id=node_ids[2],
websocket=log_in_and_out,
Expand All @@ -221,7 +222,10 @@ def test_tip( # noqa: PLR0915
else _POST_PRO_MAX_STARTUP_TIME
),
press_start_button=False,
)
) as service_running:
app_mode_trigger_next_app(page)
s4l_postpro_iframe = service_running.iframe_locator
assert s4l_postpro_iframe

with log_context(logging.INFO, "Post process"):
# click on the postpro mode button
Expand Down

0 comments on commit 81897d5

Please sign in to comment.