@camunda/e2e-test-suite 0.0.1766 → 0.0.1768
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1024,10 +1024,25 @@ class ModelerHomePage {
|
|
|
1024
1024
|
await this.clickWorkspaceBreadcrumb();
|
|
1025
1025
|
return;
|
|
1026
1026
|
}
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1027
|
+
// The deep link routes through Keycloak; while it is briefly unavailable
|
|
1028
|
+
// the page is stranded on an error or a stalled login-callback. Only a
|
|
1029
|
+
// fresh goto restarts that flow (page.reload() would not), so retry it.
|
|
1030
|
+
const maxAttempts = 3;
|
|
1031
|
+
for (let attempt = 1;; attempt++) {
|
|
1032
|
+
try {
|
|
1033
|
+
await this.page.goto(this.processApplicationUrl, {
|
|
1034
|
+
waitUntil: 'domcontentloaded',
|
|
1035
|
+
});
|
|
1036
|
+
await this.processApplicationPage.waitForProcessApplication(60000);
|
|
1037
|
+
break;
|
|
1038
|
+
}
|
|
1039
|
+
catch (error) {
|
|
1040
|
+
if (attempt >= maxAttempts) {
|
|
1041
|
+
throw error;
|
|
1042
|
+
}
|
|
1043
|
+
console.log(`returnToResourceContainer: process application not rendered after attempt ${attempt}, re-navigating...`);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1031
1046
|
await this.clickMessageBanner();
|
|
1032
1047
|
}
|
|
1033
1048
|
// Single seam for "give me an empty BPMN diagram in this test's container".
|
|
@@ -121,16 +121,8 @@ class OperateHomePage {
|
|
|
121
121
|
// Replace the whole JSON document in one shot. Typing it per-character
|
|
122
122
|
// raced the editor's re-render: after a couple of keystrokes the caret
|
|
123
123
|
// jumped outside the closing quote, leaving invalid JSON such as
|
|
124
|
-
// `"up"datedValue`.
|
|
125
|
-
//
|
|
126
|
-
// `not.toBeVisible('"testValue"')` assertion times out. insertText emits a
|
|
127
|
-
// single input event, so there is no intermediate state to race.
|
|
128
|
-
//
|
|
129
|
-
// Pass only the OPENING quote: Monaco auto-closes it. Supplying both ends
|
|
130
|
-
// yields `"updatedValue""` -- invalid JSON, and Apply rejects it exactly
|
|
131
|
-
// like the per-character version did. Same recipe as
|
|
132
|
-
// pages/c8Run-8.10/OperateHomePage.ts. Firefox's textarea input does not
|
|
133
|
-
// auto-close, so it gets the closing quote explicitly.
|
|
124
|
+
// `"up"datedValue`. insertText emits a single input event, so there is no
|
|
125
|
+
// intermediate state to race.
|
|
134
126
|
//
|
|
135
127
|
// Select with Home + Shift+End rather than ControlOrMeta+A: headless
|
|
136
128
|
// Chromium on macOS does not apply Meta+A as select-all inside Monaco's
|
|
@@ -139,8 +131,23 @@ class OperateHomePage {
|
|
|
139
131
|
// every platform.
|
|
140
132
|
await this.page.keyboard.press('Home');
|
|
141
133
|
await this.page.keyboard.press('Shift+End');
|
|
142
|
-
|
|
143
|
-
|
|
134
|
+
await this.page.keyboard.insertText(`"${newValue}`);
|
|
135
|
+
// Whether Monaco auto-closes the opening quote under keyboard.insertText
|
|
136
|
+
// varies across Operate builds: when it does not fire the line is left as
|
|
137
|
+
// the unterminated string `"updatedValue`, Apply is silently rejected and
|
|
138
|
+
// the old value stays on screen. Append the closing quote only when it is
|
|
139
|
+
// missing, so the document is valid JSON either way (the branch is only
|
|
140
|
+
// reached in the non-auto-closing state, so this insert does not double it).
|
|
141
|
+
const valueLine = this.page
|
|
142
|
+
.getByLabel('Edit Variable "testVariable"')
|
|
143
|
+
.locator('.view-line')
|
|
144
|
+
.first();
|
|
145
|
+
await (0, test_1.expect)(valueLine).toContainText(newValue);
|
|
146
|
+
const lineText = (await valueLine.textContent()) ?? '';
|
|
147
|
+
if (!lineText.trimEnd().endsWith('"')) {
|
|
148
|
+
await this.page.keyboard.press('End');
|
|
149
|
+
await this.page.keyboard.insertText('"');
|
|
150
|
+
}
|
|
144
151
|
}
|
|
145
152
|
async clickSaveVariableButton() {
|
|
146
153
|
await this.applyButton.click();
|