@camunda/e2e-test-suite 0.0.1733 → 0.0.1735

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.
@@ -19,6 +19,8 @@ declare class ModelerHomePage {
19
19
  readonly diagramTypeDropdown: Locator;
20
20
  readonly bpmnTemplateOption: Locator;
21
21
  readonly formTemplateOption: Locator;
22
+ readonly newEntityNameInput: Locator;
23
+ readonly newEntityNameSubmit: Locator;
22
24
  readonly diagramPropertiesPanel: Locator;
23
25
  readonly projectBreadcrumb: Locator;
24
26
  readonly workspaceBreadcrumb: Locator;
@@ -64,6 +66,7 @@ declare class ModelerHomePage {
64
66
  clickBpmnTemplateOption(): Promise<void>;
65
67
  clickFormOption(): Promise<void>;
66
68
  enterFormName(name: string): Promise<void>;
69
+ private submitNewEntityName;
67
70
  clickProjectBreadcrumb(): Promise<void>;
68
71
  clickWorkspaceBreadcrumb(): Promise<void>;
69
72
  enterResourceContainer(name?: string): Promise<void>;
@@ -45,6 +45,8 @@ class ModelerHomePage {
45
45
  diagramTypeDropdown;
46
46
  bpmnTemplateOption;
47
47
  formTemplateOption;
48
+ newEntityNameInput;
49
+ newEntityNameSubmit;
48
50
  // Same group the spec asserts on ModelerCreatePage: it is what proves the
49
51
  // BPMN editor opened, and clickBpmnTemplateOption() has to know that here.
50
52
  diagramPropertiesPanel;
@@ -171,6 +173,10 @@ class ModelerHomePage {
171
173
  // day that variant ships.
172
174
  this.bpmnTemplateOption = page.locator('[data-test="create-bpmn-diagram"]');
173
175
  this.formTemplateOption = page.locator('[data-test="create-form"]');
176
+ // Hub asks for the name in a dialog before it creates a file
177
+ // (camunda-hub NewEntityNameDialog.tsx).
178
+ this.newEntityNameInput = page.locator('[data-test="new-entity-name-input"]');
179
+ this.newEntityNameSubmit = page.locator('[data-test="new-entity-name-submit"]');
174
180
  this.diagramPropertiesPanel = page.locator('[data-group-id="group-general"]');
175
181
  // Hub's breadcrumbs carry no data-test at all (confirmed by a DOM audit of
176
182
  // a live run: none of the seven breadcrumb-* ids this file used are
@@ -707,6 +713,9 @@ class ModelerHomePage {
707
713
  // 30s rather than the old 120s: the option is proven visible above, so a
708
714
  // longer click budget only ate the time the retry below needs.
709
715
  await this.bpmnTemplateOption.click({ timeout: 30000 });
716
+ // The specs rename the diagram later through enterDiagramName, so keep
717
+ // Hub's former default rather than its project-name suggestion.
718
+ await this.submitNewEntityName('New BPMN diagram');
710
719
  await (0, test_1.expect)(this.diagramPropertiesPanel).toBeVisible({ timeout: 60000 });
711
720
  }).toPass({ timeout: 240000, intervals: [1000, 2000, 5000] });
712
721
  }
@@ -720,9 +729,28 @@ class ModelerHomePage {
720
729
  }
721
730
  async enterFormName(name) {
722
731
  await (0, sessionRecovery_1.recoverStuckModelerLogin)(this.page);
732
+ if (await this.submitNewEntityName(name)) {
733
+ await (0, test_1.expect)((0, hubResourceRename_1.hubBreadcrumbs)(this.page).getByText(name)).toBeVisible({
734
+ timeout: 60000,
735
+ });
736
+ return;
737
+ }
723
738
  // "New form" is the server default the form still carries at this point.
724
739
  await (0, hubResourceRename_1.renameHubResource)(this.page, 'New form', name);
725
740
  }
741
+ // Returns false when no naming dialog opened, i.e. a shell that still
742
+ // creates the file straight away under a placeholder name.
743
+ async submitNewEntityName(name) {
744
+ if (!(await this.becameVisible(this.newEntityNameInput, 10000))) {
745
+ return false;
746
+ }
747
+ await this.newEntityNameInput.fill(name);
748
+ await (0, test_1.expect)(this.newEntityNameInput).toHaveValue(name, { timeout: 10000 });
749
+ await (0, test_1.expect)(this.newEntityNameSubmit).toBeEnabled({ timeout: 15000 });
750
+ await this.newEntityNameSubmit.click({ timeout: 15000 });
751
+ await (0, test_1.expect)(this.newEntityNameInput).toBeHidden({ timeout: 60000 });
752
+ return true;
753
+ }
726
754
  // Kept under its original name because it is what the existing call sites
727
755
  // already mean: "go back to where my resources live". That is now the
728
756
  // process application, not the workspace root.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1733",
3
+ "version": "0.0.1735",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",