@camunda/e2e-test-suite 0.0.671 → 0.0.673
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.
|
@@ -27,6 +27,7 @@ declare class PlayPage {
|
|
|
27
27
|
waitForInstanceDetailsToBeLoaded(): Promise<void>;
|
|
28
28
|
waitForNextElementToBeActive(historyItem: string): Promise<void>;
|
|
29
29
|
waitForProcessToBeCompleted(): Promise<void>;
|
|
30
|
+
private dismissNotifications;
|
|
30
31
|
clickSaveScenarioButton(): Promise<void>;
|
|
31
32
|
clickViewScenarioButton(): Promise<void>;
|
|
32
33
|
enterScenarioName(scenarioName: string): Promise<void>;
|
|
@@ -166,11 +166,32 @@ class PlayPage {
|
|
|
166
166
|
timeout: maxWaitTimeSeconds,
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
// The "<task> completed manually" success toast renders in the top-right
|
|
170
|
+
// corner, directly on top of the "Save scenario" button. These Play toasts
|
|
171
|
+
// do not auto-dismiss, so passively waiting for them to hide times out and a
|
|
172
|
+
// force-click then lands on the toast instead of the button — leaving the
|
|
173
|
+
// save-scenario modal closed. Actively close every open toast before
|
|
174
|
+
// interacting with the button.
|
|
175
|
+
async dismissNotifications() {
|
|
176
|
+
const closeButtons = this.page.getByLabel('Close notification');
|
|
177
|
+
for (let i = 0; i < 5; i++) {
|
|
178
|
+
const count = await closeButtons.count().catch(() => 0);
|
|
179
|
+
if (count === 0) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
await closeButtons
|
|
183
|
+
.first()
|
|
184
|
+
.click({ timeout: 5000 })
|
|
185
|
+
.catch(() => { });
|
|
186
|
+
await this.page.waitForTimeout(300);
|
|
187
|
+
}
|
|
170
188
|
await this.notifications
|
|
171
189
|
.first()
|
|
172
|
-
.waitFor({ state: 'hidden', timeout:
|
|
190
|
+
.waitFor({ state: 'hidden', timeout: 10000 })
|
|
173
191
|
.catch(() => { });
|
|
192
|
+
}
|
|
193
|
+
async clickSaveScenarioButton() {
|
|
194
|
+
await this.dismissNotifications();
|
|
174
195
|
const isModalVisible = await this.saveScenarioModal
|
|
175
196
|
.isVisible()
|
|
176
197
|
.catch(() => false);
|
|
@@ -194,6 +215,9 @@ class PlayPage {
|
|
|
194
215
|
async enterScenarioName(scenarioName) {
|
|
195
216
|
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.dialog, {
|
|
196
217
|
postAction: async () => {
|
|
218
|
+
// A lingering success toast can cover the "Save scenario" button and
|
|
219
|
+
// swallow the recovery click, so clear it before re-clicking.
|
|
220
|
+
await this.dismissNotifications();
|
|
197
221
|
await this.saveScenarioButton.click({ timeout: 5000 }).catch(() => { });
|
|
198
222
|
},
|
|
199
223
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OCIdentityClusterVariablesPage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
5
6
|
class OCIdentityClusterVariablesPage {
|
|
6
7
|
page;
|
|
7
8
|
variablesList;
|
|
@@ -63,7 +64,17 @@ class OCIdentityClusterVariablesPage {
|
|
|
63
64
|
await (0, test_1.expect)(this.editVariableModal).toBeHidden();
|
|
64
65
|
}
|
|
65
66
|
async assertVariableExists(variableName) {
|
|
66
|
-
|
|
67
|
+
// Cluster variables are created via the API and indexed asynchronously in
|
|
68
|
+
// the search server, so a freshly-created variable may not yet appear in
|
|
69
|
+
// the search-backed Admin UI list when the tab first renders. The list is
|
|
70
|
+
// not auto-refreshed, so a single visibility check against the default 5s
|
|
71
|
+
// timeout can miss it. Reload between attempts to re-fetch the list until
|
|
72
|
+
// the row appears.
|
|
73
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.variableRow(variableName), {
|
|
74
|
+
postAction: async () => {
|
|
75
|
+
await this.page.reload();
|
|
76
|
+
},
|
|
77
|
+
});
|
|
67
78
|
}
|
|
68
79
|
async assertVariableValue(variableName, expectedValue) {
|
|
69
80
|
const row = this.variableRow(variableName);
|