@camunda/e2e-test-suite 0.0.1726 → 0.0.1728
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.
|
@@ -59,7 +59,7 @@ declare class ClusterPage {
|
|
|
59
59
|
clickClusterOption(version: string): Promise<void>;
|
|
60
60
|
createClusterIfNotExists(clusterName: string, region?: string): Promise<void>;
|
|
61
61
|
waitForClusterRestartToStart(name: string, timeout?: number): Promise<void>;
|
|
62
|
-
assertClusterHealthyStatusWithRetry(name: string, visibilityTimeout?: number, totalTimeout?: number, isUpgradeScenario?: boolean): Promise<void>;
|
|
62
|
+
assertClusterHealthyStatusWithRetry(name: string, visibilityTimeout?: number, totalTimeout?: number, isUpgradeScenario?: boolean, reauthenticate?: () => Promise<void>): Promise<void>;
|
|
63
63
|
clickAlphaTab(): Promise<void>;
|
|
64
64
|
clickDevTab(): Promise<void>;
|
|
65
65
|
clickStableTab(): Promise<void>;
|
|
@@ -528,7 +528,7 @@ class ClusterPage {
|
|
|
528
528
|
? `${name}: restart started, status left Healthy.`
|
|
529
529
|
: `${name}: status stayed Healthy for ${timeout / 1000}s after the change.`);
|
|
530
530
|
}
|
|
531
|
-
async assertClusterHealthyStatusWithRetry(name, visibilityTimeout = 100000, totalTimeout = 420000, isUpgradeScenario = false) {
|
|
531
|
+
async assertClusterHealthyStatusWithRetry(name, visibilityTimeout = 100000, totalTimeout = 420000, isUpgradeScenario = false, reauthenticate) {
|
|
532
532
|
// For upgrade scenarios, use much longer timeouts and more retries instead of fixed waits.
|
|
533
533
|
// After the 8.7->8.8 upgrade the cluster's components report healthy and the generation
|
|
534
534
|
// flips to 8.8 well before the cluster-list overall Status leaves "Updating"; that overall
|
|
@@ -550,6 +550,15 @@ class ClusterPage {
|
|
|
550
550
|
maxRetries: maxRetries,
|
|
551
551
|
preAction: async () => {
|
|
552
552
|
await this.page.reload();
|
|
553
|
+
// The upgrade wait outlives the Console session: in the 8.7 -> 8.8
|
|
554
|
+
// weekly run, the reload on attempt 10 landed on
|
|
555
|
+
// hub.ultrawombat.com/login and every remaining attempt then polled
|
|
556
|
+
// the login form. Let the caller sign back in and return to the
|
|
557
|
+
// cluster list instead of burning the rest of the budget there.
|
|
558
|
+
if (reauthenticate && /\/login|weblogin\./.test(this.page.url())) {
|
|
559
|
+
console.warn(`${name}: session expired during health wait.`);
|
|
560
|
+
await reauthenticate();
|
|
561
|
+
}
|
|
553
562
|
await (0, test_1.expect)(this.cluster(name).first()).toBeVisible({ timeout: 60000 });
|
|
554
563
|
},
|
|
555
564
|
});
|
|
@@ -133,37 +133,64 @@ class OperateHomePage {
|
|
|
133
133
|
// elsewhere. Click to focus, then confirm. Both act on the
|
|
134
134
|
// contenteditable rather than its container, which cannot hold focus.
|
|
135
135
|
await (0, test_1.expect)(this.variableValueContent).toBeVisible({ timeout: 30000 });
|
|
136
|
-
// Click the editor root, not the editable node: Monaco overlays its
|
|
137
|
-
// rendered text (.view-lines) on top of the edit context, which would
|
|
138
|
-
// intercept a direct click. Clicking either editor's root moves focus
|
|
139
|
-
// into its editable node, which the next line confirms.
|
|
140
|
-
await this.variableValueEditor.click();
|
|
141
|
-
await (0, test_1.expect)(this.variableValueContent).toBeFocused({ timeout: 10000 });
|
|
142
|
-
// Insert the COMPLETE JSON value, both quotes included. Monaco used to
|
|
143
|
-
// auto-close a lone opening quote, so the old recipe inserted only
|
|
144
|
-
// `"value`; CodeMirror's closeBrackets extension ignores insertions
|
|
145
|
-
// longer than two characters, which left the string unterminated. That
|
|
146
|
-
// is invalid JSON, and EditButtons.tsx keeps "Save variable" disabled
|
|
147
|
-
// while hasValidationErrors -- the nightly timed out clicking a button
|
|
148
|
-
// that could never become enabled. Same recipe as
|
|
149
|
-
// pages/8.10/OperateHomePage.ts: select all, clear, insert the whole
|
|
150
|
-
// value in a single input event (no intermediate state to race, and
|
|
151
|
-
// multi-character insertText is not subject to auto-close), then
|
|
152
|
-
// confirm the editor actually holds it.
|
|
153
|
-
// ControlOrMeta+A (not Control+A) so select-all also works on Mac --
|
|
154
|
-
// same cross-platform shortcut the sibling page objects use for this
|
|
155
|
-
// exact operation (pages/SM-8.10/OperateHomePage.ts,
|
|
156
|
-
// pages/8.9/OCIdentityClusterVariablesPage.ts).
|
|
157
|
-
await this.page.keyboard.press('ControlOrMeta+A');
|
|
158
|
-
await this.page.keyboard.press('Backspace');
|
|
159
136
|
const jsonValue = JSON.stringify(newValue);
|
|
160
|
-
|
|
161
|
-
//
|
|
162
|
-
//
|
|
163
|
-
//
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
137
|
+
// Insert the COMPLETE JSON value, both quotes included, in a single
|
|
138
|
+
// input event: CodeMirror's closeBrackets ignores multi-character
|
|
139
|
+
// insertions and Monaco does not auto-close inside insertText, so there
|
|
140
|
+
// is no intermediate state to race.
|
|
141
|
+
//
|
|
142
|
+
// Do NOT clear the old value with select-all. On the macOS runner
|
|
143
|
+
// ControlOrMeta+A resolves to Meta+A, which Playwright turns into the
|
|
144
|
+
// native `selectAll` editing command -- Monaco's edit context ignores it,
|
|
145
|
+
// so nothing was selected, Backspace removed a single character at the
|
|
146
|
+
// caret, and the new value landed in the middle of the old one
|
|
147
|
+
// (`"testVal"updatedValue"e"`). That is invalid JSON, EditButtons.tsx
|
|
148
|
+
// keeps "Save variable" disabled while hasValidationErrors, and the
|
|
149
|
+
// nightly timed out clicking it. Delete/Backspace are honoured by both
|
|
150
|
+
// editors on every platform (the failing run shows Backspace working),
|
|
151
|
+
// so remove the old value one character at a time -- Delete and then
|
|
152
|
+
// Backspace, enough presses each to cover the whole value wherever the
|
|
153
|
+
// caret ended up.
|
|
154
|
+
//
|
|
155
|
+
// toContainText alone cannot tell a clean replace from that corruption
|
|
156
|
+
// (the substring is present either way), so also require Save to be
|
|
157
|
+
// enabled: the product only enables it for valid JSON, and a JSON
|
|
158
|
+
// document containing `"updatedValue"` with leftovers around it is
|
|
159
|
+
// never valid. Retry the whole clear-and-insert if either check fails.
|
|
160
|
+
await (0, test_1.expect)(async () => {
|
|
161
|
+
// Click the editor root, not the editable node: Monaco overlays its
|
|
162
|
+
// rendered text (.view-lines) on top of the edit context, which would
|
|
163
|
+
// intercept a direct click. Clicking either editor's root moves focus
|
|
164
|
+
// into its editable node, which the next line confirms. Click near the
|
|
165
|
+
// right edge (clear of Monaco's vertical scrollbar) so the caret lands
|
|
166
|
+
// after the single-line value, where Backspace alone clears it.
|
|
167
|
+
const box = await this.variableValueEditor.boundingBox();
|
|
168
|
+
await this.variableValueEditor.click(box
|
|
169
|
+
? {
|
|
170
|
+
position: {
|
|
171
|
+
x: Math.max(box.width - 30, box.width / 2),
|
|
172
|
+
y: box.height / 2,
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
: undefined);
|
|
176
|
+
await (0, test_1.expect)(this.variableValueContent).toBeFocused({ timeout: 10000 });
|
|
177
|
+
const currentText = await this.variableValueEditor.innerText();
|
|
178
|
+
const presses = currentText.length + 5;
|
|
179
|
+
for (let i = 0; i < presses; i++) {
|
|
180
|
+
await this.page.keyboard.press('Delete');
|
|
181
|
+
}
|
|
182
|
+
for (let i = 0; i < presses; i++) {
|
|
183
|
+
await this.page.keyboard.press('Backspace');
|
|
184
|
+
}
|
|
185
|
+
await this.page.keyboard.insertText(jsonValue);
|
|
186
|
+
// Asserted on the editor root: CodeMirror keeps the text inside
|
|
187
|
+
// .cm-content, but Monaco renders it in sibling .view-lines, not in
|
|
188
|
+
// the edit-context element that holds focus.
|
|
189
|
+
await (0, test_1.expect)(this.variableValueEditor).toContainText(jsonValue, {
|
|
190
|
+
timeout: 10000,
|
|
191
|
+
});
|
|
192
|
+
await (0, test_1.expect)(this.saveVariableButton).toBeEnabled({ timeout: 10000 });
|
|
193
|
+
}).toPass({ timeout: 90000 });
|
|
167
194
|
}
|
|
168
195
|
async clickSaveVariableButton() {
|
|
169
196
|
await this.saveVariableButton.click({ timeout: 30000 });
|
|
@@ -35,14 +35,29 @@ _8_8_1.test.describe('SaaS Migration Path Tests', () => {
|
|
|
35
35
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
36
36
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
37
37
|
});
|
|
38
|
-
(0, _8_8_1.test)('SaaS UI Upgrade Flow Automation @saasUpgrade', async ({ homePage, clusterPage, clusterDetailsPage, }) => {
|
|
38
|
+
(0, _8_8_1.test)('SaaS UI Upgrade Flow Automation @saasUpgrade', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, }, testInfo) => {
|
|
39
39
|
_8_8_1.test.slow();
|
|
40
40
|
await _8_8_1.test.step('Navigate to SaaS Upgrade Section', async () => {
|
|
41
41
|
await homePage.clickClusters();
|
|
42
|
-
await clusterPage.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
await (0, test_1.expect)(clusterPage.cluster('Test Cluster').first()).toBeVisible({
|
|
43
|
+
timeout: 60000,
|
|
44
|
+
});
|
|
45
|
+
// A Playwright retry runs against the same org, so the first attempt
|
|
46
|
+
// may already have moved the cluster to 8.8. Starting the wizard again
|
|
47
|
+
// would then offer (and apply) the next generation, 8.9.
|
|
48
|
+
const alreadyUpgraded = await clusterPage
|
|
49
|
+
.clusterVersion('Test Cluster', '8.8')
|
|
50
|
+
.first()
|
|
51
|
+
.isVisible();
|
|
52
|
+
if (!alreadyUpgraded) {
|
|
53
|
+
await clusterPage.clickClusterLink('Test Cluster');
|
|
54
|
+
await clusterDetailsPage.performClusterUpdate();
|
|
55
|
+
await homePage.clickClusters();
|
|
56
|
+
}
|
|
57
|
+
await clusterPage.assertClusterHealthyStatusWithRetry('Test Cluster', undefined, undefined, true, async () => {
|
|
58
|
+
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
|
|
59
|
+
await homePage.clickClusters();
|
|
60
|
+
});
|
|
46
61
|
await (0, test_1.expect)(clusterPage.clusterVersion('Test Cluster', '8.8')).toBeVisible();
|
|
47
62
|
});
|
|
48
63
|
});
|
|
@@ -17,9 +17,30 @@ async function resetSession(browser, page) {
|
|
|
17
17
|
await page.reload();
|
|
18
18
|
}).toPass({ timeout: 60000 });
|
|
19
19
|
await page.waitForLoadState('domcontentloaded');
|
|
20
|
-
await page
|
|
20
|
+
await goToRootOrBlank(page);
|
|
21
21
|
}
|
|
22
22
|
exports.resetSession = resetSession;
|
|
23
|
+
// On Self-Managed deployments without Console, "/" answers an empty 404. In
|
|
24
|
+
// headless Chromium that still loads, but other browsers swap in their own
|
|
25
|
+
// error page: Firefox ("Looks like there's a problem with this site") never
|
|
26
|
+
// fires "load" (nor even commits) for page.goto, so the navigation hung for
|
|
27
|
+
// the full 120s navigationTimeout; branded Edge ("HTTP ERROR 404") makes
|
|
28
|
+
// page.goto throw net::ERR_HTTP_RESPONSE_CODE_FAILURE. Either way every test
|
|
29
|
+
// that reset its session failed. Probe "/"
|
|
30
|
+
// over HTTP first; when nothing is served there, park the tab on about:blank
|
|
31
|
+
// instead. Every SM caller navigates to its target app explicitly afterwards,
|
|
32
|
+
// and where "/" does serve an app (SaaS Console) the behavior is unchanged.
|
|
33
|
+
async function goToRootOrBlank(page) {
|
|
34
|
+
const rootStatus = await page.request
|
|
35
|
+
.get('/', { timeout: 30000 })
|
|
36
|
+
.then((response) => response.status())
|
|
37
|
+
.catch(() => undefined);
|
|
38
|
+
if (rootStatus !== undefined && rootStatus >= 400) {
|
|
39
|
+
await page.goto('about:blank');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
await page.goto('/');
|
|
43
|
+
}
|
|
23
44
|
async function resetSessionAll(context, page) {
|
|
24
45
|
await context.clearCookies();
|
|
25
46
|
await context.clearPermissions();
|