@camunda/e2e-test-suite 0.0.1554 → 0.0.1556
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.
|
@@ -192,11 +192,6 @@ async function modelRestConnector(modelerCreatePage, connectorSettingsPage, conn
|
|
|
192
192
|
}
|
|
193
193
|
await modelerCreatePage.clickAppendElementButton();
|
|
194
194
|
await modelerCreatePage.clickAppendTaskButton();
|
|
195
|
-
// The REST connector template requires engines.camunda ^8.10 (since connector v15).
|
|
196
|
-
// New diagrams default to "Check problems against: Camunda 8.9", which moves the
|
|
197
|
-
// connector into the "Requires newer Camunda version" section where clicking it
|
|
198
|
-
// has no effect. Set the diagram version to 8.10 before opening the picker.
|
|
199
|
-
await modelerCreatePage.setEngineVersion('8.10');
|
|
200
195
|
await modelerCreatePage.clickChangeTypeButton();
|
|
201
196
|
try {
|
|
202
197
|
// The change-element popup virtualizes its list: connector templates render
|
|
@@ -366,12 +366,30 @@ _8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
366
366
|
timeout: 120000,
|
|
367
367
|
});
|
|
368
368
|
const url = await modelerCreatePage.copyWebhookUrlToClipboardButton.innerText();
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
369
|
+
// The modeler's "webhook is active" banner can lead the connector
|
|
370
|
+
// runtime actually serving the endpoint: an intermediate catch event is
|
|
371
|
+
// only registered once the runtime has picked up the new process
|
|
372
|
+
// instance, so the first POST (seconds after "Deploy & run") can land
|
|
373
|
+
// on a not-yet-registered webhook.
|
|
374
|
+
//
|
|
375
|
+
// Retry ONLY while the request provably was not processed: a 5xx, or a
|
|
376
|
+
// 404 with an empty body -- the runtime's InboundWebhookRestController
|
|
377
|
+
// answers `notFound().build()` when no connector is registered for the
|
|
378
|
+
// path, before any correlation is attempted, so re-posting cannot
|
|
379
|
+
// double-trigger the process. A 404 from a failed correlation carries a
|
|
380
|
+
// body, and any other 4xx/2xx is a real answer that is asserted as-is.
|
|
381
|
+
const deadline = Date.now() + 180000;
|
|
382
|
+
let response = await request.post(url, { data: { test: 'test' } });
|
|
383
|
+
while (Date.now() < deadline) {
|
|
384
|
+
const status = response.status();
|
|
385
|
+
const notRegistered = status === 404 && (await response.body()).length === 0;
|
|
386
|
+
if (status < 500 && !notRegistered)
|
|
387
|
+
break;
|
|
388
|
+
console.warn(`Webhook not ready yet: ${url} -> ${status}`);
|
|
389
|
+
await (0, sleep_1.sleep)(10000);
|
|
390
|
+
response = await request.post(url, { data: { test: 'test' } });
|
|
391
|
+
}
|
|
392
|
+
(0, test_1.expect)(response.status()).toBe(200);
|
|
375
393
|
});
|
|
376
394
|
await _8_8_1.test.step('Assert Diagram Has Successfully Completed in Operate', async () => {
|
|
377
395
|
await (0, sleep_1.sleep)(90000);
|