@camunda/e2e-test-suite 0.0.1684 → 0.0.1685
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 +25 -1
- package/dist/pages/8.11/ClusterDetailsPage.js +25 -1
- package/dist/tests/8.10/saas-migration-path-user-flows.spec.js +4 -0
- package/dist/tests/8.11/saas-migration-path-user-flows.spec.js +4 -0
- package/dist/utils/consoleApiHelpers.js +5 -0
- package/dist/utils/jobSummary.d.ts +2 -0
- package/dist/utils/jobSummary.js +26 -0
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ClusterDetailsPage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
|
+
const jobSummary_1 = require("../../utils/jobSummary");
|
|
6
7
|
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
7
8
|
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
8
9
|
const ClientCredentialsDetailsPage_1 = require("./ClientCredentialsDetailsPage");
|
|
@@ -996,14 +997,34 @@ class ClusterDetailsPage {
|
|
|
996
997
|
.waitFor({ state: 'visible', timeout: 10000 })
|
|
997
998
|
.then(() => true)
|
|
998
999
|
.catch(() => false);
|
|
1000
|
+
const version = targetVersion ?? process.env.CLUSTER_VERSION;
|
|
999
1001
|
if (hasTargetVersionStep) {
|
|
1000
|
-
const
|
|
1002
|
+
const offered = await this.selectTargetVersionDialog
|
|
1003
|
+
.locator('label')
|
|
1004
|
+
.allInnerTexts();
|
|
1005
|
+
console.log(`Upgrade target options offered: ${offered.map(oneLine).join(' | ')}`);
|
|
1001
1006
|
if (version) {
|
|
1002
1007
|
await this.targetVersionOption(version).click({ timeout: 30000 });
|
|
1003
1008
|
}
|
|
1009
|
+
const selected = await this.selectTargetVersionDialog
|
|
1010
|
+
.locator('label:has(input:checked)')
|
|
1011
|
+
.allInnerTexts();
|
|
1012
|
+
const selectedText = selected.map(oneLine).join(' | ') || '(none)';
|
|
1013
|
+
console.log(`Upgrade target requested: "${version ?? '(none)'}", selected: ` +
|
|
1014
|
+
`"${selectedText}"`);
|
|
1015
|
+
(0, jobSummary_1.appendJobSummary)(`- **Target generation selected:** ${selectedText} (requested ` +
|
|
1016
|
+
`"${version ?? '(none)'}")`);
|
|
1004
1017
|
await this.nextButton.click({ timeout: 60000 });
|
|
1005
1018
|
}
|
|
1019
|
+
else {
|
|
1020
|
+
console.log(`No "Select target version" step: Console's single offered update is ` +
|
|
1021
|
+
`used (requested "${version ?? '(none)'}" is not applied)`);
|
|
1022
|
+
(0, jobSummary_1.appendJobSummary)(`- **Target generation selected:** Console's single offered update ` +
|
|
1023
|
+
`(no "Select target version" step; requested ` +
|
|
1024
|
+
`"${version ?? '(none)'}" is not applied)`);
|
|
1025
|
+
}
|
|
1006
1026
|
await (0, test_1.expect)(this.updateAvailableDialog).toBeVisible({ timeout: 30000 });
|
|
1027
|
+
console.log(`Update dialog: ${oneLine(await this.updateAvailableDialog.innerText())}`);
|
|
1007
1028
|
await this.updateButton.click({ timeout: 60000 });
|
|
1008
1029
|
}
|
|
1009
1030
|
async checkMcpSupportToggle() {
|
|
@@ -1071,3 +1092,6 @@ class ClusterDetailsPage {
|
|
|
1071
1092
|
}
|
|
1072
1093
|
}
|
|
1073
1094
|
exports.ClusterDetailsPage = ClusterDetailsPage;
|
|
1095
|
+
function oneLine(text) {
|
|
1096
|
+
return text.replace(/\s+/g, ' ').trim();
|
|
1097
|
+
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ClusterDetailsPage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
|
+
const jobSummary_1 = require("../../utils/jobSummary");
|
|
6
7
|
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
7
8
|
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
8
9
|
const ClientCredentialsDetailsPage_1 = require("./ClientCredentialsDetailsPage");
|
|
@@ -942,14 +943,34 @@ class ClusterDetailsPage {
|
|
|
942
943
|
.waitFor({ state: 'visible', timeout: 10000 })
|
|
943
944
|
.then(() => true)
|
|
944
945
|
.catch(() => false);
|
|
946
|
+
const version = targetVersion ?? process.env.CLUSTER_VERSION;
|
|
945
947
|
if (hasTargetVersionStep) {
|
|
946
|
-
const
|
|
948
|
+
const offered = await this.selectTargetVersionDialog
|
|
949
|
+
.locator('label')
|
|
950
|
+
.allInnerTexts();
|
|
951
|
+
console.log(`Upgrade target options offered: ${offered.map(oneLine).join(' | ')}`);
|
|
947
952
|
if (version) {
|
|
948
953
|
await this.targetVersionOption(version).click({ timeout: 30000 });
|
|
949
954
|
}
|
|
955
|
+
const selected = await this.selectTargetVersionDialog
|
|
956
|
+
.locator('label:has(input:checked)')
|
|
957
|
+
.allInnerTexts();
|
|
958
|
+
const selectedText = selected.map(oneLine).join(' | ') || '(none)';
|
|
959
|
+
console.log(`Upgrade target requested: "${version ?? '(none)'}", selected: ` +
|
|
960
|
+
`"${selectedText}"`);
|
|
961
|
+
(0, jobSummary_1.appendJobSummary)(`- **Target generation selected:** ${selectedText} (requested ` +
|
|
962
|
+
`"${version ?? '(none)'}")`);
|
|
950
963
|
await this.nextButton.click({ timeout: 60000 });
|
|
951
964
|
}
|
|
965
|
+
else {
|
|
966
|
+
console.log(`No "Select target version" step: Console's single offered update is ` +
|
|
967
|
+
`used (requested "${version ?? '(none)'}" is not applied)`);
|
|
968
|
+
(0, jobSummary_1.appendJobSummary)(`- **Target generation selected:** Console's single offered update ` +
|
|
969
|
+
`(no "Select target version" step; requested ` +
|
|
970
|
+
`"${version ?? '(none)'}" is not applied)`);
|
|
971
|
+
}
|
|
952
972
|
await (0, test_1.expect)(this.updateAvailableDialog).toBeVisible({ timeout: 30000 });
|
|
973
|
+
console.log(`Update dialog: ${oneLine(await this.updateAvailableDialog.innerText())}`);
|
|
953
974
|
await this.updateButton.click({ timeout: 60000 });
|
|
954
975
|
}
|
|
955
976
|
async checkMcpSupportToggle() {
|
|
@@ -1017,3 +1038,6 @@ class ClusterDetailsPage {
|
|
|
1017
1038
|
}
|
|
1018
1039
|
}
|
|
1019
1040
|
exports.ClusterDetailsPage = ClusterDetailsPage;
|
|
1041
|
+
function oneLine(text) {
|
|
1042
|
+
return text.replace(/\s+/g, ' ').trim();
|
|
1043
|
+
}
|
|
@@ -55,6 +55,10 @@ _8_10_1.test.describe('SaaS Migration Path Tests', () => {
|
|
|
55
55
|
await (0, test_1.expect)(clusterPage.clusterVersion('Test Cluster', '8.10')).toBeVisible({ timeout: 15000 });
|
|
56
56
|
}).toPass({ timeout: 300000 });
|
|
57
57
|
await clusterPage.assertClusterHealthyStatusWithRetry('Test Cluster');
|
|
58
|
+
const upgradedRow = await clusterPage
|
|
59
|
+
.clusterRow('Test Cluster')
|
|
60
|
+
.innerText();
|
|
61
|
+
console.log(`Cluster after upgrade: ${upgradedRow.replace(/\s+/g, ' ').trim()}`);
|
|
58
62
|
});
|
|
59
63
|
});
|
|
60
64
|
(0, _8_10_1.test)('Basic Navigation After SaaS Upgrade', async ({ homePage, appsPage, modelerHomePage, operateHomePage, optimizeHomePage, taskPanelPage, ocIdentityHomePage, }) => {
|
|
@@ -47,6 +47,10 @@ _8_11_1.test.describe('SaaS Migration Path Tests', () => {
|
|
|
47
47
|
await homePage.clickClusters();
|
|
48
48
|
await clusterPage.assertClusterHealthyStatusWithRetry('Test Cluster');
|
|
49
49
|
await (0, test_1.expect)(clusterPage.clusterVersion('Test Cluster', '8.11')).toBeVisible({ timeout: 30000 });
|
|
50
|
+
const upgradedRow = await clusterPage
|
|
51
|
+
.clusterRow('Test Cluster')
|
|
52
|
+
.innerText();
|
|
53
|
+
console.log(`Cluster after upgrade: ${upgradedRow.replace(/\s+/g, ' ').trim()}`);
|
|
50
54
|
});
|
|
51
55
|
});
|
|
52
56
|
(0, _8_11_1.test)('Basic Navigation After SaaS Upgrade', async ({ homePage, appsPage, modelerHomePage, operateHomePage, optimizeHomePage, taskPanelPage, ocIdentityHomePage, }) => {
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
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;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("./sleep");
|
|
6
|
+
const jobSummary_1 = require("./jobSummary");
|
|
6
7
|
const PLAN_TYPE_ID = '574cde5f-54ae-43c1-851a-e6fb4f03423a';
|
|
7
8
|
const CHANNEL_ID = 'cf355219-cc2d-4266-83e1-2430998ddf30';
|
|
8
9
|
const STABLE_CHANNEL_NAME = 'Stable';
|
|
@@ -366,9 +367,13 @@ function pickGenerationByName(channels, generationName) {
|
|
|
366
367
|
if (match) {
|
|
367
368
|
console.log(`Resolved source generation "${generationName}" from channel ` +
|
|
368
369
|
`"${channel.name}" (${match.uuid})`);
|
|
370
|
+
(0, jobSummary_1.appendJobSummary)(`- **Source generation resolved:** ${generationName} — channel ` +
|
|
371
|
+
`"${channel.name}" (\`${match.uuid}\`)`);
|
|
369
372
|
return { channelId: channel.uuid, generationId: match.uuid };
|
|
370
373
|
}
|
|
371
374
|
}
|
|
375
|
+
(0, jobSummary_1.appendJobSummary)(`- **Source generation NOT found:** ${generationName} is not listed in ` +
|
|
376
|
+
`any channel's allowed generations`);
|
|
372
377
|
throw new Error(`Source generation "${generationName}" not found in any channel's ` +
|
|
373
378
|
`allowed generations`);
|
|
374
379
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under
|
|
4
|
+
* one or more contributor license agreements. See the NOTICE file distributed
|
|
5
|
+
* with this work for additional information regarding copyright ownership.
|
|
6
|
+
* Licensed under the Camunda License 1.0. You may not use this file
|
|
7
|
+
* except in compliance with the Camunda License 1.0.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.appendJobSummary = void 0;
|
|
11
|
+
const fs_1 = require("fs");
|
|
12
|
+
// Append one markdown line to the GitHub job summary of the job the tests run
|
|
13
|
+
// in. Outside Actions GITHUB_STEP_SUMMARY is unset and this is a no-op, and a
|
|
14
|
+
// write failure must never fail a test, so it is reported and swallowed.
|
|
15
|
+
function appendJobSummary(line) {
|
|
16
|
+
const file = (process.env.GITHUB_STEP_SUMMARY ?? '').trim();
|
|
17
|
+
if (!file)
|
|
18
|
+
return;
|
|
19
|
+
try {
|
|
20
|
+
(0, fs_1.appendFileSync)(file, `${line}\n`);
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
console.log(`Could not write to GITHUB_STEP_SUMMARY: ${error}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.appendJobSummary = appendJobSummary;
|