@camunda/e2e-test-suite 0.0.769 → 0.0.770
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.
|
@@ -193,6 +193,7 @@ declare class ModelerCreatePage {
|
|
|
193
193
|
fillZeebeRestValue(zeebeUrl: string): Promise<void>;
|
|
194
194
|
embedForm(formName: string): Promise<void>;
|
|
195
195
|
clickFirstPlaceRESTConnector(): Promise<void>;
|
|
196
|
+
dismissCreatePad(): Promise<void>;
|
|
196
197
|
setOAuthTokenEndpoint(elementToClick: Locator, endpoint: string, options?: {
|
|
197
198
|
retries?: number;
|
|
198
199
|
settleMs?: number;
|
|
@@ -1168,11 +1168,39 @@ class ModelerCreatePage {
|
|
|
1168
1168
|
async clickFirstPlaceRESTConnector() {
|
|
1169
1169
|
await this.firstPlaceRESTConnector.click({ timeout: 60000 });
|
|
1170
1170
|
}
|
|
1171
|
+
async dismissCreatePad() {
|
|
1172
|
+
// Hovering or selecting a bpmn element renders a floating create-pad next
|
|
1173
|
+
// to it. When the next task to click sits under that pad, the pad's
|
|
1174
|
+
// "Append task" entry intercepts the pointer event and the click never
|
|
1175
|
+
// lands. Move the pointer off the canvas so the pad collapses and detaches
|
|
1176
|
+
// before the next click.
|
|
1177
|
+
const createPad = this.page.locator('.djs-create-pad.open').first();
|
|
1178
|
+
await this.page.mouse.move(0, 0);
|
|
1179
|
+
await createPad
|
|
1180
|
+
.waitFor({ state: 'hidden', timeout: 10000 })
|
|
1181
|
+
.catch(() => false);
|
|
1182
|
+
}
|
|
1171
1183
|
async setOAuthTokenEndpoint(elementToClick, endpoint, options) {
|
|
1172
1184
|
const retries = options?.retries ?? 2;
|
|
1173
1185
|
const settleMs = options?.settleMs ?? 250;
|
|
1174
1186
|
const openPanel = options?.openPanel ?? false;
|
|
1175
|
-
|
|
1187
|
+
// The create-pad can reappear when Playwright hovers the target to click
|
|
1188
|
+
// it, so dismiss it and retry rather than relying on a single dismissal.
|
|
1189
|
+
let clickError;
|
|
1190
|
+
for (let attempt = 1; attempt <= 3; attempt++) {
|
|
1191
|
+
await this.dismissCreatePad();
|
|
1192
|
+
try {
|
|
1193
|
+
await elementToClick.click({ timeout: 20000 });
|
|
1194
|
+
clickError = undefined;
|
|
1195
|
+
break;
|
|
1196
|
+
}
|
|
1197
|
+
catch (err) {
|
|
1198
|
+
clickError = err;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
if (clickError) {
|
|
1202
|
+
throw clickError;
|
|
1203
|
+
}
|
|
1176
1204
|
if (openPanel) {
|
|
1177
1205
|
await this.clickOpenDetailsPanel();
|
|
1178
1206
|
}
|