@camunda/e2e-test-suite 0.0.1751 → 0.0.1752
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.
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Authorization = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const UtilitiesPage_1 = require("../SM-8.8/UtilitiesPage");
|
|
6
|
+
const NavigationPage_1 = require("../SM-8.8/NavigationPage");
|
|
6
7
|
class Authorization {
|
|
7
8
|
page;
|
|
8
9
|
selectResourceTypeTab;
|
|
@@ -120,7 +121,9 @@ class Authorization {
|
|
|
120
121
|
let lastError;
|
|
121
122
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
122
123
|
try {
|
|
123
|
-
|
|
124
|
+
const resourceTypeTab = this.selectResourceTypeTab(authorization.resourceType);
|
|
125
|
+
await (0, test_1.expect)(resourceTypeTab).toBeVisible({ timeout: 30000 });
|
|
126
|
+
await resourceTypeTab.click();
|
|
124
127
|
await this.tableFilter.click();
|
|
125
128
|
await this.tableFilter.fill(authorization.ownerId);
|
|
126
129
|
await (0, test_1.expect)(item).toBeVisible({ timeout: 5000 });
|
|
@@ -130,12 +133,30 @@ class Authorization {
|
|
|
130
133
|
lastError = error;
|
|
131
134
|
console.warn(`Attempt ${attempt + 1}/${maxAttempts} failed asserting ${authorization.resourceType} authorization row (${authorization.ownerId} / ${authorization.resourceId}). Retrying...`);
|
|
132
135
|
if (attempt < maxAttempts - 1) {
|
|
133
|
-
|
|
136
|
+
try {
|
|
137
|
+
await this.reopenAuthorizationsPage();
|
|
138
|
+
}
|
|
139
|
+
catch (navigationError) {
|
|
140
|
+
console.warn(`Re-opening the Authorizations page failed: ${navigationError}`);
|
|
141
|
+
}
|
|
134
142
|
}
|
|
135
143
|
}
|
|
136
144
|
}
|
|
137
145
|
throw new Error(`Authorization row not visible after ${maxAttempts} attempts: ${authorization.ownerId} / ${authorization.resourceId} (${authorization.resourceType}). Last error: ${lastError}`);
|
|
138
146
|
}
|
|
147
|
+
// A bare reload has left OC Identity without its resource-type tabs for
|
|
148
|
+
// every remaining attempt; re-entering through the login-aware navigation
|
|
149
|
+
// recovers the page.
|
|
150
|
+
async reopenAuthorizationsPage() {
|
|
151
|
+
const navigationPage = new NavigationPage_1.NavigationPage(this.page);
|
|
152
|
+
await navigationPage.goToOCIdentity();
|
|
153
|
+
const authorizationsNavLink = this.page
|
|
154
|
+
.getByRole('banner')
|
|
155
|
+
.locator('a')
|
|
156
|
+
.filter({ hasText: /^Authorizations$/ });
|
|
157
|
+
await (0, test_1.expect)(authorizationsNavLink).toBeVisible({ timeout: 30000 });
|
|
158
|
+
await authorizationsNavLink.click();
|
|
159
|
+
}
|
|
139
160
|
async deleteAuthorization(resourceId, resourceType) {
|
|
140
161
|
await this.deleteAuthorizationButton(resourceId).click();
|
|
141
162
|
await (0, test_1.expect)(this.deleteAuthorizationModal).toBeVisible();
|
|
@@ -266,11 +266,15 @@ if (node_process_1.default.env.IS_RBA === 'true') {
|
|
|
266
266
|
});
|
|
267
267
|
});
|
|
268
268
|
await SM_8_8_1.test.step('Navigate to Operate and Make Sure that the Two Deployed Processes Are Not Accessible', async () => {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
269
|
+
// The Processes view intermittently never renders after the fresh
|
|
270
|
+
// login; re-entering Operate recovers it.
|
|
271
|
+
await (0, test_1.expect)(async () => {
|
|
272
|
+
await navigationPage.goToOperate(undefined, credentials);
|
|
273
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
274
|
+
timeout: 120000,
|
|
275
|
+
});
|
|
276
|
+
await operateHomePage.clickProcessesTab();
|
|
277
|
+
}).toPass({ timeout: 360000, intervals: [10000] });
|
|
274
278
|
await (0, test_1.expect)(page.getByText(`${processName}1`).last()).not.toBeVisible({
|
|
275
279
|
timeout: 120000,
|
|
276
280
|
});
|
|
@@ -545,11 +549,15 @@ if (node_process_1.default.env.IS_RBA === 'true') {
|
|
|
545
549
|
await (0, UtilitiesPage_1.runMultipleProcesses)(page, modelerHomePage, modelerCreatePage, 2, processName, processName);
|
|
546
550
|
});
|
|
547
551
|
await SM_8_8_1.test.step('Navigate to Operate and Only First Process Is Accessible', async () => {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
552
|
+
// The Processes view intermittently never renders after the fresh
|
|
553
|
+
// login; re-entering Operate recovers it.
|
|
554
|
+
await (0, test_1.expect)(async () => {
|
|
555
|
+
await navigationPage.goToOperate(undefined, credentials);
|
|
556
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
557
|
+
timeout: 120000,
|
|
558
|
+
});
|
|
559
|
+
await operateHomePage.clickProcessesTab();
|
|
560
|
+
}).toPass({ timeout: 360000, intervals: [10000] });
|
|
553
561
|
await (0, test_1.expect)(page.getByText(`${processName}1`).last()).toBeVisible({
|
|
554
562
|
timeout: 120000,
|
|
555
563
|
});
|