Skip to content

Commit 44f264a

Browse files
committed
rename
1 parent 4d6ac70 commit 44f264a

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/playwright.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def to_json(self) -> str:
137137

138138

139139
@dataclass
140-
class RestartableWebSocket:
140+
class RobustWebSocket:
141141
page: Page
142142
ws: WebSocket
143143
_registered_events: list[tuple[str, typing.Callable | None]] = field(
@@ -483,7 +483,7 @@ def assert_service_ready(self) -> None:
483483
def wait_for_pipeline_state(
484484
current_state: RunningState,
485485
*,
486-
websocket: RestartableWebSocket,
486+
websocket: RobustWebSocket,
487487
if_in_states: tuple[RunningState, ...],
488488
expected_states: tuple[RunningState, ...],
489489
timeout_ms: int,
@@ -540,7 +540,7 @@ def expected_service_running(
540540
*,
541541
page: Page,
542542
node_id: str,
543-
websocket: RestartableWebSocket,
543+
websocket: RobustWebSocket,
544544
timeout: int,
545545
press_start_button: bool,
546546
product_url: AnyUrl,
@@ -575,7 +575,7 @@ def wait_for_service_running(
575575
*,
576576
page: Page,
577577
node_id: str,
578-
websocket: RestartableWebSocket,
578+
websocket: RobustWebSocket,
579579
timeout: int,
580580
press_start_button: bool,
581581
product_url: AnyUrl,

packages/pytest-simcore/src/pytest_simcore/helpers/playwright_sim4life.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
MINUTE,
1515
SECOND,
1616
SOCKETIO_MESSAGE_PREFIX,
17-
RestartableWebSocket,
17+
RobustWebSocket,
1818
SocketIOEvent,
1919
decode_socketio_42_message,
2020
wait_for_service_running,
@@ -102,7 +102,7 @@ class WaitForS4LDict(TypedDict):
102102
def wait_for_launched_s4l(
103103
page: Page,
104104
node_id,
105-
log_in_and_out: RestartableWebSocket,
105+
log_in_and_out: RobustWebSocket,
106106
*,
107107
autoscaled: bool,
108108
copy_workspace: bool,

tests/e2e-playwright/tests/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
MINUTE,
3030
SECOND,
3131
AutoRegisteredUser,
32-
RestartableWebSocket,
32+
RobustWebSocket,
3333
RunningState,
3434
ServiceType,
3535
SocketIOEvent,
@@ -366,7 +366,7 @@ def log_in_and_out(
366366
register: Callable[[], AutoRegisteredUser],
367367
store_browser_context: bool,
368368
context: BrowserContext,
369-
) -> Iterator[RestartableWebSocket]:
369+
) -> Iterator[RobustWebSocket]:
370370
with log_context(
371371
logging.INFO,
372372
f"Open {product_url=} using {user_name=}/{user_password=}/{auto_register=} with {browser.browser_type.name}:{browser.version}({browser.browser_type.executable_path})",
@@ -410,7 +410,7 @@ def log_in_and_out(
410410
assert response_info.value.ok, f"{response_info.value.json()}"
411411

412412
assert not ws_info.value.is_closed()
413-
restartable_wb = RestartableWebSocket.create(page, ws_info.value)
413+
restartable_wb = RobustWebSocket.create(page, ws_info.value)
414414

415415
# Welcome to Sim4Life
416416
page.wait_for_timeout(5000)
@@ -473,7 +473,7 @@ def _select_service_version(page: Page, *, version: str) -> None:
473473
@pytest.fixture
474474
def create_new_project_and_delete( # noqa: C901, PLR0915
475475
page: Page,
476-
log_in_and_out: RestartableWebSocket,
476+
log_in_and_out: RobustWebSocket,
477477
is_product_billable: bool,
478478
api_request_context: APIRequestContext,
479479
product_url: AnyUrl,
@@ -735,7 +735,7 @@ def _(
735735
def start_and_stop_pipeline(
736736
product_url: AnyUrl,
737737
page: Page,
738-
log_in_and_out: RestartableWebSocket,
738+
log_in_and_out: RobustWebSocket,
739739
api_request_context: APIRequestContext,
740740
) -> Iterator[Callable[[], SocketIOEvent]]:
741741
started_pipeline_ids = []

tests/e2e-playwright/tests/jupyterlabs/test_jupyterlab.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from pytest_simcore.helpers.playwright import (
2121
MINUTE,
2222
SECOND,
23-
RestartableWebSocket,
23+
RobustWebSocket,
2424
ServiceType,
2525
wait_for_service_running,
2626
)
@@ -63,7 +63,7 @@ def __call__(self, new_websocket: WebSocket) -> bool:
6363

6464
def test_jupyterlab(
6565
page: Page,
66-
log_in_and_out: RestartableWebSocket,
66+
log_in_and_out: RobustWebSocket,
6767
create_project_from_service_dashboard: Callable[
6868
[ServiceType, str, str | None, str | None], dict[str, Any]
6969
],
@@ -140,7 +140,7 @@ def test_jupyterlab(
140140
iframe.get_by_label("Launcher").get_by_text("Terminal").click()
141141

142142
assert not ws_info.value.is_closed()
143-
restartable_terminal_web_socket = RestartableWebSocket.create(
143+
restartable_terminal_web_socket = RobustWebSocket.create(
144144
page, ws_info.value
145145
)
146146

tests/e2e-playwright/tests/sim4life/test_sim4life.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from playwright.sync_api import Page
1515
from pydantic import AnyUrl
16-
from pytest_simcore.helpers.playwright import RestartableWebSocket, ServiceType
16+
from pytest_simcore.helpers.playwright import RobustWebSocket, ServiceType
1717
from pytest_simcore.helpers.playwright_sim4life import (
1818
check_video_streaming,
1919
interact_with_s4l,
@@ -27,7 +27,7 @@ def test_sim4life(
2727
[ServiceType, str, str | None, str | None], dict[str, Any]
2828
],
2929
create_project_from_new_button: Callable[[str], dict[str, Any]],
30-
log_in_and_out: RestartableWebSocket,
30+
log_in_and_out: RobustWebSocket,
3131
service_key: str,
3232
service_version: str | None,
3333
use_plus_button: bool,

tests/e2e-playwright/tests/sim4life/test_template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from playwright.sync_api import Page
1515
from pydantic import AnyUrl
16-
from pytest_simcore.helpers.playwright import RestartableWebSocket
16+
from pytest_simcore.helpers.playwright import RobustWebSocket
1717
from pytest_simcore.helpers.playwright_sim4life import (
1818
check_video_streaming,
1919
interact_with_s4l,
@@ -24,7 +24,7 @@
2424
def test_template(
2525
page: Page,
2626
create_project_from_template_dashboard: Callable[[str], dict[str, Any]],
27-
log_in_and_out: RestartableWebSocket,
27+
log_in_and_out: RobustWebSocket,
2828
template_id: str,
2929
is_autoscaled: bool,
3030
check_videostreaming: bool,

tests/e2e-playwright/tests/sleepers/test_sleepers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
)
2525
from pytest_simcore.helpers.playwright import (
2626
MINUTE,
27-
RestartableWebSocket,
27+
RobustWebSocket,
2828
RunningState,
2929
ServiceType,
3030
SocketIOEvent,
@@ -80,7 +80,7 @@ def _get_file_names(page: Page) -> list[str]:
8080

8181
def test_sleepers(
8282
page: Page,
83-
log_in_and_out: RestartableWebSocket,
83+
log_in_and_out: RobustWebSocket,
8484
create_project_from_service_dashboard: Callable[
8585
[ServiceType, str, str | None, str | None], dict[str, Any]
8686
],

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from pytest_simcore.helpers.playwright import (
2121
MINUTE,
2222
SECOND,
23-
RestartableWebSocket,
23+
RobustWebSocket,
2424
app_mode_trigger_next_app,
2525
expected_service_running,
2626
wait_for_service_running,
@@ -91,7 +91,7 @@ def __call__(self, message: str) -> bool:
9191

9292
def test_classic_ti_plan( # noqa: PLR0915
9393
page: Page,
94-
log_in_and_out: RestartableWebSocket,
94+
log_in_and_out: RobustWebSocket,
9595
is_autoscaled: bool,
9696
is_product_lite: bool,
9797
create_tip_plan_from_dashboard: Callable[[str], dict[str, Any]],
@@ -222,7 +222,7 @@ def test_classic_ti_plan( # noqa: PLR0915
222222
assert ti_iframe
223223

224224
assert not ws_info.value.is_closed()
225-
restartable_jlab_websocket = RestartableWebSocket.create(page, ws_info.value)
225+
restartable_jlab_websocket = RobustWebSocket.create(page, ws_info.value)
226226

227227
with (
228228
log_context(logging.INFO, "Run optimization"),

0 commit comments

Comments
 (0)