Skip to content

Commit fd9641d

Browse files
authored
🎨 [e2e] Improve MMUX test (ITISFoundation#8494)
1 parent 4b88d15 commit fd9641d

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

services/static-webserver/client/source/class/osparc/navigation/NavigationBar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ qx.Class.define("osparc.navigation.NavigationBar", {
230230
opacity: 0.8,
231231
visibility: "excluded",
232232
});
233+
osparc.utils.Utils.setIdToWidget(control, "savingStudyIcon");
233234
this.getChildControl("left-items").add(control);
234235
break;
235236
case "read-only-info": {

tests/e2e-playwright/tests/metamodeling/test_response_surface_modeling.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from pytest_simcore.helpers.logging_tools import log_context
2020
from pytest_simcore.helpers.playwright import (
2121
MINUTE,
22+
SECOND,
2223
RobustWebSocket,
2324
ServiceType,
2425
wait_for_service_running,
@@ -180,15 +181,22 @@ def test_response_surface_modeling(
180181
lambda resp: resp.url.endswith(f"/projects/{jsonifier_prj_uuid}")
181182
and resp.request.method == "PATCH"
182183
) as patch_prj_rename_ctx:
183-
page.get_by_test_id("studyTitleRenamer").locator("input").fill(
184-
_STUDY_FUNCTION_NAME
185-
)
184+
renamer = page.get_by_test_id("studyTitleRenamer").locator("input")
185+
renamer.fill(_STUDY_FUNCTION_NAME)
186+
renamer.press("Enter")
186187

187188
patch_prj_rename_resp = patch_prj_rename_ctx.value
188189
assert (
189190
patch_prj_rename_resp.status == 204
190191
), f"Expected 204 from PATCH, got {patch_prj_rename_resp.status}"
191192

193+
# if the project is being saved, wait until it's finished
194+
with log_context(logging.INFO, "Wait until project is saved"):
195+
# Wait for the saving icon to disappear
196+
page.get_by_test_id("savingStudyIcon").wait_for(
197+
state="hidden", timeout=5 * SECOND
198+
)
199+
192200
# 2. go back to dashboard
193201
with (
194202
log_context(logging.INFO, "Go back to dashboard"),

0 commit comments

Comments
 (0)