@camunda/e2e-test-suite 0.0.644 → 0.0.646

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,
@@ -1012,6 +1018,68 @@ class ModelerCreatePage {
1012
1018
  }
1013
1019
  async completePlayConfiguration(clusterName) {
1014
1020
  const timeout = 30000;
1021
+ // New flow (8.10+): "Setup environment" panel with three steps:
1022
+ // 1. Connect cluster → "Configure environment" modal → select cluster → Save
1023
+ // 2. Deploy process → wait for success banner
1024
+ // 3. Configure scenario
1025
+ const setupDeployButton = this.page
1026
+ .getByText('Deploy process')
1027
+ .locator('..')
1028
+ .getByRole('button', { name: 'Deploy' });
1029
+ const configureScenarioButton = this.page.getByRole('button', {
1030
+ name: 'Configure scenario',
1031
+ });
1032
+ // Wait up to 15s for EITHER the new-flow setup panel OR the legacy Continue
1033
+ // button to appear. Using .or() avoids separate sequential timeouts that would
1034
+ // both expire before the page finishes loading on a slow cluster.
1035
+ const setupOrContinue = setupDeployButton.or(this.continueToPlayButton);
1036
+ const panelAppeared = await setupOrContinue
1037
+ .first()
1038
+ .isVisible({ timeout: 15000 })
1039
+ .catch(() => false);
1040
+ if (!panelAppeared) {
1041
+ // Neither appeared — Play is already configured and ready.
1042
+ return;
1043
+ }
1044
+ const isNewFlow = await setupDeployButton.isVisible().catch(() => false);
1045
+ if (isNewFlow) {
1046
+ // Step 1: connect cluster if the Deploy button is still disabled.
1047
+ // The Deploy button (data-testid="play-configuration-deploy-button") is
1048
+ // rendered disabled until a cluster is connected. Check its state to decide
1049
+ // whether the "Connect cluster" step is needed — this is more reliable than
1050
+ // a short visibility poll on the "Connect cluster" button, which can be slow
1051
+ // to render on first page load.
1052
+ const deployButtonDisabled = await setupDeployButton
1053
+ .isDisabled()
1054
+ .catch(() => true);
1055
+ if (deployButtonDisabled) {
1056
+ const connectClusterButton = this.page.getByRole('button', {
1057
+ name: 'Connect cluster',
1058
+ });
1059
+ await connectClusterButton.click({ timeout: 15000 });
1060
+ const configureEnvDialog = this.page
1061
+ .getByRole('dialog')
1062
+ .filter({ hasText: 'Configure environment' });
1063
+ await configureEnvDialog.getByRole('combobox').click({ timeout });
1064
+ await this.page
1065
+ .getByRole('option', { name: new RegExp(clusterName, 'i') })
1066
+ .click({ timeout });
1067
+ await configureEnvDialog
1068
+ .getByRole('button', { name: 'Save' })
1069
+ .click({ timeout });
1070
+ // Wait for Deploy button to become enabled after cluster is saved.
1071
+ await (0, test_1.expect)(setupDeployButton).toBeEnabled({ timeout: 30000 });
1072
+ }
1073
+ // Step 2: deploy — wait for enabled; button stays disabled until the cluster
1074
+ // connection is confirmed by the backend after the Save in step 1.
1075
+ await (0, test_1.expect)(setupDeployButton).toBeEnabled({ timeout: 30000 });
1076
+ await setupDeployButton.click({ timeout });
1077
+ await (0, test_1.expect)(this.page.getByText('Process has been successfully deployed')).toBeVisible({ timeout: 90000 });
1078
+ // Step 3: configure scenario
1079
+ await configureScenarioButton.click({ timeout });
1080
+ return;
1081
+ }
1082
+ // Legacy flow: select cluster via dialog, then click Continue.
1015
1083
  let attempts = 0;
1016
1084
  const maxRetries = 2;
1017
1085
  while (attempts < maxRetries) {
@@ -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.646",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",