@camunda/e2e-test-suite 0.0.332 → 0.0.333

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.
@@ -144,7 +144,7 @@ class OperateProcessesPage {
144
144
  return;
145
145
  }
146
146
  const MAX_ATTEMPTS = 100;
147
- const TOTAL_TIMEOUT_MS = constants_1._1_MINUTE_IN_MS * 2;
147
+ const TOTAL_TIMEOUT_MS = constants_1._1_MINUTE_IN_MS * 4;
148
148
  let attempt = 0;
149
149
  let lastError;
150
150
  const startTime = Date.now();
@@ -68,11 +68,11 @@ class PlayPage {
68
68
  await this.completeJobButton.click();
69
69
  }
70
70
  async clickStartInstanceButton() {
71
- const maxRetries = 3;
71
+ const maxRetries = 5;
72
72
  let attempts = 0;
73
73
  while (attempts < maxRetries) {
74
74
  try {
75
- await this.diagram.waitFor({ state: 'visible', timeout: 30000 });
75
+ await this.diagram.waitFor({ state: 'visible', timeout: 60000 });
76
76
  await this.startInstanceButton
77
77
  .or(this.startInstanceWithCachedButton)
78
78
  .first()
@@ -86,8 +86,7 @@ class PlayPage {
86
86
  catch (error) {
87
87
  if (attempts >= maxRetries - 1)
88
88
  throw error;
89
- await this.page.reload();
90
- await (0, sleep_1.sleep)(2000);
89
+ await (0, sleep_1.sleep)(5000);
91
90
  attempts++;
92
91
  }
93
92
  }
@@ -248,7 +248,7 @@ class TaskDetailsPage {
248
248
  let attempts = 0;
249
249
  while (attempts < maxAttempts) {
250
250
  try {
251
- await (0, test_1.expect)(this.page.getByText(expectedText)).toBeVisible({
251
+ await (0, test_1.expect)(this.page.getByText(expectedText).first()).toBeVisible({
252
252
  timeout: 60000,
253
253
  });
254
254
  return;
@@ -40,6 +40,7 @@ class TaskPanelPage {
40
40
  async openTask(name, assignButton = true) {
41
41
  for (let attempt = 1; attempt <= 30; attempt++) {
42
42
  try {
43
+ await this.page.waitForLoadState('networkidle');
43
44
  await this.availableTasks
44
45
  .getByText(name, { exact: true })
45
46
  .nth(0)
@@ -55,9 +56,10 @@ class TaskPanelPage {
55
56
  if (attempt < 30) {
56
57
  console.warn(`Attempt ${attempt} failed. Reloading page...`);
57
58
  await this.page.reload();
59
+ await (0, sleep_1.sleep)(2000);
58
60
  }
59
61
  else {
60
- throw new Error(`Failed to open task "${name}" after 3 attempts: ${error}`);
62
+ throw new Error(`Failed to open task "${name}" after ${attempt} attempts: ${error}`);
61
63
  }
62
64
  }
63
65
  }
@@ -145,7 +145,7 @@ class OperateProcessesPage {
145
145
  return;
146
146
  }
147
147
  const MAX_ATTEMPTS = 100;
148
- const TOTAL_TIMEOUT_MS = constants_1._1_MINUTE_IN_MS * 2;
148
+ const TOTAL_TIMEOUT_MS = constants_1._1_MINUTE_IN_MS * 4;
149
149
  let attempt = 0;
150
150
  let lastError;
151
151
  const startTime = Date.now();
@@ -70,11 +70,11 @@ class PlayPage {
70
70
  await this.completeJobButton.click();
71
71
  }
72
72
  async clickStartInstanceButton() {
73
- const maxRetries = 3;
73
+ const maxRetries = 5;
74
74
  let attempts = 0;
75
75
  while (attempts < maxRetries) {
76
76
  try {
77
- await this.diagram.waitFor({ state: 'visible', timeout: 30000 });
77
+ await this.diagram.waitFor({ state: 'visible', timeout: 60000 });
78
78
  await this.startInstanceButton
79
79
  .or(this.startInstanceWithCachedButton)
80
80
  .first()
@@ -88,8 +88,7 @@ class PlayPage {
88
88
  catch (error) {
89
89
  if (attempts >= maxRetries - 1)
90
90
  throw error;
91
- await this.page.reload();
92
- await (0, sleep_1.sleep)(2000);
91
+ await (0, sleep_1.sleep)(5000);
93
92
  attempts++;
94
93
  }
95
94
  }
@@ -248,7 +248,7 @@ class TaskDetailsPage {
248
248
  let attempts = 0;
249
249
  while (attempts < maxAttempts) {
250
250
  try {
251
- await (0, test_1.expect)(this.page.getByText(expectedText)).toBeVisible({
251
+ await (0, test_1.expect)(this.page.getByText(expectedText).first()).toBeVisible({
252
252
  timeout: 60000,
253
253
  });
254
254
  return;
@@ -40,6 +40,7 @@ class TaskPanelPage {
40
40
  async openTask(name, assignButton = true) {
41
41
  for (let attempt = 1; attempt <= 30; attempt++) {
42
42
  try {
43
+ await this.page.waitForLoadState('networkidle');
43
44
  await this.availableTasks
44
45
  .getByText(name, { exact: true })
45
46
  .nth(0)
@@ -55,9 +56,10 @@ class TaskPanelPage {
55
56
  if (attempt < 30) {
56
57
  console.warn(`Attempt ${attempt} failed. Reloading page...`);
57
58
  await this.page.reload();
59
+ await (0, sleep_1.sleep)(2000);
58
60
  }
59
61
  else {
60
- throw new Error(`Failed to open task "${name}" after 3 attempts: ${error}`);
62
+ throw new Error(`Failed to open task "${name}" after ${attempt} attempts: ${error}`);
61
63
  }
62
64
  }
63
65
  }
@@ -125,8 +125,15 @@ SM_8_10_1.test.describe('Deploy and run a process in Play', () => {
125
125
  await modelerCreatePage.clickSecondPlacedGateway();
126
126
  await (0, sleep_1.sleep)(5000);
127
127
  await modelerCreatePage.switchToPlay();
128
- await modelerCreatePage.clickContinueToPlay();
129
- await (0, sleep_1.sleep)(5000);
128
+ // After diagram modification, Play may show a "Continue" button
129
+ // to redeploy, or it may show the diagram directly. Try clicking
130
+ // Continue if present, then wait for the diagram to be ready.
131
+ try {
132
+ await modelerCreatePage.clickContinueToPlay();
133
+ }
134
+ catch {
135
+ // Continue button not present; Play loaded directly
136
+ }
130
137
  await playPage.clickStartInstanceButton();
131
138
  await playPage.waitForNextElementToBeActive('zeebe-user-task' + randomString + '1');
132
139
  await playPage.waitForCompleteJobButtonToBeAvailable();
@@ -125,8 +125,15 @@ SM_8_9_1.test.describe('Deploy and run a process in Play', () => {
125
125
  await modelerCreatePage.clickSecondPlacedGateway();
126
126
  await (0, sleep_1.sleep)(5000);
127
127
  await modelerCreatePage.switchToPlay();
128
- await modelerCreatePage.clickContinueToPlay();
129
- await (0, sleep_1.sleep)(5000);
128
+ // After diagram modification, Play may show a "Continue" button
129
+ // to redeploy, or it may show the diagram directly. Try clicking
130
+ // Continue if present, then wait for the diagram to be ready.
131
+ try {
132
+ await modelerCreatePage.clickContinueToPlay();
133
+ }
134
+ catch {
135
+ // Continue button not present; Play loaded directly
136
+ }
130
137
  await playPage.clickStartInstanceButton();
131
138
  await playPage.waitForNextElementToBeActive('zeebe-user-task' + randomString + '1');
132
139
  await playPage.waitForCompleteJobButtonToBeAvailable();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.332",
3
+ "version": "0.0.333",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",