@camunda/e2e-test-suite 0.0.931 → 0.0.932
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.
|
@@ -3,8 +3,8 @@ declare class OptimizeDashboardPage {
|
|
|
3
3
|
private page;
|
|
4
4
|
readonly filterTable: Locator;
|
|
5
5
|
constructor(page: Page);
|
|
6
|
-
clickFilterTable(): Promise<void>;
|
|
7
|
-
fillFilterTable(processName: string): Promise<void>;
|
|
6
|
+
clickFilterTable(timeout?: number): Promise<void>;
|
|
7
|
+
fillFilterTable(processName: string, timeout?: number): Promise<void>;
|
|
8
8
|
processLinkAssertion(processName: string, maxRetries: number, retryDelay?: number): Promise<void>;
|
|
9
9
|
processOwnerNameAssertion(processName: string, userEmail: string): Promise<void>;
|
|
10
10
|
}
|
|
@@ -9,11 +9,11 @@ class OptimizeDashboardPage {
|
|
|
9
9
|
this.page = page;
|
|
10
10
|
this.filterTable = page.getByPlaceholder('Filter table');
|
|
11
11
|
}
|
|
12
|
-
async clickFilterTable() {
|
|
13
|
-
await this.filterTable.click({ timeout
|
|
12
|
+
async clickFilterTable(timeout = 120000) {
|
|
13
|
+
await this.filterTable.click({ timeout });
|
|
14
14
|
}
|
|
15
|
-
async fillFilterTable(processName) {
|
|
16
|
-
await this.filterTable.fill(processName, { timeout
|
|
15
|
+
async fillFilterTable(processName, timeout = 60000) {
|
|
16
|
+
await this.filterTable.fill(processName, { timeout });
|
|
17
17
|
await this.filterTable.press('Enter');
|
|
18
18
|
}
|
|
19
19
|
async processLinkAssertion(processName, maxRetries, retryDelay = 60000) {
|
|
@@ -39,26 +39,40 @@ class OptimizeDashboardPage {
|
|
|
39
39
|
async processOwnerNameAssertion(processName, userEmail) {
|
|
40
40
|
// Optimize's Process Overview only refreshes its owner data on a page
|
|
41
41
|
// reload (it does not poll in the background), so a long per-attempt
|
|
42
|
-
// assertion timeout just idles against a stale DOM. Poll
|
|
43
|
-
// instead: a short assertion timeout (enough for the table to render
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
|
|
42
|
+
// assertion timeout just idles against a stale DOM. Poll frequently
|
|
43
|
+
// instead: a short assertion timeout (enough for the table to render) plus
|
|
44
|
+
// a short delay lets us reload roughly every ~45s and catch a slow owner
|
|
45
|
+
// import sooner.
|
|
46
|
+
//
|
|
47
|
+
// The reload also clears the "Filter table" search that
|
|
48
|
+
// processLinkAssertion applied, so every attempt re-applies it — otherwise
|
|
49
|
+
// attempts 2..n search the full, paginated org-wide process list and the
|
|
50
|
+
// row can be off-screen entirely. Filter waits are bounded per attempt so
|
|
51
|
+
// one slow render cannot consume the whole budget.
|
|
52
|
+
//
|
|
53
|
+
// Owner assignment is asynchronous (Optimize assigns the deploying Web
|
|
54
|
+
// Modeler user once the deployment is imported) and on a loaded nightly
|
|
55
|
+
// org it can lag well past 20 minutes, so the loop keeps polling until a
|
|
56
|
+
// wall-clock deadline. The deadline (not just the attempt count) is what
|
|
57
|
+
// keeps the total under the test.slow() timeout, so a genuine failure
|
|
58
|
+
// surfaces as this clean error rather than an opaque test-timeout.
|
|
59
|
+
const maxRetries = 32;
|
|
49
60
|
const retryDelay = 25000;
|
|
61
|
+
const deadline = Date.now() + 25 * 60 * 1000;
|
|
50
62
|
const localPart = userEmail.split('@')[0];
|
|
51
63
|
const uuid = localPart.replace('qa-user-', '');
|
|
52
64
|
const result = !uuid ? 'QA Camunda' : `QA User ${uuid}`;
|
|
53
65
|
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
54
66
|
try {
|
|
67
|
+
await this.clickFilterTable(30000);
|
|
68
|
+
await this.fillFilterTable(processName, 15000);
|
|
55
69
|
await (0, test_1.expect)(this.page.getByRole('row', {
|
|
56
70
|
name: `${processName}\nProcess\n\t${result}`,
|
|
57
71
|
})).toBeVisible({ timeout: 20000 });
|
|
58
72
|
return;
|
|
59
73
|
}
|
|
60
74
|
catch (error) {
|
|
61
|
-
if (attempt < maxRetries - 1) {
|
|
75
|
+
if (attempt < maxRetries - 1 && Date.now() < deadline) {
|
|
62
76
|
console.warn(`Attempt ${attempt + 1} failed for asserting owner name ${result} assertion for ${processName} in Optimize.. Retrying...`);
|
|
63
77
|
try {
|
|
64
78
|
await this.page.reload();
|
|
@@ -69,7 +83,7 @@ class OptimizeDashboardPage {
|
|
|
69
83
|
await new Promise((resolve) => setTimeout(resolve, retryDelay));
|
|
70
84
|
}
|
|
71
85
|
else {
|
|
72
|
-
throw new Error(`Owner name ${result} assertion for ${processName} failed after ${
|
|
86
|
+
throw new Error(`Owner name ${result} assertion for ${processName} failed after ${attempt + 1} attempts`);
|
|
73
87
|
}
|
|
74
88
|
}
|
|
75
89
|
}
|