@camunda/e2e-test-suite 0.0.218 → 0.0.220

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.
@@ -9,6 +9,10 @@ declare class FormJsPage {
9
9
  readonly keyInput: Locator;
10
10
  readonly generalPanel: Locator;
11
11
  readonly textFieldInForm: Locator;
12
+ readonly deployButton: Locator;
13
+ readonly deploySubButton: Locator;
14
+ readonly dialog: Locator;
15
+ readonly deploySuccessNotification: Locator;
12
16
  constructor(page: Page);
13
17
  clickAIFormGeneratorButton(): Promise<void>;
14
18
  generateAIForm(request?: string): Promise<void>;
@@ -18,5 +22,9 @@ declare class FormJsPage {
18
22
  dragAndDrop(source: Locator, target: Locator): Promise<void>;
19
23
  fillKeyInput(key: string): Promise<void>;
20
24
  clickGeneralPropertiesPanel(): Promise<void>;
25
+ selectCluster(clusterName: string): Promise<void>;
26
+ clickDeployButton(): Promise<void>;
27
+ clickDeploySubButton(): Promise<void>;
28
+ deployForm(clusterName: string): Promise<void>;
21
29
  }
22
30
  export { FormJsPage };
@@ -13,6 +13,10 @@ class FormJsPage {
13
13
  keyInput;
14
14
  generalPanel;
15
15
  textFieldInForm;
16
+ deployButton;
17
+ deploySubButton;
18
+ dialog;
19
+ deploySuccessNotification;
16
20
  constructor(page) {
17
21
  this.page = page;
18
22
  this.aiFormGeneratorButton = page.getByRole('button', {
@@ -25,6 +29,19 @@ class FormJsPage {
25
29
  this.generalPanel = page.locator('[data-group-id="group-general"]').first();
26
30
  this.keyInput = page.getByRole('textbox', { name: 'key' });
27
31
  this.textFieldInForm = page.getByLabel('Form Definition');
32
+ this.deployButton = page
33
+ .locator('[data-test="action-bar"]')
34
+ .getByRole('button', { name: 'Deploy', exact: true });
35
+ this.dialog = page
36
+ .locator('.cds--modal-container[role="dialog"]')
37
+ .filter({ hasText: 'Deploy form' });
38
+ this.deploySubButton = this.dialog.getByRole('button', {
39
+ name: 'Deploy',
40
+ exact: true,
41
+ });
42
+ this.deploySuccessNotification = page
43
+ .locator('.cds--toast-notification--success')
44
+ .filter({ hasText: 'Form deployed!' });
28
45
  }
29
46
  async clickAIFormGeneratorButton() {
30
47
  await this.aiFormGeneratorButton.click();
@@ -61,5 +78,35 @@ class FormJsPage {
61
78
  async clickGeneralPropertiesPanel() {
62
79
  await this.generalPanel.click({ timeout: 60000 });
63
80
  }
81
+ async selectCluster(clusterName) {
82
+ await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 30000 });
83
+ const healthCheckTimeout = 30000;
84
+ const healthyRegex = new RegExp(`${clusterName}[\\s\\S]*?HealthydevManage`);
85
+ const cluster = this.dialog.locator(`[title="${clusterName}"]`);
86
+ await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
87
+ await cluster.click();
88
+ await (0, test_1.expect)(this.dialog
89
+ .locator('label')
90
+ .filter({ hasText: clusterName })
91
+ .getByRole('switch')).toBeChecked({ timeout: 30000 });
92
+ await (0, test_1.expect)(this.dialog).toHaveText(healthyRegex, {
93
+ timeout: healthCheckTimeout,
94
+ });
95
+ }
96
+ async clickDeployButton() {
97
+ await this.deployButton.click({ timeout: 60000 });
98
+ }
99
+ async clickDeploySubButton() {
100
+ await this.deploySubButton.click({ timeout: 60000 });
101
+ }
102
+ async deployForm(clusterName) {
103
+ await this.clickDeployButton();
104
+ await (0, test_1.expect)(this.dialog).toBeVisible({
105
+ timeout: 30000,
106
+ });
107
+ await this.selectCluster(clusterName);
108
+ await this.clickDeploySubButton();
109
+ await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 30000 });
110
+ }
64
111
  }
65
112
  exports.FormJsPage = FormJsPage;
@@ -13,6 +13,10 @@ declare class FormJsPage {
13
13
  readonly generalPanel: Locator;
14
14
  readonly textField: 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
  generalPanel;
18
18
  textField;
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({
@@ -79,5 +96,35 @@ class FormJsPage {
79
96
  async clickGeneralPropertiesPanel() {
80
97
  await this.generalPanel.click({ timeout: 60000 });
81
98
  }
99
+ async selectCluster(clusterName) {
100
+ await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 30000 });
101
+ const healthCheckTimeout = 30000;
102
+ const healthyRegex = new RegExp(`${clusterName}[\\s\\S]*?HealthydevManage`);
103
+ const cluster = this.dialog.locator(`[title="${clusterName}"]`);
104
+ await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
105
+ await cluster.click();
106
+ await (0, test_1.expect)(this.dialog
107
+ .locator('label')
108
+ .filter({ hasText: clusterName })
109
+ .getByRole('switch')).toBeChecked({ timeout: 30000 });
110
+ await (0, test_1.expect)(this.dialog).toHaveText(healthyRegex, {
111
+ timeout: healthCheckTimeout,
112
+ });
113
+ }
114
+ async clickDeployButton() {
115
+ await this.deployButton.click({ timeout: 60000 });
116
+ }
117
+ async clickDeploySubButton() {
118
+ await this.deploySubButton.click({ timeout: 60000 });
119
+ }
120
+ async deployForm(clusterName) {
121
+ await this.clickDeployButton();
122
+ await (0, test_1.expect)(this.dialog).toBeVisible({
123
+ timeout: 30000,
124
+ });
125
+ await this.selectCluster(clusterName);
126
+ await this.clickDeploySubButton();
127
+ await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 30000 });
128
+ }
82
129
  }
83
130
  exports.FormJsPage = FormJsPage;
@@ -34,7 +34,7 @@ class IdpCreatePage {
34
34
  name: 'Create extraction template',
35
35
  exact: true,
36
36
  });
37
- this.idpExtractionTemplateName = page.getByLabel('Name');
37
+ this.idpExtractionTemplateName = page.locator('#idp-project-name');
38
38
  this.createIdpExtractationTemplateButton = page.getByRole('button', {
39
39
  name: 'Create template',
40
40
  exact: true,
@@ -26,7 +26,7 @@ _8_6_1.test.describe('Smoke Tests', () => {
26
26
  await (0, _setup_1.captureScreenshot)(page, testInfo);
27
27
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
28
28
  });
29
- (0, _8_6_1.test)('Most Common Flow User Flow With All Apps', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, }) => {
29
+ (0, _8_6_1.test)('Most Common Flow User Flow With All Apps', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, formJsPage, }) => {
30
30
  _8_6_1.test.slow();
31
31
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
32
32
  const formName = 'New form' + randomString;
@@ -45,10 +45,8 @@ _8_6_1.test.describe('Smoke Tests', () => {
45
45
  });
46
46
  await _8_6_1.test.step('Create Form To Be Linked For Zeebe User Task', async () => {
47
47
  await modelerHomePage.clickCrossComponentProjectFolder();
48
- await modelerHomePage.clickDiagramTypeDropdown();
49
- await modelerHomePage.clickFormOption();
50
- await modelerHomePage.enterFormName(formName);
51
- await modelerHomePage.assertFormBreadcrumbVisible(formName);
48
+ await modelerHomePage.createForm(formName);
49
+ await formJsPage.deployForm(clusterName);
52
50
  });
53
51
  await _8_6_1.test.step('Add A BPMN Template To The Project', async () => {
54
52
  await modelerHomePage.clickProjectBreadcrumb();
@@ -54,6 +54,7 @@ _8_6_1.test.describe('Web Modeler User Flow Tests', () => {
54
54
  await _8_6_1.test.step('Create an AI Generated Form', async () => {
55
55
  await modelerHomePage.createForm(formName);
56
56
  await formJsPage.generateAIForm();
57
+ await formJsPage.deployForm(clusterName);
57
58
  });
58
59
  await _8_6_1.test.step('Add A BPMN Template To The Project', async () => {
59
60
  await modelerHomePage.clickProjectBreadcrumb();
@@ -300,6 +301,7 @@ _8_6_1.test.describe('Web Modeler User Flow Tests', () => {
300
301
  await _8_6_1.test.step('Create an AI Generated Form', async () => {
301
302
  await modelerHomePage.createForm(formName);
302
303
  await formJsPage.generateAIForm();
304
+ await formJsPage.deployForm(clusterName);
303
305
  });
304
306
  await _8_6_1.test.step('Add A BPMN Template To The Project', async () => {
305
307
  await modelerHomePage.clickProjectBreadcrumb();
@@ -529,7 +531,7 @@ _8_6_1.test.describe('Web Modeler User Flow Tests', () => {
529
531
  });
530
532
  await _8_6_1.test.step('Create BPMN Diagram with a embedded form and Start Process Instance', async () => {
531
533
  await modelerCreatePage.modelJobWorkerDiagram(processName, true);
532
- await modelerCreatePage.runProcessInstance(clusterName, '', {}, 'The diagram contains 1 embedded form.');
534
+ await modelerCreatePage.runProcessInstance(clusterName);
533
535
  });
534
536
  await _8_6_1.test.step('View Process Instance in Operate and check if process is complete', async () => {
535
537
  await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
@@ -628,6 +630,7 @@ _8_6_1.test.describe('Web Modeler User Flow Tests', () => {
628
630
  await formJsPage.clickGeneralPropertiesPanel();
629
631
  await formJsPage.fillKeyInput('Public_Form_Text_Field');
630
632
  await (0, sleep_1.sleep)(10000);
633
+ await formJsPage.deployForm(clusterName);
631
634
  });
632
635
  await _8_6_1.test.step('Add A BPMN Template To The Project', async () => {
633
636
  await modelerHomePage.clickProjectBreadcrumb();
@@ -49,6 +49,7 @@ _8_7_1.test.describe('AWS Cluster User Flows Test', () => {
49
49
  await formJsPage.fillKeyInput('Upload_Files');
50
50
  await formJsPage.enableUploadMultipleFiles();
51
51
  await (0, sleep_1.sleep)(10000);
52
+ await formJsPage.deployForm(clusterName);
52
53
  });
53
54
  await _8_7_1.test.step('Create a Form with a Document Preview Field', async () => {
54
55
  await modelerHomePage.clickProjectBreadcrumb();
@@ -60,6 +61,7 @@ _8_7_1.test.describe('AWS Cluster User Flows Test', () => {
60
61
  await formJsPage.clickGeneralPropertiesPanel();
61
62
  await formJsPage.filldocumentReferenceInput('Upload_Files');
62
63
  await (0, sleep_1.sleep)(10000);
64
+ await formJsPage.deployForm(clusterName);
63
65
  });
64
66
  await _8_7_1.test.step('Add A BPMN Template To The Project', async () => {
65
67
  await modelerHomePage.clickProjectBreadcrumb();
@@ -474,6 +474,7 @@ _8_7_1.test.describe('HTO User Flow Tests', () => {
474
474
  await formJsPage.fillKeyInput('Upload_Files');
475
475
  await formJsPage.enableUploadMultipleFiles();
476
476
  await (0, sleep_1.sleep)(10000);
477
+ await formJsPage.deployForm(clusterName);
477
478
  });
478
479
  await _8_7_1.test.step('Create a Form with a Document Preview Field', async () => {
479
480
  await modelerHomePage.clickProjectBreadcrumb();
@@ -485,6 +486,7 @@ _8_7_1.test.describe('HTO User Flow Tests', () => {
485
486
  await formJsPage.clickGeneralPropertiesPanel();
486
487
  await formJsPage.filldocumentReferenceInput('Upload_Files');
487
488
  await (0, sleep_1.sleep)(10000);
489
+ await formJsPage.deployForm(clusterName);
488
490
  });
489
491
  await _8_7_1.test.step('Add A BPMN Template To The Project', async () => {
490
492
  await modelerHomePage.clickProjectBreadcrumb();
@@ -26,7 +26,7 @@ _8_7_1.test.describe('Smoke Tests', () => {
26
26
  await (0, _setup_1.captureScreenshot)(page, testInfo);
27
27
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
28
28
  });
29
- (0, _8_7_1.test)('Most Common Flow User Flow With All Apps', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, }) => {
29
+ (0, _8_7_1.test)('Most Common Flow User Flow With All Apps', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, formJsPage, }) => {
30
30
  _8_7_1.test.slow();
31
31
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
32
32
  const formName = 'New form' + randomString;
@@ -45,10 +45,8 @@ _8_7_1.test.describe('Smoke Tests', () => {
45
45
  });
46
46
  await _8_7_1.test.step('Create Form To Be Linked For Zeebe User Task', async () => {
47
47
  await modelerHomePage.clickCrossComponentProjectFolder();
48
- await modelerHomePage.clickDiagramTypeDropdown();
49
- await modelerHomePage.clickFormOption();
50
- await modelerHomePage.enterFormName(formName);
51
- await modelerHomePage.assertFormBreadcrumbVisible(formName);
48
+ await modelerHomePage.createForm(formName);
49
+ await formJsPage.deployForm(clusterName);
52
50
  });
53
51
  await _8_7_1.test.step('Add A BPMN Template To The Project', async () => {
54
52
  await modelerHomePage.clickProjectBreadcrumb();
@@ -54,6 +54,7 @@ _8_7_1.test.describe('Web Modeler User Flow Tests', () => {
54
54
  await _8_7_1.test.step('Create an AI Generated Form', async () => {
55
55
  await modelerHomePage.createForm(formName);
56
56
  await formJsPage.generateAIForm();
57
+ await formJsPage.deployForm(clusterName);
57
58
  });
58
59
  await _8_7_1.test.step('Add A BPMN Template To The Project', async () => {
59
60
  await modelerHomePage.clickProjectBreadcrumb();
@@ -300,6 +301,7 @@ _8_7_1.test.describe('Web Modeler User Flow Tests', () => {
300
301
  await _8_7_1.test.step('Create an AI Generated Form', async () => {
301
302
  await modelerHomePage.createForm(formName);
302
303
  await formJsPage.generateAIForm();
304
+ await formJsPage.deployForm(clusterName);
303
305
  });
304
306
  await _8_7_1.test.step('Add A BPMN Template To The Project', async () => {
305
307
  await modelerHomePage.clickProjectBreadcrumb();
@@ -534,7 +536,7 @@ _8_7_1.test.describe('Web Modeler User Flow Tests', () => {
534
536
  });
535
537
  await _8_7_1.test.step('Create BPMN Diagram with a embedded form and Start Process Instance', async () => {
536
538
  await modelerCreatePage.modelJobWorkerDiagram(processName, true);
537
- await modelerCreatePage.runProcessInstance(clusterName, '', {}, 'The diagram contains 1 embedded form.');
539
+ await modelerCreatePage.runProcessInstance(clusterName);
538
540
  });
539
541
  await _8_7_1.test.step('View Process Instance in Operate and check if process is complete', async () => {
540
542
  await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
@@ -635,6 +637,7 @@ _8_7_1.test.describe('Web Modeler User Flow Tests', () => {
635
637
  await formJsPage.fillKeyInput('Public_Form_Text_Field');
636
638
  await (0, test_1.expect)(formJsPage.textFieldInForm).toBeVisible();
637
639
  await (0, sleep_1.sleep)(5000);
640
+ await formJsPage.deployForm(clusterName);
638
641
  });
639
642
  await _8_7_1.test.step('Add A BPMN Template To The Project', async () => {
640
643
  await modelerHomePage.clickProjectBreadcrumb();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.218",
3
+ "version": "0.0.220",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",