@camunda/e2e-test-suite 0.0.1710 → 0.0.1712
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.
- package/dist/pages/8.10/ClusterDetailsPage.js +8 -1
- package/dist/pages/8.10/ClusterSecretsPage.js +10 -1
- package/dist/tests/c8Run-8.10/mcp-user-flows.spec.js +4 -1
- package/dist/tests/c8Run-8.11/mcp-user-flows.spec.js +4 -1
- package/dist/tests/c8Run-8.9/mcp-user-flows.spec.js +4 -1
- package/dist/utils/consoleApiHelpers.d.ts +2 -0
- package/dist/utils/consoleApiHelpers.js +36 -1
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ const jobSummary_1 = require("../../utils/jobSummary");
|
|
|
7
7
|
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
8
8
|
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
9
9
|
const ClientCredentialsDetailsPage_1 = require("./ClientCredentialsDetailsPage");
|
|
10
|
+
const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
|
|
10
11
|
const sessionRecovery_1 = require("../../utils/sessionRecovery");
|
|
11
12
|
// Hub's own /login and /login-callback routes, which render only a spinner
|
|
12
13
|
// while the Auth0 hand-off of a full page load is in flight.
|
|
@@ -747,13 +748,19 @@ class ClusterDetailsPage {
|
|
|
747
748
|
for (const component of components) {
|
|
748
749
|
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.page.getByText(`${component}Healthy`, { exact: true }), {
|
|
749
750
|
visibilityTimeout: 60000,
|
|
750
|
-
|
|
751
|
+
// Raised from 400s: attempts may now wait out the rate limiter
|
|
752
|
+
// (waitForRateLimitToClear) before reloading.
|
|
753
|
+
totalTimeout: 600000,
|
|
751
754
|
maxRetries: 7,
|
|
752
755
|
preAction: async () => {
|
|
753
756
|
if (recoverSession && this.isSessionLost()) {
|
|
754
757
|
await recoverSession();
|
|
755
758
|
return;
|
|
756
759
|
}
|
|
760
|
+
// A reload is a full Hub load plus Auth0 round-trip. Fired into
|
|
761
|
+
// an exhausted Envoy rate limit it renders "fetch error" again or
|
|
762
|
+
// gets the session logged out, so let the limiter drain first.
|
|
763
|
+
await (0, consoleApiHelpers_1.waitForRateLimitToClear)(this.page);
|
|
757
764
|
await this.page.reload();
|
|
758
765
|
},
|
|
759
766
|
});
|
|
@@ -4,6 +4,7 @@ exports.ClusterSecretsPage = void 0;
|
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
6
|
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
7
|
+
const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
|
|
7
8
|
const sessionRecovery_1 = require("../../utils/sessionRecovery");
|
|
8
9
|
class ClusterSecretsPage {
|
|
9
10
|
page;
|
|
@@ -448,7 +449,15 @@ class ClusterSecretsPage {
|
|
|
448
449
|
// screenshot still showed Overview), so re-click until the panel renders.
|
|
449
450
|
// Re-clicking the already selected tab does not refetch a failed secrets
|
|
450
451
|
// list, so use the error card's own Reload button for that case.
|
|
452
|
+
// A reload into Hub's Envoy rate limit leaves the bare
|
|
453
|
+
// "local_rate_limited" body with no tab to click, so re-clicking alone
|
|
454
|
+
// can never recover (release 8.10+gen9 run 44518810855 spun on it for the
|
|
455
|
+
// full budget). Wait for the limiter to drain, then re-open the cluster.
|
|
451
456
|
await (0, test_1.expect)(async () => {
|
|
457
|
+
if (await (0, consoleApiHelpers_1.isRateLimitedPage)(this.page)) {
|
|
458
|
+
await (0, consoleApiHelpers_1.waitForRateLimitToClear)(this.page, clusterUrl);
|
|
459
|
+
await this.page.goto(clusterUrl, { waitUntil: 'domcontentloaded' });
|
|
460
|
+
}
|
|
452
461
|
await this.restoreClusterPageIfSignedOut(clusterUrl);
|
|
453
462
|
if (await this.secretsFetchErrorReloadButton.isVisible()) {
|
|
454
463
|
await this.secretsFetchErrorReloadButton.click({ timeout: 15000 });
|
|
@@ -457,7 +466,7 @@ class ClusterSecretsPage {
|
|
|
457
466
|
await this.clusterSecretTab.first().click({ timeout: 15000 });
|
|
458
467
|
}
|
|
459
468
|
await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({ timeout: 10000 });
|
|
460
|
-
}).toPass({ timeout:
|
|
469
|
+
}).toPass({ timeout: 360000 });
|
|
461
470
|
}
|
|
462
471
|
// A reload is a full Hub navigation through Auth0 and /login-callback. When
|
|
463
472
|
// Hub's session hand-off fails it calls Auth0 logout, which parks the tab on
|
|
@@ -72,7 +72,10 @@ c8Run_8_10_1.test.describe('@tasklistV2 MCP Client connector tests', () => {
|
|
|
72
72
|
await operateProcessInstancePage.verifyVariableJsonContent('listResourcesTemplateResult', (value) => {
|
|
73
73
|
const data = value;
|
|
74
74
|
(0, test_1.expect)(data.resourceTemplates).toBeDefined();
|
|
75
|
-
|
|
75
|
+
const echoMetaTemplate = data.resourceTemplates.find((template) => template.uriTemplate === 'echo-meta://{name}');
|
|
76
|
+
(0, test_1.expect)(echoMetaTemplate).toBeDefined();
|
|
77
|
+
(0, test_1.expect)(echoMetaTemplate?.name).toBe('echo-meta');
|
|
78
|
+
(0, test_1.expect)(echoMetaTemplate?.mimeType).toBe('application/json');
|
|
76
79
|
});
|
|
77
80
|
});
|
|
78
81
|
await c8Run_8_10_1.test.step('Verify readResourceResult variable from jokes-guide.md', async () => {
|
|
@@ -72,7 +72,10 @@ c8Run_8_11_1.test.describe('@tasklistV2 MCP Client connector tests', () => {
|
|
|
72
72
|
await operateProcessInstancePage.verifyVariableJsonContent('listResourcesTemplateResult', (value) => {
|
|
73
73
|
const data = value;
|
|
74
74
|
(0, test_1.expect)(data.resourceTemplates).toBeDefined();
|
|
75
|
-
|
|
75
|
+
const echoMetaTemplate = data.resourceTemplates.find((template) => template.uriTemplate === 'echo-meta://{name}');
|
|
76
|
+
(0, test_1.expect)(echoMetaTemplate).toBeDefined();
|
|
77
|
+
(0, test_1.expect)(echoMetaTemplate?.name).toBe('echo-meta');
|
|
78
|
+
(0, test_1.expect)(echoMetaTemplate?.mimeType).toBe('application/json');
|
|
76
79
|
});
|
|
77
80
|
});
|
|
78
81
|
await c8Run_8_11_1.test.step('Verify readResourceResult variable from jokes-guide.md', async () => {
|
|
@@ -75,7 +75,10 @@ c8Run_8_9_1.test.describe('@tasklistV2 MCP Client connector tests', () => {
|
|
|
75
75
|
await operateProcessInstancePage.verifyVariableJsonContent('listResourcesTemplateResult', (value) => {
|
|
76
76
|
const data = value;
|
|
77
77
|
(0, test_1.expect)(data.resourceTemplates).toBeDefined();
|
|
78
|
-
|
|
78
|
+
const echoMetaTemplate = data.resourceTemplates.find((template) => template.uriTemplate === 'echo-meta://{name}');
|
|
79
|
+
(0, test_1.expect)(echoMetaTemplate).toBeDefined();
|
|
80
|
+
(0, test_1.expect)(echoMetaTemplate?.name).toBe('echo-meta');
|
|
81
|
+
(0, test_1.expect)(echoMetaTemplate?.mimeType).toBe('application/json');
|
|
79
82
|
});
|
|
80
83
|
});
|
|
81
84
|
await c8Run_8_9_1.test.step('Verify readResourceResult variable from jokes-guide.md', async () => {
|
|
@@ -2,6 +2,8 @@ import { Page } from '@playwright/test';
|
|
|
2
2
|
export declare function getOrgId(): string;
|
|
3
3
|
export declare function observeBearerTokens(page: Page): void;
|
|
4
4
|
export declare function resetHubBearerToken(page: Page): void;
|
|
5
|
+
export declare function isRateLimitedPage(page: Page): Promise<boolean>;
|
|
6
|
+
export declare function waitForRateLimitToClear(page: Page, hubUrl?: string, timeoutMs?: number): Promise<void>;
|
|
5
7
|
export declare function getClusterUuidByName(page: Page, clusterName: string): Promise<string>;
|
|
6
8
|
export declare function deleteClusterViaApi(page: Page, clusterName: string): Promise<void>;
|
|
7
9
|
export declare function createClusterViaApi(page: Page, clusterName: string, region?: string, tasklistV2Enabled?: boolean): Promise<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteOwnHubWorkspacesViaApi = exports.ensureClusterLinkedToSharedWorkspace = exports.linkClusterToWorkspacesNamedViaApi = exports.linkClusterToSharedWorkspaceViaApi = exports.getHubWorkspaceId = exports.rememberHubWorkspaceId = exports.linkClusterToWorkspaceViaApi = exports.waitForAiFeaturesEnabledViaApi = exports.areAiFeaturesEnabledViaApi = exports.waitForClusterRestartHealthyViaApi = exports.waitForClusterHealthyViaApi = exports.ensureClientAuditLoggingViaApi = exports.ensureTasklistV2Enabled = exports.ensureClusterViaApi = exports.createClusterViaApi = exports.deleteClusterViaApi = exports.getClusterUuidByName = exports.resetHubBearerToken = exports.observeBearerTokens = exports.getOrgId = void 0;
|
|
3
|
+
exports.deleteOwnHubWorkspacesViaApi = exports.ensureClusterLinkedToSharedWorkspace = exports.linkClusterToWorkspacesNamedViaApi = exports.linkClusterToSharedWorkspaceViaApi = exports.getHubWorkspaceId = exports.rememberHubWorkspaceId = exports.linkClusterToWorkspaceViaApi = exports.waitForAiFeaturesEnabledViaApi = exports.areAiFeaturesEnabledViaApi = exports.waitForClusterRestartHealthyViaApi = exports.waitForClusterHealthyViaApi = exports.ensureClientAuditLoggingViaApi = exports.ensureTasklistV2Enabled = exports.ensureClusterViaApi = exports.createClusterViaApi = exports.deleteClusterViaApi = exports.getClusterUuidByName = exports.waitForRateLimitToClear = exports.isRateLimitedPage = exports.resetHubBearerToken = exports.observeBearerTokens = exports.getOrgId = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("./sleep");
|
|
6
6
|
const jobSummary_1 = require("./jobSummary");
|
|
@@ -211,6 +211,41 @@ async function clusterApiRequest(page, method, url, data) {
|
|
|
211
211
|
}
|
|
212
212
|
return response;
|
|
213
213
|
}
|
|
214
|
+
// The same Envoy local rate limit also rejects the *browser's* requests, and a
|
|
215
|
+
// Hub page load is a burst of 100-300 of them plus a full Auth0 round-trip. In
|
|
216
|
+
// the browser a 429 from console.cloud.* shows up as a failed fetch (the
|
|
217
|
+
// limiter's reply carries no CORS headers), so the cluster page renders "fetch
|
|
218
|
+
// error" instead of component statuses. A 429 on a Hub document leaves the bare
|
|
219
|
+
// text "local_rate_limited" with no app shell to click or reload into. Reloading
|
|
220
|
+
// straight back into a drained bucket only repeats the burst. Release
|
|
221
|
+
// 8.10+gen9 (run 44518810855) spent its whole health/secrets retry budget that
|
|
222
|
+
// way. So before re-navigating, wait until the limiter admits a single cheap
|
|
223
|
+
// request again.
|
|
224
|
+
const RATE_LIMIT_PROBE_INTERVALS = [5000, 10000, 20000, 30000];
|
|
225
|
+
async function isRateLimitedPage(page) {
|
|
226
|
+
return page
|
|
227
|
+
.getByText('local_rate_limited', { exact: true })
|
|
228
|
+
.isVisible()
|
|
229
|
+
.catch(() => false);
|
|
230
|
+
}
|
|
231
|
+
exports.isRateLimitedPage = isRateLimitedPage;
|
|
232
|
+
async function waitForRateLimitToClear(page, hubUrl = page.url(), timeoutMs = 120000) {
|
|
233
|
+
const consoleUrl = `${getConsoleBaseUrl()}/api/orgs/${getOrgId()}/clusters`;
|
|
234
|
+
await (0, test_1.expect)(async () => {
|
|
235
|
+
const hub = await page.request.get(hubUrl, {
|
|
236
|
+
maxRedirects: 0,
|
|
237
|
+
timeout: API_READ_TIMEOUT_MS,
|
|
238
|
+
});
|
|
239
|
+
(0, test_1.expect)(hub.status(), `GET ${hubUrl} is rate-limited`).not.toBe(429);
|
|
240
|
+
const token = await getUserToken(page);
|
|
241
|
+
const api = await page.request.get(consoleUrl, {
|
|
242
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
243
|
+
timeout: API_READ_TIMEOUT_MS,
|
|
244
|
+
});
|
|
245
|
+
(0, test_1.expect)(api.status(), `GET ${consoleUrl} is rate-limited`).not.toBe(429);
|
|
246
|
+
}).toPass({ timeout: timeoutMs, intervals: RATE_LIMIT_PROBE_INTERVALS });
|
|
247
|
+
}
|
|
248
|
+
exports.waitForRateLimitToClear = waitForRateLimitToClear;
|
|
214
249
|
async function findClusterByName(page, clusterName) {
|
|
215
250
|
const orgId = getOrgId();
|
|
216
251
|
const response = await clusterApiRequest(page, 'GET', `${getConsoleBaseUrl()}/api/orgs/${orgId}/clusters`);
|