@camunda/e2e-test-suite 0.0.716 → 0.0.717
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.
|
@@ -46,44 +46,49 @@ class OperateProcessesPage {
|
|
|
46
46
|
});
|
|
47
47
|
this.gotItButton = page.getByRole('button', { name: 'Got it' });
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
// Carbon DS checkboxes are hidden inputs — click the label to trigger React's
|
|
50
|
+
// synthetic event. Operate's filter sidebar is URL-bound and the URL→state
|
|
51
|
+
// hydration that runs on mount can revert a click that races with it, so the
|
|
52
|
+
// setter re-clicks (bounded) when the post-click assertion fails.
|
|
53
|
+
async setCheckboxState(checkbox, desired) {
|
|
50
54
|
await checkbox.waitFor({ state: 'attached', timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
const checkboxId = await checkbox.getAttribute('id');
|
|
56
|
+
const MAX_ATTEMPTS = 4;
|
|
57
|
+
let lastError;
|
|
58
|
+
for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
|
|
59
|
+
if ((await checkbox.isChecked()) !== desired) {
|
|
60
|
+
if (checkboxId) {
|
|
61
|
+
await this.page
|
|
62
|
+
.locator(`label[for="${checkboxId}"]`)
|
|
63
|
+
.click({ timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
64
|
+
}
|
|
65
|
+
else if (desired) {
|
|
66
|
+
await checkbox.check({ force: true, timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
await checkbox.uncheck({ force: true, timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
70
|
+
}
|
|
60
71
|
}
|
|
61
|
-
|
|
62
|
-
await
|
|
72
|
+
try {
|
|
73
|
+
await (0, test_1.expect)(checkbox).toBeChecked({
|
|
74
|
+
checked: desired,
|
|
75
|
+
timeout: constants_1._1_SECOND_IN_MS * 5,
|
|
76
|
+
});
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
lastError = err;
|
|
63
81
|
}
|
|
64
|
-
await (0, test_1.expect)(checkbox).toBeChecked({
|
|
65
|
-
checked: true,
|
|
66
|
-
timeout: constants_1._1_SECOND_IN_MS * 30,
|
|
67
|
-
});
|
|
68
82
|
}
|
|
83
|
+
throw lastError instanceof Error
|
|
84
|
+
? lastError
|
|
85
|
+
: new Error(`Checkbox did not settle to checked=${desired} after ${MAX_ATTEMPTS} attempts`);
|
|
86
|
+
}
|
|
87
|
+
async checkCheckbox(checkbox) {
|
|
88
|
+
await this.setCheckboxState(checkbox, true);
|
|
69
89
|
}
|
|
70
90
|
async uncheckCheckbox(checkbox) {
|
|
71
|
-
await
|
|
72
|
-
if (await checkbox.isChecked()) {
|
|
73
|
-
const checkboxId = await checkbox.getAttribute('id');
|
|
74
|
-
if (checkboxId) {
|
|
75
|
-
await this.page
|
|
76
|
-
.locator(`label[for="${checkboxId}"]`)
|
|
77
|
-
.click({ timeout: constants_1._1_SECOND_IN_MS * 30 });
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
await checkbox.uncheck({ force: true, timeout: constants_1._1_SECOND_IN_MS * 30 });
|
|
81
|
-
}
|
|
82
|
-
await (0, test_1.expect)(checkbox).toBeChecked({
|
|
83
|
-
checked: false,
|
|
84
|
-
timeout: constants_1._1_SECOND_IN_MS * 30,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
91
|
+
await this.setCheckboxState(checkbox, false);
|
|
87
92
|
}
|
|
88
93
|
async uncheckCompletedCheckbox() {
|
|
89
94
|
await this.uncheckCheckbox(this.processCompletedCheckbox);
|
|
@@ -46,44 +46,49 @@ class OperateProcessesPage {
|
|
|
46
46
|
});
|
|
47
47
|
this.gotItButton = page.getByRole('button', { name: 'Got it' });
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
// Carbon DS checkboxes are hidden inputs — click the label to trigger React's
|
|
50
|
+
// synthetic event. Operate's filter sidebar is URL-bound and the URL→state
|
|
51
|
+
// hydration that runs on mount can revert a click that races with it, so the
|
|
52
|
+
// setter re-clicks (bounded) when the post-click assertion fails.
|
|
53
|
+
async setCheckboxState(checkbox, desired) {
|
|
50
54
|
await checkbox.waitFor({ state: 'attached', timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
const checkboxId = await checkbox.getAttribute('id');
|
|
56
|
+
const MAX_ATTEMPTS = 4;
|
|
57
|
+
let lastError;
|
|
58
|
+
for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
|
|
59
|
+
if ((await checkbox.isChecked()) !== desired) {
|
|
60
|
+
if (checkboxId) {
|
|
61
|
+
await this.page
|
|
62
|
+
.locator(`label[for="${checkboxId}"]`)
|
|
63
|
+
.click({ timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
64
|
+
}
|
|
65
|
+
else if (desired) {
|
|
66
|
+
await checkbox.check({ force: true, timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
await checkbox.uncheck({ force: true, timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
70
|
+
}
|
|
60
71
|
}
|
|
61
|
-
|
|
62
|
-
await
|
|
72
|
+
try {
|
|
73
|
+
await (0, test_1.expect)(checkbox).toBeChecked({
|
|
74
|
+
checked: desired,
|
|
75
|
+
timeout: constants_1._1_SECOND_IN_MS * 5,
|
|
76
|
+
});
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
lastError = err;
|
|
63
81
|
}
|
|
64
|
-
await (0, test_1.expect)(checkbox).toBeChecked({
|
|
65
|
-
checked: true,
|
|
66
|
-
timeout: constants_1._1_SECOND_IN_MS * 30,
|
|
67
|
-
});
|
|
68
82
|
}
|
|
83
|
+
throw lastError instanceof Error
|
|
84
|
+
? lastError
|
|
85
|
+
: new Error(`Checkbox did not settle to checked=${desired} after ${MAX_ATTEMPTS} attempts`);
|
|
86
|
+
}
|
|
87
|
+
async checkCheckbox(checkbox) {
|
|
88
|
+
await this.setCheckboxState(checkbox, true);
|
|
69
89
|
}
|
|
70
90
|
async uncheckCheckbox(checkbox) {
|
|
71
|
-
await
|
|
72
|
-
if (await checkbox.isChecked()) {
|
|
73
|
-
const id = await checkbox.getAttribute('id');
|
|
74
|
-
if (id) {
|
|
75
|
-
await this.page
|
|
76
|
-
.locator(`label[for="${id}"]`)
|
|
77
|
-
.click({ timeout: constants_1._1_SECOND_IN_MS * 30 });
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
await checkbox.uncheck({ force: true, timeout: constants_1._1_SECOND_IN_MS * 30 });
|
|
81
|
-
}
|
|
82
|
-
await (0, test_1.expect)(checkbox).toBeChecked({
|
|
83
|
-
checked: false,
|
|
84
|
-
timeout: constants_1._1_SECOND_IN_MS * 30,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
91
|
+
await this.setCheckboxState(checkbox, false);
|
|
87
92
|
}
|
|
88
93
|
async uncheckCompletedCheckbox() {
|
|
89
94
|
await this.uncheckCheckbox(this.processCompletedCheckbox);
|