Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from dataclasses import dataclass, field
from datetime import UTC, datetime, timedelta
from enum import Enum, unique
from pathlib import Path
from typing import Any, Final

import arrow
Expand Down Expand Up @@ -590,7 +589,6 @@ def expected_service_running(
press_start_button: bool,
product_url: AnyUrl,
is_service_legacy: bool,
assertion_output_folder: Path,
) -> Generator[ServiceRunning, None, None]:
started = arrow.utcnow()
with contextlib.ExitStack() as stack:
Expand All @@ -610,6 +608,10 @@ def expected_service_running(
waiter = SocketIONodeProgressCompleteWaiter(
node_id=node_id,
logger=ctx.logger,
max_idle_timeout=min(
_SOCKET_IO_NODE_PROGRESS_WAITER_MAX_IDLE_TIMEOUT,
timedelta(seconds=timeout / 1000 - 10),
),
)
stack.enter_context(
websocket.expect_event("framereceived", waiter, timeout=timeout)
Expand Down Expand Up @@ -647,7 +649,6 @@ def wait_for_service_running(
press_start_button: bool,
product_url: AnyUrl,
is_service_legacy: bool,
assertion_output_folder: Path,
) -> FrameLocator:
"""NOTE: if the service was already started this will not work as some of the required websocket events will not be emitted again
In which case this will need further adjutment"""
Expand All @@ -669,6 +670,10 @@ def wait_for_service_running(
waiter = SocketIONodeProgressCompleteWaiter(
node_id=node_id,
logger=ctx.logger,
max_idle_timeout=min(
_SOCKET_IO_NODE_PROGRESS_WAITER_MAX_IDLE_TIMEOUT,
timedelta(seconds=timeout / 1000 - 10),
),
)
stack.enter_context(
websocket.expect_event("framereceived", waiter, timeout=timeout)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging
import re
from dataclasses import dataclass
from pathlib import Path
from typing import Final, TypedDict

import arrow
Expand Down Expand Up @@ -108,7 +107,6 @@ def wait_for_launched_s4l(
copy_workspace: bool,
product_url: AnyUrl,
is_service_legacy: bool,
assertion_output_folder: Path,
) -> WaitForS4LDict:
with log_context(logging.INFO, "launch S4L") as ctx:
predicate = S4LWaitForWebsocket(logger=ctx.logger)
Expand Down Expand Up @@ -136,7 +134,6 @@ def wait_for_launched_s4l(
press_start_button=False,
product_url=product_url,
is_service_legacy=is_service_legacy,
assertion_output_folder=assertion_output_folder,
)
s4l_websocket = ws_info.value
ctx.logger.info("acquired S4L websocket!")
Expand Down
3 changes: 0 additions & 3 deletions tests/e2e-playwright/tests/jupyterlabs/test_jupyterlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import re
from collections.abc import Callable
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Final, Literal

from playwright.sync_api import Page, WebSocket
Expand Down Expand Up @@ -73,7 +72,6 @@ def test_jupyterlab(
large_file_block_size: ByteSize,
product_url: AnyUrl,
is_service_legacy: bool,
playwright_test_results_dir: Path,
):
# NOTE: this waits for the jupyter to send message, but is not quite enough
with (
Expand Down Expand Up @@ -106,7 +104,6 @@ def test_jupyterlab(
press_start_button=False,
product_url=product_url,
is_service_legacy=is_service_legacy,
assertion_output_folder=playwright_test_results_dir,
)

iframe = page.frame_locator("iframe")
Expand Down
3 changes: 0 additions & 3 deletions tests/e2e-playwright/tests/sim4life/test_sim4life.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


from collections.abc import Callable
from pathlib import Path
from typing import Any

from playwright.sync_api import Page
Expand All @@ -35,7 +34,6 @@ def test_sim4life(
check_videostreaming: bool,
product_url: AnyUrl,
is_service_legacy: bool,
playwright_test_results_dir: Path,
):
if use_plus_button:
project_data = create_project_from_new_button(service_key)
Expand All @@ -59,7 +57,6 @@ def test_sim4life(
copy_workspace=False,
product_url=product_url,
is_service_legacy=is_service_legacy,
assertion_output_folder=playwright_test_results_dir,
)
s4l_websocket = resp["websocket"]
s4l_iframe = resp["iframe"]
Expand Down
3 changes: 0 additions & 3 deletions tests/e2e-playwright/tests/sim4life/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


from collections.abc import Callable
from pathlib import Path
from typing import Any

from playwright.sync_api import Page
Expand All @@ -30,7 +29,6 @@ def test_template(
check_videostreaming: bool,
product_url: AnyUrl,
is_service_legacy: bool,
playwright_test_results_dir: Path,
):
project_data = create_project_from_template_dashboard(template_id)

Expand All @@ -49,7 +47,6 @@ def test_template(
copy_workspace=True,
product_url=product_url,
is_service_legacy=is_service_legacy,
assertion_output_folder=playwright_test_results_dir,
)
s4l_websocket = resp["websocket"]
s4l_iframe = resp["iframe"]
Expand Down
3 changes: 0 additions & 3 deletions tests/e2e-playwright/tests/tip/test_ti_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def test_classic_ti_plan( # noqa: PLR0915
press_start_button=False,
product_url=product_url,
is_service_legacy=is_service_legacy,
assertion_output_folder=playwright_test_results_dir,
)
# NOTE: Sometimes this iframe flicks and shows a white page. This wait will avoid it
page.wait_for_timeout(_ELECTRODE_SELECTOR_FLICKERING_WAIT_TIME)
Expand Down Expand Up @@ -227,7 +226,6 @@ def test_classic_ti_plan( # noqa: PLR0915
press_start_button=False,
product_url=product_url,
is_service_legacy=is_service_legacy,
assertion_output_folder=playwright_test_results_dir,
) as service_running:
app_mode_trigger_next_app(page)
ti_iframe = service_running.iframe_locator
Expand Down Expand Up @@ -345,7 +343,6 @@ def test_classic_ti_plan( # noqa: PLR0915
press_start_button=False,
product_url=product_url,
is_service_legacy=is_service_legacy,
assertion_output_folder=playwright_test_results_dir,
) as service_running:
app_mode_trigger_next_app(page)
s4l_postpro_iframe = service_running.iframe_locator
Expand Down
Loading