@camunda/e2e-test-suite 0.0.1153 → 0.0.1154
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.
|
@@ -32,6 +32,7 @@ declare class OperateProcessInstancePage {
|
|
|
32
32
|
private reenterViaConsole;
|
|
33
33
|
reload(): Promise<boolean>;
|
|
34
34
|
assertProcessCompleteStatusWithRetry(timeout?: number, maxRetries?: number): Promise<void>;
|
|
35
|
+
assertProcessVariableIsVisible(variableName: string, timeout?: number, maxRetries?: number): Promise<void>;
|
|
35
36
|
assertProcessVariableContainsText(variableName: string, text: string): Promise<void>;
|
|
36
37
|
assertProcessVariableHasDocumentCount(variableName: string, count: number, softFail?: boolean): Promise<void>;
|
|
37
38
|
clickDiagramTask(taskName: string): Promise<void>;
|
|
@@ -797,6 +797,29 @@ class OperateProcessInstancePage {
|
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
|
+
// Operate's Variables tab fetches the scope's variables once per page
|
|
801
|
+
// load and does not re-poll them — only the instance header and the
|
|
802
|
+
// diagram are polled. So when a slow connector job completes *after* the
|
|
803
|
+
// panel has already rendered (AWS Bedrock knowledge-base retrieval has
|
|
804
|
+
// been observed taking ~6 minutes), the header flips to COMPLETED while
|
|
805
|
+
// the Variables panel still shows the pre-completion snapshot
|
|
806
|
+
// ("The element has no variables") and the output variable never appears.
|
|
807
|
+
// Reload between attempts so each retry re-fetches the variables, the
|
|
808
|
+
// same recovery `assertProcessVariableContainsText` already uses.
|
|
809
|
+
async assertProcessVariableIsVisible(variableName, timeout = 30000, maxRetries = 3) {
|
|
810
|
+
for (let retries = 0; retries < maxRetries; retries++) {
|
|
811
|
+
try {
|
|
812
|
+
await (0, test_1.expect)(this.connectorResultVariableName(variableName)).toBeVisible({ timeout: timeout });
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
catch (error) {
|
|
816
|
+
console.log(`Variable ${variableName} is not visible yet (attempt ${retries + 1}): ${error}`);
|
|
817
|
+
await this.page.reload();
|
|
818
|
+
await (0, sleep_1.sleep)(10000);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
throw new Error(`Variable ${variableName} was not visible after ${maxRetries} attempts.`);
|
|
822
|
+
}
|
|
800
823
|
async assertProcessVariableContainsText(variableName, text) {
|
|
801
824
|
const maxRetries = 3;
|
|
802
825
|
for (let retries = 0; retries < maxRetries; retries++) {
|
|
@@ -106,7 +106,7 @@ _8_10_1.test.describe('AWS Connectors User Flows', () => {
|
|
|
106
106
|
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
107
107
|
// Assert retrievedChunks variable is present and contains at least one
|
|
108
108
|
// entry with a sourceUri (list with at least one entry containing a source URI)
|
|
109
|
-
await
|
|
109
|
+
await operateProcessInstancePage.assertProcessVariableIsVisible('retrievedChunks');
|
|
110
110
|
await operateProcessInstancePage.assertProcessVariableContainsText('retrievedChunks', 'sourceUri');
|
|
111
111
|
});
|
|
112
112
|
});
|