@camunda/e2e-test-suite 0.0.215 → 0.0.217
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/8.10/FormJsPage.d.ts +8 -0
- package/dist/pages/8.10/FormJsPage.js +47 -0
- package/dist/pages/8.10/IdpCreatePage.d.ts +3 -1
- package/dist/pages/8.10/IdpCreatePage.js +35 -13
- package/dist/tests/8.10/aws-cluster-user-flows.spec.js +2 -0
- package/dist/tests/8.10/hto-user-flows.spec.js +2 -0
- package/dist/tests/8.10/web-modeler-user-flows.spec.js +5 -1
- package/dist/tests/c8Run-8.10/api-tests-v1.spec.js +70 -67
- package/dist/tests/c8Run-8.9/api-tests-v1.spec.js +70 -67
- package/dist/tests/c8Run-8.9/mcp-user-flows.spec.js +30 -27
- package/package.json +1 -1
|
@@ -13,6 +13,10 @@ declare class FormJsPage {
|
|
|
13
13
|
readonly documentReferenceInput: Locator;
|
|
14
14
|
readonly generalPanel: Locator;
|
|
15
15
|
readonly textFieldInForm: Locator;
|
|
16
|
+
readonly deployButton: Locator;
|
|
17
|
+
readonly deploySubButton: Locator;
|
|
18
|
+
readonly dialog: Locator;
|
|
19
|
+
readonly deploySuccessNotification: Locator;
|
|
16
20
|
constructor(page: Page);
|
|
17
21
|
generateAIForm(request?: string): Promise<void>;
|
|
18
22
|
clickAIFormGeneratorButton(): Promise<void>;
|
|
@@ -24,5 +28,9 @@ declare class FormJsPage {
|
|
|
24
28
|
enableUploadMultipleFiles(): Promise<void>;
|
|
25
29
|
filldocumentReferenceInput(key: string): Promise<void>;
|
|
26
30
|
clickGeneralPropertiesPanel(): Promise<void>;
|
|
31
|
+
selectCluster(clusterName: string): Promise<void>;
|
|
32
|
+
clickDeployButton(): Promise<void>;
|
|
33
|
+
clickDeploySubButton(): Promise<void>;
|
|
34
|
+
deployForm(clusterName: string): Promise<void>;
|
|
27
35
|
}
|
|
28
36
|
export { FormJsPage };
|
|
@@ -17,6 +17,10 @@ class FormJsPage {
|
|
|
17
17
|
documentReferenceInput;
|
|
18
18
|
generalPanel;
|
|
19
19
|
textFieldInForm;
|
|
20
|
+
deployButton;
|
|
21
|
+
deploySubButton;
|
|
22
|
+
dialog;
|
|
23
|
+
deploySuccessNotification;
|
|
20
24
|
constructor(page) {
|
|
21
25
|
this.page = page;
|
|
22
26
|
this.aiFormGeneratorButton = page.getByRole('button', {
|
|
@@ -37,6 +41,19 @@ class FormJsPage {
|
|
|
37
41
|
this.textFieldInForm = page
|
|
38
42
|
.getByLabel('Form Definition')
|
|
39
43
|
.getByText('Text field');
|
|
44
|
+
this.deployButton = page
|
|
45
|
+
.locator('[data-test="action-bar"]')
|
|
46
|
+
.getByRole('button', { name: 'Deploy', exact: true });
|
|
47
|
+
this.dialog = page
|
|
48
|
+
.locator('.cds--modal-container[role="dialog"]')
|
|
49
|
+
.filter({ hasText: 'Deploy form' });
|
|
50
|
+
this.deploySubButton = this.dialog.getByRole('button', {
|
|
51
|
+
name: 'Deploy',
|
|
52
|
+
exact: true,
|
|
53
|
+
});
|
|
54
|
+
this.deploySuccessNotification = page
|
|
55
|
+
.locator('.cds--toast-notification--success')
|
|
56
|
+
.filter({ hasText: 'Form deployed!' });
|
|
40
57
|
}
|
|
41
58
|
async generateAIForm(request = 'Create a form with the following fields: 1. A text field with the label "Full Name" 2. A number with the label "Count" 3. A date input with the label "Date of birth"4. A Checkbox with the label "Agree"') {
|
|
42
59
|
await (0, test_1.expect)(this.aiFormGeneratorButton).toBeVisible({
|
|
@@ -81,5 +98,35 @@ class FormJsPage {
|
|
|
81
98
|
async clickGeneralPropertiesPanel() {
|
|
82
99
|
await this.generalPanel.click({ timeout: 60000 });
|
|
83
100
|
}
|
|
101
|
+
async selectCluster(clusterName) {
|
|
102
|
+
await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 30000 });
|
|
103
|
+
const healthCheckTimeout = 30000;
|
|
104
|
+
const healthyRegex = new RegExp(`${clusterName}[\\s\\S]*?HealthydevManage`);
|
|
105
|
+
const cluster = this.dialog.locator(`[title="${clusterName}"]`);
|
|
106
|
+
await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
|
|
107
|
+
await cluster.click();
|
|
108
|
+
await (0, test_1.expect)(this.dialog
|
|
109
|
+
.locator('label')
|
|
110
|
+
.filter({ hasText: clusterName })
|
|
111
|
+
.getByRole('switch')).toBeChecked({ timeout: 30000 });
|
|
112
|
+
await (0, test_1.expect)(this.dialog).toHaveText(healthyRegex, {
|
|
113
|
+
timeout: healthCheckTimeout,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
async clickDeployButton() {
|
|
117
|
+
await this.deployButton.click({ timeout: 60000 });
|
|
118
|
+
}
|
|
119
|
+
async clickDeploySubButton() {
|
|
120
|
+
await this.deploySubButton.click({ timeout: 60000 });
|
|
121
|
+
}
|
|
122
|
+
async deployForm(clusterName) {
|
|
123
|
+
await this.clickDeployButton();
|
|
124
|
+
await (0, test_1.expect)(this.dialog).toBeVisible({
|
|
125
|
+
timeout: 30000,
|
|
126
|
+
});
|
|
127
|
+
await this.selectCluster(clusterName);
|
|
128
|
+
await this.clickDeploySubButton();
|
|
129
|
+
await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 30000 });
|
|
130
|
+
}
|
|
84
131
|
}
|
|
85
132
|
exports.FormJsPage = FormJsPage;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Page, Locator } from '@playwright/test';
|
|
2
2
|
declare class IdpCreatePage {
|
|
3
3
|
private page;
|
|
4
|
-
readonly
|
|
4
|
+
readonly createNewDropdownButton: Locator;
|
|
5
|
+
readonly createExtractionTemplateOption: Locator;
|
|
5
6
|
readonly idpExtractionTemplateName: Locator;
|
|
6
7
|
readonly idpDescriptionField: Locator;
|
|
7
8
|
readonly providerDropdown: Locator;
|
|
@@ -27,6 +28,7 @@ declare class IdpCreatePage {
|
|
|
27
28
|
readonly unstructured_toastNotificationCloseButton: Locator;
|
|
28
29
|
readonly selectUnstructuredDataExtraction: Locator;
|
|
29
30
|
readonly selectStructuredDataExtraction: Locator;
|
|
31
|
+
readonly selectStructuredDataExtractionLabel: Locator;
|
|
30
32
|
readonly extractionInProgressNotification: Locator;
|
|
31
33
|
readonly structured_FieldsTab: Locator;
|
|
32
34
|
readonly structured_TablesTab: Locator;
|
|
@@ -5,7 +5,8 @@ const test_1 = require("@playwright/test");
|
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
6
|
class IdpCreatePage {
|
|
7
7
|
page;
|
|
8
|
-
|
|
8
|
+
createNewDropdownButton;
|
|
9
|
+
createExtractionTemplateOption;
|
|
9
10
|
idpExtractionTemplateName;
|
|
10
11
|
idpDescriptionField;
|
|
11
12
|
providerDropdown;
|
|
@@ -31,6 +32,7 @@ class IdpCreatePage {
|
|
|
31
32
|
unstructured_toastNotificationCloseButton;
|
|
32
33
|
selectUnstructuredDataExtraction;
|
|
33
34
|
selectStructuredDataExtraction;
|
|
35
|
+
selectStructuredDataExtractionLabel;
|
|
34
36
|
extractionInProgressNotification;
|
|
35
37
|
structured_FieldsTab;
|
|
36
38
|
structured_TablesTab;
|
|
@@ -47,11 +49,9 @@ class IdpCreatePage {
|
|
|
47
49
|
structured_SuccessfullPublishNotification;
|
|
48
50
|
constructor(page) {
|
|
49
51
|
this.page = page;
|
|
50
|
-
this.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
this.idpExtractionTemplateName = page.getByLabel('Name');
|
|
52
|
+
this.createNewDropdownButton = page.locator('[data-test="idp-create-template-dropdown"]');
|
|
53
|
+
this.createExtractionTemplateOption = page.locator('[data-test="create-extraction-template"]');
|
|
54
|
+
this.idpExtractionTemplateName = page.locator('#idp-project-name');
|
|
55
55
|
this.idpDescriptionField = page.getByLabel('Description');
|
|
56
56
|
this.createIdpExtractationTemplateButton = page.getByRole('button', {
|
|
57
57
|
name: 'Create template',
|
|
@@ -100,8 +100,9 @@ class IdpCreatePage {
|
|
|
100
100
|
this.unstructured_idpSuccessfullPublishNotification = page.getByText('NotificationSuccessIDP');
|
|
101
101
|
this.unstructured_toastNotificationCloseButton =
|
|
102
102
|
page.getByLabel('Close notification');
|
|
103
|
-
this.selectUnstructuredDataExtraction = page.
|
|
104
|
-
this.selectStructuredDataExtraction = page.
|
|
103
|
+
this.selectUnstructuredDataExtraction = page.locator('#idp-project-extraction-method-unstructured');
|
|
104
|
+
this.selectStructuredDataExtraction = page.locator('#idp-project-extraction-method-structured');
|
|
105
|
+
this.selectStructuredDataExtractionLabel = page.locator('label[for="idp-project-extraction-method-structured"]');
|
|
105
106
|
this.extractionInProgressNotification = page.getByText('Extracting document...');
|
|
106
107
|
this.structured_uploadFilesButton = page
|
|
107
108
|
.getByRole('button', {
|
|
@@ -144,7 +145,11 @@ class IdpCreatePage {
|
|
|
144
145
|
this.providerDropdown = page.getByRole('combobox', { name: 'Provider' });
|
|
145
146
|
}
|
|
146
147
|
async clickCreateIdpTemplateButton() {
|
|
147
|
-
await this.
|
|
148
|
+
await this.createNewDropdownButton.click({ timeout: 60000 });
|
|
149
|
+
await (0, test_1.expect)(this.createExtractionTemplateOption).toBeVisible({
|
|
150
|
+
timeout: 10000,
|
|
151
|
+
});
|
|
152
|
+
await this.createExtractionTemplateOption.click({ timeout: 60000 });
|
|
148
153
|
}
|
|
149
154
|
async fillIdpExtractionTemplateName(name) {
|
|
150
155
|
await this.idpExtractionTemplateName.fill(name);
|
|
@@ -260,7 +265,21 @@ class IdpCreatePage {
|
|
|
260
265
|
});
|
|
261
266
|
}
|
|
262
267
|
async selectStructuredDataExtractionMethod() {
|
|
263
|
-
await this.
|
|
268
|
+
await (0, test_1.expect)(this.selectStructuredDataExtractionLabel).toBeVisible({
|
|
269
|
+
timeout: 30000,
|
|
270
|
+
});
|
|
271
|
+
const maxRetries = 3;
|
|
272
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
273
|
+
await this.selectStructuredDataExtractionLabel.click({ timeout: 60000 });
|
|
274
|
+
const isChecked = await this.selectStructuredDataExtraction.isChecked();
|
|
275
|
+
if (isChecked)
|
|
276
|
+
return;
|
|
277
|
+
console.warn(`Structured extraction not selected on attempt ${attempt}, retrying...`);
|
|
278
|
+
await this.page.waitForTimeout(1000);
|
|
279
|
+
}
|
|
280
|
+
await (0, test_1.expect)(this.selectStructuredDataExtraction).toBeChecked({
|
|
281
|
+
timeout: 5000,
|
|
282
|
+
});
|
|
264
283
|
}
|
|
265
284
|
async clickStructuredUploadFilesButton() {
|
|
266
285
|
await (0, test_1.expect)(this.structured_uploadFilesButton).toBeVisible({
|
|
@@ -344,10 +363,13 @@ class IdpCreatePage {
|
|
|
344
363
|
await this.idpDescriptionField.fill(description);
|
|
345
364
|
}
|
|
346
365
|
async selectProvider(provider) {
|
|
347
|
-
await
|
|
366
|
+
await (0, test_1.expect)(async () => {
|
|
367
|
+
await this.providerDropdown.click({ timeout: 10000 });
|
|
368
|
+
await (0, test_1.expect)(this.providerDropdown).toHaveAttribute('aria-expanded', 'true', { timeout: 5000 });
|
|
369
|
+
}).toPass({ timeout: 60000 });
|
|
348
370
|
const providerOption = this.page
|
|
349
|
-
.
|
|
350
|
-
.
|
|
371
|
+
.locator('[role="listbox"] [role="option"]')
|
|
372
|
+
.filter({ hasText: new RegExp(`^${provider}$`) });
|
|
351
373
|
await (0, test_1.expect)(providerOption).toBeVisible({ timeout: 120000 });
|
|
352
374
|
await providerOption.click({ timeout: 120000 });
|
|
353
375
|
}
|
|
@@ -48,6 +48,7 @@ _8_10_1.test.describe('AWS Cluster User Flows Test', () => {
|
|
|
48
48
|
await formJsPage.fillKeyInput('Upload_Files');
|
|
49
49
|
await formJsPage.enableUploadMultipleFiles();
|
|
50
50
|
await (0, sleep_1.sleep)(10000);
|
|
51
|
+
await formJsPage.deployForm(clusterName);
|
|
51
52
|
});
|
|
52
53
|
await _8_10_1.test.step('Create a Form with a Document Preview Field', async () => {
|
|
53
54
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
@@ -59,6 +60,7 @@ _8_10_1.test.describe('AWS Cluster User Flows Test', () => {
|
|
|
59
60
|
await formJsPage.clickGeneralPropertiesPanel();
|
|
60
61
|
await formJsPage.filldocumentReferenceInput('Upload_Files');
|
|
61
62
|
await (0, sleep_1.sleep)(10000);
|
|
63
|
+
await formJsPage.deployForm(clusterName);
|
|
62
64
|
});
|
|
63
65
|
await _8_10_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
64
66
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
@@ -388,6 +388,7 @@ _8_10_1.test.describe('HTO User Flow Tests', () => {
|
|
|
388
388
|
await formJsPage.fillKeyInput('Upload_Files');
|
|
389
389
|
await formJsPage.enableUploadMultipleFiles();
|
|
390
390
|
await (0, sleep_1.sleep)(10000);
|
|
391
|
+
await formJsPage.deployForm(clusterName);
|
|
391
392
|
});
|
|
392
393
|
await _8_10_1.test.step('Create a Form with a Document Preview Field', async () => {
|
|
393
394
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
@@ -399,6 +400,7 @@ _8_10_1.test.describe('HTO User Flow Tests', () => {
|
|
|
399
400
|
await formJsPage.clickGeneralPropertiesPanel();
|
|
400
401
|
await formJsPage.filldocumentReferenceInput('Upload_Files');
|
|
401
402
|
await (0, sleep_1.sleep)(10000);
|
|
403
|
+
await formJsPage.deployForm(clusterName);
|
|
402
404
|
});
|
|
403
405
|
await _8_10_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
404
406
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
@@ -57,6 +57,7 @@ _8_10_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
57
57
|
await _8_10_1.test.step('Create an AI Generated Form', async () => {
|
|
58
58
|
await modelerHomePage.createForm(formName);
|
|
59
59
|
await formJsPage.generateAIForm();
|
|
60
|
+
await formJsPage.deployForm(clusterName);
|
|
60
61
|
});
|
|
61
62
|
await _8_10_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
62
63
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
@@ -113,6 +114,7 @@ _8_10_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
113
114
|
await _8_10_1.test.step('Create an AI Generated Form', async () => {
|
|
114
115
|
await modelerHomePage.createForm(formName);
|
|
115
116
|
await formJsPage.generateAIForm();
|
|
117
|
+
await formJsPage.deployForm(clusterName);
|
|
116
118
|
});
|
|
117
119
|
await _8_10_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
118
120
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
@@ -339,7 +341,7 @@ _8_10_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
339
341
|
});
|
|
340
342
|
await _8_10_1.test.step('Create BPMN Diagram with a embedded form and Start Process Instance', async () => {
|
|
341
343
|
await modelerCreatePage.modelJobWorkerDiagram(processName, true);
|
|
342
|
-
await modelerCreatePage.runProcessInstance(clusterName
|
|
344
|
+
await modelerCreatePage.runProcessInstance(clusterName);
|
|
343
345
|
});
|
|
344
346
|
await _8_10_1.test.step('View Process Instance in Operate and check if process is complete', async () => {
|
|
345
347
|
await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
|
|
@@ -436,6 +438,7 @@ _8_10_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
436
438
|
await formJsPage.dragAndDrop(formJsPage.textField, formJsPage.formEditor);
|
|
437
439
|
await (0, test_1.expect)(formJsPage.textFieldInForm).toBeVisible();
|
|
438
440
|
await (0, sleep_1.sleep)(10000);
|
|
441
|
+
await formJsPage.deployForm(clusterName);
|
|
439
442
|
});
|
|
440
443
|
await _8_10_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
441
444
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
@@ -490,6 +493,7 @@ _8_10_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
490
493
|
await formJsPage.dragAndDrop(formJsPage.textField, formJsPage.formEditor);
|
|
491
494
|
await formJsPage.clickGeneralPropertiesPanel();
|
|
492
495
|
await formJsPage.fillKeyInput('Public_Form_Text_Field');
|
|
496
|
+
await formJsPage.deployForm(clusterName);
|
|
493
497
|
});
|
|
494
498
|
await _8_10_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
495
499
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
@@ -7,74 +7,77 @@ const zeebeClient_1 = require("../../utils/zeebeClient");
|
|
|
7
7
|
const test_1 = require("@playwright/test");
|
|
8
8
|
const constants_1 = require("../../utils/constants");
|
|
9
9
|
if (process.env.DATABASE != 'RDBMS') {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
c8Run_8_10_1.test.describe('API tests for v1', () => {
|
|
24
|
-
const auth = Buffer.from(`demo:demo`).toString('base64');
|
|
25
|
-
const requestHeaders = {
|
|
26
|
-
headers: {
|
|
27
|
-
'Content-Type': 'application/json',
|
|
28
|
-
Authorization: `Basic ${auth}`,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
(0, c8Run_8_10_1.test)('Search for process definitions @tasklistV2', async ({ request }) => {
|
|
32
|
-
const processDefinitionsList = await request.post('/v1/process-definitions/search', requestHeaders);
|
|
33
|
-
await (0, apiHelpers_1.assertResponseStatus)(processDefinitionsList, 200);
|
|
34
|
-
});
|
|
35
|
-
(0, c8Run_8_10_1.test)('Get a process definition via key @tasklistV2', async ({ request }) => {
|
|
36
|
-
await (0, test_1.expect)(async () => {
|
|
37
|
-
const searchProcessDefinitions = await request.post(`/v1/process-definitions/search`, requestHeaders);
|
|
38
|
-
const processKey = await searchProcessDefinitions.json();
|
|
39
|
-
(0, test_1.expect)(processKey.items.length).toBeGreaterThan(0);
|
|
40
|
-
const response = await request.get(`/v1/process-definitions/` + processKey.items[0].key, requestHeaders);
|
|
41
|
-
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
42
|
-
}).toPass(constants_1.defaultAssertionOptions);
|
|
43
|
-
});
|
|
44
|
-
(0, c8Run_8_10_1.test)('Search for process instances @tasklistV2', async ({ request }) => {
|
|
45
|
-
const processInstancesList = await request.post('/v1/process-instances/search', requestHeaders);
|
|
46
|
-
await (0, apiHelpers_1.assertResponseStatus)(processInstancesList, 200);
|
|
47
|
-
});
|
|
48
|
-
(0, c8Run_8_10_1.test)('Search for flownode-instances @tasklistV2', async ({ request }) => {
|
|
49
|
-
const flowNodeInstancesList = await request.post('/v1/flownode-instances/search', requestHeaders);
|
|
50
|
-
await (0, apiHelpers_1.assertResponseStatus)(flowNodeInstancesList, 200);
|
|
51
|
-
});
|
|
52
|
-
(0, c8Run_8_10_1.test)('Search for variables for process instances @tasklistV2', async ({ request, }) => {
|
|
53
|
-
const variablesInstancesList = await request.post('/v1/variables/search', requestHeaders);
|
|
54
|
-
await (0, apiHelpers_1.assertResponseStatus)(variablesInstancesList, 200);
|
|
55
|
-
});
|
|
56
|
-
(0, c8Run_8_10_1.test)('Search for incidents @tasklistV2', async ({ request }) => {
|
|
57
|
-
const incidentsList = await request.post('/v1/incidents/search', requestHeaders);
|
|
58
|
-
await (0, apiHelpers_1.assertResponseStatus)(incidentsList, 200);
|
|
59
|
-
});
|
|
60
|
-
(0, c8Run_8_10_1.test)('Get connectors status @tasklistV2', async ({ request }) => {
|
|
10
|
+
//Skipped due to bug:47006: https://github.com/camunda/camunda/issues/47006
|
|
11
|
+
if (process.env.RUN_AS_DOCKER_COMPOSE != 'true') {
|
|
12
|
+
c8Run_8_10_1.test.beforeAll(async () => {
|
|
13
|
+
await Promise.all([
|
|
14
|
+
(0, zeebeClient_1.deploy)('./resources/User_Task_Process_With_Form.bpmn'),
|
|
15
|
+
(0, zeebeClient_1.deploy)('./resources/New Form.form'),
|
|
16
|
+
(0, zeebeClient_1.deploy)('./resources/User_Task_Process_With_Form.bpmn'),
|
|
17
|
+
(0, zeebeClient_1.deploy)('./resources/Start_Form_Process.bpmn'),
|
|
18
|
+
]);
|
|
19
|
+
await Promise.all([
|
|
20
|
+
(0, zeebeClient_1.createInstances)('Form_User_Task', 1, 3),
|
|
21
|
+
(0, zeebeClient_1.createInstances)('Start_Form_Process', 1, 1),
|
|
22
|
+
]);
|
|
61
23
|
await (0, sleep_1.sleep)(10000);
|
|
62
|
-
const connectorsStatus = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/actuator/health', requestHeaders);
|
|
63
|
-
await (0, apiHelpers_1.assertResponseStatus)(connectorsStatus, 200);
|
|
64
|
-
});
|
|
65
|
-
(0, c8Run_8_10_1.test)('Get a inbound connectors list @tasklistV2', async ({ request }) => {
|
|
66
|
-
const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/inbound', requestHeaders);
|
|
67
|
-
await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
|
|
68
24
|
});
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
25
|
+
c8Run_8_10_1.test.describe('API tests for v1', () => {
|
|
26
|
+
const auth = Buffer.from(`demo:demo`).toString('base64');
|
|
27
|
+
const requestHeaders = {
|
|
28
|
+
headers: {
|
|
29
|
+
'Content-Type': 'application/json',
|
|
30
|
+
Authorization: `Basic ${auth}`,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
(0, c8Run_8_10_1.test)('Search for process definitions @tasklistV2', async ({ request }) => {
|
|
34
|
+
const processDefinitionsList = await request.post('/v1/process-definitions/search', requestHeaders);
|
|
35
|
+
await (0, apiHelpers_1.assertResponseStatus)(processDefinitionsList, 200);
|
|
36
|
+
});
|
|
37
|
+
(0, c8Run_8_10_1.test)('Get a process definition via key @tasklistV2', async ({ request, }) => {
|
|
38
|
+
await (0, test_1.expect)(async () => {
|
|
39
|
+
const searchProcessDefinitions = await request.post(`/v1/process-definitions/search`, requestHeaders);
|
|
40
|
+
const processKey = await searchProcessDefinitions.json();
|
|
41
|
+
(0, test_1.expect)(processKey.items.length).toBeGreaterThan(0);
|
|
42
|
+
const response = await request.get(`/v1/process-definitions/` + processKey.items[0].key, requestHeaders);
|
|
43
|
+
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
44
|
+
}).toPass(constants_1.defaultAssertionOptions);
|
|
45
|
+
});
|
|
46
|
+
(0, c8Run_8_10_1.test)('Search for process instances @tasklistV2', async ({ request }) => {
|
|
47
|
+
const processInstancesList = await request.post('/v1/process-instances/search', requestHeaders);
|
|
48
|
+
await (0, apiHelpers_1.assertResponseStatus)(processInstancesList, 200);
|
|
49
|
+
});
|
|
50
|
+
(0, c8Run_8_10_1.test)('Search for flownode-instances @tasklistV2', async ({ request }) => {
|
|
51
|
+
const flowNodeInstancesList = await request.post('/v1/flownode-instances/search', requestHeaders);
|
|
52
|
+
await (0, apiHelpers_1.assertResponseStatus)(flowNodeInstancesList, 200);
|
|
53
|
+
});
|
|
54
|
+
(0, c8Run_8_10_1.test)('Search for variables for process instances @tasklistV2', async ({ request, }) => {
|
|
55
|
+
const variablesInstancesList = await request.post('/v1/variables/search', requestHeaders);
|
|
56
|
+
await (0, apiHelpers_1.assertResponseStatus)(variablesInstancesList, 200);
|
|
57
|
+
});
|
|
58
|
+
(0, c8Run_8_10_1.test)('Search for incidents @tasklistV2', async ({ request }) => {
|
|
59
|
+
const incidentsList = await request.post('/v1/incidents/search', requestHeaders);
|
|
60
|
+
await (0, apiHelpers_1.assertResponseStatus)(incidentsList, 200);
|
|
61
|
+
});
|
|
62
|
+
(0, c8Run_8_10_1.test)('Get connectors status @tasklistV2', async ({ request }) => {
|
|
63
|
+
await (0, sleep_1.sleep)(10000);
|
|
64
|
+
const connectorsStatus = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/actuator/health', requestHeaders);
|
|
65
|
+
await (0, apiHelpers_1.assertResponseStatus)(connectorsStatus, 200);
|
|
66
|
+
});
|
|
67
|
+
(0, c8Run_8_10_1.test)('Get a inbound connectors list @tasklistV2', async ({ request }) => {
|
|
68
|
+
const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/inbound', requestHeaders);
|
|
69
|
+
await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
|
|
70
|
+
});
|
|
71
|
+
(0, c8Run_8_10_1.test)('Search for tasks', async ({ request }) => {
|
|
72
|
+
const taskList = await request.post('/v1/tasks/search', requestHeaders);
|
|
73
|
+
await (0, apiHelpers_1.assertResponseStatus)(taskList, 200);
|
|
74
|
+
});
|
|
75
|
+
(0, c8Run_8_10_1.test)('Get a task via ID', async ({ request }) => {
|
|
76
|
+
const searchTasks = await request.post(`/v1/tasks/search`, requestHeaders);
|
|
77
|
+
const taskID = await searchTasks.json();
|
|
78
|
+
const response = await request.get('/v1/tasks/' + taskID[0].id, requestHeaders);
|
|
79
|
+
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
80
|
+
});
|
|
78
81
|
});
|
|
79
|
-
}
|
|
82
|
+
}
|
|
80
83
|
}
|
|
@@ -7,74 +7,77 @@ const zeebeClient_1 = require("../../utils/zeebeClient");
|
|
|
7
7
|
const test_1 = require("@playwright/test");
|
|
8
8
|
const constants_1 = require("../../utils/constants");
|
|
9
9
|
if (process.env.DATABASE != 'RDBMS') {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
c8Run_8_9_1.test.describe('API tests for v1', () => {
|
|
24
|
-
const auth = Buffer.from(`demo:demo`).toString('base64');
|
|
25
|
-
const requestHeaders = {
|
|
26
|
-
headers: {
|
|
27
|
-
'Content-Type': 'application/json',
|
|
28
|
-
Authorization: `Basic ${auth}`,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
(0, c8Run_8_9_1.test)('Search for process definitions @tasklistV2', async ({ request }) => {
|
|
32
|
-
const processDefinitionsList = await request.post('/v1/process-definitions/search', requestHeaders);
|
|
33
|
-
await (0, apiHelpers_1.assertResponseStatus)(processDefinitionsList, 200);
|
|
34
|
-
});
|
|
35
|
-
(0, c8Run_8_9_1.test)('Get a process definition via key @tasklistV2', async ({ request }) => {
|
|
36
|
-
await (0, test_1.expect)(async () => {
|
|
37
|
-
const searchProcessDefinitions = await request.post(`/v1/process-definitions/search`, requestHeaders);
|
|
38
|
-
const processKey = await searchProcessDefinitions.json();
|
|
39
|
-
(0, test_1.expect)(processKey.items.length).toBeGreaterThan(0);
|
|
40
|
-
const response = await request.get(`/v1/process-definitions/` + processKey.items[0].key, requestHeaders);
|
|
41
|
-
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
42
|
-
}).toPass(constants_1.defaultAssertionOptions);
|
|
43
|
-
});
|
|
44
|
-
(0, c8Run_8_9_1.test)('Search for process instances @tasklistV2', async ({ request }) => {
|
|
45
|
-
const processInstancesList = await request.post('/v1/process-instances/search', requestHeaders);
|
|
46
|
-
await (0, apiHelpers_1.assertResponseStatus)(processInstancesList, 200);
|
|
47
|
-
});
|
|
48
|
-
(0, c8Run_8_9_1.test)('Search for flownode-instances @tasklistV2', async ({ request }) => {
|
|
49
|
-
const flowNodeInstancesList = await request.post('/v1/flownode-instances/search', requestHeaders);
|
|
50
|
-
await (0, apiHelpers_1.assertResponseStatus)(flowNodeInstancesList, 200);
|
|
51
|
-
});
|
|
52
|
-
(0, c8Run_8_9_1.test)('Search for variables for process instances @tasklistV2', async ({ request, }) => {
|
|
53
|
-
const variablesInstancesList = await request.post('/v1/variables/search', requestHeaders);
|
|
54
|
-
await (0, apiHelpers_1.assertResponseStatus)(variablesInstancesList, 200);
|
|
55
|
-
});
|
|
56
|
-
(0, c8Run_8_9_1.test)('Search for incidents @tasklistV2', async ({ request }) => {
|
|
57
|
-
const incidentsList = await request.post('/v1/incidents/search', requestHeaders);
|
|
58
|
-
await (0, apiHelpers_1.assertResponseStatus)(incidentsList, 200);
|
|
59
|
-
});
|
|
60
|
-
(0, c8Run_8_9_1.test)('Get connectors status @tasklistV2', async ({ request }) => {
|
|
10
|
+
//Skipped due to bug:47006: https://github.com/camunda/camunda/issues/47006
|
|
11
|
+
if (process.env.RUN_AS_DOCKER_COMPOSE != 'true') {
|
|
12
|
+
c8Run_8_9_1.test.beforeAll(async () => {
|
|
13
|
+
await Promise.all([
|
|
14
|
+
(0, zeebeClient_1.deploy)('./resources/User_Task_Process_With_Form.bpmn'),
|
|
15
|
+
(0, zeebeClient_1.deploy)('./resources/New Form.form'),
|
|
16
|
+
(0, zeebeClient_1.deploy)('./resources/User_Task_Process_With_Form.bpmn'),
|
|
17
|
+
(0, zeebeClient_1.deploy)('./resources/Start_Form_Process.bpmn'),
|
|
18
|
+
]);
|
|
19
|
+
await Promise.all([
|
|
20
|
+
(0, zeebeClient_1.createInstances)('Form_User_Task', 1, 3),
|
|
21
|
+
(0, zeebeClient_1.createInstances)('Start_Form_Process', 1, 1),
|
|
22
|
+
]);
|
|
61
23
|
await (0, sleep_1.sleep)(10000);
|
|
62
|
-
const connectorsStatus = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/actuator/health', requestHeaders);
|
|
63
|
-
await (0, apiHelpers_1.assertResponseStatus)(connectorsStatus, 200);
|
|
64
|
-
});
|
|
65
|
-
(0, c8Run_8_9_1.test)('Get a inbound connectors list @tasklistV2', async ({ request }) => {
|
|
66
|
-
const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/inbound', requestHeaders);
|
|
67
|
-
await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
|
|
68
24
|
});
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
25
|
+
c8Run_8_9_1.test.describe('API tests for v1', () => {
|
|
26
|
+
const auth = Buffer.from(`demo:demo`).toString('base64');
|
|
27
|
+
const requestHeaders = {
|
|
28
|
+
headers: {
|
|
29
|
+
'Content-Type': 'application/json',
|
|
30
|
+
Authorization: `Basic ${auth}`,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
(0, c8Run_8_9_1.test)('Search for process definitions @tasklistV2', async ({ request }) => {
|
|
34
|
+
const processDefinitionsList = await request.post('/v1/process-definitions/search', requestHeaders);
|
|
35
|
+
await (0, apiHelpers_1.assertResponseStatus)(processDefinitionsList, 200);
|
|
36
|
+
});
|
|
37
|
+
(0, c8Run_8_9_1.test)('Get a process definition via key @tasklistV2', async ({ request, }) => {
|
|
38
|
+
await (0, test_1.expect)(async () => {
|
|
39
|
+
const searchProcessDefinitions = await request.post(`/v1/process-definitions/search`, requestHeaders);
|
|
40
|
+
const processKey = await searchProcessDefinitions.json();
|
|
41
|
+
(0, test_1.expect)(processKey.items.length).toBeGreaterThan(0);
|
|
42
|
+
const response = await request.get(`/v1/process-definitions/` + processKey.items[0].key, requestHeaders);
|
|
43
|
+
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
44
|
+
}).toPass(constants_1.defaultAssertionOptions);
|
|
45
|
+
});
|
|
46
|
+
(0, c8Run_8_9_1.test)('Search for process instances @tasklistV2', async ({ request }) => {
|
|
47
|
+
const processInstancesList = await request.post('/v1/process-instances/search', requestHeaders);
|
|
48
|
+
await (0, apiHelpers_1.assertResponseStatus)(processInstancesList, 200);
|
|
49
|
+
});
|
|
50
|
+
(0, c8Run_8_9_1.test)('Search for flownode-instances @tasklistV2', async ({ request }) => {
|
|
51
|
+
const flowNodeInstancesList = await request.post('/v1/flownode-instances/search', requestHeaders);
|
|
52
|
+
await (0, apiHelpers_1.assertResponseStatus)(flowNodeInstancesList, 200);
|
|
53
|
+
});
|
|
54
|
+
(0, c8Run_8_9_1.test)('Search for variables for process instances @tasklistV2', async ({ request, }) => {
|
|
55
|
+
const variablesInstancesList = await request.post('/v1/variables/search', requestHeaders);
|
|
56
|
+
await (0, apiHelpers_1.assertResponseStatus)(variablesInstancesList, 200);
|
|
57
|
+
});
|
|
58
|
+
(0, c8Run_8_9_1.test)('Search for incidents @tasklistV2', async ({ request }) => {
|
|
59
|
+
const incidentsList = await request.post('/v1/incidents/search', requestHeaders);
|
|
60
|
+
await (0, apiHelpers_1.assertResponseStatus)(incidentsList, 200);
|
|
61
|
+
});
|
|
62
|
+
(0, c8Run_8_9_1.test)('Get connectors status @tasklistV2', async ({ request }) => {
|
|
63
|
+
await (0, sleep_1.sleep)(10000);
|
|
64
|
+
const connectorsStatus = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/actuator/health', requestHeaders);
|
|
65
|
+
await (0, apiHelpers_1.assertResponseStatus)(connectorsStatus, 200);
|
|
66
|
+
});
|
|
67
|
+
(0, c8Run_8_9_1.test)('Get a inbound connectors list @tasklistV2', async ({ request }) => {
|
|
68
|
+
const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/inbound', requestHeaders);
|
|
69
|
+
await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
|
|
70
|
+
});
|
|
71
|
+
(0, c8Run_8_9_1.test)('Search for tasks', async ({ request }) => {
|
|
72
|
+
const taskList = await request.post('/v1/tasks/search', requestHeaders);
|
|
73
|
+
await (0, apiHelpers_1.assertResponseStatus)(taskList, 200);
|
|
74
|
+
});
|
|
75
|
+
(0, c8Run_8_9_1.test)('Get a task via ID', async ({ request }) => {
|
|
76
|
+
const searchTasks = await request.post(`/v1/tasks/search`, requestHeaders);
|
|
77
|
+
const taskID = await searchTasks.json();
|
|
78
|
+
const response = await request.get('/v1/tasks/' + taskID[0].id, requestHeaders);
|
|
79
|
+
await (0, apiHelpers_1.assertResponseStatus)(response, 200);
|
|
80
|
+
});
|
|
78
81
|
});
|
|
79
|
-
}
|
|
82
|
+
}
|
|
80
83
|
}
|
|
@@ -6,34 +6,37 @@ const _setup_1 = require("../../test-setup.js");
|
|
|
6
6
|
const apiHelpers_1 = require("../../utils/apiHelpers");
|
|
7
7
|
const zeebeClient_1 = require("../../utils/zeebeClient");
|
|
8
8
|
const sleep_1 = require("../../utils/sleep");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
await (0, UtilitiesPage_1.navigateToApp)(page, 'operate');
|
|
17
|
-
await operateLoginPage.login('demo', 'demo');
|
|
18
|
-
await operateHomePage.operateBannerIsVisible();
|
|
19
|
-
});
|
|
20
|
-
c8Run_8_9_1.test.describe('@tasklistV2 MCP Test Server User Flows', () => {
|
|
21
|
-
c8Run_8_9_1.test.afterEach(async ({ page }, testInfo) => {
|
|
22
|
-
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
23
|
-
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
9
|
+
if (process.env.RUN_AS_DOCKER_COMPOSE != 'true') {
|
|
10
|
+
//MCP server is not configured with Docker
|
|
11
|
+
c8Run_8_9_1.test.beforeAll(async () => {
|
|
12
|
+
await (0, apiHelpers_1.validateMcpServerHealth)();
|
|
13
|
+
await (0, zeebeClient_1.deploy)('./resources/mcp_server/mcp_server_list_tools.bpmn');
|
|
14
|
+
await (0, zeebeClient_1.createInstances)('mcp_remote_client', 1, 1);
|
|
15
|
+
await (0, sleep_1.sleep)(5000);
|
|
24
16
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
await
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
c8Run_8_9_1.test.beforeEach(async ({ page, operateLoginPage, operateHomePage }) => {
|
|
18
|
+
await (0, UtilitiesPage_1.navigateToApp)(page, 'operate');
|
|
19
|
+
await operateLoginPage.login('demo', 'demo');
|
|
20
|
+
await operateHomePage.operateBannerIsVisible();
|
|
21
|
+
});
|
|
22
|
+
c8Run_8_9_1.test.describe('@tasklistV2 MCP Test Server User Flows', () => {
|
|
23
|
+
c8Run_8_9_1.test.afterEach(async ({ page }, testInfo) => {
|
|
24
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
25
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
32
26
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
await
|
|
36
|
-
|
|
27
|
+
(0, c8Run_8_9_1.test)('MCP server returns list of tools from process', async ({ operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
|
|
28
|
+
c8Run_8_9_1.test.slow();
|
|
29
|
+
await c8Run_8_9_1.test.step('User can access the completed process on operate', async () => {
|
|
30
|
+
await operateHomePage.clickProcessesTab();
|
|
31
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
32
|
+
await operateProcessesPage.clickProcessInstanceLink('mcp_remote_client');
|
|
33
|
+
await operateProcessInstancePage.completedIconAssertion();
|
|
34
|
+
});
|
|
35
|
+
await c8Run_8_9_1.test.step('Verify MCP tools are returned in the process result', async () => {
|
|
36
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('toolCallResult', 'add');
|
|
37
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('toolCallResult', 'greet');
|
|
38
|
+
await operateProcessInstancePage.assertProcessVariableContainsText('toolCallResult', 'echo');
|
|
39
|
+
});
|
|
37
40
|
});
|
|
38
41
|
});
|
|
39
|
-
}
|
|
42
|
+
}
|