Skip to content

Commit c26f39e

Browse files
committed
checks two out of three steps
1 parent 69b286d commit c26f39e

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

tests/e2e-playwright/tests/tip/test_ti_plan.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from typing import Any, Final
1515

1616
from playwright.sync_api import Page, WebSocket
17-
from pytest_simcore.helpers.logging_tools import log_context
17+
from pytest_simcore.helpers.logging_tools import log_context, test_logger
1818
from pytest_simcore.helpers.playwright import (
1919
MINUTE,
2020
SECOND,
@@ -91,16 +91,27 @@ def test_classic_ti_plan( # noqa: PLR0915
9191
create_tip_plan_from_dashboard: Callable[[str], dict[str, Any]],
9292
log_in_and_out: WebSocket,
9393
is_autoscaled: bool,
94+
is_product_lite: bool,
9495
):
9596
project_data = create_tip_plan_from_dashboard("newTIPlanButton")
9697
assert "workbench" in project_data, "Expected workbench to be in project data!"
9798
assert isinstance(
9899
project_data["workbench"], dict
99100
), "Expected workbench to be a dict!"
100101
node_ids: list[str] = list(project_data["workbench"])
101-
assert len(node_ids) >= 3, "Expected at least 3 nodes in the workbench!"
102102

103-
with log_context(logging.INFO, "Electrode Selector step") as ctx:
103+
if is_product_lite:
104+
expected_number_of_steps = 2
105+
assert (
106+
len(node_ids) == expected_number_of_steps
107+
), f"Expected {expected_number_of_steps=} in the app-mode"
108+
else:
109+
expected_number_of_steps = 3
110+
assert (
111+
len(node_ids) >= expected_number_of_steps
112+
), f"Expected at least {expected_number_of_steps} nodes in the workbench"
113+
114+
with log_context(logging.INFO, "Electrode Selector step (1)") as ctx:
104115
# NOTE: creating the plan auto-triggers the first service to start, which might already triggers socket events
105116
electrode_selector_iframe = wait_for_service_running(
106117
page=page,
@@ -149,7 +160,7 @@ def test_classic_ti_plan( # noqa: PLR0915
149160
response_body = response.json()
150161
ctx.logger.info("the following output was generated: %s", response_body)
151162

152-
with log_context(logging.INFO, "Classic TI step") as ctx:
163+
with log_context(logging.INFO, "Classic TI step (2)") as ctx:
153164
with page.expect_websocket(
154165
_JLabWaitForWebSocket(),
155166
timeout=_OUTER_EXPECT_TIMEOUT_RATIO
@@ -211,7 +222,13 @@ def test_classic_ti_plan( # noqa: PLR0915
211222
text_on_output_button = f"Outputs ({len(expected_outputs)})"
212223
page.get_by_test_id("outputsBtn").get_by_text(text_on_output_button).click()
213224

214-
with log_context(logging.INFO, "Exposure Analysis step"):
225+
if is_product_lite:
226+
test_logger.info(
227+
"Skipping the rest of the test since it is intended for the full version"
228+
)
229+
return
230+
231+
with log_context(logging.INFO, "Exposure Analysis step (3)"):
215232
with expected_service_running(
216233
page=page,
217234
node_id=node_ids[2],

0 commit comments

Comments
 (0)