@camunda/e2e-test-suite 0.0.1708 → 0.0.1709
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.
|
@@ -73,6 +73,14 @@ declare class ClusterPage {
|
|
|
73
73
|
* for the cluster') after 3 attempts": one recoverable slow render, then
|
|
74
74
|
* two attempts that could not succeed. Retrying in place costs the same
|
|
75
75
|
* time and can actually find the input.
|
|
76
|
+
*
|
|
77
|
+
* Retrying in place cannot help either when the form's own data request
|
|
78
|
+
* failed: release run 44501084573 (DUP-04) showed the form route render
|
|
79
|
+
* only its "Duplicate a cluster" heading because GET .../clusters/parameters
|
|
80
|
+
* was rejected by Console's rate limiter (a 429 without CORS headers, so
|
|
81
|
+
* net::ERR_FAILED), and Hub never refetches it. Both forms are their own
|
|
82
|
+
* routes (/clusters/create and /clusters/create?duplicateOf=<id>), so a
|
|
83
|
+
* reload keeps the user on the same form and does refetch its data.
|
|
76
84
|
*/
|
|
77
85
|
clickClusterNameInput(): Promise<void>;
|
|
78
86
|
cloudProviderOption(region: string): Locator;
|
|
@@ -381,9 +381,26 @@ class ClusterPage {
|
|
|
381
381
|
* for the cluster') after 3 attempts": one recoverable slow render, then
|
|
382
382
|
* two attempts that could not succeed. Retrying in place costs the same
|
|
383
383
|
* time and can actually find the input.
|
|
384
|
+
*
|
|
385
|
+
* Retrying in place cannot help either when the form's own data request
|
|
386
|
+
* failed: release run 44501084573 (DUP-04) showed the form route render
|
|
387
|
+
* only its "Duplicate a cluster" heading because GET .../clusters/parameters
|
|
388
|
+
* was rejected by Console's rate limiter (a 429 without CORS headers, so
|
|
389
|
+
* net::ERR_FAILED), and Hub never refetches it. Both forms are their own
|
|
390
|
+
* routes (/clusters/create and /clusters/create?duplicateOf=<id>), so a
|
|
391
|
+
* reload keeps the user on the same form and does refetch its data.
|
|
384
392
|
*/
|
|
385
393
|
async clickClusterNameInput() {
|
|
386
|
-
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.clusterNameInput
|
|
394
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.clusterNameInput, {
|
|
395
|
+
maxRetries: 4,
|
|
396
|
+
visibilityTimeout: 20000,
|
|
397
|
+
totalTimeout: 150000,
|
|
398
|
+
postAction: async () => {
|
|
399
|
+
if (/\/clusters\/create$/.test(new URL(this.page.url()).pathname)) {
|
|
400
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
});
|
|
387
404
|
}
|
|
388
405
|
// The Console's "Select cloud provider" radiogroup now names its options
|
|
389
406
|
// by the provider's full name with the short code in parentheses ("Google
|
|
@@ -480,12 +497,29 @@ class ClusterPage {
|
|
|
480
497
|
// didn't propagate yet (parallel setup workers, list-fetch race).
|
|
481
498
|
// Reload once and give the list a longer window before giving up.
|
|
482
499
|
console.warn(`clickClustersBreadcrumb: '${clusterName}' not visible after banner nav; reloading and extending wait to 90s.`);
|
|
483
|
-
|
|
484
|
-
|
|
500
|
+
// One reload is not enough when the list request itself is rejected:
|
|
501
|
+
// release run 44501084573 (DUP-05) showed the list's empty state ("Processes
|
|
502
|
+
// run on clusters") because Console's rate limiter answered GET
|
|
503
|
+
// .../clusters with a 429 lacking CORS headers, and Hub does not
|
|
504
|
+
// refetch on its own. Reload between shorter waits so a later
|
|
505
|
+
// request can land (a failed reload is retried by toPass too).
|
|
506
|
+
await (0, test_1.expect)(async () => {
|
|
507
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
508
|
+
await (0, test_1.expect)(clusterRowVisible).toBeVisible({ timeout: 30000 });
|
|
509
|
+
}).toPass({ intervals: [5000], timeout: 120000 });
|
|
485
510
|
}
|
|
486
511
|
}
|
|
487
512
|
async clickClusterLink(name) {
|
|
513
|
+
// When Console's rate limiter rejects GET .../clusters (a 429 without
|
|
514
|
+
// CORS headers, so Hub sees net::ERR_FAILED), the list renders its empty
|
|
515
|
+
// state until a later navigation refetches. Release run 44501084573 (GCP
|
|
516
|
+
// secrets flow) spent all of the default 3 x 10s window inside one such
|
|
517
|
+
// burst. Give the list longer and back off between re-navigations.
|
|
488
518
|
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.clusterLink(name), {
|
|
519
|
+
maxRetries: 5,
|
|
520
|
+
visibilityTimeout: 20000,
|
|
521
|
+
retryDelayMs: 5000,
|
|
522
|
+
totalTimeout: 180000,
|
|
489
523
|
postAction: async () => {
|
|
490
524
|
await this.clickClusterBanner();
|
|
491
525
|
},
|
|
@@ -519,6 +553,13 @@ class ClusterPage {
|
|
|
519
553
|
if (activated) {
|
|
520
554
|
return;
|
|
521
555
|
}
|
|
556
|
+
// A failed cluster request leaves the page on "Oops ... something went
|
|
557
|
+
// wrong." (release run 44501084573), which re-clicking a tab never
|
|
558
|
+
// clears. Reload so the next attempt starts from a fresh fetch.
|
|
559
|
+
const oopsHeading = this.page.getByRole('heading', { name: /Oops/i });
|
|
560
|
+
if (attempt < maxAttempts && (await oopsHeading.isVisible())) {
|
|
561
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
562
|
+
}
|
|
522
563
|
}
|
|
523
564
|
// Still on Overview after re-clicking: fail loudly rather than proceeding
|
|
524
565
|
// to a secrets panel that never mounted -- this keeps a genuinely broken
|
|
@@ -252,17 +252,58 @@ class ClusterSecretsPage {
|
|
|
252
252
|
await this.createButton.click({ timeout: 30000 });
|
|
253
253
|
}
|
|
254
254
|
async createNewSecret(key, value, cluster) {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
255
|
+
// The verification loop below only re-reads the list, so a create POST
|
|
256
|
+
// that never reached the backend can never pass it. Release run
|
|
257
|
+
// 44501084573 (DUP-05) had exactly that: Console's rate limiter rejected
|
|
258
|
+
// POST .../connectorSecrets (a 429 without CORS headers, so
|
|
259
|
+
// net::ERR_FAILED) and the panel stayed on its empty state for every
|
|
260
|
+
// attempt. Re-submit when the POST got no response or a 429/5xx; a 409
|
|
261
|
+
// (already exists) counts as created, as the comment below describes.
|
|
262
|
+
const maxSubmits = 3;
|
|
263
|
+
for (let submit = 1; submit <= maxSubmits; submit++) {
|
|
264
|
+
await this.clickCreateNewSecretButton(cluster);
|
|
265
|
+
await this.clickKeyInput();
|
|
266
|
+
await this.fillKeyInput(key);
|
|
267
|
+
await (0, sleep_1.sleep)(1000);
|
|
268
|
+
await this.clickValueInput();
|
|
269
|
+
await this.fillValueInput(value);
|
|
270
|
+
await (0, sleep_1.sleep)(1000);
|
|
271
|
+
const createRequest = this.page.waitForRequest((request) => request.method() === 'POST' &&
|
|
272
|
+
/\/connectorSecrets$/.test(new URL(request.url()).pathname), { timeout: 30000 });
|
|
273
|
+
// Mark the rejection handled now: it can time out while the click and
|
|
274
|
+
// the 60s "Creating..." wait below are still running. The await in the
|
|
275
|
+
// try block further down still receives the rejection.
|
|
276
|
+
createRequest.catch(() => undefined);
|
|
277
|
+
await this.clickCreateButton();
|
|
278
|
+
await (0, test_1.expect)(this.page.getByText('Creating...')).not.toBeVisible({
|
|
279
|
+
timeout: 60000,
|
|
280
|
+
});
|
|
281
|
+
let rejected = false;
|
|
282
|
+
try {
|
|
283
|
+
const response = await (await createRequest).response();
|
|
284
|
+
rejected =
|
|
285
|
+
response === null ||
|
|
286
|
+
response.status() === 429 ||
|
|
287
|
+
response.status() >= 500;
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
// POST not observed (e.g. a different create route): keep the
|
|
291
|
+
// previous behaviour and let the list check below decide.
|
|
292
|
+
console.warn(`createNewSecret: create POST not observed. ${error}`);
|
|
293
|
+
}
|
|
294
|
+
if (!rejected) {
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
if (submit === maxSubmits) {
|
|
298
|
+
throw new Error(`createNewSecret: POST for "${key}" was rejected on all ${maxSubmits} submits (rate limited or server error).`);
|
|
299
|
+
}
|
|
300
|
+
console.warn(`createNewSecret: POST for "${key}" was rejected (submit ${submit}/${maxSubmits}); reloading and re-submitting.`);
|
|
301
|
+
// Stay on the current cluster: the reload lands on its Overview tab,
|
|
302
|
+
// so open the secrets tab directly instead of going through the
|
|
303
|
+
// clusters list, whose GET can be rate limited the same way.
|
|
304
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
305
|
+
await this.clusterSecretTab.click({ timeout: 30000 });
|
|
306
|
+
}
|
|
266
307
|
const secretRow = this.page.getByRole('row', {
|
|
267
308
|
name: new RegExp(`^${key}\\b`, 'i'),
|
|
268
309
|
});
|
|
@@ -35,6 +35,12 @@ _8_10_1.test.describe('Hub to connectors runtime CORS @tasklistV2', () => {
|
|
|
35
35
|
// A CORS-blocked request fires `requestfailed` and no `response`, so
|
|
36
36
|
// listen for both to report the block instead of a bare wait timeout.
|
|
37
37
|
let outcome;
|
|
38
|
+
let inboundRequested = false;
|
|
39
|
+
page.on('request', (req) => {
|
|
40
|
+
if (INBOUND_INSTANCES.test(req.url())) {
|
|
41
|
+
inboundRequested = true;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
38
44
|
page.on('response', (res) => {
|
|
39
45
|
if (INBOUND_INSTANCES.test(res.url())) {
|
|
40
46
|
outcome = { url: res.url(), status: res.status() };
|
|
@@ -48,13 +54,28 @@ _8_10_1.test.describe('Hub to connectors runtime CORS @tasklistV2', () => {
|
|
|
48
54
|
};
|
|
49
55
|
}
|
|
50
56
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
// Hub only issues inbound-instances once it has the cluster's
|
|
58
|
+
// connectors URL from Console. When Console's rate limiter rejects that
|
|
59
|
+
// lookup (a 429 without CORS headers), the page renders "Connectors URL
|
|
60
|
+
// not available" and never retries (release run 44501084573), so
|
|
61
|
+
// re-open the page instead of waiting on a request that cannot come.
|
|
62
|
+
// Any inbound-instances outcome, success or failure, ends the loop and
|
|
63
|
+
// is asserted below unchanged.
|
|
64
|
+
const managementUrl = `${hubOrigin}/org/${orgId}/cluster/${clusterUuid}/connectors/management`;
|
|
65
|
+
await (0, test_1.expect)(async () => {
|
|
66
|
+
// Only re-open while Hub has not issued the request at all: an
|
|
67
|
+
// in-flight one would be aborted by the navigation and reported as a
|
|
68
|
+
// false failure.
|
|
69
|
+
if (!inboundRequested) {
|
|
70
|
+
await page.goto(managementUrl);
|
|
71
|
+
}
|
|
72
|
+
await test_1.expect
|
|
73
|
+
.poll(() => outcome, {
|
|
74
|
+
message: 'inbound-instances request must complete or fail',
|
|
75
|
+
timeout: 60000,
|
|
76
|
+
})
|
|
77
|
+
.toBeDefined();
|
|
78
|
+
}).toPass({ intervals: [10000], timeout: 220000 });
|
|
58
79
|
inboundInstancesUrl = outcome.url;
|
|
59
80
|
(0, test_1.expect)(outcome.failure, `GET ${inboundInstancesUrl} failed (likely blocked by CORS)`).toBeUndefined();
|
|
60
81
|
(0, test_1.expect)(outcome.status, `GET ${inboundInstancesUrl} must succeed`).toBeLessThan(300);
|
|
@@ -78,6 +99,13 @@ _8_10_1.test.describe('Hub to connectors runtime CORS @tasklistV2', () => {
|
|
|
78
99
|
(0, test_1.expect)(listTokens(headers['access-control-allow-headers'])).toContain('authorization');
|
|
79
100
|
});
|
|
80
101
|
// Checked last: the console error can arrive after the network event.
|
|
81
|
-
|
|
102
|
+
// Scoped to the connectors runtime origin this test is about. Console's
|
|
103
|
+
// own endpoints (e.g. console.cloud.../external/events) also report as
|
|
104
|
+
// "blocked by CORS" whenever its rate limiter answers with a 429 that
|
|
105
|
+
// lacks CORS headers (release run 44501084573), which says nothing about
|
|
106
|
+
// whether the runtime allows the Hub origin.
|
|
107
|
+
const runtimeOrigin = new URL(inboundInstancesUrl).origin;
|
|
108
|
+
(0, test_1.expect)(corsConsoleErrors.filter((text) => text.includes(` at '${runtimeOrigin}`) ||
|
|
109
|
+
text.includes(`(redirected from '${runtimeOrigin}`))).toEqual([]);
|
|
82
110
|
});
|
|
83
111
|
});
|