@camunda/e2e-test-suite 0.0.710 → 0.0.712

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.
@@ -56,16 +56,35 @@ class FormJsPage {
56
56
  .filter({ hasText: 'Form deployed!' });
57
57
  }
58
58
  async generateAIForm(request = 'Create a form with the following fields: 1. A text field with the label "Full Name" 2. A number with the label "Count" 3. A date input with the label "Date of birth"4. A Checkbox with the label "Agree"') {
59
- await (0, test_1.expect)(this.aiFormGeneratorButton).toBeVisible({
60
- timeout: 90000,
61
- });
62
- await this.clickAIFormGeneratorButton();
63
- await this.clickFormRequestInput();
64
- await this.fillFormRequestInput(request);
65
- await this.clickGenerateFormButton();
66
- await (0, test_1.expect)(this.page.getByText('Generating...')).toBeVisible();
67
- await (0, test_1.expect)(this.page.getByText('Successfully generated smart form.')).toBeVisible({ timeout: 300000 });
68
- await (0, sleep_1.sleep)(60000);
59
+ // The "Successfully generated smart form." toast is delivered over a Pusher
60
+ // websocket. A transient websocket/network drop during generation means the
61
+ // toast never renders even though generation finished, leaving the old
62
+ // single 5-minute wait stuck until the test timed out. Re-attempt on a
63
+ // reloaded editor (fresh websocket) if the toast doesn't arrive.
64
+ const maxAttempts = 2;
65
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
66
+ await (0, test_1.expect)(this.aiFormGeneratorButton).toBeVisible({
67
+ timeout: 90000,
68
+ });
69
+ await this.clickAIFormGeneratorButton();
70
+ await this.clickFormRequestInput();
71
+ await this.fillFormRequestInput(request);
72
+ await this.clickGenerateFormButton();
73
+ await (0, test_1.expect)(this.page.getByText('Generating...'))
74
+ .toBeVisible({ timeout: 60000 })
75
+ .catch(() => { });
76
+ try {
77
+ await (0, test_1.expect)(this.page.getByText('Successfully generated smart form.')).toBeVisible({ timeout: 180000 });
78
+ await (0, sleep_1.sleep)(60000);
79
+ return;
80
+ }
81
+ catch (error) {
82
+ if (attempt === maxAttempts) {
83
+ throw error;
84
+ }
85
+ await this.page.reload();
86
+ }
87
+ }
69
88
  }
70
89
  async clickAIFormGeneratorButton() {
71
90
  await this.aiFormGeneratorButton.click();
@@ -63,7 +63,9 @@ class ClusterPage {
63
63
  this.confirmDeleteInput = page.getByRole('textbox', {
64
64
  name: 'Type the word DELETE to confirm',
65
65
  });
66
- this.dangerDeleteButton = page.getByRole('button', { name: 'danger Delete' });
66
+ this.dangerDeleteButton = page
67
+ .getByRole('dialog')
68
+ .getByRole('button', { name: 'Delete' });
67
69
  this.testClusterLink = page.getByRole('link', { name: 'Test Cluster' });
68
70
  this.connectorSecretsTab = page.getByRole('tab', {
69
71
  name: 'Connector Secrets',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.710",
3
+ "version": "0.0.712",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",