Skip to content

Commit de19002

Browse files
author
Andrei Neagu
committed
refactor ui tests
1 parent 8e8b9b2 commit de19002

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_render_utils.py renamed to services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/routes_external_scheduler/_render_utils.py

File renamed without changes.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from nicegui import APIRouter
22

3+
from . import _index
4+
35
router = APIRouter()
46

5-
# router.include_router(_index.router)
7+
router.include_router(_index.router)
68

79
__all__: tuple[str, ...] = ("router",)
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
from nicegui import APIRouter, ui
22

3-
from .._render_utils import base_page
4-
53
router = APIRouter()
64

75

86
@router.page("/")
97
async def index():
10-
with base_page():
11-
ui.label("PLACEHOLDER for internal scheduler UI")
8+
ui.label("PLACEHOLDER for internal scheduler UI")

services/dynamic-scheduler/tests/unit/api_frontend/routes_internal_scheduler/test__index.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
from fastapi import FastAPI
6-
from helpers import assert_contains_text, take_screenshot_on_error
6+
from helpers import assert_contains_text
77
from playwright.async_api import Page
88
from simcore_service_dynamic_scheduler.api.frontend._utils import get_settings
99

@@ -24,9 +24,8 @@ async def test_placeholder_index(
2424
server_host_port: str,
2525
not_initialized_app: FastAPI,
2626
):
27-
async with take_screenshot_on_error(async_page):
28-
await async_page.goto(
29-
f"{server_host_port}{get_settings().DYNAMIC_SCHEDULER_UI_MOUNT_PATH}"
30-
)
27+
await async_page.goto(
28+
f"{server_host_port}{get_settings().DYNAMIC_SCHEDULER_UI_MOUNT_PATH}"
29+
)
3130

3231
await assert_contains_text(async_page, "PLACEHOLDER for internal scheduler UI")

0 commit comments

Comments
 (0)