| 
14 | 14 | from typing import Any, Final  | 
15 | 15 | 
 
  | 
16 | 16 | 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  | 
18 | 18 | from pytest_simcore.helpers.playwright import (  | 
19 | 19 |     MINUTE,  | 
20 | 20 |     SECOND,  | 
@@ -91,16 +91,27 @@ def test_classic_ti_plan(  # noqa: PLR0915  | 
91 | 91 |     create_tip_plan_from_dashboard: Callable[[str], dict[str, Any]],  | 
92 | 92 |     log_in_and_out: WebSocket,  | 
93 | 93 |     is_autoscaled: bool,  | 
 | 94 | +    is_product_lite: bool,  | 
94 | 95 | ):  | 
95 | 96 |     project_data = create_tip_plan_from_dashboard("newTIPlanButton")  | 
96 | 97 |     assert "workbench" in project_data, "Expected workbench to be in project data!"  | 
97 | 98 |     assert isinstance(  | 
98 | 99 |         project_data["workbench"], dict  | 
99 | 100 |     ), "Expected workbench to be a dict!"  | 
100 | 101 |     node_ids: list[str] = list(project_data["workbench"])  | 
101 |  | -    assert len(node_ids) >= 3, "Expected at least 3 nodes in the workbench!"  | 
102 | 102 | 
 
  | 
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:  | 
104 | 115 |         # NOTE: creating the plan auto-triggers the first service to start, which might already triggers socket events  | 
105 | 116 |         electrode_selector_iframe = wait_for_service_running(  | 
106 | 117 |             page=page,  | 
@@ -149,7 +160,7 @@ def test_classic_ti_plan(  # noqa: PLR0915  | 
149 | 160 |             response_body = response.json()  | 
150 | 161 |             ctx.logger.info("the following output was generated: %s", response_body)  | 
151 | 162 | 
 
  | 
152 |  | -    with log_context(logging.INFO, "Classic TI step") as ctx:  | 
 | 163 | +    with log_context(logging.INFO, "Classic TI step (2)") as ctx:  | 
153 | 164 |         with page.expect_websocket(  | 
154 | 165 |             _JLabWaitForWebSocket(),  | 
155 | 166 |             timeout=_OUTER_EXPECT_TIMEOUT_RATIO  | 
@@ -211,7 +222,13 @@ def test_classic_ti_plan(  # noqa: PLR0915  | 
211 | 222 |             text_on_output_button = f"Outputs ({len(expected_outputs)})"  | 
212 | 223 |             page.get_by_test_id("outputsBtn").get_by_text(text_on_output_button).click()  | 
213 | 224 | 
 
  | 
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)"):  | 
215 | 232 |         with expected_service_running(  | 
216 | 233 |             page=page,  | 
217 | 234 |             node_id=node_ids[2],  | 
 | 
0 commit comments