@camunda/e2e-test-suite 0.0.1554 → 0.0.1555

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.
@@ -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
- const response = await request.post(url, {
370
- data: {
371
- test: 'test',
372
- },
373
- });
374
- await (0, test_1.expect)(response.status()).toBe(200);
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1554",
3
+ "version": "0.0.1555",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",