@camunda/e2e-test-suite 0.0.65 → 0.0.67
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/FormJsPage.d.ts +12 -0
- package/dist/pages/SM-8.8/FormJsPage.js +33 -0
- package/dist/pages/SM-8.8/ModelerCreatePage.d.ts +13 -0
- package/dist/pages/SM-8.8/ModelerCreatePage.js +77 -0
- package/dist/pages/SM-8.8/OperateProcessInstancePage.d.ts +2 -0
- package/dist/pages/SM-8.8/OperateProcessInstancePage.js +35 -0
- package/dist/pages/SM-8.8/TaskDetailsPage.d.ts +5 -0
- package/dist/pages/SM-8.8/TaskDetailsPage.js +22 -0
- package/dist/pages/SM-8.8/UtilitiesPage.d.ts +1 -0
- package/dist/pages/SM-8.8/UtilitiesPage.js +32 -1
- package/dist/tests/SM-8.8/document-handling-user-flows.spec.d.ts +1 -0
- package/dist/tests/SM-8.8/document-handling-user-flows.spec.js +117 -0
- package/package.json +1 -1
|
@@ -4,10 +4,22 @@ declare class FormJsPage {
|
|
|
4
4
|
readonly aiFormGeneratorButton: Locator;
|
|
5
5
|
readonly formRequestInput: Locator;
|
|
6
6
|
readonly generateFormButton: Locator;
|
|
7
|
+
readonly formEditor: Locator;
|
|
8
|
+
readonly filePicker: Locator;
|
|
9
|
+
readonly generalPanel: Locator;
|
|
10
|
+
readonly keyInput: Locator;
|
|
11
|
+
readonly uploadMultipleFilesToggle: Locator;
|
|
12
|
+
readonly documentReferenceInput: Locator;
|
|
13
|
+
readonly documentPreview: Locator;
|
|
7
14
|
constructor(page: Page);
|
|
8
15
|
clickAIFormGeneratorButton(): Promise<void>;
|
|
9
16
|
clickFormRequestInput(): Promise<void>;
|
|
10
17
|
fillFormRequestInput(formRequest: string): Promise<void>;
|
|
11
18
|
clickGenerateFormButton(): Promise<void>;
|
|
19
|
+
dragAndDrop(source: Locator, target: Locator): Promise<void>;
|
|
20
|
+
clickGeneralPropertiesPanel(): Promise<void>;
|
|
21
|
+
fillKeyInput(key: string): Promise<void>;
|
|
22
|
+
enableUploadMultipleFiles(): Promise<void>;
|
|
23
|
+
filldocumentReferenceInput(key: string): Promise<void>;
|
|
12
24
|
}
|
|
13
25
|
export { FormJsPage };
|
|
@@ -6,6 +6,13 @@ class FormJsPage {
|
|
|
6
6
|
aiFormGeneratorButton;
|
|
7
7
|
formRequestInput;
|
|
8
8
|
generateFormButton;
|
|
9
|
+
formEditor;
|
|
10
|
+
filePicker;
|
|
11
|
+
generalPanel;
|
|
12
|
+
keyInput;
|
|
13
|
+
uploadMultipleFilesToggle;
|
|
14
|
+
documentReferenceInput;
|
|
15
|
+
documentPreview;
|
|
9
16
|
constructor(page) {
|
|
10
17
|
this.page = page;
|
|
11
18
|
this.aiFormGeneratorButton = page.getByRole('button', {
|
|
@@ -13,6 +20,15 @@ class FormJsPage {
|
|
|
13
20
|
});
|
|
14
21
|
this.formRequestInput = page.getByPlaceholder('A form for an american standard loan request');
|
|
15
22
|
this.generateFormButton = page.getByRole('button', { name: 'Generate form' });
|
|
23
|
+
this.formEditor = page.getByLabel('Form Definition');
|
|
24
|
+
this.filePicker = page.locator('button[data-field-type="filepicker"]');
|
|
25
|
+
this.generalPanel = page.getByTitle('General').first();
|
|
26
|
+
this.keyInput = page.getByRole('textbox', { name: 'key' });
|
|
27
|
+
this.uploadMultipleFilesToggle = page.locator('div[data-entry-id="multiple"] .bio-properties-panel-toggle-switch__switcher');
|
|
28
|
+
this.documentReferenceInput = page.getByRole('textbox', {
|
|
29
|
+
name: 'document reference',
|
|
30
|
+
});
|
|
31
|
+
this.documentPreview = page.locator('button[data-field-type="documentPreview"]');
|
|
16
32
|
}
|
|
17
33
|
async clickAIFormGeneratorButton() {
|
|
18
34
|
await this.aiFormGeneratorButton.click();
|
|
@@ -26,5 +42,22 @@ class FormJsPage {
|
|
|
26
42
|
async clickGenerateFormButton() {
|
|
27
43
|
await this.generateFormButton.click();
|
|
28
44
|
}
|
|
45
|
+
async dragAndDrop(source, target) {
|
|
46
|
+
await source.waitFor();
|
|
47
|
+
await target.waitFor();
|
|
48
|
+
await source.dragTo(target);
|
|
49
|
+
}
|
|
50
|
+
async clickGeneralPropertiesPanel() {
|
|
51
|
+
await this.generalPanel.click({ timeout: 60000 });
|
|
52
|
+
}
|
|
53
|
+
async fillKeyInput(key) {
|
|
54
|
+
await this.keyInput.fill(key, { timeout: 60000 });
|
|
55
|
+
}
|
|
56
|
+
async enableUploadMultipleFiles() {
|
|
57
|
+
await this.uploadMultipleFilesToggle.click({ timeout: 60000 });
|
|
58
|
+
}
|
|
59
|
+
async filldocumentReferenceInput(key) {
|
|
60
|
+
await this.documentReferenceInput.fill(key, { timeout: 60000 });
|
|
61
|
+
}
|
|
29
62
|
}
|
|
30
63
|
exports.FormJsPage = FormJsPage;
|
|
@@ -71,6 +71,14 @@ declare class ModelerCreatePage {
|
|
|
71
71
|
readonly closeModalButton: Locator;
|
|
72
72
|
readonly deployErrorMessage: Locator;
|
|
73
73
|
readonly bpmnReplaceMenu: Locator;
|
|
74
|
+
readonly connectorsDocHandlingStartEventElement: Locator;
|
|
75
|
+
readonly startEventVariableInputWithThreeVariables: Locator;
|
|
76
|
+
readonly zeebeRestAddressVariable: Locator;
|
|
77
|
+
readonly variableAssignmentValueTextbox: Locator;
|
|
78
|
+
readonly zeebeSecretVariable: Locator;
|
|
79
|
+
readonly variableAssignmentValueTextboxSecondVariable: Locator;
|
|
80
|
+
readonly zeebeClientIdVariable: Locator;
|
|
81
|
+
readonly variableAssignmentValueTextboxThirdVariable: Locator;
|
|
74
82
|
constructor(page: Page);
|
|
75
83
|
deployProcessInstance(): Promise<void>;
|
|
76
84
|
clickCloseModalButton(): Promise<void>;
|
|
@@ -164,5 +172,10 @@ declare class ModelerCreatePage {
|
|
|
164
172
|
fillTimerValue(value: string): Promise<void>;
|
|
165
173
|
clickEighthPlacedElement(): Promise<void>;
|
|
166
174
|
assertNameInput(processName: string): Promise<void>;
|
|
175
|
+
fillStartEventVariablesForDocHandling(zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string): Promise<void>;
|
|
176
|
+
fillZeebeClientId(clientId: string): Promise<void>;
|
|
177
|
+
fillZeebeSecretValue(zeebeSecret: string): Promise<void>;
|
|
178
|
+
fillZeebeRestValue(zeebeUrl: string): Promise<void>;
|
|
179
|
+
embedForm(formName: string): Promise<void>;
|
|
167
180
|
}
|
|
168
181
|
export { ModelerCreatePage };
|
|
@@ -76,6 +76,14 @@ class ModelerCreatePage {
|
|
|
76
76
|
closeModalButton;
|
|
77
77
|
deployErrorMessage;
|
|
78
78
|
bpmnReplaceMenu;
|
|
79
|
+
connectorsDocHandlingStartEventElement;
|
|
80
|
+
startEventVariableInputWithThreeVariables;
|
|
81
|
+
zeebeRestAddressVariable;
|
|
82
|
+
variableAssignmentValueTextbox;
|
|
83
|
+
zeebeSecretVariable;
|
|
84
|
+
variableAssignmentValueTextboxSecondVariable;
|
|
85
|
+
zeebeClientIdVariable;
|
|
86
|
+
variableAssignmentValueTextboxThirdVariable;
|
|
79
87
|
constructor(page) {
|
|
80
88
|
this.page = page;
|
|
81
89
|
this.generalPanel = page.locator('[data-group-id="group-general"]');
|
|
@@ -201,6 +209,22 @@ class ModelerCreatePage {
|
|
|
201
209
|
.getByRole('button', { name: 'Close' });
|
|
202
210
|
this.deployErrorMessage = page.getByText('The diagram failed to deploy & run');
|
|
203
211
|
this.bpmnReplaceMenu = page.getByTestId('bpmn-replace');
|
|
212
|
+
this.connectorsDocHandlingStartEventElement = page.locator('g:nth-child(5) > .djs-element > .djs-hit');
|
|
213
|
+
this.startEventVariableInputWithThreeVariables = page.getByText('Outputs3');
|
|
214
|
+
this.zeebeRestAddressVariable = page
|
|
215
|
+
.locator('[data-test="properties-panel"]')
|
|
216
|
+
.getByText('zeebeRestAdress');
|
|
217
|
+
this.variableAssignmentValueTextbox = page.getByRole('textbox', {
|
|
218
|
+
name: 'Variable assignment value',
|
|
219
|
+
});
|
|
220
|
+
this.zeebeSecretVariable = page
|
|
221
|
+
.locator('[data-test="properties-panel"]')
|
|
222
|
+
.getByText('zeebeSecret');
|
|
223
|
+
this.variableAssignmentValueTextboxSecondVariable = page.locator('#bio-properties-panel-StartEvent_1-output-1-source div');
|
|
224
|
+
this.zeebeClientIdVariable = page
|
|
225
|
+
.locator('[data-test="properties-panel"]')
|
|
226
|
+
.getByText('zeebeClientId');
|
|
227
|
+
this.variableAssignmentValueTextboxThirdVariable = page.locator('#bio-properties-panel-StartEvent_1-output-2-source div');
|
|
204
228
|
}
|
|
205
229
|
async deployProcessInstance() {
|
|
206
230
|
await this.clickDeployButton();
|
|
@@ -881,5 +905,58 @@ class ModelerCreatePage {
|
|
|
881
905
|
await (0, test_1.expect)(this.nameInput).toHaveValue(processName);
|
|
882
906
|
}
|
|
883
907
|
}
|
|
908
|
+
async fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret) {
|
|
909
|
+
console.log(`URL: ${zeebeUrl}, ClientId: ${zeebeClientId}, Secret: ${zeebeClientSecret}`);
|
|
910
|
+
(0, test_1.expect)(this.connectorsDocHandlingStartEventElement).toBeVisible({
|
|
911
|
+
timeout: 60000,
|
|
912
|
+
});
|
|
913
|
+
await this.connectorsDocHandlingStartEventElement.click();
|
|
914
|
+
(0, test_1.expect)(this.startEventVariableInputWithThreeVariables).toBeVisible({
|
|
915
|
+
timeout: 60000,
|
|
916
|
+
});
|
|
917
|
+
await this.startEventVariableInputWithThreeVariables.click();
|
|
918
|
+
await this.fillZeebeRestValue(zeebeUrl);
|
|
919
|
+
await this.fillZeebeSecretValue(zeebeClientSecret);
|
|
920
|
+
await this.fillZeebeClientId(zeebeClientId);
|
|
921
|
+
await (0, sleep_1.sleep)(1000);
|
|
922
|
+
}
|
|
923
|
+
async fillZeebeClientId(clientId) {
|
|
924
|
+
await this.zeebeClientIdVariable.click();
|
|
925
|
+
await (0, test_1.expect)(this.variableAssignmentValueTextboxThirdVariable).toBeVisible({
|
|
926
|
+
timeout: 60000,
|
|
927
|
+
});
|
|
928
|
+
await this.variableAssignmentValueTextboxThirdVariable.click();
|
|
929
|
+
await (0, sleep_1.sleep)(1000);
|
|
930
|
+
await this.variableAssignmentValueTextboxThirdVariable.fill('');
|
|
931
|
+
await this.variableAssignmentValueTextboxThirdVariable.fill(clientId);
|
|
932
|
+
await (0, test_1.expect)(this.variableAssignmentValueTextboxThirdVariable).toHaveText(clientId);
|
|
933
|
+
}
|
|
934
|
+
async fillZeebeSecretValue(zeebeSecret) {
|
|
935
|
+
await this.zeebeSecretVariable.click();
|
|
936
|
+
await (0, test_1.expect)(this.variableAssignmentValueTextboxSecondVariable).toBeVisible({
|
|
937
|
+
timeout: 60000,
|
|
938
|
+
});
|
|
939
|
+
await this.variableAssignmentValueTextboxSecondVariable.click();
|
|
940
|
+
await (0, sleep_1.sleep)(1000);
|
|
941
|
+
await this.variableAssignmentValueTextboxSecondVariable.fill('');
|
|
942
|
+
await this.variableAssignmentValueTextboxSecondVariable.fill(zeebeSecret);
|
|
943
|
+
await (0, test_1.expect)(this.variableAssignmentValueTextboxSecondVariable).toHaveText(zeebeSecret);
|
|
944
|
+
}
|
|
945
|
+
async fillZeebeRestValue(zeebeUrl) {
|
|
946
|
+
await this.zeebeRestAddressVariable.click();
|
|
947
|
+
await (0, test_1.expect)(this.variableAssignmentValueTextbox).toBeVisible({
|
|
948
|
+
timeout: 60000,
|
|
949
|
+
});
|
|
950
|
+
await this.variableAssignmentValueTextbox.click();
|
|
951
|
+
await (0, sleep_1.sleep)(1000);
|
|
952
|
+
await this.variableAssignmentValueTextbox.fill('');
|
|
953
|
+
await this.variableAssignmentValueTextbox.fill(zeebeUrl);
|
|
954
|
+
await (0, test_1.expect)(this.variableAssignmentValueTextbox).toHaveText(zeebeUrl);
|
|
955
|
+
}
|
|
956
|
+
async embedForm(formName) {
|
|
957
|
+
await this.clickEmbedFormButton();
|
|
958
|
+
await this.clickForm(formName);
|
|
959
|
+
await this.clickEmbedButton();
|
|
960
|
+
}
|
|
884
961
|
}
|
|
885
962
|
exports.ModelerCreatePage = ModelerCreatePage;
|
|
@@ -17,5 +17,7 @@ declare class OperateProcessInstancePage {
|
|
|
17
17
|
activeUserTaskIconVisibleAssertion(taskName: string): Promise<void>;
|
|
18
18
|
activeUserTaskIconNotVisibleAssertion(taskName: string): Promise<void>;
|
|
19
19
|
tenantNameAssertion(name: string): Promise<void>;
|
|
20
|
+
assertProcessCompleteStatusWithRetry(timeout?: number, maxRetries?: number): Promise<void>;
|
|
21
|
+
assertProcessVariableContainsText(variableName: string, text: string): Promise<void>;
|
|
20
22
|
}
|
|
21
23
|
export { OperateProcessInstancePage };
|
|
@@ -128,5 +128,40 @@ class OperateProcessInstancePage {
|
|
|
128
128
|
async tenantNameAssertion(name) {
|
|
129
129
|
await (0, test_1.expect)(this.page.getByRole('cell', { name: name, exact: true })).toBeVisible({ timeout: 60000 });
|
|
130
130
|
}
|
|
131
|
+
async assertProcessCompleteStatusWithRetry(timeout = 60000, maxRetries = 10) {
|
|
132
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
133
|
+
try {
|
|
134
|
+
await (0, test_1.expect)(this.completedIcon).toBeVisible({
|
|
135
|
+
timeout: timeout,
|
|
136
|
+
});
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
if (attempt < maxRetries - 1) {
|
|
141
|
+
console.warn(`Process complete status attempt ${attempt + 1} failed. Retrying...`);
|
|
142
|
+
await this.page.reload();
|
|
143
|
+
await (0, sleep_1.sleep)(5000);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
throw new Error(`Assertion failed after ${maxRetries} attempts`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
async assertProcessVariableContainsText(variableName, text) {
|
|
152
|
+
const maxRetries = 3;
|
|
153
|
+
for (let retries = 0; retries < maxRetries; retries++) {
|
|
154
|
+
try {
|
|
155
|
+
await (0, test_1.expect)(this.page.getByTestId(`variable-${variableName}`)).toContainText(text, { timeout: 30000 });
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
console.log(`Failed to assert variable ${variableName}` + error);
|
|
160
|
+
await this.page.reload();
|
|
161
|
+
await (0, sleep_1.sleep)(10000);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
throw new Error(`Failed to assert variable ${variableName} after ${maxRetries} attempts.`);
|
|
165
|
+
}
|
|
131
166
|
}
|
|
132
167
|
exports.OperateProcessInstancePage = OperateProcessInstancePage;
|
|
@@ -31,6 +31,8 @@ declare class TaskDetailsPage {
|
|
|
31
31
|
readonly textInput: Locator;
|
|
32
32
|
readonly taskCompletedBanner: Locator;
|
|
33
33
|
readonly assignedToMeText: Locator;
|
|
34
|
+
readonly noPreviewContainer: Locator;
|
|
35
|
+
readonly previewContainer: Locator;
|
|
34
36
|
constructor(page: Page);
|
|
35
37
|
clickAssignToMeButton(): Promise<void>;
|
|
36
38
|
clickUnassignButton(): Promise<void>;
|
|
@@ -60,5 +62,8 @@ declare class TaskDetailsPage {
|
|
|
60
62
|
fillTextInput(value: string): Promise<void>;
|
|
61
63
|
priorityAssertion(priority: string): Promise<void>;
|
|
62
64
|
taskAssertion(name: string): Promise<void>;
|
|
65
|
+
assertLoadedImage(documentName: string): Promise<void>;
|
|
66
|
+
assertDocumentDownloadButton(documentName: string): Promise<void>;
|
|
67
|
+
assertPdfPreviewViewerExists(): Promise<void>;
|
|
63
68
|
}
|
|
64
69
|
export { TaskDetailsPage };
|
|
@@ -51,6 +51,8 @@ class TaskDetailsPage {
|
|
|
51
51
|
textInput;
|
|
52
52
|
taskCompletedBanner;
|
|
53
53
|
assignedToMeText;
|
|
54
|
+
noPreviewContainer;
|
|
55
|
+
previewContainer;
|
|
54
56
|
constructor(page) {
|
|
55
57
|
this.page = page;
|
|
56
58
|
this.assignToMeButton = page.getByRole('button', { name: 'Assign to me' });
|
|
@@ -96,6 +98,8 @@ class TaskDetailsPage {
|
|
|
96
98
|
this.assignedToMeText = page
|
|
97
99
|
.getByTestId('assignee')
|
|
98
100
|
.getByText('Assigned to me');
|
|
101
|
+
this.noPreviewContainer = this.page.locator('[class = "fjs-documentPreview-non-preview-item fjs-documentPreview-single-document-container"]');
|
|
102
|
+
this.previewContainer = this.page.locator('[class = "fjs-documentPreview-single-document-container"]');
|
|
99
103
|
}
|
|
100
104
|
async clickAssignToMeButton() {
|
|
101
105
|
await (0, test_1.expect)(this.assignToMeButton).toBeVisible({ timeout: 60000 });
|
|
@@ -222,5 +226,23 @@ class TaskDetailsPage {
|
|
|
222
226
|
}
|
|
223
227
|
throw new Error(`Task not visible after ${maxRetries} attempts.`);
|
|
224
228
|
}
|
|
229
|
+
async assertLoadedImage(documentName) {
|
|
230
|
+
await (0, test_1.expect)(this.page.locator(`img[alt="${documentName}"]`)).toBeVisible({
|
|
231
|
+
timeout: 60000,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
async assertDocumentDownloadButton(documentName) {
|
|
235
|
+
await (0, test_1.expect)(this.page.locator(`button[aria-label="Download ${documentName}"]`)).toBeVisible({ timeout: 60000 });
|
|
236
|
+
}
|
|
237
|
+
async assertPdfPreviewViewerExists() {
|
|
238
|
+
const containers = this.page.locator('[class="fjs-documentPreview-single-document-container"]');
|
|
239
|
+
const firstPdfViewer = containers
|
|
240
|
+
.first()
|
|
241
|
+
.locator('.fjs-documentPreview-pdf-viewer');
|
|
242
|
+
const lastPdfViewer = containers
|
|
243
|
+
.last()
|
|
244
|
+
.locator('.fjs-documentPreview-pdf-viewer');
|
|
245
|
+
await (0, test_1.expect)(firstPdfViewer.or(lastPdfViewer)).toBeVisible();
|
|
246
|
+
}
|
|
225
247
|
}
|
|
226
248
|
exports.TaskDetailsPage = TaskDetailsPage;
|
|
@@ -31,3 +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, clusterName: string, zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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;
|
|
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
6
|
const fileUpload_1 = require("../../utils/fileUpload");
|
|
@@ -393,3 +393,34 @@ async function expectTextWithPagination(page, text, shouldExist = true, timeout
|
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
exports.expectTextWithPagination = expectTextWithPagination;
|
|
396
|
+
async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modelerHomePage, processName, page, connectorMarketplacePage, clusterName, zeebeUrl, zeebeClientId, zeebeClientSecret) {
|
|
397
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
398
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
399
|
+
await modelerHomePage.clickUploadFilesButton();
|
|
400
|
+
await (0, fileUpload_1.uploadFile)(page, 'Connectors Document Handling.bpmn');
|
|
401
|
+
await modelerHomePage.clickProcessDiagram('Connectors Document Handling');
|
|
402
|
+
await modelerCreatePage.clickDiagramBreadcrumb();
|
|
403
|
+
await modelerCreatePage.clickEditDiagramNameButton();
|
|
404
|
+
await modelerCreatePage.enterDiagramName(processName);
|
|
405
|
+
await modelerCreatePage.clickGeneralPropertiesPanel();
|
|
406
|
+
await modelerCreatePage.clickNameInput();
|
|
407
|
+
await modelerCreatePage.fillNameInput(processName);
|
|
408
|
+
await modelerCreatePage.clickIdInput();
|
|
409
|
+
await modelerCreatePage.fillIdInput(processName);
|
|
410
|
+
await (0, sleep_1.sleep)(10000);
|
|
411
|
+
await modelerCreatePage.clickSecondPlacedElement();
|
|
412
|
+
await modelerCreatePage.clickChangeTypeButton();
|
|
413
|
+
await (0, test_1.expect)(modelerCreatePage.marketPlaceButton).toBeVisible({
|
|
414
|
+
timeout: 120000,
|
|
415
|
+
});
|
|
416
|
+
await modelerCreatePage.clickMarketPlaceButton();
|
|
417
|
+
await connectorMarketplacePage.clickSearchForConnectorTextbox();
|
|
418
|
+
await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
|
|
419
|
+
await connectorMarketplacePage.downloadConnectorToProject();
|
|
420
|
+
await (0, sleep_1.sleep)(5000);
|
|
421
|
+
await page.reload();
|
|
422
|
+
await (0, sleep_1.sleep)(5000);
|
|
423
|
+
await modelerCreatePage.fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret);
|
|
424
|
+
await modelerCreatePage.runProcessInstance();
|
|
425
|
+
}
|
|
426
|
+
exports.modelAndRunConnectorsDocHandlingDiagram = modelAndRunConnectorsDocHandlingDiagram;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const test_1 = require("@playwright/test");
|
|
4
|
+
const SM_8_8_1 = require("../../fixtures/SM-8.8");
|
|
5
|
+
const _setup_1 = require("../../test-setup.js");
|
|
6
|
+
const sleep_1 = require("../../utils/sleep");
|
|
7
|
+
const fileUpload_1 = require("../../utils/fileUpload");
|
|
8
|
+
if (process.env.IS_DS === 'true') {
|
|
9
|
+
SM_8_8_1.test.describe.configure({ mode: 'parallel' });
|
|
10
|
+
SM_8_8_1.test.describe('AWS Document Handling User Flows Test', () => {
|
|
11
|
+
SM_8_8_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
12
|
+
await navigationPage.goToModeler((testInfo.workerIndex + 1) * 1000);
|
|
13
|
+
});
|
|
14
|
+
SM_8_8_1.test.afterEach(async ({ page }, testInfo) => {
|
|
15
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
16
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
17
|
+
});
|
|
18
|
+
(0, SM_8_8_1.test)('Document Handling HTO User Flow - AWS', async ({ modelerHomePage, formJsPage, modelerCreatePage, taskPanelPage, taskDetailsPage, operateHomePage, operateProcessInstancePage, operateProcessesPage, navigationPage, page, }) => {
|
|
19
|
+
SM_8_8_1.test.slow();
|
|
20
|
+
const randomName = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
21
|
+
const processName = 'HTO_Document_Handling_Process' + randomName;
|
|
22
|
+
const formNameFilePicker = 'File Picker Form ' + randomName;
|
|
23
|
+
const formNameDocumentPreview = 'Document Preview Form ' + randomName;
|
|
24
|
+
await SM_8_8_1.test.step('Open Cross Component Test Project', async () => {
|
|
25
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
26
|
+
});
|
|
27
|
+
await SM_8_8_1.test.step('Create a Form with a File Picker Field', async () => {
|
|
28
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
29
|
+
await modelerHomePage.clickFormOption();
|
|
30
|
+
await modelerHomePage.enterFormName(formNameFilePicker);
|
|
31
|
+
await (0, sleep_1.sleep)(10000);
|
|
32
|
+
await formJsPage.dragAndDrop(formJsPage.filePicker, formJsPage.formEditor);
|
|
33
|
+
await formJsPage.clickGeneralPropertiesPanel();
|
|
34
|
+
await formJsPage.fillKeyInput('Upload_Files');
|
|
35
|
+
await formJsPage.enableUploadMultipleFiles();
|
|
36
|
+
await (0, sleep_1.sleep)(10000);
|
|
37
|
+
});
|
|
38
|
+
await SM_8_8_1.test.step('Create a Form with a Document Preview Field', async () => {
|
|
39
|
+
await modelerHomePage.clickProjectBreadcrumb();
|
|
40
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
41
|
+
await modelerHomePage.clickFormOption();
|
|
42
|
+
await modelerHomePage.enterFormName(formNameDocumentPreview);
|
|
43
|
+
await (0, sleep_1.sleep)(10000);
|
|
44
|
+
await formJsPage.dragAndDrop(formJsPage.documentPreview, formJsPage.formEditor);
|
|
45
|
+
await formJsPage.clickGeneralPropertiesPanel();
|
|
46
|
+
await formJsPage.filldocumentReferenceInput('Upload_Files');
|
|
47
|
+
await (0, sleep_1.sleep)(10000);
|
|
48
|
+
});
|
|
49
|
+
await SM_8_8_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
50
|
+
await modelerHomePage.clickProjectBreadcrumb();
|
|
51
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
52
|
+
await modelerHomePage.clickBpmnTemplateOption();
|
|
53
|
+
});
|
|
54
|
+
await SM_8_8_1.test.step('Create a BPMN Diagram with Two User Tasks and Linked Forms', async () => {
|
|
55
|
+
await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
|
|
56
|
+
timeout: 120000,
|
|
57
|
+
});
|
|
58
|
+
await modelerCreatePage.enterDiagramName(processName);
|
|
59
|
+
await (0, sleep_1.sleep)(1000);
|
|
60
|
+
await modelerCreatePage.clickCanvas();
|
|
61
|
+
await modelerCreatePage.clickGeneralPropertiesPanel();
|
|
62
|
+
await modelerCreatePage.clickIdInput();
|
|
63
|
+
await modelerCreatePage.fillIdInput(processName);
|
|
64
|
+
await modelerCreatePage.assertNameInput(processName);
|
|
65
|
+
await (0, sleep_1.sleep)(1000);
|
|
66
|
+
await modelerCreatePage.clickStartEventElement();
|
|
67
|
+
await modelerCreatePage.clickAppendElementButton();
|
|
68
|
+
await modelerCreatePage.clickAppendTaskButton();
|
|
69
|
+
await modelerCreatePage.clickChangeTypeButton();
|
|
70
|
+
await modelerCreatePage.clickUserTaskOption();
|
|
71
|
+
await modelerCreatePage.assertImplementationOption('zeebeUserTask');
|
|
72
|
+
await modelerCreatePage.embedForm(formNameFilePicker);
|
|
73
|
+
await modelerCreatePage.clickAppendElementButton();
|
|
74
|
+
await modelerCreatePage.clickAppendTaskButton();
|
|
75
|
+
await modelerCreatePage.clickChangeTypeButton();
|
|
76
|
+
await modelerCreatePage.clickUserTaskOption();
|
|
77
|
+
await modelerCreatePage.assertImplementationOption('zeebeUserTask');
|
|
78
|
+
await modelerCreatePage.embedForm(formNameDocumentPreview);
|
|
79
|
+
await modelerCreatePage.clickAppendElementButton();
|
|
80
|
+
await modelerCreatePage.clickAppendEndEventButton();
|
|
81
|
+
await (0, sleep_1.sleep)(5000);
|
|
82
|
+
await modelerCreatePage.runProcessInstance();
|
|
83
|
+
});
|
|
84
|
+
await SM_8_8_1.test.step('Navigate to Tasklist and Assert Document Upload And Preview', async () => {
|
|
85
|
+
await navigationPage.goToTasklist();
|
|
86
|
+
await taskPanelPage.openTask(processName);
|
|
87
|
+
await taskDetailsPage.clickAssignToMeButton();
|
|
88
|
+
await (0, fileUpload_1.uploadFile)(page, [
|
|
89
|
+
'simple_text.txt',
|
|
90
|
+
'simple_pdf.pdf',
|
|
91
|
+
'camunda.png',
|
|
92
|
+
]);
|
|
93
|
+
await taskDetailsPage.clickCompleteTaskButton();
|
|
94
|
+
await (0, sleep_1.sleep)(10000);
|
|
95
|
+
await page.reload();
|
|
96
|
+
await taskPanelPage.openTask(processName);
|
|
97
|
+
await taskDetailsPage.clickAssignToMeButton();
|
|
98
|
+
await taskDetailsPage.assertLoadedImage('camunda.png');
|
|
99
|
+
await taskDetailsPage.assertDocumentDownloadButton('camunda.png');
|
|
100
|
+
await (0, test_1.expect)(taskDetailsPage.noPreviewContainer).toContainText('simple_text.txt', { timeout: 60000 });
|
|
101
|
+
await taskDetailsPage.assertDocumentDownloadButton('simple_text.txt');
|
|
102
|
+
await (0, test_1.expect)(taskDetailsPage.previewContainer).toHaveCount(2);
|
|
103
|
+
await taskDetailsPage.assertPdfPreviewViewerExists();
|
|
104
|
+
await taskDetailsPage.clickCompleteTaskButton();
|
|
105
|
+
});
|
|
106
|
+
await SM_8_8_1.test.step('Navigate to Operate and Assert Documents And StoreId', async () => {
|
|
107
|
+
await navigationPage.goToOperate();
|
|
108
|
+
await operateHomePage.clickProcessesTab();
|
|
109
|
+
await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
|
|
110
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('Upload_Files', 'camunda.png');
|
|
111
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('Upload_Files', 'simple_pdf.pdf');
|
|
112
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('Upload_Files', 'simple_text.txt');
|
|
113
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('Upload_Files', 'aws');
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|