@camunda/e2e-test-suite 0.0.1505 → 0.0.1506
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.9/ClusterDetailsPage.d.ts +2 -0
- package/dist/pages/8.9/ClusterDetailsPage.js +36 -1
- package/dist/pages/8.9/ClusterPage.d.ts +1 -1
- package/dist/pages/8.9/ClusterPage.js +13 -2
- package/dist/pages/8.9/UtilitiesPage.d.ts +1 -0
- package/dist/pages/8.9/UtilitiesPage.js +22 -1
- package/dist/tests/8.9/saas-migration-path-user-flows.spec.js +6 -2
- package/dist/tests/SM-8.11/license-key-user-flows.spec.js +4 -8
- package/package.json +1 -1
|
@@ -60,6 +60,7 @@ declare class ClusterDetailsPage {
|
|
|
60
60
|
readonly targetVersionOption: (version: string) => Locator;
|
|
61
61
|
readonly updateAvailableDialog: Locator;
|
|
62
62
|
readonly updateButton: Locator;
|
|
63
|
+
readonly generationRow: Locator;
|
|
63
64
|
constructor(page: Page);
|
|
64
65
|
clickAPITab(): Promise<void>;
|
|
65
66
|
dismissOopsIfPresent(): Promise<void>;
|
|
@@ -73,6 +74,7 @@ declare class ClusterDetailsPage {
|
|
|
73
74
|
clickOptimizeCheckbox(): Promise<void>;
|
|
74
75
|
clickCreateButton(): Promise<void>;
|
|
75
76
|
clickReviewUpdateButton(): Promise<void>;
|
|
77
|
+
private isOnLatestGeneration;
|
|
76
78
|
performClusterUpdate(targetVersion?: string): Promise<void>;
|
|
77
79
|
clickCloseModalButton(): Promise<void>;
|
|
78
80
|
clickSettingsTab(): Promise<void>;
|
|
@@ -72,6 +72,7 @@ class ClusterDetailsPage {
|
|
|
72
72
|
targetVersionOption;
|
|
73
73
|
updateAvailableDialog;
|
|
74
74
|
updateButton;
|
|
75
|
+
generationRow;
|
|
75
76
|
constructor(page) {
|
|
76
77
|
this.page = page;
|
|
77
78
|
this.apiTab = page.getByRole('tab', { name: 'API' });
|
|
@@ -256,6 +257,14 @@ class ClusterDetailsPage {
|
|
|
256
257
|
this.updateButton = this.updateAvailableDialog.getByRole('button', {
|
|
257
258
|
name: 'Update',
|
|
258
259
|
});
|
|
260
|
+
// The "Generation" row of the Overview tab's "Cluster Details" table. It
|
|
261
|
+
// carries the generation the cluster runs plus, when Console has nothing
|
|
262
|
+
// newer to offer, a "No updates available" note. Scoped to the Overview
|
|
263
|
+
// panel because a page-wide row query also reads the other tabs' tables.
|
|
264
|
+
this.generationRow = page
|
|
265
|
+
.getByRole('tabpanel', { name: 'Overview' })
|
|
266
|
+
.getByRole('row')
|
|
267
|
+
.filter({ has: page.getByRole('cell', { name: 'Generation', exact: true }) });
|
|
259
268
|
}
|
|
260
269
|
async clickAPITab() {
|
|
261
270
|
await (0, test_1.expect)(this.apiTab).toBeVisible({ timeout: 60000 });
|
|
@@ -350,7 +359,34 @@ class ClusterDetailsPage {
|
|
|
350
359
|
async clickReviewUpdateButton() {
|
|
351
360
|
await this.reviewUpdateButton.click({ timeout: 60000 });
|
|
352
361
|
}
|
|
362
|
+
// Whether Console already reports this cluster as running `generation` with
|
|
363
|
+
// nothing newer on offer, which is what it shows after a successful update.
|
|
364
|
+
async isOnLatestGeneration(generation) {
|
|
365
|
+
const rowShown = await this.generationRow
|
|
366
|
+
.waitFor({ state: 'visible', timeout: 10000 })
|
|
367
|
+
.then(() => true)
|
|
368
|
+
.catch(() => false);
|
|
369
|
+
if (!rowShown) {
|
|
370
|
+
return false;
|
|
371
|
+
}
|
|
372
|
+
const row = await this.generationRow
|
|
373
|
+
.innerText({ timeout: 10000 })
|
|
374
|
+
.catch(() => '');
|
|
375
|
+
return row.includes(generation) && /No updates available/i.test(row);
|
|
376
|
+
}
|
|
353
377
|
async performClusterUpdate(targetVersion) {
|
|
378
|
+
const version = targetVersion ?? process.env.CLUSTER_VERSION;
|
|
379
|
+
// Playwright retries the whole test, so a retry re-enters this flow
|
|
380
|
+
// against a cluster the first attempt already updated. Console then
|
|
381
|
+
// renders no "Review Update" button at all, the click below can only time
|
|
382
|
+
// out, and that timeout buries whatever actually ended the first attempt.
|
|
383
|
+
// The caller still asserts the resulting generation, so returning early
|
|
384
|
+
// here cannot pass an update that never happened.
|
|
385
|
+
if (version && (await this.isOnLatestGeneration(version))) {
|
|
386
|
+
console.warn(`performClusterUpdate: cluster already runs "${version}" and Console ` +
|
|
387
|
+
'offers no update; nothing to do.');
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
354
390
|
await this.clickReviewUpdateButton();
|
|
355
391
|
// When multiple target generations are available, Console inserts a
|
|
356
392
|
// "Select target version" step before "Update available". The desired
|
|
@@ -361,7 +397,6 @@ class ClusterDetailsPage {
|
|
|
361
397
|
.then(() => true)
|
|
362
398
|
.catch(() => false);
|
|
363
399
|
if (hasTargetVersionStep) {
|
|
364
|
-
const version = targetVersion ?? process.env.CLUSTER_VERSION;
|
|
365
400
|
if (version) {
|
|
366
401
|
await this.targetVersionOption(version).click({ timeout: 30000 });
|
|
367
402
|
}
|
|
@@ -57,7 +57,7 @@ declare class ClusterPage {
|
|
|
57
57
|
clickClusterOption(): Promise<void>;
|
|
58
58
|
createClusterIfNotExists(clusterName: string, region?: string): Promise<void>;
|
|
59
59
|
waitForClusterRestartToStart(name: string, timeout?: number): Promise<void>;
|
|
60
|
-
assertClusterHealthyStatusWithRetry(name: string, visibilityTimeout?: number, totalTimeout?: number, maxRetries?: number): Promise<void>;
|
|
60
|
+
assertClusterHealthyStatusWithRetry(name: string, visibilityTimeout?: number, totalTimeout?: number, maxRetries?: number, recoverSession?: () => Promise<void>): Promise<void>;
|
|
61
61
|
clickAlphaTab(): Promise<void>;
|
|
62
62
|
clickDevTab(): Promise<void>;
|
|
63
63
|
clickStableTab(): Promise<void>;
|
|
@@ -5,6 +5,7 @@ const test_1 = require("@playwright/test");
|
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
6
|
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
7
7
|
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
8
|
+
const sessionRecovery_1 = require("../../utils/sessionRecovery");
|
|
8
9
|
const CLUSTER_CREATING_STATUS = /^Creating(…|\.\.\.)?$/;
|
|
9
10
|
class ClusterPage {
|
|
10
11
|
page;
|
|
@@ -536,13 +537,23 @@ class ClusterPage {
|
|
|
536
537
|
? `${name}: restart started, status left Healthy.`
|
|
537
538
|
: `${name}: status stayed Healthy for ${timeout / 1000}s after the change.`);
|
|
538
539
|
}
|
|
539
|
-
async assertClusterHealthyStatusWithRetry(name, visibilityTimeout = 100000, totalTimeout = 500000, maxRetries) {
|
|
540
|
+
async assertClusterHealthyStatusWithRetry(name, visibilityTimeout = 100000, totalTimeout = 500000, maxRetries, recoverSession) {
|
|
540
541
|
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.clusterHealthiness(name), {
|
|
541
542
|
visibilityTimeout: visibilityTimeout,
|
|
542
543
|
totalTimeout: totalTimeout,
|
|
543
544
|
maxRetries: maxRetries ?? 5,
|
|
544
545
|
preAction: async () => {
|
|
545
|
-
|
|
546
|
+
// Reloading cannot bring the cluster list back once Console has
|
|
547
|
+
// dropped the session: every further attempt re-renders the identity
|
|
548
|
+
// provider's login form instead, so the whole retry budget is spent
|
|
549
|
+
// on a page that can never satisfy the assertion. The reload itself
|
|
550
|
+
// is often what lands there, so check on both sides of it.
|
|
551
|
+
if (!recoverSession || !(0, sessionRecovery_1.isAtIdentityProvider)(this.page)) {
|
|
552
|
+
await this.page.reload();
|
|
553
|
+
}
|
|
554
|
+
if (recoverSession && (0, sessionRecovery_1.isAtIdentityProvider)(this.page)) {
|
|
555
|
+
await recoverSession();
|
|
556
|
+
}
|
|
546
557
|
await (0, test_1.expect)(this.cluster(name)).toBeVisible({ timeout: 10000 });
|
|
547
558
|
},
|
|
548
559
|
});
|
|
@@ -34,6 +34,7 @@ export declare function runMultipleProcesses(clusterName: string, page: Page, mo
|
|
|
34
34
|
}): Promise<void>;
|
|
35
35
|
export declare function disableRBA(clusterName: string, homePage: HomePage, clusterPage: ClusterPage, clusterDetailsPage: ClusterDetailsPage, appsPage: AppsPage): Promise<void>;
|
|
36
36
|
export declare function enableAuthorizations(clusterName: string, homePage: HomePage, clusterPage: ClusterPage, clusterDetailsPage: ClusterDetailsPage, appsPage: AppsPage): Promise<void>;
|
|
37
|
+
export declare function consoleSessionRecovery(page: Page, returnUrl: string): () => Promise<void>;
|
|
37
38
|
export declare function clickInvitationLinkInEmail(page: Page, id: string): Promise<void>;
|
|
38
39
|
export declare function assertLatestAlertEmail(id: string, mailSlurp: MailSlurp, processName: string, alertText: string): Promise<string>;
|
|
39
40
|
export declare function assertTestUsesCorrectOrganization(page: Page): Promise<void>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.waitForLoadingToFinish = exports.assertTestUsesCorrectOrganizationFromModeler = exports.expectCountToBeOneOf = exports.createAPIClient = exports.modelAndRunConnectorsTimerEventDiagram = exports.modelAndRunConnectorsDocHandlingDiagram = exports.deleteCluster = exports.deleteAllUserGroups = exports.assertTestUsesCorrectOrganization = exports.assertLatestAlertEmail = exports.clickInvitationLinkInEmail = exports.enableAuthorizations = exports.disableRBA = exports.runMultipleProcesses = exports.runProcess = exports.completeTaskWithRetry = exports.assertPageTextWithRetry = exports.assertLocatorVisibleWithRetry = exports.modelRestConnector = exports.modelDiagramFromFile = exports.loginWithRetry = void 0;
|
|
3
|
+
exports.waitForLoadingToFinish = exports.assertTestUsesCorrectOrganizationFromModeler = exports.expectCountToBeOneOf = exports.createAPIClient = exports.modelAndRunConnectorsTimerEventDiagram = exports.modelAndRunConnectorsDocHandlingDiagram = exports.deleteCluster = exports.deleteAllUserGroups = exports.assertTestUsesCorrectOrganization = exports.assertLatestAlertEmail = exports.clickInvitationLinkInEmail = exports.consoleSessionRecovery = exports.enableAuthorizations = exports.disableRBA = exports.runMultipleProcesses = exports.runProcess = exports.completeTaskWithRetry = exports.assertPageTextWithRetry = exports.assertLocatorVisibleWithRetry = exports.modelRestConnector = exports.modelDiagramFromFile = exports.loginWithRetry = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const authErrorClassification_1 = require("../../utils/authErrorClassification");
|
|
6
6
|
const ModelerHomePage_1 = require("./ModelerHomePage");
|
|
7
7
|
const HomePage_1 = require("./HomePage");
|
|
8
8
|
const sleep_1 = require("../../utils/sleep");
|
|
9
9
|
const randomSleep_1 = require("../../utils/randomSleep");
|
|
10
|
+
const LoginPage_1 = require("./LoginPage");
|
|
10
11
|
const fileUpload_1 = require("../../utils/fileUpload");
|
|
11
12
|
const mailSlurpClient_1 = require("../../utils/mailSlurpClient");
|
|
12
13
|
const hubTableRow_1 = require("../../utils/hubTableRow");
|
|
@@ -459,6 +460,26 @@ async function enableAuthorizations(clusterName, homePage, clusterPage, clusterD
|
|
|
459
460
|
await clusterDetailsPage.assertComponentsHealth();
|
|
460
461
|
}
|
|
461
462
|
exports.enableAuthorizations = enableAuthorizations;
|
|
463
|
+
// The Console SPA drops its own session when auth0-spa-js fails a silent
|
|
464
|
+
// token renewal: it calls `/v2/logout` and the tab is bounced to the identity
|
|
465
|
+
// provider's login form. That can happen mid-flight during a minutes-long
|
|
466
|
+
// poll, after which reloading only ever re-renders the login form.
|
|
467
|
+
// Re-authenticate as the console user and return to the page that was being
|
|
468
|
+
// polled, so the assertion that owns the poll carries on unchanged.
|
|
469
|
+
function consoleSessionRecovery(page, returnUrl) {
|
|
470
|
+
return async () => {
|
|
471
|
+
console.warn(`Console session lost while polling ${returnUrl}; re-authenticating.`);
|
|
472
|
+
await loginWithRetry(page, new LoginPage_1.LoginPage(page), {
|
|
473
|
+
username: process.env.C8_USERNAME,
|
|
474
|
+
password: process.env.C8_PASSWORD,
|
|
475
|
+
}, 0, 3);
|
|
476
|
+
await page.goto(returnUrl, {
|
|
477
|
+
waitUntil: 'domcontentloaded',
|
|
478
|
+
timeout: 60000,
|
|
479
|
+
});
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
exports.consoleSessionRecovery = consoleSessionRecovery;
|
|
462
483
|
async function clickInvitationLinkInEmail(page, id) {
|
|
463
484
|
const email = await mailSlurpClient_1.mailSlurp.waitForLatestEmail(id, 120000);
|
|
464
485
|
if (email && email.body) {
|
|
@@ -38,12 +38,16 @@ _8_9_1.test.describe('SaaS Migration Path Tests', () => {
|
|
|
38
38
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
39
39
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
40
40
|
});
|
|
41
|
-
(0, _8_9_1.test)('SaaS UI Upgrade Flow Automation @saasUpgrade', async ({ homePage, clusterPage, clusterDetailsPage, }) => {
|
|
41
|
+
(0, _8_9_1.test)('SaaS UI Upgrade Flow Automation @saasUpgrade', async ({ page, homePage, clusterPage, clusterDetailsPage, }) => {
|
|
42
42
|
await homePage.clickClusters();
|
|
43
|
+
const clustersUrl = page.url();
|
|
43
44
|
await clusterPage.clickClusterLink('Test Cluster');
|
|
44
45
|
await clusterDetailsPage.performClusterUpdate();
|
|
45
46
|
await homePage.clickClusters();
|
|
46
|
-
|
|
47
|
+
// The update takes minutes, and Console has dropped its own session
|
|
48
|
+
// part-way through that poll; without a way back the remaining retries
|
|
49
|
+
// all run against the login form.
|
|
50
|
+
await clusterPage.assertClusterHealthyStatusWithRetry('Test Cluster', undefined, undefined, undefined, (0, UtilitiesPage_1.consoleSessionRecovery)(page, clustersUrl));
|
|
47
51
|
await (0, test_1.expect)(clusterPage.clusterVersion('Test Cluster', '8.9')).toBeVisible();
|
|
48
52
|
});
|
|
49
53
|
(0, _8_9_1.test)('Basic Navigation After SaaS Upgrade', async ({ homePage, appsPage, modelerHomePage, operateHomePage, optimizeHomePage, taskPanelPage, ocIdentityHomePage, }) => {
|
|
@@ -13,8 +13,7 @@ if (process.env.IS_LICENSE_KEY === 'true') {
|
|
|
13
13
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
14
14
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
15
15
|
});
|
|
16
|
-
|
|
17
|
-
SM_8_11_1.test.skip('License Invalid Commercial Expired User Flow', async ({ navigationPage, ocIdentityHomePage, managementIdentityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, }) => {
|
|
16
|
+
(0, SM_8_11_1.test)('License Invalid Commercial Expired User Flow', async ({ navigationPage, ocIdentityHomePage, managementIdentityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, }) => {
|
|
18
17
|
if (process.env.LICENSE_KEY !== 'lic-inv-com-expired') {
|
|
19
18
|
SM_8_11_1.test.skip(true, 'Skipping test because test environment does not correct license key');
|
|
20
19
|
}
|
|
@@ -54,8 +53,7 @@ if (process.env.IS_LICENSE_KEY === 'true') {
|
|
|
54
53
|
});
|
|
55
54
|
});
|
|
56
55
|
});
|
|
57
|
-
|
|
58
|
-
SM_8_11_1.test.skip('License Invalid Commercial Special Characters User Flow', async ({ navigationPage, ocIdentityHomePage, managementIdentityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, }) => {
|
|
56
|
+
(0, SM_8_11_1.test)('License Invalid Commercial Special Characters User Flow', async ({ navigationPage, ocIdentityHomePage, managementIdentityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, }) => {
|
|
59
57
|
if (process.env.LICENSE_KEY !== 'lic-inv-com-special-characters') {
|
|
60
58
|
SM_8_11_1.test.skip(true, 'Skipping test because test environment does not correct license key');
|
|
61
59
|
}
|
|
@@ -95,8 +93,7 @@ if (process.env.IS_LICENSE_KEY === 'true') {
|
|
|
95
93
|
});
|
|
96
94
|
});
|
|
97
95
|
});
|
|
98
|
-
|
|
99
|
-
SM_8_11_1.test.skip('License Invalid Commercial Wrong Signature User Flow', async ({ navigationPage, ocIdentityHomePage, managementIdentityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, }) => {
|
|
96
|
+
(0, SM_8_11_1.test)('License Invalid Commercial Wrong Signature User Flow', async ({ navigationPage, ocIdentityHomePage, managementIdentityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, }) => {
|
|
100
97
|
if (process.env.LICENSE_KEY !== 'lic-inv-com-wrong-signature') {
|
|
101
98
|
SM_8_11_1.test.skip(true, 'Skipping test because test environment does not correct license key');
|
|
102
99
|
}
|
|
@@ -136,8 +133,7 @@ if (process.env.IS_LICENSE_KEY === 'true') {
|
|
|
136
133
|
});
|
|
137
134
|
});
|
|
138
135
|
});
|
|
139
|
-
|
|
140
|
-
SM_8_11_1.test.skip('License Invalid Non-Commercial Expired User Flow', async ({ navigationPage, ocIdentityHomePage, managementIdentityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, }) => {
|
|
136
|
+
(0, SM_8_11_1.test)('License Invalid Non-Commercial Expired User Flow', async ({ navigationPage, ocIdentityHomePage, managementIdentityPage, modelerHomePage, taskPanelPage, operateHomePage, optimizeHomePage, }) => {
|
|
141
137
|
if (process.env.LICENSE_KEY !== 'lic-inv-ncom-expired') {
|
|
142
138
|
SM_8_11_1.test.skip(true, 'Skipping test because test environment does not correct license key');
|
|
143
139
|
}
|