@camunda/e2e-test-suite 0.0.630 → 0.0.631

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.
@@ -14,6 +14,8 @@ declare class PlayPage {
14
14
  readonly diagram: Locator;
15
15
  readonly startInstanceButton: Locator;
16
16
  readonly startInstanceWithCachedButton: Locator;
17
+ readonly configureTestPanel: Locator;
18
+ readonly configureTestPanelStartButton: Locator;
17
19
  readonly notifications: Locator;
18
20
  readonly saveScenarioModal: Locator;
19
21
  readonly loadingInstanceDetailsText: Locator;
@@ -4,6 +4,7 @@ exports.PlayPage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const sleep_1 = require("../../utils/sleep");
6
6
  const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
7
+ const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
7
8
  const maxWaitTimeSeconds = 180000;
8
9
  class PlayPage {
9
10
  page;
@@ -20,6 +21,8 @@ class PlayPage {
20
21
  diagram;
21
22
  startInstanceButton;
22
23
  startInstanceWithCachedButton;
24
+ configureTestPanel;
25
+ configureTestPanelStartButton;
23
26
  notifications;
24
27
  saveScenarioModal;
25
28
  loadingInstanceDetailsText;
@@ -54,6 +57,8 @@ class PlayPage {
54
57
  exact: true,
55
58
  });
56
59
  this.startInstanceWithCachedButton = page.getByLabel('Start instance with cached');
60
+ this.configureTestPanel = page.getByTestId('configure-test-panel');
61
+ this.configureTestPanelStartButton = this.configureTestPanel.getByRole('button', { name: /^Start( with .*)?$/, exact: false });
57
62
  this.notifications = page.locator('.cds--toast-notification');
58
63
  this.saveScenarioModal = page.getByTestId('save-scenario-modal');
59
64
  this.loadingInstanceDetailsText = this.page.getByText('Loading instance details...');
@@ -69,29 +74,15 @@ class PlayPage {
69
74
  await this.completeJobButton.click();
70
75
  }
71
76
  async clickStartInstanceButton() {
72
- const maxRetries = 5;
73
- let attempts = 0;
74
- while (attempts < maxRetries) {
75
- try {
76
- await this.page.waitForLoadState('domcontentloaded');
77
- await this.diagram.waitFor({ state: 'visible', timeout: 60000 });
78
- await this.startInstanceButton
79
- .or(this.startInstanceWithCachedButton)
80
- .first()
81
- .click({ timeout: 60000 });
82
- await (0, test_1.expect)(this.loadingInstanceDetailsText).toBeVisible();
83
- await (0, test_1.expect)(this.loadingInstanceDetailsText).not.toBeVisible({
84
- timeout: 60000,
85
- });
86
- return;
87
- }
88
- catch (error) {
89
- if (attempts >= maxRetries - 1)
90
- throw error;
91
- await this.page.waitForLoadState('load');
92
- attempts++;
93
- }
94
- }
77
+ const startTrigger = this.configureTestPanelStartButton
78
+ .or(this.startInstanceButton)
79
+ .or(this.startInstanceWithCachedButton)
80
+ .first();
81
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, startTrigger, {
82
+ totalTimeout: maxWaitTimeSeconds,
83
+ visibilityTimeout: 30000,
84
+ maxRetries: 5,
85
+ });
95
86
  }
96
87
  async dismissStartModal() {
97
88
  const buttonVariations = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.630",
3
+ "version": "0.0.631",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",