@camunda/e2e-test-suite 0.0.115 → 0.0.116
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.8/ConnectorMarketplacePage.js +2 -0
- package/dist/pages/SM-8.8/ModelerCreatePage.d.ts +13 -0
- package/dist/pages/SM-8.8/ModelerCreatePage.js +47 -0
- package/dist/pages/SM-8.8/UtilitiesPage.d.ts +1 -1
- package/dist/pages/SM-8.8/UtilitiesPage.js +15 -7
- package/dist/tests/SM-8.8/document-handling-user-flows.spec.js +38 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConnectorMarketplacePage = void 0;
|
|
4
|
+
const sleep_1 = require("../../utils/sleep");
|
|
4
5
|
class ConnectorMarketplacePage {
|
|
5
6
|
page;
|
|
6
7
|
searchForConnectorTextbox;
|
|
@@ -23,6 +24,7 @@ class ConnectorMarketplacePage {
|
|
|
23
24
|
}
|
|
24
25
|
async fillSearchForConnectorTextbox(connectorName) {
|
|
25
26
|
await this.searchForConnectorTextbox.fill(connectorName, { timeout: 60000 });
|
|
27
|
+
await (0, sleep_1.sleep)(2000);
|
|
26
28
|
}
|
|
27
29
|
async clickDownloadToProjectButton() {
|
|
28
30
|
await this.downloadToProjectButton.click({ timeout: 60000 });
|
|
@@ -80,6 +80,11 @@ declare class ModelerCreatePage {
|
|
|
80
80
|
readonly variableAssignmentValueTextboxSecondVariable: Locator;
|
|
81
81
|
readonly zeebeClientIdVariable: Locator;
|
|
82
82
|
readonly variableAssignmentValueTextboxThirdVariable: Locator;
|
|
83
|
+
readonly firstPlaceRESTConnector: Locator;
|
|
84
|
+
readonly authenticationPanel: Locator;
|
|
85
|
+
readonly oauthTokenEndpointInput: Locator;
|
|
86
|
+
readonly closeDetailsPanel: Locator;
|
|
87
|
+
readonly openDetailsPanel: Locator;
|
|
83
88
|
constructor(page: Page);
|
|
84
89
|
deployProcessInstance(): Promise<void>;
|
|
85
90
|
clickCloseModalButton(): Promise<void>;
|
|
@@ -182,5 +187,13 @@ declare class ModelerCreatePage {
|
|
|
182
187
|
fillZeebeSecretValue(zeebeSecret: string): Promise<void>;
|
|
183
188
|
fillZeebeRestValue(zeebeUrl: string): Promise<void>;
|
|
184
189
|
embedForm(formName: string): Promise<void>;
|
|
190
|
+
clickFirstPlaceRESTConnector(): Promise<void>;
|
|
191
|
+
setOAuthTokenEndpoint(elementToClick: Locator, endpoint: string, options?: {
|
|
192
|
+
retries?: number;
|
|
193
|
+
settleMs?: number;
|
|
194
|
+
openPanel?: boolean;
|
|
195
|
+
}): Promise<void>;
|
|
196
|
+
clickCloseDetailsPanel(): Promise<void>;
|
|
197
|
+
clickOpenDetailsPanel(): Promise<void>;
|
|
185
198
|
}
|
|
186
199
|
export { ModelerCreatePage };
|
|
@@ -85,6 +85,11 @@ class ModelerCreatePage {
|
|
|
85
85
|
variableAssignmentValueTextboxSecondVariable;
|
|
86
86
|
zeebeClientIdVariable;
|
|
87
87
|
variableAssignmentValueTextboxThirdVariable;
|
|
88
|
+
firstPlaceRESTConnector;
|
|
89
|
+
authenticationPanel;
|
|
90
|
+
oauthTokenEndpointInput;
|
|
91
|
+
closeDetailsPanel;
|
|
92
|
+
openDetailsPanel;
|
|
88
93
|
constructor(page) {
|
|
89
94
|
this.page = page;
|
|
90
95
|
this.generalPanel = page.locator('[data-group-id="group-general"]');
|
|
@@ -227,6 +232,14 @@ class ModelerCreatePage {
|
|
|
227
232
|
.locator('[data-test="properties-panel"]')
|
|
228
233
|
.getByText('zeebeClientId');
|
|
229
234
|
this.variableAssignmentValueTextboxThirdVariable = page.locator('#bio-properties-panel-StartEvent_1-output-2-source div');
|
|
235
|
+
this.firstPlaceRESTConnector = page.locator('g:nth-child(2) > .djs-element > .djs-hit');
|
|
236
|
+
this.authenticationPanel = page
|
|
237
|
+
.locator('div')
|
|
238
|
+
.filter({ hasText: /^Authentication$/ })
|
|
239
|
+
.first();
|
|
240
|
+
this.oauthTokenEndpointInput = page.getByLabel('OAuth 2.0 token endpoint');
|
|
241
|
+
this.closeDetailsPanel = page.getByTitle('Close Details Panel');
|
|
242
|
+
this.openDetailsPanel = page.getByTitle('Open Details Panel');
|
|
230
243
|
}
|
|
231
244
|
async deployProcessInstance() {
|
|
232
245
|
await this.clickDeployButton();
|
|
@@ -972,5 +985,39 @@ class ModelerCreatePage {
|
|
|
972
985
|
await this.clickForm(formName);
|
|
973
986
|
await this.clickEmbedButton();
|
|
974
987
|
}
|
|
988
|
+
async clickFirstPlaceRESTConnector() {
|
|
989
|
+
await this.firstPlaceRESTConnector.click({ timeout: 60000 });
|
|
990
|
+
}
|
|
991
|
+
async setOAuthTokenEndpoint(elementToClick, endpoint, options) {
|
|
992
|
+
const retries = options?.retries ?? 2;
|
|
993
|
+
const settleMs = options?.settleMs ?? 250;
|
|
994
|
+
const openPanel = options?.openPanel ?? false;
|
|
995
|
+
await elementToClick.click({ timeout: 60000 });
|
|
996
|
+
if (openPanel) {
|
|
997
|
+
await this.clickOpenDetailsPanel();
|
|
998
|
+
}
|
|
999
|
+
await this.authenticationPanel.click({ timeout: 60000 });
|
|
1000
|
+
let lastError;
|
|
1001
|
+
for (let attempt = 1; attempt <= retries; attempt++) {
|
|
1002
|
+
try {
|
|
1003
|
+
await (0, test_1.expect)(this.oauthTokenEndpointInput).toBeVisible({ timeout: 3000 });
|
|
1004
|
+
await this.oauthTokenEndpointInput.click({ timeout: 3000 });
|
|
1005
|
+
await this.oauthTokenEndpointInput.fill(endpoint, { timeout: 30000 });
|
|
1006
|
+
return;
|
|
1007
|
+
}
|
|
1008
|
+
catch (err) {
|
|
1009
|
+
lastError = err;
|
|
1010
|
+
await this.authenticationPanel.click({ timeout: 60000 });
|
|
1011
|
+
await (0, sleep_1.sleep)(settleMs);
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
throw new Error(`Failed to set OAuth 2.0 token endpoint after ${retries} attempt(s). Last error: ${String(lastError)}`);
|
|
1015
|
+
}
|
|
1016
|
+
async clickCloseDetailsPanel() {
|
|
1017
|
+
await this.closeDetailsPanel.click({ timeout: 30000 });
|
|
1018
|
+
}
|
|
1019
|
+
async clickOpenDetailsPanel() {
|
|
1020
|
+
await this.openDetailsPanel.click({ timeout: 30000 });
|
|
1021
|
+
}
|
|
975
1022
|
}
|
|
976
1023
|
exports.ModelerCreatePage = ModelerCreatePage;
|
|
@@ -31,4 +31,4 @@ export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage
|
|
|
31
31
|
export declare function findTextWithPagination(page: Page, text: string, timeout?: number, action?: (locator: Locator) => Promise<void>): Promise<boolean>;
|
|
32
32
|
export declare function modelDiagramFromFile(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, fileName?: string, nrOfRenamedUserTasks?: number, taskName?: string): Promise<void>;
|
|
33
33
|
export declare function expectTextWithPagination(page: Page, text: string, shouldExist?: boolean, timeout?: number): Promise<void>;
|
|
34
|
-
export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage,
|
|
34
|
+
export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string, endpoint: string): Promise<void>;
|
|
@@ -390,12 +390,12 @@ async function expectTextWithPagination(page, text, shouldExist = true, timeout
|
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
exports.expectTextWithPagination = expectTextWithPagination;
|
|
393
|
-
async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage,
|
|
393
|
+
async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, zeebeUrl, zeebeClientId, zeebeClientSecret, endpoint) {
|
|
394
394
|
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
395
395
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
396
396
|
await modelerHomePage.clickUploadFilesButton();
|
|
397
|
-
await (0, fileUpload_1.uploadFile)(page, '
|
|
398
|
-
await modelerHomePage.clickProcessDiagram('
|
|
397
|
+
await (0, fileUpload_1.uploadFile)(page, 'SM_Document_Handling_Connectors_User_Flow.bpmn');
|
|
398
|
+
await modelerHomePage.clickProcessDiagram('SM_Document_Handling_Connectors_User_Flow');
|
|
399
399
|
await modelerCreatePage.clickDiagramBreadcrumb();
|
|
400
400
|
await modelerCreatePage.clickEditDiagramNameButton();
|
|
401
401
|
await modelerCreatePage.enterDiagramName(processName);
|
|
@@ -405,11 +405,8 @@ async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modele
|
|
|
405
405
|
await modelerCreatePage.clickIdInput();
|
|
406
406
|
await modelerCreatePage.fillIdInput(processName);
|
|
407
407
|
await (0, sleep_1.sleep)(10000);
|
|
408
|
-
await modelerCreatePage.
|
|
408
|
+
await modelerCreatePage.clickFirstPlaceRESTConnector();
|
|
409
409
|
await modelerCreatePage.clickChangeTypeButton();
|
|
410
|
-
await (0, test_1.expect)(modelerCreatePage.marketPlaceButton).toBeVisible({
|
|
411
|
-
timeout: 120000,
|
|
412
|
-
});
|
|
413
410
|
await modelerCreatePage.clickMarketPlaceButton();
|
|
414
411
|
await connectorMarketplacePage.clickSearchForConnectorTextbox();
|
|
415
412
|
await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
|
|
@@ -418,6 +415,17 @@ async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modele
|
|
|
418
415
|
await page.reload();
|
|
419
416
|
await (0, sleep_1.sleep)(5000);
|
|
420
417
|
await modelerCreatePage.fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret);
|
|
418
|
+
await modelerCreatePage.setOAuthTokenEndpoint(page.locator('.djs-hit').first(), endpoint);
|
|
419
|
+
await (0, sleep_1.sleep)(2000);
|
|
420
|
+
await modelerCreatePage.setOAuthTokenEndpoint(page.locator('g:nth-child(3) > .djs-element > .djs-hit'), endpoint);
|
|
421
|
+
await (0, sleep_1.sleep)(2000);
|
|
422
|
+
await modelerCreatePage.setOAuthTokenEndpoint(page.locator('g:nth-child(6) > .djs-element > .djs-hit'), endpoint);
|
|
423
|
+
await (0, sleep_1.sleep)(2000);
|
|
424
|
+
await modelerCreatePage.clickCloseDetailsPanel();
|
|
425
|
+
await modelerCreatePage.setOAuthTokenEndpoint(page.locator('g:nth-child(7) > .djs-element > .djs-hit'), endpoint, { openPanel: true });
|
|
426
|
+
await (0, sleep_1.sleep)(2000);
|
|
427
|
+
await modelerCreatePage.clickCloseDetailsPanel();
|
|
428
|
+
await modelerCreatePage.setOAuthTokenEndpoint(page.locator('g:nth-child(9) > .djs-element > .djs-hit'), endpoint, { openPanel: true });
|
|
421
429
|
await modelerCreatePage.runProcessInstance();
|
|
422
430
|
}
|
|
423
431
|
exports.modelAndRunConnectorsDocHandlingDiagram = modelAndRunConnectorsDocHandlingDiagram;
|
|
@@ -5,6 +5,7 @@ const SM_8_8_1 = require("../../fixtures/SM-8.8");
|
|
|
5
5
|
const _setup_1 = require("../../test-setup.js");
|
|
6
6
|
const sleep_1 = require("../../utils/sleep");
|
|
7
7
|
const fileUpload_1 = require("../../utils/fileUpload");
|
|
8
|
+
const UtilitiesPage_1 = require("../../pages/SM-8.8/UtilitiesPage");
|
|
8
9
|
if (process.env.IS_DS === 'true') {
|
|
9
10
|
SM_8_8_1.test.describe.configure({ mode: 'parallel' });
|
|
10
11
|
SM_8_8_1.test.describe('AWS Document Handling User Flows Test', () => {
|
|
@@ -113,5 +114,42 @@ if (process.env.IS_DS === 'true') {
|
|
|
113
114
|
await operateProcessInstancePage.assertProcessVariableContainsText('Upload_Files', 'aws');
|
|
114
115
|
});
|
|
115
116
|
});
|
|
117
|
+
(0, SM_8_8_1.test)('Document Handling Connectors User Flow - AWS @tasklistV2', async ({ page, navigationPage, modelerHomePage, modelerCreatePage, operateHomePage, operateProcessesPage, connectorMarketplacePage, operateProcessInstancePage, ocIdentityHomePage, ocIdentityRolesPage, }) => {
|
|
118
|
+
const processName = 'Document_Handling_Connectors_User_Flow_AWS_Process' +
|
|
119
|
+
(await (0, _setup_1.generateRandomStringAsync)(3));
|
|
120
|
+
const baseURL = process.env.PLAYWRIGHT_BASE_URL ||
|
|
121
|
+
`https://eks-${process.env.BASE_URL}.qa.aws.camunda.cloud`;
|
|
122
|
+
const clientSecret = process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_CLIENTS_SECRET;
|
|
123
|
+
const endpoint = `${baseURL}/auth/realms/camunda-platform/protocol/openid-connect/token`;
|
|
124
|
+
await SM_8_8_1.test.step('Grant client admin access', async () => {
|
|
125
|
+
await navigationPage.goToOCIdentity();
|
|
126
|
+
await ocIdentityHomePage.clickRolesTab();
|
|
127
|
+
await ocIdentityRolesPage.clickRole('admin');
|
|
128
|
+
await ocIdentityRolesPage.addClientToRole('test');
|
|
129
|
+
});
|
|
130
|
+
await SM_8_8_1.test.step('Open Cross Component Test Project and Create a REST Connector Document Handling Flow', async () => {
|
|
131
|
+
await navigationPage.goToModeler();
|
|
132
|
+
await (0, UtilitiesPage_1.modelAndRunConnectorsDocHandlingDiagram)(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, `"${baseURL}/orchestration"`, `"test"`, `"${clientSecret}"`, endpoint);
|
|
133
|
+
});
|
|
134
|
+
await SM_8_8_1.test.step('View Process Instance in Operate, assert it completes and assert variable values are correct', async () => {
|
|
135
|
+
await navigationPage.goToOperate();
|
|
136
|
+
await operateHomePage.clickProcessesTab();
|
|
137
|
+
await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
|
|
138
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('doc', 'aws');
|
|
139
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('doc', '14e564c347119f8bdde27c80ff5b3cb8d92709c5a6177b74cde568c5503c1f12');
|
|
140
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('doc', '72519');
|
|
141
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('doc', 'image/jpeg');
|
|
142
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('doc2', 'aws');
|
|
143
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('doc2', '14e564c347119f8bdde27c80ff5b3cb8d92709c5a6177b74cde568c5503c1f12');
|
|
144
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('doc2', '72519');
|
|
145
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('doc2', 'image/jpeg');
|
|
146
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('uploadBatch', 'aws');
|
|
147
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('uploadBatch', '201');
|
|
148
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('uploadDoc2', 'aws');
|
|
149
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('uploadDoc2', '201');
|
|
150
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('uploadDoc2', 'aws');
|
|
151
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('GetDocUpload', '200');
|
|
152
|
+
});
|
|
153
|
+
});
|
|
116
154
|
});
|
|
117
155
|
}
|