@camunda/e2e-test-suite 0.0.644 → 0.0.645

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.
@@ -16,6 +16,7 @@ declare class ModelerCreatePage {
16
16
  readonly renameDiagramNameButton: Locator;
17
17
  readonly diagramNameInput: Locator;
18
18
  readonly variableInput: Locator;
19
+ readonly businessIdInput: Locator;
19
20
  readonly embedFormButton: Locator;
20
21
  readonly embedButton: Locator;
21
22
  readonly newForm: Locator;
@@ -137,7 +138,7 @@ declare class ModelerCreatePage {
137
138
  clickStartInstanceSubButton(): Promise<void>;
138
139
  runProcessInstance(clusterName: string, variables?: string, formVariables?: {
139
140
  [key: string]: string;
140
- }, textToVisible?: string, hasDeploymentPermission?: boolean): Promise<void>;
141
+ }, textToVisible?: string, hasDeploymentPermission?: boolean, businessId?: string): Promise<void>;
141
142
  selectCluster(clusterName: string): Promise<void>;
142
143
  clickViewProcessInstanceLink(): Promise<void>;
143
144
  clickNameInput(): Promise<void>;
@@ -22,6 +22,7 @@ class ModelerCreatePage {
22
22
  renameDiagramNameButton;
23
23
  diagramNameInput;
24
24
  variableInput;
25
+ businessIdInput;
25
26
  embedFormButton;
26
27
  embedButton;
27
28
  newForm;
@@ -149,6 +150,7 @@ class ModelerCreatePage {
149
150
  this.renameDiagramNameButton = page.getByText('Rename');
150
151
  this.diagramNameInput = page.locator('[data-test="editable-input"]');
151
152
  this.variableInput = page.locator('textarea#variables-json');
153
+ this.businessIdInput = page.locator('[id^="business-id-input"]');
152
154
  this.embedFormButton = page.getByRole('button', { name: 'Link form' });
153
155
  this.embedButton = page.locator('[data-test="confirm-move"]');
154
156
  this.newForm = page
@@ -534,7 +536,7 @@ class ModelerCreatePage {
534
536
  async clickStartInstanceSubButton() {
535
537
  await this.deployAndRunSubButton.click({ timeout: 30000 });
536
538
  }
537
- async runProcessInstance(clusterName, variables = '', formVariables = {}, textToVisible = '', hasDeploymentPermission = true) {
539
+ async runProcessInstance(clusterName, variables = '', formVariables = {}, textToVisible = '', hasDeploymentPermission = true, businessId = '') {
538
540
  const maxRetries = 10;
539
541
  const retryDelayMs = 20000;
540
542
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
@@ -560,6 +562,10 @@ class ModelerCreatePage {
560
562
  await this.fillStartFormNumber(formVariables.startNumber);
561
563
  }
562
564
  }
565
+ if (businessId.length > 0) {
566
+ await (0, test_1.expect)(this.businessIdInput).toBeVisible({ timeout: 60000 });
567
+ await this.businessIdInput.fill(businessId);
568
+ }
563
569
  if (textToVisible.length > 0) {
564
570
  await (0, test_1.expect)(this.dialog.getByText(textToVisible)).toBeVisible({
565
571
  timeout: 30000,
@@ -23,5 +23,6 @@ declare class OperateProcessInstancePage {
23
23
  clickDiagramTask(taskName: string): Promise<void>;
24
24
  assertActiveTokenIsPresent(): Promise<void>;
25
25
  assertDetailsPopoverIsVisible(): Promise<void>;
26
+ assertBusinessIdVisible(businessId: string): Promise<void>;
26
27
  }
27
28
  export { OperateProcessInstancePage };
@@ -136,5 +136,12 @@ class OperateProcessInstancePage {
136
136
  timeout: 60000,
137
137
  });
138
138
  }
139
+ async assertBusinessIdVisible(businessId) {
140
+ const instanceHeader = this.page.getByTestId('instance-header');
141
+ await (0, test_1.expect)(instanceHeader.getByText('Business ID')).toBeVisible({
142
+ timeout: 60000,
143
+ });
144
+ await (0, test_1.expect)(instanceHeader.getByText(businessId, { exact: true })).toBeVisible({ timeout: 60000 });
145
+ }
139
146
  }
140
147
  exports.OperateProcessInstancePage = OperateProcessInstancePage;
@@ -366,6 +366,46 @@ _8_10_1.test.describe('Web Modeler User Flow Tests', () => {
366
366
  await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateProcessInstancePage, operateProcessInstancePage.completedIcon, 'Completed icon', 60000, false, 5);
367
367
  });
368
368
  });
369
+ (0, _8_10_1.test)('Deploy and run process with run configuration and verify in Operate', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, }) => {
370
+ _8_10_1.test.slow();
371
+ const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
372
+ const processName = 'Run_Config_Process_' + randomString;
373
+ const businessId = `bid-${Date.now()}-${randomString}`;
374
+ const variables = '{"orderNumber": "A12BH98", "amount": 185.34}';
375
+ await _8_10_1.test.step('Navigate to Web Modeler', async () => {
376
+ await (0, test_1.expect)(homePage.camundaComponentsButton).toBeVisible({
377
+ timeout: 120000,
378
+ });
379
+ await appsPage.clickCamundaApps();
380
+ await appsPage.clickModeler();
381
+ await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
382
+ timeout: 180000,
383
+ });
384
+ });
385
+ await _8_10_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
386
+ await modelerHomePage.clickCrossComponentProjectFolder();
387
+ await modelerHomePage.clickDiagramTypeDropdown();
388
+ await modelerHomePage.clickBpmnTemplateOption();
389
+ });
390
+ await _8_10_1.test.step('Model a simple job worker diagram', async () => {
391
+ await modelerCreatePage.modelJobWorkerDiagram(processName);
392
+ });
393
+ await _8_10_1.test.step('Deploy and run process with variables and Business ID', async () => {
394
+ await modelerCreatePage.runProcessInstance(clusterName, variables, {}, '', true, businessId);
395
+ });
396
+ await _8_10_1.test.step('View process instance in Operate and assert run configuration is visible', async () => {
397
+ await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
398
+ timeout: 180000,
399
+ });
400
+ await modelerCreatePage.clickViewProcessInstanceLink();
401
+ const operateTab = await page.waitForEvent('popup', { timeout: 60000 });
402
+ const operateTabOperateProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
403
+ await operateTabOperateProcessInstancePage.closePopOverIfVisible();
404
+ await operateTabOperateProcessInstancePage.assertBusinessIdVisible(businessId);
405
+ await operateTabOperateProcessInstancePage.assertProcessVariableContainsText('orderNumber', '"A12BH98"');
406
+ await operateTabOperateProcessInstancePage.assertProcessVariableContainsText('amount', '185.34');
407
+ });
408
+ });
369
409
  (0, _8_10_1.test)('Conditional Events - Deploy, verify in Operate and verify process in Optimize dashboard @tasklistV2', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, }) => {
370
410
  _8_10_1.test.slow();
371
411
  const bpmnFileName = 'Conditional_Events_All.bpmn';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.644",
3
+ "version": "0.0.645",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",