@camunda/e2e-test-suite 0.0.221 → 0.0.223

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.
@@ -11,6 +11,9 @@ declare class FormJsPage {
11
11
  readonly uploadMultipleFilesToggle: Locator;
12
12
  readonly documentReferenceInput: Locator;
13
13
  readonly documentPreview: Locator;
14
+ readonly deployFormButton: Locator;
15
+ readonly deployModalSubmitButton: Locator;
16
+ readonly deploySuccessNotification: Locator;
14
17
  constructor(page: Page);
15
18
  clickAIFormGeneratorButton(): Promise<void>;
16
19
  clickFormRequestInput(): Promise<void>;
@@ -21,5 +24,8 @@ declare class FormJsPage {
21
24
  fillKeyInput(key: string): Promise<void>;
22
25
  enableUploadMultipleFiles(): Promise<void>;
23
26
  filldocumentReferenceInput(key: string): Promise<void>;
27
+ clickDeployFormButton(): Promise<void>;
28
+ clickDeployModalSubmitButton(): Promise<void>;
29
+ deployForm(): Promise<void>;
24
30
  }
25
31
  export { FormJsPage };
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FormJsPage = void 0;
4
+ const test_1 = require("@playwright/test");
4
5
  class FormJsPage {
5
6
  page;
6
7
  aiFormGeneratorButton;
@@ -13,6 +14,9 @@ class FormJsPage {
13
14
  uploadMultipleFilesToggle;
14
15
  documentReferenceInput;
15
16
  documentPreview;
17
+ deployFormButton;
18
+ deployModalSubmitButton;
19
+ deploySuccessNotification;
16
20
  constructor(page) {
17
21
  this.page = page;
18
22
  this.aiFormGeneratorButton = page.getByRole('button', {
@@ -31,6 +35,13 @@ class FormJsPage {
31
35
  name: 'document reference',
32
36
  });
33
37
  this.documentPreview = page.locator('button[data-field-type="documentPreview"]');
38
+ this.deployFormButton = page.locator('button.cds--btn--primary', {
39
+ hasText: 'Deploy',
40
+ });
41
+ this.deployModalSubmitButton = page.locator('button[data-modal-primary-focus="true"][type="submit"]');
42
+ this.deploySuccessNotification = page
43
+ .locator('.cds--toast-notification--success')
44
+ .filter({ hasText: 'Form deployed!' });
34
45
  }
35
46
  async clickAIFormGeneratorButton() {
36
47
  await this.aiFormGeneratorButton.click();
@@ -61,5 +72,16 @@ class FormJsPage {
61
72
  async filldocumentReferenceInput(key) {
62
73
  await this.documentReferenceInput.fill(key, { timeout: 60000 });
63
74
  }
75
+ async clickDeployFormButton() {
76
+ await this.deployFormButton.click({ timeout: 60000 });
77
+ }
78
+ async clickDeployModalSubmitButton() {
79
+ await this.deployModalSubmitButton.click({ timeout: 60000 });
80
+ }
81
+ async deployForm() {
82
+ await this.clickDeployFormButton();
83
+ await this.clickDeployModalSubmitButton();
84
+ await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 30000 });
85
+ }
64
86
  }
65
87
  exports.FormJsPage = FormJsPage;
@@ -46,9 +46,7 @@ class PlayPage {
46
46
  this.confirmDeleteScenarioButton = page.getByRole('button', {
47
47
  name: 'danger Delete',
48
48
  });
49
- this.viewAllScenariosButton = page.getByRole('button', {
50
- name: '(View all)',
51
- });
49
+ this.viewAllScenariosButton = page.getByText('(View all)').last();
52
50
  this.getScenarioRowByName = (scenarioName) => page.locator('tr', { hasText: scenarioName });
53
51
  this.getScenarioRow = (scenarioName) => page.locator('tr', { hasText: scenarioName });
54
52
  this.diagram = page.getByTestId('diagram');
@@ -35,6 +35,7 @@ if (process.env.IS_DS === 'true') {
35
35
  await formJsPage.fillKeyInput('Upload_Files');
36
36
  await formJsPage.enableUploadMultipleFiles();
37
37
  await (0, sleep_1.sleep)(10000);
38
+ await formJsPage.deployForm();
38
39
  });
39
40
  await SM_8_9_1.test.step('Create a Form with a Document Preview Field', async () => {
40
41
  await modelerHomePage.clickProjectBreadcrumb();
@@ -46,6 +47,7 @@ if (process.env.IS_DS === 'true') {
46
47
  await formJsPage.clickGeneralPropertiesPanel();
47
48
  await formJsPage.filldocumentReferenceInput('Upload_Files');
48
49
  await (0, sleep_1.sleep)(10000);
50
+ await formJsPage.deployForm();
49
51
  });
50
52
  await SM_8_9_1.test.step('Add A BPMN Template To The Project', async () => {
51
53
  await modelerHomePage.clickProjectBreadcrumb();
@@ -15,7 +15,7 @@ SM_8_9_1.test.describe('Web Modeler User Flow Tests', () => {
15
15
  await (0, _setup_1.captureScreenshot)(page, testInfo);
16
16
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
17
17
  });
18
- (0, SM_8_9_1.test)('Form.js Integration with User Task', async ({ taskDetailsPage, taskPanelPage, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, page, }) => {
18
+ (0, SM_8_9_1.test)('Form.js Integration with User Task', async ({ taskDetailsPage, taskPanelPage, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, formJsPage, page, }) => {
19
19
  SM_8_9_1.test.slow();
20
20
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
21
21
  const processName = 'User_Task_Process_With_Form' + randomString;
@@ -26,6 +26,7 @@ SM_8_9_1.test.describe('Web Modeler User Flow Tests', () => {
26
26
  await modelerHomePage.clickFormOption();
27
27
  await modelerHomePage.enterFormName(formName);
28
28
  await (0, sleep_1.sleep)(10000);
29
+ await formJsPage.deployForm();
29
30
  });
30
31
  await SM_8_9_1.test.step('Add A BPMN Template To The Project', async () => {
31
32
  await modelerHomePage.clickProjectBreadcrumb();
@@ -49,7 +50,7 @@ SM_8_9_1.test.describe('Web Modeler User Flow Tests', () => {
49
50
  await (0, UtilitiesPage_1.completeTaskWithRetry)(page, taskPanelPage, taskDetailsPage, processName, 'medium');
50
51
  });
51
52
  });
52
- (0, SM_8_9_1.test)('Form.js Integration with Start form @tasklistV2', async ({ modelerHomePage, modelerCreatePage, navigationPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
53
+ (0, SM_8_9_1.test)('Form.js Integration with Start form @tasklistV2', async ({ modelerHomePage, modelerCreatePage, navigationPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, formJsPage, }) => {
53
54
  SM_8_9_1.test.slow();
54
55
  const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
55
56
  const processName = 'Start_Form_Process' + randomString;
@@ -60,6 +61,7 @@ SM_8_9_1.test.describe('Web Modeler User Flow Tests', () => {
60
61
  await modelerHomePage.clickFormOption();
61
62
  await modelerHomePage.enterFormName(formName);
62
63
  await (0, sleep_1.sleep)(10000);
64
+ await formJsPage.deployForm();
63
65
  });
64
66
  await SM_8_9_1.test.step('Add A BPMN Template To The Project', async () => {
65
67
  await modelerHomePage.clickProjectBreadcrumb();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.221",
3
+ "version": "0.0.223",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",