diff --git a/packages/pytest-simcore/src/pytest_simcore/helpers/playwright_sim4life.py b/packages/pytest-simcore/src/pytest_simcore/helpers/playwright_sim4life.py index cb0d4089c3e..9cafcc8f6e6 100644 --- a/packages/pytest-simcore/src/pytest_simcore/helpers/playwright_sim4life.py +++ b/packages/pytest-simcore/src/pytest_simcore/helpers/playwright_sim4life.py @@ -28,7 +28,7 @@ _EC2_STARTUP_MAX_WAIT_TIME + _S4L_DOCKER_PULLING_MAX_TIME + _S4L_MAX_STARTUP_TIME ) _S4L_STARTUP_SCREEN_MAX_TIME: Final[int] = 45 * SECOND - +_S4L_COPY_WORKSPACE_TIME: Final[int] = 60 * SECOND @dataclass(kw_only=True) class S4LWaitForWebsocket: @@ -84,7 +84,7 @@ def __call__(self, message: str) -> bool: return False -def launch_S4L(page: Page, node_id, log_in_and_out: WebSocket, autoscaled: bool) -> Dict[str, Union[WebSocket, FrameLocator]]: +def launch_S4L(page: Page, node_id, log_in_and_out: WebSocket, autoscaled: bool, copy_workspace: bool = False) -> Dict[str, Union[WebSocket, FrameLocator]]: with log_context(logging.INFO, "launch S4L") as ctx: predicate = S4LWaitForWebsocket(logger=ctx.logger) with page.expect_websocket( @@ -95,6 +95,11 @@ def launch_S4L(page: Page, node_id, log_in_and_out: WebSocket, autoscaled: bool) if autoscaled else _S4L_MAX_STARTUP_TIME ) + + ( + _S4L_COPY_WORKSPACE_TIME + if copy_workspace + else 0 + ) + 10 * SECOND, ) as ws_info: s4l_iframe = wait_for_service_running( @@ -105,6 +110,11 @@ def launch_S4L(page: Page, node_id, log_in_and_out: WebSocket, autoscaled: bool) _S4L_AUTOSCALED_MAX_STARTUP_TIME if autoscaled else _S4L_MAX_STARTUP_TIME + ) + + ( + _S4L_COPY_WORKSPACE_TIME + if copy_workspace + else 0 ), press_start_button=False, ) diff --git a/tests/e2e-playwright/tests/sim4life/test_template.py b/tests/e2e-playwright/tests/sim4life/test_template.py index 21f7387c2b2..b770979770c 100644 --- a/tests/e2e-playwright/tests/sim4life/test_template.py +++ b/tests/e2e-playwright/tests/sim4life/test_template.py @@ -35,7 +35,7 @@ def test_template( node_ids: list[str] = list(project_data["workbench"]) assert len(node_ids) == 1, "Expected 1 node in the workbench!" - resp = launch_S4L(page, node_ids[0], log_in_and_out, autoscaled) + resp = launch_S4L(page, node_ids[0], log_in_and_out, autoscaled, copy_workspace=True) s4l_websocket = resp["websocket"] s4l_iframe = resp["iframe"] interact_with_S4L(page, s4l_iframe)