Skip to content

Commit 85a2e9d

Browse files
authored
🐛E2E: TIP test fixes (#7610)
1 parent 190be9a commit 85a2e9d

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def __call__(self, message: str) -> None:
319319

320320

321321
_FAIL_FAST_DYNAMIC_SERVICE_STATES: Final[tuple[str, ...]] = ("idle", "failed")
322-
_SERVICE_ROOT_POINT_STATUS_TIMEOUT: Final[timedelta] = timedelta(seconds=5)
322+
_SERVICE_ROOT_POINT_STATUS_TIMEOUT: Final[timedelta] = timedelta(seconds=30)
323323

324324

325325
def _get_service_url(

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

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,17 @@ def test_classic_ti_plan( # noqa: PLR0915
236236
assert not ws_info.value.is_closed()
237237
restartable_jlab_websocket = RobustWebSocket(page, ws_info.value)
238238

239-
with log_context(logging.INFO, "Run optimization") as ctx:
239+
with log_context(logging.INFO, "Run optimization") as ctx2:
240240
run_button = ti_iframe.get_by_role("button", name="Run Optimization")
241241
run_button.click(timeout=_JLAB_RUN_OPTIMIZATION_APPEARANCE_TIME)
242242
try:
243243
_wait_for_optimization_complete(run_button)
244-
ctx.logger.info("Optimization finished!")
244+
ctx2.logger.info("Optimization finished!")
245245
except RetryError as e:
246246
last_exc = e.last_attempt.exception()
247-
ctx.logger.warning(f"Optimization did not finish in time: {last_exc}")
247+
ctx2.logger.warning(
248+
"Optimization did not finish in time: %s", f"{last_exc}"
249+
)
248250

249251
with log_context(logging.INFO, "Create report"):
250252
with log_context(
@@ -262,16 +264,23 @@ def test_classic_ti_plan( # noqa: PLR0915
262264

263265
if is_product_lite:
264266
assert (
265-
not ti_iframe.get_by_role("button", name="Add to Report (0)")
267+
ti_iframe.get_by_role("button", name="Add to Report (0)")
266268
.nth(0)
267-
.is_enabled()
268-
)
269-
assert not ti_iframe.get_by_role(
270-
"button", name="Export to S4L"
271-
).is_enabled()
272-
assert not ti_iframe.get_by_role(
273-
"button", name="Export Report"
274-
).is_enabled()
269+
.get_attribute("disabled")
270+
is not None
271+
), "Add to Report button should be disabled in lite product"
272+
assert (
273+
ti_iframe.get_by_role("button", name="Export to S4L").get_attribute(
274+
"disabled"
275+
)
276+
is not None
277+
), "Export to S4L button should be disabled in lite product"
278+
assert (
279+
ti_iframe.get_by_role("button", name="Export Report").get_attribute(
280+
"disabled"
281+
)
282+
is not None
283+
), "Export Report button should be disabled in lite product"
275284

276285
else:
277286
with log_context(

0 commit comments

Comments
 (0)