@camunda/e2e-test-suite 0.0.408 → 0.0.410
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/KeycloakAdminPage.d.ts +1 -0
- package/dist/pages/SM-8.10/KeycloakAdminPage.js +4 -1
- package/dist/pages/SM-8.10/OCIdentityRolesPage.d.ts +1 -0
- package/dist/pages/SM-8.10/OCIdentityRolesPage.js +40 -10
- package/dist/pages/SM-8.8/ModelerCreatePage.js +6 -1
- package/dist/tests/SM-8.8/connectors-user-flows.spec.js +1 -1
- package/package.json +1 -1
|
@@ -7,10 +7,12 @@ class KeycloakAdminPage {
|
|
|
7
7
|
page;
|
|
8
8
|
keycloakBanner;
|
|
9
9
|
addUserButton;
|
|
10
|
+
credentialsTab;
|
|
10
11
|
constructor(page) {
|
|
11
12
|
this.page = page;
|
|
12
13
|
this.keycloakBanner = page.locator('#kc-main-content-page-container');
|
|
13
14
|
this.addUserButton = page.getByTestId('add-user');
|
|
15
|
+
this.credentialsTab = page.getByTestId('credentials');
|
|
14
16
|
}
|
|
15
17
|
async toBeVisible() {
|
|
16
18
|
await (0, test_1.expect)(this.keycloakBanner).toBeVisible({ timeout: 10000 });
|
|
@@ -51,7 +53,8 @@ class KeycloakAdminPage {
|
|
|
51
53
|
await this.page.getByTestId('user-creation-save').click();
|
|
52
54
|
}
|
|
53
55
|
async fillPassword(password) {
|
|
54
|
-
await this.
|
|
56
|
+
await (0, test_1.expect)(this.credentialsTab).toBeVisible({ timeout: 30000 });
|
|
57
|
+
await this.credentialsTab.click();
|
|
55
58
|
await this.page.getByTestId('no-credentials-empty-action').click();
|
|
56
59
|
await this.page.getByTestId('passwordField').fill(password);
|
|
57
60
|
await this.page.getByTestId('passwordConfirmationField').fill(password);
|
|
@@ -28,6 +28,7 @@ declare class OCIdentityRolesPage {
|
|
|
28
28
|
readonly assignClientsButton: Locator;
|
|
29
29
|
readonly clientIdTextBox: Locator;
|
|
30
30
|
readonly assignClientIdSubButton: Locator;
|
|
31
|
+
readonly notFoundText: Locator;
|
|
31
32
|
constructor(page: Page);
|
|
32
33
|
clickMappingRulesTab(): Promise<void>;
|
|
33
34
|
clickRole(roleID: string): Promise<void>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OCIdentityRolesPage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const UtilitiesPage_1 = require("../SM-8.10/UtilitiesPage");
|
|
6
|
+
const sleep_1 = require("../../utils/sleep");
|
|
6
7
|
class OCIdentityRolesPage {
|
|
7
8
|
page;
|
|
8
9
|
selectResourceTypeTab;
|
|
@@ -32,9 +33,11 @@ class OCIdentityRolesPage {
|
|
|
32
33
|
assignClientsButton;
|
|
33
34
|
clientIdTextBox;
|
|
34
35
|
assignClientIdSubButton;
|
|
36
|
+
notFoundText;
|
|
35
37
|
constructor(page) {
|
|
36
38
|
this.page = page;
|
|
37
39
|
this.rolesList = page.getByRole('table');
|
|
40
|
+
this.notFoundText = page.getByText('404 not found');
|
|
38
41
|
this.selectResourceTypeTab = (resourceType) => page.getByRole('tab', { name: resourceType });
|
|
39
42
|
this.assignMappingRuleButton = page.getByRole('button', {
|
|
40
43
|
name: /^(Assign mapping rule|assignMapping)$/,
|
|
@@ -104,16 +107,43 @@ class OCIdentityRolesPage {
|
|
|
104
107
|
await this.roleCell(roleID).first().click();
|
|
105
108
|
}
|
|
106
109
|
async assignMappingRuleToRole(roleId, mappingId) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
const maxRetries = 3;
|
|
111
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
112
|
+
await this.clickRole(roleId);
|
|
113
|
+
// After clicking the role, the detail page may show a 404 if the role
|
|
114
|
+
// was just created and the backend hasn't fully provisioned it yet.
|
|
115
|
+
const gotNotFound = await this.notFoundText
|
|
116
|
+
.isVisible({ timeout: 3000 })
|
|
117
|
+
.catch(() => false);
|
|
118
|
+
if (gotNotFound) {
|
|
119
|
+
console.warn(`Attempt ${attempt + 1}: Role detail page returned 404 for "${roleId}", retrying...`);
|
|
120
|
+
await this.page.goBack();
|
|
121
|
+
await (0, sleep_1.sleep)(3000);
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
try {
|
|
125
|
+
await this.clickMappingRulesTab();
|
|
126
|
+
await (0, test_1.expect)(this.assignMappingRuleButton).toBeVisible({
|
|
127
|
+
timeout: 60000,
|
|
128
|
+
});
|
|
129
|
+
await this.assignMappingRuleButton.click({ timeout: 60000 });
|
|
130
|
+
await (0, test_1.expect)(this.assignMappingModal).toBeVisible({ timeout: 60000 });
|
|
131
|
+
await this.mappingSearchBox.fill(mappingId);
|
|
132
|
+
await this.assignMappingModalSearchResult.getByText(mappingId).click();
|
|
133
|
+
await this.assignMappingModalAssignRuleButton.click();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
if (attempt < maxRetries - 1) {
|
|
138
|
+
console.warn(`Attempt ${attempt + 1} failed to assign mapping rule to role "${roleId}". Retrying...`);
|
|
139
|
+
await this.page.goBack();
|
|
140
|
+
await (0, sleep_1.sleep)(2000);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
throw error;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
117
147
|
}
|
|
118
148
|
async createRole(role) {
|
|
119
149
|
await this.createRoleButton.click();
|
|
@@ -872,7 +872,12 @@ class ModelerCreatePage {
|
|
|
872
872
|
// Reload to pick up newly-downloaded connector templates, then
|
|
873
873
|
// re-select the intermediate event element and open the type picker.
|
|
874
874
|
await this.page.reload();
|
|
875
|
-
await this.
|
|
875
|
+
await this.page.waitForLoadState('domcontentloaded');
|
|
876
|
+
await this.secondElement.waitFor({
|
|
877
|
+
state: 'visible',
|
|
878
|
+
timeout: 30000,
|
|
879
|
+
});
|
|
880
|
+
await this.secondElement.click({ timeout: 30000 });
|
|
876
881
|
await this.changeTypeButton.click({ force: true, timeout: 30000 });
|
|
877
882
|
}
|
|
878
883
|
// Use a longer timeout to allow the connector to finish registering
|
|
@@ -187,7 +187,7 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
187
187
|
await modelerCreatePage.clickIntermediateBoundaryEvent();
|
|
188
188
|
await modelerCreatePage.clickChangeTypeButton();
|
|
189
189
|
try {
|
|
190
|
-
await (0, test_1.expect)(modelerCreatePage.
|
|
190
|
+
await (0, test_1.expect)(modelerCreatePage.intermediateWebhookConnectorOption).toBeVisible({
|
|
191
191
|
timeout: 15000,
|
|
192
192
|
});
|
|
193
193
|
}
|