@camunda/e2e-test-suite 0.0.1653 → 0.0.1655
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.
|
@@ -66,28 +66,48 @@ class ConnectorTemplatePage {
|
|
|
66
66
|
.first()
|
|
67
67
|
.waitFor({ state: 'visible', timeout: 5000 })
|
|
68
68
|
.catch(() => { });
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
const readConflictingFile = async () => (await dialog
|
|
70
|
+
.locator('a[href*="/connector-templates/"]')
|
|
71
|
+
.first()
|
|
72
|
+
.innerText({ timeout: 30000 })).trim();
|
|
73
|
+
const cancel = async () => {
|
|
74
74
|
await dialog
|
|
75
75
|
.getByRole('button', { name: 'Cancel', exact: true })
|
|
76
76
|
.click({ timeout: 30000 });
|
|
77
77
|
await (0, test_1.expect)(dialog).toBeHidden({ timeout: 30000 });
|
|
78
|
+
};
|
|
79
|
+
if (await idConflictText.isVisible()) {
|
|
80
|
+
const conflictingFile = await readConflictingFile();
|
|
81
|
+
await cancel();
|
|
78
82
|
return conflictingFile;
|
|
79
83
|
}
|
|
80
84
|
if (await alreadyPublishedText.isVisible()) {
|
|
81
|
-
await
|
|
82
|
-
.getByRole('button', { name: 'Cancel', exact: true })
|
|
83
|
-
.click({ timeout: 30000 });
|
|
84
|
-
await (0, test_1.expect)(dialog).toBeHidden({ timeout: 30000 });
|
|
85
|
+
await cancel();
|
|
85
86
|
return null;
|
|
86
87
|
}
|
|
87
88
|
await dialog
|
|
88
89
|
.getByRole('button', { name: 'Publish', exact: true })
|
|
89
90
|
.click({ timeout: 30000 });
|
|
90
|
-
|
|
91
|
+
// The publish dry run that detects an ID conflict (or an already published
|
|
92
|
+
// version) is asynchronous. When it only resolves after Publish was
|
|
93
|
+
// clicked, the submit handler refuses silently and the dialog stays open
|
|
94
|
+
// showing the reason, so wait for either outcome instead of only for the
|
|
95
|
+
// dialog to close.
|
|
96
|
+
await (0, test_1.expect)(async () => {
|
|
97
|
+
if ((await idConflictText.isVisible()) ||
|
|
98
|
+
(await alreadyPublishedText.isVisible())) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
await (0, test_1.expect)(dialog).toBeHidden({ timeout: 2000 });
|
|
102
|
+
}).toPass({ timeout: 60000 });
|
|
103
|
+
if (await idConflictText.isVisible()) {
|
|
104
|
+
const conflictingFile = await readConflictingFile();
|
|
105
|
+
await cancel();
|
|
106
|
+
return conflictingFile;
|
|
107
|
+
}
|
|
108
|
+
if (await alreadyPublishedText.isVisible()) {
|
|
109
|
+
await cancel();
|
|
110
|
+
}
|
|
91
111
|
return null;
|
|
92
112
|
}
|
|
93
113
|
// Replace the whole content of the open template file. Web Modeler's Monaco
|
|
@@ -104,13 +104,24 @@ class OCIdentityGroupsPage {
|
|
|
104
104
|
}
|
|
105
105
|
async createGroup(groupId, groupName, description) {
|
|
106
106
|
await this.createGroupButton.click();
|
|
107
|
-
await this.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
await (0, test_1.expect)(this.createGroupModal).toBeVisible();
|
|
108
|
+
// The modal can reset its form right after opening, wiping values that
|
|
109
|
+
// were filled too early. Re-fill until the values stick before submitting.
|
|
110
|
+
await (0, test_1.expect)(async () => {
|
|
111
|
+
await this.createGroupIdField.fill(groupId);
|
|
112
|
+
await this.createNameField.fill(groupName);
|
|
113
|
+
if (description) {
|
|
114
|
+
await this.createDescriptionField.fill(description);
|
|
115
|
+
}
|
|
116
|
+
await (0, test_1.expect)(this.createGroupIdField).toHaveValue(groupId, {
|
|
117
|
+
timeout: 2000,
|
|
118
|
+
});
|
|
119
|
+
await (0, test_1.expect)(this.createNameField).toHaveValue(groupName, {
|
|
120
|
+
timeout: 2000,
|
|
121
|
+
});
|
|
122
|
+
}).toPass({ timeout: 30000 });
|
|
112
123
|
await this.createGroupModalCreateButton.click();
|
|
113
|
-
await (0, test_1.expect)(this.createGroupModal).toBeHidden();
|
|
124
|
+
await (0, test_1.expect)(this.createGroupModal).toBeHidden({ timeout: 30000 });
|
|
114
125
|
}
|
|
115
126
|
async editGroup(currentName, newName, newDescription) {
|
|
116
127
|
await this.editGroupButton(currentName).click();
|
|
@@ -175,6 +175,14 @@ async function publishRestConnectorTemplateFile(page, modelerHomePage) {
|
|
|
175
175
|
if (!conflictingFile) {
|
|
176
176
|
return;
|
|
177
177
|
}
|
|
178
|
+
// Parallel workers that all find no REST template in the project each
|
|
179
|
+
// upload their own copy, so several files share this name. Only one of them
|
|
180
|
+
// can publish the ID; for every other copy the owner is a sibling holding
|
|
181
|
+
// the same pinned v13 content, which already makes the template available.
|
|
182
|
+
// Replacing "it" by name would just reopen a copy that cannot publish.
|
|
183
|
+
if (conflictingFile === REST_CONNECTOR_TEMPLATE_RESOURCE) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
178
186
|
const template = JSON.parse((await fetchRestConnectorTemplateV13(page)).toString('utf-8'));
|
|
179
187
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
180
188
|
await page.getByPlaceholder('Filter table').fill(conflictingFile);
|
|
@@ -234,8 +234,15 @@ SM_8_9_1.test.describe('HTO User Flow Tests', () => {
|
|
|
234
234
|
});
|
|
235
235
|
await SM_8_9_1.test.step('Navigate to Tasklist and Assert User Tasks ', async () => {
|
|
236
236
|
await navigationPage.goToTasklist(undefined, credentials1);
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
// Tasklist reloads itself after a post-login 401 and can stay blank;
|
|
238
|
+
// reload until the task list has rendered.
|
|
239
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, page.getByText(`${userTaskName}1`), {
|
|
240
|
+
totalTimeout: 180000,
|
|
241
|
+
visibilityTimeout: 30000,
|
|
242
|
+
maxRetries: 6,
|
|
243
|
+
postAction: async () => {
|
|
244
|
+
await page.reload();
|
|
245
|
+
},
|
|
239
246
|
});
|
|
240
247
|
await (0, test_1.expect)(page.getByText(`${userTaskName}2`)).toBeVisible({
|
|
241
248
|
timeout: 120000,
|
|
@@ -247,10 +254,18 @@ SM_8_9_1.test.describe('HTO User Flow Tests', () => {
|
|
|
247
254
|
});
|
|
248
255
|
await SM_8_9_1.test.step('Navigate to Tasklist and Assert User Tasks ', async () => {
|
|
249
256
|
await navigationPage.goToTasklist(undefined, credentials2);
|
|
250
|
-
|
|
251
|
-
|
|
257
|
+
// Wait for the task list to render (reloading a blank page after the
|
|
258
|
+
// post-login 401) before asserting the task that must NOT be visible,
|
|
259
|
+
// otherwise that check passes vacuously on an empty page.
|
|
260
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, page.getByText(`${userTaskName}2`), {
|
|
261
|
+
totalTimeout: 180000,
|
|
262
|
+
visibilityTimeout: 30000,
|
|
263
|
+
maxRetries: 6,
|
|
264
|
+
postAction: async () => {
|
|
265
|
+
await page.reload();
|
|
266
|
+
},
|
|
252
267
|
});
|
|
253
|
-
await (0, test_1.expect)(page.getByText(`${userTaskName}
|
|
268
|
+
await (0, test_1.expect)(page.getByText(`${userTaskName}1`)).not.toBeVisible({
|
|
254
269
|
timeout: 120000,
|
|
255
270
|
});
|
|
256
271
|
});
|