@camunda/e2e-test-suite 0.0.1020 → 0.0.1021
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/SM-8.10/ManagementIdentityPage.d.ts +1 -1
- package/dist/pages/SM-8.10/ManagementIdentityPage.js +20 -10
- package/dist/pages/SM-8.10/NavigationPage.js +8 -4
- package/dist/pages/SM-8.10/UtilitiesPage.js +1 -1
- package/dist/pages/SM-8.9/NavigationPage.js +9 -5
- package/dist/tests/SM-8.10/identity-user-flows.spec.js +6 -1
- package/dist/tests/SM-8.9/connectors-user-flows.spec.js +22 -2
- package/dist/utils/apiHelpers.js +1 -1
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ declare class ManagementIdentityPage {
|
|
|
27
27
|
clickUser(username: string): Promise<void>;
|
|
28
28
|
clickAssignedRolesTab(): Promise<void>;
|
|
29
29
|
clickDemoUser(): Promise<void>;
|
|
30
|
-
clickDeleteAccessButton(accessToDelete: string): Promise<void>;
|
|
30
|
+
clickDeleteAccessButton(accessToDelete: string | string[]): Promise<void>;
|
|
31
31
|
clickConfirmDeleteButton(): Promise<void>;
|
|
32
32
|
clickAssignRolesButton(): Promise<void>;
|
|
33
33
|
clickAddButton(): Promise<void>;
|
|
@@ -46,9 +46,16 @@ class ManagementIdentityPage {
|
|
|
46
46
|
this.optimizeCheckbox = page
|
|
47
47
|
.locator('label')
|
|
48
48
|
.filter({ hasText: 'Optimize (Grants full access to Optimize)' });
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
// Mid-rename: camunda/identity#4541 moves these role descriptions from Web
|
|
50
|
+
// Modeler to Hub, and the role names follow only later. Depending on which
|
|
51
|
+
// Identity image the deployed chart carries, the same checkbox renders as
|
|
52
|
+
// "Web Modeler (Grants full access to Web Modeler)", the half-renamed
|
|
53
|
+
// "Web Modeler (Grants full access to Hub)", or "Hub (Grants full access to
|
|
54
|
+
// Hub)". Match all three so the suite stays green on either side of the
|
|
55
|
+
// rollout. The " (" after the name keeps this off the Admin row.
|
|
56
|
+
this.modelerCheckbox = page.locator('label').filter({
|
|
57
|
+
hasText: /(Web Modeler|Hub) \(Grants full access to (Web Modeler|Hub)\)/,
|
|
58
|
+
});
|
|
52
59
|
this.identityCheckbox = page.locator('label').filter({
|
|
53
60
|
hasText: 'ManagementIdentity (Provides full access to Management Identity)',
|
|
54
61
|
});
|
|
@@ -60,8 +67,9 @@ class ManagementIdentityPage {
|
|
|
60
67
|
this.licenseKeyTagNonCommercial = page.getByText('Non-commercial license');
|
|
61
68
|
this.licenseKeyTagProduction = page.getByText('Production license').first();
|
|
62
69
|
this.licenseKeyTagCommercial = page.getByText('Commercial license');
|
|
70
|
+
// Same Web Modeler → Hub rename straddle as `modelerCheckbox` above.
|
|
63
71
|
this.modelerAdminCheckbox = page.locator('label').filter({
|
|
64
|
-
hasText:
|
|
72
|
+
hasText: /(Web Modeler|Hub) Admin \(Grants elevated access to (Web Modeler|Hub)\)/,
|
|
65
73
|
});
|
|
66
74
|
this.openSidebarButton = page.getByLabel('Open User Sidebar');
|
|
67
75
|
this.logoutButton = page.getByRole('button', { name: 'Log out' });
|
|
@@ -100,9 +108,9 @@ class ManagementIdentityPage {
|
|
|
100
108
|
// and it does not re-render on its own. Rebuild it from a fresh response
|
|
101
109
|
// between attempts before reporting the role as missing.
|
|
102
110
|
async clickDeleteAccessButton(accessToDelete) {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
111
|
+
const candidates = typeof accessToDelete === 'string' ? [accessToDelete] : accessToDelete;
|
|
112
|
+
const rowSelector = candidates.map((c) => `:text("${c}")`).join(', ');
|
|
113
|
+
const roleRow = this.page.locator(rowSelector).first();
|
|
106
114
|
for (let attempt = 1; attempt <= 2; attempt++) {
|
|
107
115
|
const rowVisible = await roleRow
|
|
108
116
|
.waitFor({ state: 'visible', timeout: 30000 })
|
|
@@ -114,10 +122,12 @@ class ManagementIdentityPage {
|
|
|
114
122
|
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
115
123
|
await this.clickAssignedRolesTab();
|
|
116
124
|
}
|
|
117
|
-
await (0, test_1.expect)(roleRow, `No assigned role matching
|
|
118
|
-
|
|
125
|
+
await (0, test_1.expect)(roleRow, `No assigned role matching ${candidates
|
|
126
|
+
.map((c) => `"${c}"`)
|
|
127
|
+
.join(' or ')} was found. The role may already be removed, or its ` +
|
|
128
|
+
`label may have changed in this version.`).toBeVisible({ timeout: 60000 });
|
|
119
129
|
await this.page
|
|
120
|
-
.locator(
|
|
130
|
+
.locator(candidates.map((c) => `td:right-of(:text("${c}"))`).join(', '))
|
|
121
131
|
.first()
|
|
122
132
|
.click({ timeout: 60000 });
|
|
123
133
|
}
|
|
@@ -6,13 +6,17 @@ const LoginPage_1 = require("./LoginPage");
|
|
|
6
6
|
const sleep_1 = require("../../utils/sleep");
|
|
7
7
|
const constants_1 = require("../../utils/constants");
|
|
8
8
|
const env_1 = require("../../utils/env");
|
|
9
|
-
|
|
9
|
+
// Context paths use `||`, not `??`: an env var set to the empty string must fall back to the
|
|
10
|
+
// default. CI wiring that always exports a variable (set to "" when the leg has no override)
|
|
11
|
+
// otherwise defeats the default — `page.goto('')` resolves to Playwright's baseURL, so the app
|
|
12
|
+
// under test is never reached and the failure surfaces as an unrelated navigation timeout.
|
|
13
|
+
const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
|
|
10
14
|
const NORMALIZED_ORCHESTRATION_CONTEXT_PATH = ORCHESTRATION_CONTEXT_PATH.startsWith('/')
|
|
11
15
|
? ORCHESTRATION_CONTEXT_PATH
|
|
12
16
|
: `/${ORCHESTRATION_CONTEXT_PATH}`;
|
|
13
|
-
const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH
|
|
14
|
-
const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH
|
|
15
|
-
const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH
|
|
17
|
+
const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH || '/modeler';
|
|
18
|
+
const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH || '/optimize';
|
|
19
|
+
const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH || '/identity';
|
|
16
20
|
const IDENTITY_FIRSTUSER_USERNAME = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME || 'demo';
|
|
17
21
|
const IDENTITY_FIRSTUSER_PASSWORD = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD || 'demo';
|
|
18
22
|
class NavigationPage {
|
|
@@ -142,7 +142,7 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
|
|
|
142
142
|
// be re-opened once the blip clears. Progressive backoff gives the
|
|
143
143
|
// backend time to recover between attempts.
|
|
144
144
|
await (0, sleep_1.sleep)(2000 * (attempt + 1));
|
|
145
|
-
const orchestrationContextPath = process.env.ORCHESTRATION_CONTEXT_PATH
|
|
145
|
+
const orchestrationContextPath = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
|
|
146
146
|
const normalizedOrchestrationPath = orchestrationContextPath.startsWith('/')
|
|
147
147
|
? orchestrationContextPath
|
|
148
148
|
: `/${orchestrationContextPath}`;
|
|
@@ -5,14 +5,18 @@ const test_1 = require("@playwright/test");
|
|
|
5
5
|
const LoginPage_1 = require("./LoginPage");
|
|
6
6
|
const sleep_1 = require("../../utils/sleep");
|
|
7
7
|
const constants_1 = require("../../utils/constants");
|
|
8
|
-
|
|
8
|
+
// Context paths use `||`, not `??`: an env var set to the empty string must fall back to the
|
|
9
|
+
// default. CI wiring that always exports a variable (set to "" when the leg has no override)
|
|
10
|
+
// otherwise defeats the default — `page.goto('')` resolves to Playwright's baseURL, so the app
|
|
11
|
+
// under test is never reached and the failure surfaces as an unrelated navigation timeout.
|
|
12
|
+
const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
|
|
9
13
|
const NORMALIZED_ORCHESTRATION_CONTEXT_PATH = ORCHESTRATION_CONTEXT_PATH.startsWith('/')
|
|
10
14
|
? ORCHESTRATION_CONTEXT_PATH
|
|
11
15
|
: `/${ORCHESTRATION_CONTEXT_PATH}`;
|
|
12
|
-
const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH
|
|
13
|
-
const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH
|
|
14
|
-
const CONSOLE_CONTEXT_PATH = process.env.CONSOLE_CONTEXT_PATH
|
|
15
|
-
const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH
|
|
16
|
+
const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH || '/modeler';
|
|
17
|
+
const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH || '/optimize';
|
|
18
|
+
const CONSOLE_CONTEXT_PATH = process.env.CONSOLE_CONTEXT_PATH || '/console';
|
|
19
|
+
const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH || '/identity';
|
|
16
20
|
const IDENTITY_FIRSTUSER_USERNAME = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME || 'demo';
|
|
17
21
|
const IDENTITY_FIRSTUSER_PASSWORD = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD || 'demo';
|
|
18
22
|
// Navigation errors raised by Chromium's network stack rather than by the app:
|
|
@@ -53,7 +53,12 @@ SM_8_10_1.test.describe('Identity User Flow Tests', () => {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
await SM_8_10_1.test.step('Remove Access from Hub', async () => {
|
|
56
|
-
|
|
56
|
+
// Either wording, for the same Web Modeler → Hub rename straddle the
|
|
57
|
+
// `modelerCheckbox` locator documents.
|
|
58
|
+
await managementIdentityPage.clickDeleteAccessButton([
|
|
59
|
+
'Grants full access to Hub',
|
|
60
|
+
'Grants full access to Web Modeler',
|
|
61
|
+
]);
|
|
57
62
|
await managementIdentityPage.clickConfirmDeleteButton();
|
|
58
63
|
});
|
|
59
64
|
await SM_8_10_1.test.step('Reset Session', async () => {
|
|
@@ -117,8 +117,28 @@ SM_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
117
117
|
await SM_8_9_1.test.step('Make Authorization Request', async () => {
|
|
118
118
|
const baseURL = process.env.PLAYWRIGHT_BASE_URL ||
|
|
119
119
|
`http://gke-${process.env.BASE_URL}.ci.distro.ultrawombat.com`;
|
|
120
|
-
const
|
|
121
|
-
|
|
120
|
+
const url = `${baseURL}/connectors/inbound/test-webhook-id${randomString}`;
|
|
121
|
+
// Deploying the process does not mean the gateway is already serving the
|
|
122
|
+
// inbound endpoint, so the first POST can land on a not-yet-registered
|
|
123
|
+
// webhook and come back 5xx with nothing actually wrong. The sibling
|
|
124
|
+
// Intermediate Event step below polls for the same reason.
|
|
125
|
+
//
|
|
126
|
+
// Retry ONLY on 5xx. A 5xx means the request was not processed, so
|
|
127
|
+
// re-posting cannot double-trigger the process; a 2xx or 4xx is a real
|
|
128
|
+
// answer about a live endpoint and must be asserted as-is rather than
|
|
129
|
+
// retried until it changes.
|
|
130
|
+
let response = await request.post(url);
|
|
131
|
+
const deadline = Date.now() + 180000;
|
|
132
|
+
let attempt = 0;
|
|
133
|
+
while (response.status() >= 500 && Date.now() < deadline) {
|
|
134
|
+
attempt++;
|
|
135
|
+
console.error(`Webhook readiness attempt ${attempt}: ${url} -> ${response.status()}`);
|
|
136
|
+
await (0, sleep_1.sleep)(10000);
|
|
137
|
+
response = await request.post(url);
|
|
138
|
+
}
|
|
139
|
+
// Not awaited: expect() on a plain value is synchronous, so an `await`
|
|
140
|
+
// here would read as a retrying assertion while doing nothing.
|
|
141
|
+
(0, test_1.expect)(response.status()).toBe(200);
|
|
122
142
|
});
|
|
123
143
|
await SM_8_9_1.test.step('Assert Diagram Has Successfully Completed in Operate', async () => {
|
|
124
144
|
await navigationPage.goToOperate();
|
package/dist/utils/apiHelpers.js
CHANGED
|
@@ -190,7 +190,7 @@ function buildZeebeApiUrl(resourcePath, environmentOverride, clusterType) {
|
|
|
190
190
|
const normalizedPath = resourcePath.startsWith('/')
|
|
191
191
|
? resourcePath
|
|
192
192
|
: `/${resourcePath}`;
|
|
193
|
-
const contextPath = process.env.ORCHESTRATION_CONTEXT_PATH
|
|
193
|
+
const contextPath = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
|
|
194
194
|
const pathWithPrefix = environment === 'sm' ? `${contextPath}${normalizedPath}` : normalizedPath;
|
|
195
195
|
return `${baseUrl}${pathWithPrefix}`;
|
|
196
196
|
}
|