@camunda/e2e-test-suite 0.0.1663 → 0.0.1665

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.
@@ -113,7 +113,7 @@ declare class IdpCreatePage {
113
113
  assertClassificationModelName(expectedModel: string): Promise<void>;
114
114
  assertClassificationAccuracy(expectedAccuracy: string): Promise<void>;
115
115
  assertClassificationAccuracyIsPresent(): Promise<void>;
116
- classifyingProgressIsComplete(): Promise<void>;
116
+ classifyingProgressIsComplete(maxAttempts?: number): Promise<void>;
117
117
  assertClassificationTemplateSuccessNotification(): Promise<void>;
118
118
  selectProvider(provider: string): Promise<void>;
119
119
  }
@@ -593,15 +593,35 @@ class IdpCreatePage {
593
593
  });
594
594
  await (0, test_1.expect)(this.classificationAccuracyValue).toHaveText(/^\d+%$/);
595
595
  }
596
- async classifyingProgressIsComplete() {
597
- // Web Modeler runs classification as a process instance with a 600s
598
- // incident timer (camunda-hub `performClassification` ->
599
- // `runInstanceWithResult(..., 600, ...)`) and keeps the spinner up until
600
- // the instance completes. Waiting only 300s gives up while the product is
601
- // still within its own budget when the LLM provider is slow; wait out the
602
- // full product window (+ variable-fetch retries). The result assertions
603
- // that follow still fail if classification errors or times out.
604
- await (0, test_1.expect)(this.classifyingLoader).not.toBeVisible({ timeout: 660000 });
596
+ // Hub clears "Classifying..." only when the Pusher `process:complete` event
597
+ // for the started instance arrives (camunda-hub
598
+ // `listenForExtractionCompletion`, no client-side timeout). When that event
599
+ // is lost the spinner never clears even though the run itself was started.
600
+ // The in-progress flag is in-memory only, so a reload restores "Run Test";
601
+ // re-run the classification instead of waiting on a dead subscription.
602
+ // Allow the full product run window before recovering, and still fail if the
603
+ // classification cannot complete.
604
+ async classifyingProgressIsComplete(maxAttempts = 3) {
605
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
606
+ try {
607
+ await (0, test_1.expect)(this.classifyingLoader).not.toBeVisible({
608
+ timeout: 660000,
609
+ });
610
+ return;
611
+ }
612
+ catch (error) {
613
+ if (attempt === maxAttempts) {
614
+ throw error;
615
+ }
616
+ console.warn(`Classification still running after attempt ${attempt}; reloading and re-running the test`);
617
+ await this.page.reload();
618
+ await this.clickTestTemplateTab();
619
+ await (0, test_1.expect)(this.classificationRunTestButton).toBeEnabled({
620
+ timeout: 120000,
621
+ });
622
+ await this.classificationRunTestButton.click();
623
+ }
624
+ }
605
625
  }
606
626
  async assertClassificationTemplateSuccessNotification() {
607
627
  await (0, test_1.expect)(this.classificationSuccessfullPublishNotification).toBeVisible({ timeout: 120000 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1663",
3
+ "version": "0.0.1665",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",