@camunda/e2e-test-suite 0.0.1560 → 0.0.1561
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.9/ConnectorTemplatePage.d.ts +1 -0
- package/dist/pages/SM-8.9/ConnectorTemplatePage.js +50 -0
- package/dist/pages/SM-8.9/ModelerCreatePage.d.ts +1 -0
- package/dist/pages/SM-8.9/ModelerCreatePage.js +18 -15
- package/dist/pages/SM-8.9/UtilitiesPage.d.ts +8 -3
- package/dist/pages/SM-8.9/UtilitiesPage.js +69 -8
- package/dist/tests/SM-8.9/connectors-user-flows.spec.js +14 -9
- package/dist/tests/SM-8.9/mt-enabled-user-flows.spec.js +7 -10
- package/dist/tests/SM-8.9/smoke-tests.spec.js +7 -3
- package/package.json +1 -1
|
@@ -20,6 +20,56 @@ class ConnectorTemplatePage {
|
|
|
20
20
|
async clickPublishButton() {
|
|
21
21
|
await this.publishButton.click({ timeout: 90000 });
|
|
22
22
|
}
|
|
23
|
+
// The control depends on whether the template was ever published: a template
|
|
24
|
+
// that never was has a single "Publish to project" button, while one that
|
|
25
|
+
// already was has a "Publish" dropdown holding "Publish to project" and
|
|
26
|
+
// "Publish to organization". The dropdown items only exist once it is open.
|
|
27
|
+
async publishToProject() {
|
|
28
|
+
const directButton = this.page.getByRole('button', {
|
|
29
|
+
name: 'Publish to project',
|
|
30
|
+
exact: true,
|
|
31
|
+
});
|
|
32
|
+
await directButton
|
|
33
|
+
.or(this.publishButton)
|
|
34
|
+
.first()
|
|
35
|
+
.waitFor({ state: 'visible', timeout: 90000 });
|
|
36
|
+
if (await directButton.isVisible()) {
|
|
37
|
+
await directButton.click({ timeout: 30000 });
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
await this.publishButton.click({ timeout: 30000 });
|
|
41
|
+
await this.page
|
|
42
|
+
.getByRole('menuitem', { name: 'Publish to project', exact: true })
|
|
43
|
+
.click({ timeout: 30000 });
|
|
44
|
+
}
|
|
45
|
+
const dialog = this.page.getByRole('dialog');
|
|
46
|
+
const confirmShown = await dialog
|
|
47
|
+
.waitFor({ state: 'visible', timeout: 15000 })
|
|
48
|
+
.then(() => true)
|
|
49
|
+
.catch(() => false);
|
|
50
|
+
if (!confirmShown) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// The version field is prefilled with the template's own version. When that
|
|
54
|
+
// version is already published, the form rejects it, so there is nothing
|
|
55
|
+
// left to publish.
|
|
56
|
+
const alreadyPublished = await dialog
|
|
57
|
+
.getByText(/Enter a version number greater than/)
|
|
58
|
+
.waitFor({ state: 'visible', timeout: 5000 })
|
|
59
|
+
.then(() => true)
|
|
60
|
+
.catch(() => false);
|
|
61
|
+
if (alreadyPublished) {
|
|
62
|
+
await dialog
|
|
63
|
+
.getByRole('button', { name: 'Cancel', exact: true })
|
|
64
|
+
.click({ timeout: 30000 });
|
|
65
|
+
await (0, test_1.expect)(dialog).toBeHidden({ timeout: 30000 });
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
await dialog
|
|
69
|
+
.getByRole('button', { name: 'Publish', exact: true })
|
|
70
|
+
.click({ timeout: 30000 });
|
|
71
|
+
await (0, test_1.expect)(dialog).toBeHidden({ timeout: 60000 });
|
|
72
|
+
}
|
|
23
73
|
async publishConnector() {
|
|
24
74
|
try {
|
|
25
75
|
await (0, test_1.expect)(this.publishToOrgButton).toBeVisible({ timeout: 15000 });
|
|
@@ -136,6 +136,7 @@ declare class ModelerCreatePage {
|
|
|
136
136
|
clickDeployButton(): Promise<void>;
|
|
137
137
|
clickDeploySubButton(): Promise<void>;
|
|
138
138
|
clickCancelButton(): Promise<void>;
|
|
139
|
+
searchChangeElementList(searchTerm: string): Promise<void>;
|
|
139
140
|
private searchAndClickRestConnector;
|
|
140
141
|
clickRestConnectorOption(): Promise<void>;
|
|
141
142
|
clickMarketPlaceButton(): Promise<void>;
|
|
@@ -627,26 +627,29 @@ class ModelerCreatePage {
|
|
|
627
627
|
async clickCancelButton() {
|
|
628
628
|
await this.cancelButton.click();
|
|
629
629
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
630
|
+
// The change-element popup virtualizes its list: connector templates
|
|
631
|
+
// render below the built-in BPMN tasks and are not in the queryable DOM
|
|
632
|
+
// slice until the list is filtered. Type into the popup search box (the
|
|
633
|
+
// same `.djs-popup-search input` selector the bpmn-js/hub e2e tests use)
|
|
634
|
+
// so the REST Outbound Connector entry is rendered before asserting on it.
|
|
635
|
+
// Wait for the search input to render before typing: a bare isVisible()
|
|
636
|
+
// check races the popup re-render on retries and silently skips the type,
|
|
637
|
+
// leaving the list unfiltered so the off-screen connector entry never
|
|
638
|
+
// becomes visible and the assertion below times out.
|
|
639
|
+
// Use pressSequentially (not fill): fill sets the value in one shot and the
|
|
640
|
+
// single input event can land before bpmn-js attaches its search handler
|
|
641
|
+
// during the popup re-render, leaving the list unfiltered. Typing
|
|
642
|
+
// character-by-character fires the keyboard events the filter listens to.
|
|
643
|
+
async searchChangeElementList(searchTerm) {
|
|
644
644
|
await (0, test_1.expect)(this.changeElementSearchInput).toBeVisible({ timeout: 30000 });
|
|
645
645
|
await this.changeElementSearchInput.click();
|
|
646
646
|
await this.changeElementSearchInput.fill('');
|
|
647
|
-
await this.changeElementSearchInput.pressSequentially(
|
|
647
|
+
await this.changeElementSearchInput.pressSequentially(searchTerm, {
|
|
648
648
|
delay: 50,
|
|
649
649
|
});
|
|
650
|
+
}
|
|
651
|
+
async searchAndClickRestConnector() {
|
|
652
|
+
await this.searchChangeElementList('REST Outbound');
|
|
650
653
|
await (0, test_1.expect)(this.restConnectorOption).toBeVisible({ timeout: 90000 });
|
|
651
654
|
await this.restConnectorOption.click({ timeout: 90000 });
|
|
652
655
|
}
|
|
@@ -20,9 +20,14 @@ export declare function createUserAndAssignToRole(page: Page, navigationPage: Na
|
|
|
20
20
|
export declare function assignMappingToRole(page: Page, ocIdentityHomePage: OCIdentityHomePage, ocIdentityRolesPage: OCIdentityRolesPage, role: string, mappingRuleId: string, testMappings?: Serializable): Promise<void>;
|
|
21
21
|
export declare function createAndRunProcess(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, processId?: string, tenant?: string): Promise<void>;
|
|
22
22
|
export declare function completeTaskWithRetry(page: Page, taskPanelPage: TaskPanelPage, taskDetailsPage: TaskDetailsPage, taskName: string, taskPriority: string, maxRetries?: number): Promise<void>;
|
|
23
|
-
export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage, connectorSettingsPage: ConnectorSettingsPage, connectorMarketplacePage: ConnectorMarketplacePage, processName: string, url: string, auth: string, resultExpression: string, resultVariable
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage, connectorSettingsPage: ConnectorSettingsPage, connectorMarketplacePage: ConnectorMarketplacePage, processName: string, url: string, auth: string, resultExpression: string, { resultVariable, basicAuthCredentials, page, modelerHomePage, }?: {
|
|
24
|
+
resultVariable?: string;
|
|
25
|
+
basicAuthCredentials?: {
|
|
26
|
+
username: string;
|
|
27
|
+
password: string;
|
|
28
|
+
};
|
|
29
|
+
page?: Page;
|
|
30
|
+
modelerHomePage?: ModelerHomePage;
|
|
26
31
|
}): Promise<void>;
|
|
27
32
|
export declare function assertLocatorVisibleWithPaginated(page: Page, locator: Locator, text: string, timeout?: number): Promise<void>;
|
|
28
33
|
export declare function assertLocatorVisibleWithRetry(page: Page, locator: Locator, text: string, timeout?: number, notVisible?: boolean, maxRetries?: number, clickLocator?: Locator): Promise<void>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.modelAndRunConnectorsDocHandlingDiagram = exports.expectTextWithPagination = exports.modelDiagramFromFile = exports.findTextWithPagination = exports.modelAndRunConnectorsTimerEventDiagram = exports.assertPageTextWithRetry = exports.assertLocatorVisibleWithRetry = exports.assertLocatorVisibleWithPaginated = exports.modelRestConnector = exports.completeTaskWithRetry = exports.createAndRunProcess = exports.assignMappingToRole = exports.createUserAndAssignToRole = exports.runMultipleProcesses = exports.deleteAllUserGroups = void 0;
|
|
4
4
|
const sleep_1 = require("../../utils/sleep");
|
|
5
5
|
const test_1 = require("@playwright/test");
|
|
6
|
+
const ConnectorTemplatePage_1 = require("./ConnectorTemplatePage");
|
|
6
7
|
const fileUpload_1 = require("../../utils/fileUpload");
|
|
7
8
|
const findLocatorInPaginatedList_1 = require("../../utils/findLocatorInPaginatedList");
|
|
8
9
|
const KeycloakUtils_1 = require("../SM-8.9/KeycloakUtils");
|
|
@@ -142,10 +143,55 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
|
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
exports.completeTaskWithRetry = completeTaskWithRetry;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
const REST_CONNECTOR_TEMPLATE_NAME = 'REST Outbound Connector';
|
|
147
|
+
// Web Modeler lists an uploaded template by its file name, not its `name`.
|
|
148
|
+
const REST_CONNECTOR_TEMPLATE_RESOURCE = 'http-json-connector-13';
|
|
149
|
+
// The Marketplace serves only `latest`, which is an 8.10-only template (see
|
|
150
|
+
// camunda/connectors#9966). v13 is the newest REST template whose engine
|
|
151
|
+
// constraint (^8.9) an 8.9 Web Modeler satisfies.
|
|
152
|
+
const REST_CONNECTOR_TEMPLATE_V13_URL = 'https://raw.githubusercontent.com/camunda/connectors/e0977665e7e64ac786a51b34106a3581a24f92ed/connectors/http/rest/element-templates/versioned/http-json-connector-13.json';
|
|
153
|
+
// Skipped due to bug 320: https://github.com/camunda/marketplace-api/issues/320
|
|
154
|
+
// Workaround so the REST connector template is imported correctly: the
|
|
155
|
+
// Marketplace only serves `latest`, which an 8.9 Web Modeler cannot import.
|
|
156
|
+
// Remove this function once the bug is solved.
|
|
157
|
+
async function uploadRestConnectorTemplate(page, modelerHomePage) {
|
|
158
|
+
// Wait for the project list to render before checking it, or a not-yet-loaded
|
|
159
|
+
// list reads as "template missing" and the file is uploaded again.
|
|
160
|
+
await (0, test_1.expect)(modelerHomePage.rows.filter({ hasText: 'BPMN diagram' }).first()).toBeVisible({ timeout: 60000 });
|
|
161
|
+
// The project list is paginated, so a template uploaded by an earlier run can
|
|
162
|
+
// sit past the first page. Filter the whole project instead of counting rows.
|
|
163
|
+
const filterInput = page.getByPlaceholder('Filter table');
|
|
164
|
+
await filterInput.fill(REST_CONNECTOR_TEMPLATE_RESOURCE);
|
|
165
|
+
const templateRow = modelerHomePage.rows.filter({
|
|
166
|
+
hasText: REST_CONNECTOR_TEMPLATE_RESOURCE,
|
|
167
|
+
});
|
|
168
|
+
const alreadyUploaded = await templateRow
|
|
169
|
+
.first()
|
|
170
|
+
.waitFor({ state: 'visible', timeout: 15000 })
|
|
171
|
+
.then(() => true)
|
|
172
|
+
.catch(() => false);
|
|
173
|
+
if (alreadyUploaded) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
await filterInput.fill('');
|
|
177
|
+
const response = await page.request.get(REST_CONNECTOR_TEMPLATE_V13_URL);
|
|
178
|
+
(0, test_1.expect)(response.ok(), `Fetching the REST connector template failed with ${response.status()}`).toBeTruthy();
|
|
179
|
+
const buffer = await response.body();
|
|
180
|
+
(0, test_1.expect)(JSON.parse(buffer.toString('utf-8'))).toMatchObject({
|
|
181
|
+
id: 'io.camunda.connectors.HttpJson.v2',
|
|
182
|
+
name: REST_CONNECTOR_TEMPLATE_NAME,
|
|
183
|
+
version: 13,
|
|
184
|
+
});
|
|
185
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
186
|
+
await modelerHomePage.clickUploadFilesButton();
|
|
187
|
+
await (0, fileUpload_1.uploadFileContent)(page, {
|
|
188
|
+
name: `${REST_CONNECTOR_TEMPLATE_RESOURCE}.json`,
|
|
189
|
+
mimeType: 'application/json',
|
|
190
|
+
buffer,
|
|
191
|
+
});
|
|
192
|
+
await (0, test_1.expect)(templateRow.first()).toBeVisible({ timeout: 60000 });
|
|
193
|
+
}
|
|
194
|
+
async function modelRestConnector(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, url, auth, resultExpression, { resultVariable = '', basicAuthCredentials = { username: '', password: '' }, page, modelerHomePage, } = {}) {
|
|
149
195
|
await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
|
|
150
196
|
timeout: 120000,
|
|
151
197
|
});
|
|
@@ -176,15 +222,30 @@ async function modelRestConnector(modelerCreatePage, connectorSettingsPage, conn
|
|
|
176
222
|
await modelerCreatePage.clickAppendTaskButton();
|
|
177
223
|
await modelerCreatePage.clickChangeTypeButton();
|
|
178
224
|
try {
|
|
225
|
+
await modelerCreatePage.searchChangeElementList('REST Outbound');
|
|
179
226
|
await (0, test_1.expect)(modelerCreatePage.restConnectorOption).toBeVisible({
|
|
180
227
|
timeout: 15000,
|
|
181
228
|
});
|
|
182
229
|
}
|
|
183
230
|
catch (error) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
231
|
+
if (!page || !modelerHomePage) {
|
|
232
|
+
throw new Error('modelRestConnector needs `page` and `modelerHomePage` to upload the REST connector template');
|
|
233
|
+
}
|
|
234
|
+
await modelerHomePage.clickProjectBreadcrumb();
|
|
235
|
+
await uploadRestConnectorTemplate(page, modelerHomePage);
|
|
236
|
+
const connectorTemplatePage = new ConnectorTemplatePage_1.ConnectorTemplatePage(page);
|
|
237
|
+
await modelerHomePage.clickProcessDiagram(REST_CONNECTOR_TEMPLATE_RESOURCE);
|
|
238
|
+
await connectorTemplatePage.publishToProject();
|
|
239
|
+
await modelerHomePage.clickProjectBreadcrumb();
|
|
240
|
+
await page.getByPlaceholder('Filter table').fill(processName);
|
|
241
|
+
await modelerHomePage.clickProcessDiagram(processName);
|
|
242
|
+
await page.reload();
|
|
243
|
+
// Re-select the task element and reopen the change-type panel so
|
|
244
|
+
// clickRestConnectorOption() finds the freshly published connector.
|
|
245
|
+
await modelerCreatePage.secondElement.click({
|
|
246
|
+
force: true,
|
|
247
|
+
timeout: 60000,
|
|
248
|
+
});
|
|
188
249
|
await modelerCreatePage.clickChangeTypeButton();
|
|
189
250
|
}
|
|
190
251
|
await modelerCreatePage.clickRestConnectorOption();
|
|
@@ -16,8 +16,7 @@ SM_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
16
16
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
17
17
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
18
18
|
});
|
|
19
|
-
|
|
20
|
-
SM_8_9_1.test.skip('REST Connector No Auth User Flow', async ({ operateHomePage, modelerHomePage, operateProcessInstancePage, modelerCreatePage, connectorSettingsPage, operateProcessesPage, connectorMarketplacePage, navigationPage, }) => {
|
|
19
|
+
(0, SM_8_9_1.test)('REST Connector No Auth User Flow', async ({ page, operateHomePage, modelerHomePage, operateProcessInstancePage, modelerCreatePage, connectorSettingsPage, operateProcessesPage, connectorMarketplacePage, navigationPage, }) => {
|
|
21
20
|
SM_8_9_1.test.slow();
|
|
22
21
|
const processName = 'REST_Connector_No_Auth_Process' + (await (0, _setup_1.generateRandomStringAsync)(3));
|
|
23
22
|
await SM_8_9_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
@@ -26,7 +25,7 @@ SM_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
26
25
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
27
26
|
});
|
|
28
27
|
await SM_8_9_1.test.step('Create BPMN Diagram with REST Connector and Start Process Instance', async () => {
|
|
29
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_URL, 'noAuth', 'body');
|
|
28
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_URL, 'noAuth', 'body', { page, modelerHomePage });
|
|
30
29
|
await modelerCreatePage.runProcessInstance('', mtTenant);
|
|
31
30
|
await (0, sleep_1.sleep)(20000);
|
|
32
31
|
});
|
|
@@ -41,8 +40,7 @@ SM_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
41
40
|
await operateProcessInstancePage.assertProcessVariableContainsText('message', '"Awesome!"');
|
|
42
41
|
});
|
|
43
42
|
});
|
|
44
|
-
|
|
45
|
-
SM_8_9_1.test.skip('REST Connector Bearer Token Auth User Flow', async ({ operateHomePage, modelerHomePage, modelerCreatePage, connectorSettingsPage, navigationPage, operateProcessInstancePage, operateProcessesPage, connectorMarketplacePage, }) => {
|
|
43
|
+
(0, SM_8_9_1.test)('REST Connector Bearer Token Auth User Flow', async ({ page, operateHomePage, modelerHomePage, modelerCreatePage, connectorSettingsPage, navigationPage, operateProcessInstancePage, operateProcessesPage, connectorMarketplacePage, }) => {
|
|
46
44
|
SM_8_9_1.test.slow();
|
|
47
45
|
const processName = 'REST_Connector_Bearer_Auth_Process' +
|
|
48
46
|
(await (0, _setup_1.generateRandomStringAsync)(3));
|
|
@@ -52,7 +50,7 @@ SM_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
52
50
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
53
51
|
});
|
|
54
52
|
await SM_8_9_1.test.step('Create BPMN Diagram with REST Connector with Basic Auth and Start Process Instance', async () => {
|
|
55
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_URL, 'bearer', '{message:response.body.message}');
|
|
53
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_URL, 'bearer', '{message:response.body.message}', { page, modelerHomePage });
|
|
56
54
|
await modelerCreatePage.runProcessInstance('', mtTenant);
|
|
57
55
|
await (0, sleep_1.sleep)(20000);
|
|
58
56
|
});
|
|
@@ -148,8 +146,7 @@ SM_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
148
146
|
(0, test_1.expect)(result).toBe('completed');
|
|
149
147
|
});
|
|
150
148
|
});
|
|
151
|
-
|
|
152
|
-
SM_8_9_1.test.skip('Connector Secrets User Flow', async ({ operateHomePage, modelerHomePage, navigationPage, modelerCreatePage, connectorSettingsPage, operateProcessInstancePage, operateProcessesPage, connectorMarketplacePage, }) => {
|
|
149
|
+
(0, SM_8_9_1.test)('Connector Secrets User Flow', async ({ page, operateHomePage, modelerHomePage, navigationPage, modelerCreatePage, connectorSettingsPage, operateProcessInstancePage, operateProcessesPage, connectorMarketplacePage, }) => {
|
|
153
150
|
SM_8_9_1.test.slow();
|
|
154
151
|
const processName = 'REST_Connector_Process' + (await (0, _setup_1.generateRandomStringAsync)(3));
|
|
155
152
|
await SM_8_9_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
@@ -158,7 +155,15 @@ SM_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
158
155
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
159
156
|
});
|
|
160
157
|
await SM_8_9_1.test.step('Create BPMN Diagram with REST Connector using secrets and Start Process Instance', async () => {
|
|
161
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_BASIC_AUTH_URL, 'basic', '{message:response.body.message}',
|
|
158
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_BASIC_AUTH_URL, 'basic', '{message:response.body.message}', {
|
|
159
|
+
resultVariable: 'result',
|
|
160
|
+
basicAuthCredentials: {
|
|
161
|
+
username: '{{secrets.username}}',
|
|
162
|
+
password: '{{secrets.password}}',
|
|
163
|
+
},
|
|
164
|
+
page,
|
|
165
|
+
modelerHomePage,
|
|
166
|
+
});
|
|
162
167
|
await modelerCreatePage.runProcessInstance('', mtTenant);
|
|
163
168
|
await (0, sleep_1.sleep)(20000);
|
|
164
169
|
});
|
|
@@ -127,8 +127,7 @@ if (process.env.IS_MT === 'true') {
|
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
|
-
|
|
131
|
-
SM_8_9_1.test.skip('Main User Can Create & Access Tenant - Connectors Flow @tasklistV2', async ({ page, modelerHomePage, modelerCreatePage, operateProcessInstancePage, operateProcessesPage, operateHomePage, navigationPage, managementIdentityTenantPage, connectorSettingsPage, connectorMarketplacePage, optimizeHomePage, optimizeDashboardPage, ocIdentityHomePage, ocTenantPage, }) => {
|
|
130
|
+
(0, SM_8_9_1.test)('Main User Can Create & Access Tenant - Connectors Flow @tasklistV2', async ({ page, modelerHomePage, modelerCreatePage, operateProcessInstancePage, operateProcessesPage, operateHomePage, navigationPage, managementIdentityTenantPage, connectorSettingsPage, connectorMarketplacePage, optimizeHomePage, optimizeDashboardPage, ocIdentityHomePage, ocTenantPage, }) => {
|
|
132
131
|
SM_8_9_1.test.slow();
|
|
133
132
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
134
133
|
const processName = 'Main_User_Connectors_Flow_' + randomString;
|
|
@@ -158,7 +157,7 @@ if (process.env.IS_MT === 'true') {
|
|
|
158
157
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
159
158
|
});
|
|
160
159
|
await SM_8_9_1.test.step('Create A Diagram with a REST Connector and Start Process Instance', async () => {
|
|
161
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_URL, 'noAuth', 'body');
|
|
160
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_URL, 'noAuth', 'body', { page, modelerHomePage });
|
|
162
161
|
await modelerCreatePage.runProcessInstance('', tenantName); //Identity bug https://github.com/camunda/camunda/issues/35834
|
|
163
162
|
});
|
|
164
163
|
await SM_8_9_1.test.step('View Process Instance in Operate & assert process is complete', async () => {
|
|
@@ -258,8 +257,7 @@ if (process.env.IS_MT === 'true') {
|
|
|
258
257
|
});
|
|
259
258
|
}
|
|
260
259
|
});
|
|
261
|
-
|
|
262
|
-
SM_8_9_1.test.skip('Second User Can Access Tenant Created By Main User - Connectors Flow @tasklistV2', async ({ page, modelerHomePage, modelerCreatePage, operateProcessInstancePage, operateProcessesPage, operateHomePage, navigationPage, managementIdentityTenantPage, connectorSettingsPage, connectorMarketplacePage, optimizeHomePage, optimizeDashboardPage, ocIdentityHomePage, ocTenantPage, managementIdentityPage, keycloakAdminPage, keycloakLoginPage, ocIdentityRolesPage, ocIdentityMappingRulesPage, browser, }) => {
|
|
260
|
+
(0, SM_8_9_1.test)('Second User Can Access Tenant Created By Main User - Connectors Flow @tasklistV2', async ({ page, modelerHomePage, modelerCreatePage, operateProcessInstancePage, operateProcessesPage, operateHomePage, navigationPage, managementIdentityTenantPage, connectorSettingsPage, connectorMarketplacePage, optimizeHomePage, optimizeDashboardPage, ocIdentityHomePage, ocTenantPage, managementIdentityPage, keycloakAdminPage, keycloakLoginPage, ocIdentityRolesPage, ocIdentityMappingRulesPage, browser, }) => {
|
|
263
261
|
SM_8_9_1.test.slow();
|
|
264
262
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
265
263
|
const processName = 'Second_User_Connectors_Flow_' + randomString;
|
|
@@ -301,7 +299,7 @@ if (process.env.IS_MT === 'true') {
|
|
|
301
299
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
302
300
|
});
|
|
303
301
|
await SM_8_9_1.test.step('Create A Diagram with a REST Connector and Start Process Instance', async () => {
|
|
304
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_URL, 'noAuth', 'body');
|
|
302
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_URL, 'noAuth', 'body', { page, modelerHomePage });
|
|
305
303
|
await modelerCreatePage.runProcessInstance('', tenantName); //Identity bug https://github.com/camunda/camunda/issues/35834
|
|
306
304
|
});
|
|
307
305
|
await SM_8_9_1.test.step('View Process Instance in Operate & assert process is complete', async () => {
|
|
@@ -386,8 +384,7 @@ if (process.env.IS_MT === 'true') {
|
|
|
386
384
|
});
|
|
387
385
|
}
|
|
388
386
|
});
|
|
389
|
-
|
|
390
|
-
SM_8_9_1.test.skip('User Can Be Assigned To Multiple Tenants @tasklistV2', async ({ page, modelerHomePage, modelerCreatePage, operateProcessInstancePage, operateProcessesPage, operateHomePage, navigationPage, managementIdentityTenantPage, connectorSettingsPage, connectorMarketplacePage, ocIdentityHomePage, ocTenantPage, managementIdentityPage, }) => {
|
|
387
|
+
(0, SM_8_9_1.test)('User Can Be Assigned To Multiple Tenants @tasklistV2', async ({ page, modelerHomePage, modelerCreatePage, operateProcessInstancePage, operateProcessesPage, operateHomePage, navigationPage, managementIdentityTenantPage, connectorSettingsPage, connectorMarketplacePage, ocIdentityHomePage, ocTenantPage, managementIdentityPage, }) => {
|
|
391
388
|
SM_8_9_1.test.slow();
|
|
392
389
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
393
390
|
const processName1 = 'Multiple_Tenant_Flow_1' + randomString;
|
|
@@ -433,14 +430,14 @@ if (process.env.IS_MT === 'true') {
|
|
|
433
430
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
434
431
|
});
|
|
435
432
|
await SM_8_9_1.test.step('Create A Diagram with a REST Connector and Start Process Instance With Tenant 1', async () => {
|
|
436
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName1, constants_1.REST_MOCK_URL, 'noAuth', 'body');
|
|
433
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName1, constants_1.REST_MOCK_URL, 'noAuth', 'body', { page, modelerHomePage });
|
|
437
434
|
await modelerCreatePage.runProcessInstance('', tenantName1); //Identity bug https://github.com/camunda/camunda/issues/35834
|
|
438
435
|
});
|
|
439
436
|
await SM_8_9_1.test.step('Create A Diagram with a REST Connector and Start Process Instance With Tenant 2', async () => {
|
|
440
437
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
441
438
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
442
439
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
443
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName2, constants_1.REST_MOCK_URL, 'noAuth', 'body');
|
|
440
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName2, constants_1.REST_MOCK_URL, 'noAuth', 'body', { page, modelerHomePage });
|
|
444
441
|
await modelerCreatePage.runProcessInstance('', tenantName2);
|
|
445
442
|
});
|
|
446
443
|
await SM_8_9_1.test.step('View Process Instances in Operate, and Assert Process Complete in Operate with Correct Tenant', async () => {
|
|
@@ -141,8 +141,7 @@ SM_8_9_1.test.describe.parallel('Smoke Tests', () => {
|
|
|
141
141
|
});
|
|
142
142
|
console.log(`[${testInfo.title}] Test end: timeout = ${testInfo.timeout}`);
|
|
143
143
|
});
|
|
144
|
-
|
|
145
|
-
SM_8_9_1.test.skip('Most Common REST Connector User Flow @tasklistV2', async ({ context, operateHomePage, modelerHomePage, modelerCreatePage, connectorSettingsPage, navigationPage, operateProcessesPage, operateProcessInstancePage, connectorMarketplacePage, }, testInfo) => {
|
|
144
|
+
(0, SM_8_9_1.test)('Most Common REST Connector User Flow @tasklistV2', async ({ page, context, operateHomePage, modelerHomePage, modelerCreatePage, connectorSettingsPage, navigationPage, operateProcessesPage, operateProcessInstancePage, connectorMarketplacePage, }, testInfo) => {
|
|
146
145
|
SM_8_9_1.test.setTimeout(env_1.isOpenSearch ? 18 * 60 * 1000 : 12 * 60 * 1000);
|
|
147
146
|
console.log(`[${testInfo.title}] Test start: timeout = ${testInfo.timeout}`);
|
|
148
147
|
const processName = 'REST_Connector_Basic_Auth_Process' +
|
|
@@ -155,7 +154,12 @@ SM_8_9_1.test.describe.parallel('Smoke Tests', () => {
|
|
|
155
154
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
156
155
|
});
|
|
157
156
|
await SM_8_9_1.test.step('Create BPMN Diagram with REST Connector with Basic Auth and Start Process Instance', async () => {
|
|
158
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_BASIC_AUTH_URL, 'basic', '{message:response.body.message}',
|
|
157
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, constants_1.REST_MOCK_BASIC_AUTH_URL, 'basic', '{message:response.body.message}', {
|
|
158
|
+
resultVariable: 'result',
|
|
159
|
+
basicAuthCredentials: { username: 'username', password: 'password' },
|
|
160
|
+
page,
|
|
161
|
+
modelerHomePage,
|
|
162
|
+
});
|
|
159
163
|
await modelerCreatePage.runProcessInstance();
|
|
160
164
|
await (0, sleep_1.sleep)(3000);
|
|
161
165
|
});
|