@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
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
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 });
|