@camunda/e2e-test-suite 0.0.1261 → 0.0.1262

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.
@@ -23,6 +23,7 @@ declare class ModelerHomePage {
23
23
  readonly workspaceWizardNameInput: Locator;
24
24
  readonly workspaceWizardSubmitButton: Locator;
25
25
  readonly workspaceWizardMembersStep: Locator;
26
+ readonly workspaceWizardEnvironmentsStep: Locator;
26
27
  readonly moreActionsButton: Locator;
27
28
  readonly renameMenuItem: Locator;
28
29
  readonly renameInput: Locator;
@@ -52,6 +53,7 @@ declare class ModelerHomePage {
52
53
  clickCreateNewProjectButton(): Promise<void>;
53
54
  enterNewProjectName(name: string): Promise<void>;
54
55
  private createWorkspaceViaWizard;
56
+ private finishWorkspaceWizard;
55
57
  waitForModelerReady(timeoutMs?: number): Promise<void>;
56
58
  createCrossComponentProjectFolder(credentials?: {
57
59
  username: string;
@@ -51,6 +51,7 @@ class ModelerHomePage {
51
51
  workspaceWizardNameInput;
52
52
  workspaceWizardSubmitButton;
53
53
  workspaceWizardMembersStep;
54
+ workspaceWizardEnvironmentsStep;
54
55
  moreActionsButton;
55
56
  renameMenuItem;
56
57
  renameInput;
@@ -113,6 +114,7 @@ class ModelerHomePage {
113
114
  this.workspaceWizardNameInput = page.locator('#workspace-name');
114
115
  this.workspaceWizardSubmitButton = page.locator('[data-test="workspace-wizard-submit"]');
115
116
  this.workspaceWizardMembersStep = page.locator('[data-test="step-members"]');
117
+ this.workspaceWizardEnvironmentsStep = page.locator('[data-test="step-environments"]');
116
118
  // The rename kebab sits beside the breadcrumb in the app header. The
117
119
  // editor's action bar is a <header> too, so it also carries the banner
118
120
  // role -- getByRole('banner') alone matches three headers in the editor
@@ -271,16 +273,30 @@ class ModelerHomePage {
271
273
  }
272
274
  await this.renameViaMoreActions(name);
273
275
  }
274
- // Drives hub's two-step workspace-creation wizard. The name is entered on the
275
- // General step, which enables "Next"; the Members step is optional and the
276
- // second submit ("Create workspace") creates the workspace. Gate that second
277
- // click on the Members step becoming active so the shared submit button is not
278
- // clicked twice while still on General.
276
+ // Drives hub's workspace-creation wizard. Environments-enabled builds add an
277
+ // optional third step after Members; older builds create on the second submit.
279
278
  async createWorkspaceViaWizard(name) {
280
279
  await this.workspaceWizardNameInput.fill(name);
281
280
  await this.workspaceWizardSubmitButton.click({ timeout: 60000 });
282
281
  await (0, test_1.expect)(this.workspaceWizardMembersStep).toHaveAttribute('data-state', 'active', { timeout: 30000 });
283
282
  await this.workspaceWizardSubmitButton.click({ timeout: 60000 });
283
+ await this.finishWorkspaceWizard();
284
+ }
285
+ async finishWorkspaceWizard() {
286
+ const needsEnvironmentSubmit = await Promise.race([
287
+ this.page
288
+ .waitForURL(/\/workspaces?\/[^/]+\/projects/, { timeout: 120000 })
289
+ .then(() => false),
290
+ (0, test_1.expect)(this.workspaceWizardEnvironmentsStep)
291
+ .toHaveAttribute('data-state', 'active', { timeout: 120000 })
292
+ .then(() => true),
293
+ ]);
294
+ if (needsEnvironmentSubmit) {
295
+ await this.workspaceWizardSubmitButton.click({ timeout: 60000 });
296
+ await this.page.waitForURL(/\/workspaces?\/[^/]+\/projects/, {
297
+ timeout: 120000,
298
+ });
299
+ }
284
300
  }
285
301
  // Wait for the Modeler project workspace to become interactive. The caller
286
302
  // arrives here via goToModeler(), which has already loaded and authenticated
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1261",
3
+ "version": "0.0.1262",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",