@camunda/e2e-test-suite 0.0.689 → 0.0.690

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.
@@ -772,7 +772,7 @@ class ModelerCreatePage {
772
772
  await this.clickMarketPlaceButton();
773
773
  const connectorMarketplacePage = new ConnectorMarketplacePage_1.ConnectorMarketplacePage(this.page);
774
774
  await connectorMarketplacePage.clickSearchForConnectorTextbox();
775
- await connectorMarketplacePage.fillSearchForConnectorTextbox('Public Holiday Connector');
775
+ await connectorMarketplacePage.fillSearchForConnectorTextbox('Worldwide Public Holiday');
776
776
  await (0, sleep_1.sleep)(10000);
777
777
  await connectorMarketplacePage.downloadConnectorToProject();
778
778
  }
@@ -781,7 +781,18 @@ class ModelerCreatePage {
781
781
  await this.secondElement.click({ timeout: 60000 });
782
782
  await this.clickChangeTypeButton();
783
783
  await (0, test_1.expect)(this.marketPlaceButton).toBeVisible({ timeout: 60000 });
784
- await this.publicHolidayConnectorOption.click({ timeout: 120000 });
784
+ // Filter the virtualized change-element popup so the option scrolls into view
785
+ const changeElementSearch = this.page.locator('.djs-popup-search input');
786
+ if (await changeElementSearch
787
+ .isVisible({ timeout: 5000 })
788
+ .catch(() => false)) {
789
+ await changeElementSearch.pressSequentially('Worldwide Public Holiday', { delay: 50 });
790
+ }
791
+ await this.publicHolidayConnectorOption.waitFor({
792
+ state: 'visible',
793
+ timeout: 60000,
794
+ });
795
+ await this.publicHolidayConnectorOption.click({ timeout: 30000 });
785
796
  return;
786
797
  }
787
798
  catch (error) {
@@ -5,11 +5,38 @@ const _8_10_1 = require("../../fixtures/8.10");
5
5
  const apiHelpers_1 = require("../../utils/apiHelpers");
6
6
  const randomName_1 = require("../../utils/randomName");
7
7
  _8_10_1.test.describe.configure({ mode: 'parallel' });
8
+ const expectUnauthorizedErrorBody = (body) => {
9
+ if (body === null || body === undefined)
10
+ return;
11
+ if (typeof body === 'string') {
12
+ return;
13
+ }
14
+ (0, test_1.expect)(typeof body).toBe('object');
15
+ const errorBody = body;
16
+ const errorMessage = errorBody.message ?? errorBody.error ?? errorBody.title ?? errorBody.detail;
17
+ (0, test_1.expect)(typeof errorMessage).toBe('string');
18
+ (0, test_1.expect)(errorMessage.trim().length).toBeGreaterThan(0);
19
+ };
20
+ const assertUnauthorizedResponseBody = async (response) => {
21
+ (0, test_1.expect)(response.status()).toBe(401);
22
+ const rawBody = await response.text();
23
+ if (rawBody.trim().length === 0)
24
+ return;
25
+ let body = rawBody;
26
+ try {
27
+ body = JSON.parse(rawBody);
28
+ }
29
+ catch {
30
+ body = rawBody;
31
+ }
32
+ expectUnauthorizedErrorBody(body);
33
+ };
8
34
  _8_10_1.test.describe('API optimize SaaS Tests', () => {
9
35
  let optimizeCookie;
10
36
  let optimizeBearerToken;
11
37
  let collectionIdValue;
12
38
  let dashboardIdValue;
39
+ let dashboardNameValue;
13
40
  let reportId;
14
41
  let baseUrl;
15
42
  _8_10_1.test.beforeAll(async ({ browser, request }) => {
@@ -33,8 +60,9 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
33
60
  },
34
61
  ],
35
62
  });
63
+ dashboardNameValue = await (0, randomName_1.randomNameAgregator)('Test Dashboard');
36
64
  dashboardIdValue = await (0, apiHelpers_1.createDashboard)(request, {
37
- name: await (0, randomName_1.randomNameAgregator)('Test Dashboard'),
65
+ name: dashboardNameValue,
38
66
  optimizeCookie,
39
67
  collectionId: collectionIdValue,
40
68
  });
@@ -64,18 +92,22 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
64
92
  await (0, apiHelpers_1.assertResponseStatus)(response, 200);
65
93
  const body = await response.json();
66
94
  (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
95
+ (0, test_1.expect)(body.length).toBeGreaterThan(0);
96
+ (0, test_1.expect)(body[0]).toHaveProperty('id');
97
+ const ids = body.map((d) => d.id);
98
+ (0, test_1.expect)(ids).toContain(dashboardIdValue);
67
99
  });
68
100
  });
69
101
  (0, _8_10_1.test)('Get dashboards without token returns 401', async ({ request }) => {
70
102
  await _8_10_1.test.step('GET /api/public/dashboard without token (401)', async () => {
71
103
  const response = await request.get(`${baseUrl}/api/public/dashboard?collectionId=${collectionIdValue}`);
72
- (0, test_1.expect)(response.status()).toBe(401);
104
+ await assertUnauthorizedResponseBody(response);
73
105
  });
74
106
  });
75
107
  (0, _8_10_1.test)('Get dashboards with invalid token returns 401', async ({ request }) => {
76
108
  await _8_10_1.test.step('GET /api/public/dashboard with invalid token (401)', async () => {
77
109
  const response = await request.get(`${baseUrl}/api/public/dashboard?collectionId=${collectionIdValue}`, { headers: { Authorization: 'Bearer invalid_token' } });
78
- (0, test_1.expect)(response.status()).toBe(401);
110
+ await assertUnauthorizedResponseBody(response);
79
111
  });
80
112
  });
81
113
  (0, _8_10_1.test)('GET /api/public/dashboard/force-internal-error returns 500', async ({ request, }) => {
@@ -96,6 +128,15 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
96
128
  await (0, apiHelpers_1.assertResponseStatus)(response, 200);
97
129
  const body = await response.json();
98
130
  (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
131
+ (0, test_1.expect)(body.length).toBeGreaterThan(0);
132
+ (0, test_1.expect)(body[0]).toHaveProperty('id');
133
+ (0, test_1.expect)(body[0].id).toBe(dashboardIdValue);
134
+ (0, test_1.expect)(body[0]).toHaveProperty('exportEntityType');
135
+ (0, test_1.expect)(body[0].exportEntityType).toBeTruthy();
136
+ (0, test_1.expect)(body[0]).toHaveProperty('name');
137
+ (0, test_1.expect)(body[0].name).toBe(dashboardNameValue);
138
+ (0, test_1.expect)(body[0]).toHaveProperty('collectionId');
139
+ (0, test_1.expect)(body[0].collectionId).toBe(collectionIdValue);
99
140
  });
100
141
  });
101
142
  (0, _8_10_1.test)('Export dashboards without token returns 401', async ({ request }) => {
@@ -104,7 +145,7 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
104
145
  headers: { 'Content-Type': 'application/json' },
105
146
  data: [dashboardIdValue],
106
147
  });
107
- (0, test_1.expect)(response.status()).toBe(401);
148
+ await assertUnauthorizedResponseBody(response);
108
149
  });
109
150
  });
110
151
  (0, _8_10_1.test)('Export dashboards with invalid token returns 401', async ({ request, }) => {
@@ -116,7 +157,7 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
116
157
  },
117
158
  data: [dashboardIdValue],
118
159
  });
119
- (0, test_1.expect)(response.status()).toBe(401);
160
+ await assertUnauthorizedResponseBody(response);
120
161
  });
121
162
  });
122
163
  (0, _8_10_1.test)('Export dashboard with invalid body returns 400', async ({ request }) => {
@@ -162,7 +203,7 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
162
203
  (0, _8_10_1.test)('Delete dashboard with invalid token returns 401', async ({ request }) => {
163
204
  await _8_10_1.test.step('DELETE /api/public/dashboard with invalid token (401)', async () => {
164
205
  const response = await request.delete(`${baseUrl}/api/public/dashboard/${dashboardIdValue}`, { headers: { Authorization: 'Bearer invalid_token' } });
165
- (0, test_1.expect)(response.status()).toBe(401);
206
+ await assertUnauthorizedResponseBody(response);
166
207
  });
167
208
  });
168
209
  (0, _8_10_1.test)('Delete non-existent dashboard returns 404', async ({ request }) => {
@@ -178,12 +219,16 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
178
219
  await (0, apiHelpers_1.assertResponseStatus)(response, 200);
179
220
  const body = await response.json();
180
221
  (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
222
+ (0, test_1.expect)(body.length).toBeGreaterThan(0);
223
+ (0, test_1.expect)(body[0]).toHaveProperty('id');
224
+ const ids = body.map((r) => r.id);
225
+ (0, test_1.expect)(ids).toContain(reportId);
181
226
  });
182
227
  });
183
228
  (0, _8_10_1.test)('Get reports with invalid token returns 401', async ({ request }) => {
184
229
  await _8_10_1.test.step('GET /api/public/report with invalid token (401)', async () => {
185
230
  const response = await request.get(`${baseUrl}/api/public/report?collectionId=${collectionIdValue}`, { headers: { Authorization: 'Bearer invalid_token' } });
186
- (0, test_1.expect)(response.status()).toBe(401);
231
+ await assertUnauthorizedResponseBody(response);
187
232
  });
188
233
  });
189
234
  (0, _8_10_1.test)('Export reports successfully returns 200 with full payload', async ({ request, }) => {
@@ -200,9 +245,15 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
200
245
  (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
201
246
  (0, test_1.expect)(body.length).toBeGreaterThan(0);
202
247
  (0, test_1.expect)(body[0]).toHaveProperty('id');
248
+ (0, test_1.expect)(body[0].id).toBe(reportId);
203
249
  (0, test_1.expect)(body[0]).toHaveProperty('exportEntityType');
250
+ (0, test_1.expect)(body[0].exportEntityType).toBeTruthy();
204
251
  (0, test_1.expect)(body[0]).toHaveProperty('name');
252
+ (0, test_1.expect)(body[0].name).toBe('Blank report');
205
253
  (0, test_1.expect)(body[0]).toHaveProperty('collectionId');
254
+ (0, test_1.expect)(body[0].collectionId).toBe(collectionIdValue);
255
+ (0, test_1.expect)(body[0]).toHaveProperty('data');
256
+ (0, test_1.expect)(body[0].data).toBeTruthy();
206
257
  });
207
258
  });
208
259
  (0, _8_10_1.test)('Export reports with invalid token returns 401', async ({ request }) => {
@@ -214,7 +265,7 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
214
265
  },
215
266
  data: [reportId],
216
267
  });
217
- (0, test_1.expect)(response.status()).toBe(401);
268
+ await assertUnauthorizedResponseBody(response);
218
269
  });
219
270
  });
220
271
  (0, _8_10_1.test)('Export non-existent report returns 404', async ({ request }) => {
@@ -257,7 +308,7 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
257
308
  (0, _8_10_1.test)('Delete report with invalid token returns 401', async ({ request }) => {
258
309
  await _8_10_1.test.step('DELETE /api/public/report with invalid token (401)', async () => {
259
310
  const response = await request.delete(`${baseUrl}/api/public/report/${reportId}`, { headers: { Authorization: 'Bearer invalid_token' } });
260
- (0, test_1.expect)(response.status()).toBe(401);
311
+ await assertUnauthorizedResponseBody(response);
261
312
  });
262
313
  });
263
314
  (0, _8_10_1.test)('Import entities successfully (200)', async ({ request }) => {
@@ -278,6 +329,9 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
278
329
  data: entitiesToImport,
279
330
  });
280
331
  await (0, apiHelpers_1.assertResponseStatus)(response, 200);
332
+ const importResult = await response.json();
333
+ (0, test_1.expect)(Array.isArray(importResult)).toBeTruthy();
334
+ (0, test_1.expect)(importResult.length).toBeGreaterThan(0);
281
335
  });
282
336
  (0, _8_10_1.test)('Import without token or invalid token returns 401', async ({ request, }) => {
283
337
  const exportResponse = await request.post(`${baseUrl}/api/public/export/dashboard/definition/json`, {
@@ -296,7 +350,7 @@ _8_10_1.test.describe('API optimize SaaS Tests', () => {
296
350
  },
297
351
  data: entitiesToImport,
298
352
  });
299
- (0, test_1.expect)(response.status()).toBe(401);
353
+ await assertUnauthorizedResponseBody(response);
300
354
  });
301
355
  // Skipped due to bug 40497: https://github.com/camunda/camunda/issues/40497
302
356
  _8_10_1.test.skip('Import to non-existent collection (404)', async ({ request }) => {
@@ -325,6 +379,7 @@ _8_10_1.test.describe('API optimize SaaS Tests - Conditional Events', () => {
325
379
  let optimizeBearerToken;
326
380
  let conditionalEventsCollectionId;
327
381
  let conditionalEventsReportId;
382
+ let conditionalEventsReportName;
328
383
  let baseUrl;
329
384
  const CONDITIONAL_EVENTS_PROCESS_KEY = 'conditional-events-auto-process';
330
385
  _8_10_1.test.beforeAll(async ({ browser, request }) => {
@@ -347,10 +402,11 @@ _8_10_1.test.describe('API optimize SaaS Tests - Conditional Events', () => {
347
402
  },
348
403
  ],
349
404
  });
405
+ conditionalEventsReportName = await (0, randomName_1.randomNameAgregator)('Conditional Events Report');
350
406
  conditionalEventsReportId = await (0, apiHelpers_1.createSingleProcessReport)(request, {
351
407
  optimizeCookie,
352
408
  collectionId: conditionalEventsCollectionId,
353
- name: await (0, randomName_1.randomNameAgregator)('Conditional Events Report'),
409
+ name: conditionalEventsReportName,
354
410
  definitions: [
355
411
  {
356
412
  key: CONDITIONAL_EVENTS_PROCESS_KEY,
@@ -417,9 +473,15 @@ _8_10_1.test.describe('API optimize SaaS Tests - Conditional Events', () => {
417
473
  (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
418
474
  (0, test_1.expect)(body.length).toBeGreaterThan(0);
419
475
  (0, test_1.expect)(body[0]).toHaveProperty('id');
476
+ (0, test_1.expect)(body[0].id).toBe(conditionalEventsReportId);
420
477
  (0, test_1.expect)(body[0]).toHaveProperty('exportEntityType');
478
+ (0, test_1.expect)(body[0].exportEntityType).toBeTruthy();
421
479
  (0, test_1.expect)(body[0]).toHaveProperty('name');
480
+ (0, test_1.expect)(body[0].name).toBe(conditionalEventsReportName);
422
481
  (0, test_1.expect)(body[0]).toHaveProperty('collectionId');
482
+ (0, test_1.expect)(body[0].collectionId).toBe(conditionalEventsCollectionId);
483
+ (0, test_1.expect)(body[0]).toHaveProperty('data');
484
+ (0, test_1.expect)(body[0].data).toBeTruthy();
423
485
  });
424
486
  });
425
487
  (0, _8_10_1.test)('CE-OPT-11: Exporting the Conditional Events report without a token returns 401', async ({ request, }) => {
@@ -428,7 +490,7 @@ _8_10_1.test.describe('API optimize SaaS Tests - Conditional Events', () => {
428
490
  headers: { 'Content-Type': 'application/json' },
429
491
  data: [conditionalEventsReportId],
430
492
  });
431
- (0, test_1.expect)(response.status()).toBe(401);
493
+ await assertUnauthorizedResponseBody(response);
432
494
  });
433
495
  });
434
496
  (0, _8_10_1.test)('CE-OPT-12: Exporting the Conditional Events report with an invalid token returns 401', async ({ request, }) => {
@@ -440,7 +502,7 @@ _8_10_1.test.describe('API optimize SaaS Tests - Conditional Events', () => {
440
502
  },
441
503
  data: [conditionalEventsReportId],
442
504
  });
443
- (0, test_1.expect)(response.status()).toBe(401);
505
+ await assertUnauthorizedResponseBody(response);
444
506
  });
445
507
  });
446
508
  (0, _8_10_1.test)('CE-OPT-13: Deleting the Conditional Events report via API succeeds with HTTP 200', async ({ request, }) => {
@@ -490,7 +552,7 @@ _8_10_1.test.describe('API optimize SaaS Tests - Conditional Events', () => {
490
552
  (0, _8_10_1.test)('CE-OPT-15: Attempting to delete the Conditional Events report with an invalid token returns 401', async ({ request, }) => {
491
553
  await _8_10_1.test.step('Delete report with invalid token (401)', async () => {
492
554
  const response = await request.delete(`${baseUrl}/api/public/report/${conditionalEventsReportId}`, { headers: { Authorization: 'Bearer invalid_token' } });
493
- (0, test_1.expect)(response.status()).toBe(401);
555
+ await assertUnauthorizedResponseBody(response);
494
556
  });
495
557
  });
496
558
  });
@@ -531,13 +593,13 @@ _8_10_1.test.describe('API optimize SaaS Tests - Sharing', () => {
531
593
  (0, _8_10_1.test)('Enable sharing without token returns 401', async ({ request }) => {
532
594
  await _8_10_1.test.step('POST /api/public/share/enable without token (401)', async () => {
533
595
  const response = await request.post(`${baseUrl}/api/public/share/enable`);
534
- (0, test_1.expect)(response.status()).toBe(401);
596
+ await assertUnauthorizedResponseBody(response);
535
597
  });
536
598
  });
537
599
  (0, _8_10_1.test)('Enable sharing with invalid token returns 401', async ({ request }) => {
538
600
  await _8_10_1.test.step('POST /api/public/share/enable with invalid token (401)', async () => {
539
601
  const response = await request.post(`${baseUrl}/api/public/share/enable`, { headers: { Authorization: 'Bearer invalid_token' } });
540
- (0, test_1.expect)(response.status()).toBe(401);
602
+ await assertUnauthorizedResponseBody(response);
541
603
  });
542
604
  });
543
605
  (0, _8_10_1.test)('Disable sharing with valid token returns 200 or 204', async ({ request, }) => {
@@ -549,13 +611,13 @@ _8_10_1.test.describe('API optimize SaaS Tests - Sharing', () => {
549
611
  (0, _8_10_1.test)('Disable sharing without token returns 401', async ({ request }) => {
550
612
  await _8_10_1.test.step('POST /api/public/share/disable without token (401)', async () => {
551
613
  const response = await request.post(`${baseUrl}/api/public/share/disable`);
552
- (0, test_1.expect)(response.status()).toBe(401);
614
+ await assertUnauthorizedResponseBody(response);
553
615
  });
554
616
  });
555
617
  (0, _8_10_1.test)('Disable sharing with invalid token returns 401', async ({ request }) => {
556
618
  await _8_10_1.test.step('POST /api/public/share/disable with invalid token (401)', async () => {
557
619
  const response = await request.post(`${baseUrl}/api/public/share/disable`, { headers: { Authorization: 'Bearer invalid_token' } });
558
- (0, test_1.expect)(response.status()).toBe(401);
620
+ await assertUnauthorizedResponseBody(response);
559
621
  });
560
622
  });
561
623
  (0, _8_10_1.test)('Sharing toggle cycle: enable then disable is idempotent', async ({ request, }) => {
@@ -602,6 +664,7 @@ _8_10_1.test.describe('API optimize SaaS Tests - Dashboard and Report GET edge c
602
664
  await (0, apiHelpers_1.assertResponseStatus)(response, 200);
603
665
  const body = await response.json();
604
666
  (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
667
+ (0, test_1.expect)(body.every((dashboard) => typeof dashboard.id === 'string' && dashboard.id.length > 0)).toBeTruthy();
605
668
  });
606
669
  });
607
670
  (0, _8_10_1.test)('GET dashboards without collectionId param returns 400 or 500', async ({ request, }) => {
@@ -618,6 +681,7 @@ _8_10_1.test.describe('API optimize SaaS Tests - Dashboard and Report GET edge c
618
681
  await (0, apiHelpers_1.assertResponseStatus)(response, 200);
619
682
  const body = await response.json();
620
683
  (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
684
+ (0, test_1.expect)(body.length).toBe(0);
621
685
  });
622
686
  });
623
687
  (0, _8_10_1.test)('GET reports without collectionId param returns 400 or 500', async ({ request, }) => {
@@ -707,6 +771,11 @@ _8_10_1.test.describe('API optimize SaaS Tests - Export edge cases', () => {
707
771
  const body = await response.json();
708
772
  (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
709
773
  (0, test_1.expect)(body.length).toBeGreaterThanOrEqual(2);
774
+ (0, test_1.expect)(body[0]).toHaveProperty('id');
775
+ (0, test_1.expect)(body[0]).toHaveProperty('exportEntityType');
776
+ const exportedIds = body.map((d) => d.id);
777
+ (0, test_1.expect)(exportedIds).toContain(dashboardId1);
778
+ (0, test_1.expect)(exportedIds).toContain(dashboardId2);
710
779
  });
711
780
  });
712
781
  (0, _8_10_1.test)('Export multiple reports in a single call returns 200 with all definitions', async ({ request, }) => {
@@ -722,6 +791,11 @@ _8_10_1.test.describe('API optimize SaaS Tests - Export edge cases', () => {
722
791
  const body = await response.json();
723
792
  (0, test_1.expect)(Array.isArray(body)).toBeTruthy();
724
793
  (0, test_1.expect)(body.length).toBeGreaterThanOrEqual(2);
794
+ (0, test_1.expect)(body[0]).toHaveProperty('id');
795
+ (0, test_1.expect)(body[0]).toHaveProperty('exportEntityType');
796
+ const exportedIds = body.map((d) => d.id);
797
+ (0, test_1.expect)(exportedIds).toContain(reportId1);
798
+ (0, test_1.expect)(exportedIds).toContain(reportId2);
725
799
  });
726
800
  });
727
801
  (0, _8_10_1.test)('Export reports with empty array body returns 200 with empty array', async ({ request, }) => {
@@ -766,20 +840,20 @@ _8_10_1.test.describe('API optimize SaaS Tests - Auth edge cases', () => {
766
840
  'invalidsignature';
767
841
  await _8_10_1.test.step('GET /api/public/dashboard with expired token returns 401', async () => {
768
842
  const response = await request.get(`${baseUrl}/api/public/dashboard?collectionId=any`, { headers: { Authorization: expiredToken } });
769
- (0, test_1.expect)(response.status()).toBe(401);
843
+ await assertUnauthorizedResponseBody(response);
770
844
  });
771
845
  });
772
846
  (0, _8_10_1.test)('Malformed Bearer value (empty string) returns 401 on dashboard endpoint', async ({ request, }) => {
773
847
  await _8_10_1.test.step('GET /api/public/dashboard with empty Bearer value returns 401', async () => {
774
848
  const response = await request.get(`${baseUrl}/api/public/dashboard?collectionId=any`, { headers: { Authorization: 'Bearer ' } });
775
- (0, test_1.expect)(response.status()).toBe(401);
849
+ await assertUnauthorizedResponseBody(response);
776
850
  });
777
851
  });
778
852
  (0, _8_10_1.test)('Token with wrong audience returns 401 on dashboard endpoint', async ({ request, }) => {
779
853
  await _8_10_1.test.step('Use a Zeebe-audience token against Optimize API and expect 401', async () => {
780
854
  const wrongAudienceToken = await (0, apiHelpers_1.authSaasAPI)();
781
855
  const response = await request.get(`${baseUrl}/api/public/dashboard?collectionId=any`, { headers: { Authorization: wrongAudienceToken } });
782
- (0, test_1.expect)(response.status()).toBe(401);
856
+ await assertUnauthorizedResponseBody(response);
783
857
  });
784
858
  });
785
859
  });
@@ -799,7 +873,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
799
873
  const response = await request.get(`${apiUrl()}/v2/topology`, {
800
874
  headers: { 'Content-Type': 'application/json' },
801
875
  });
802
- (0, test_1.expect)(response.status()).toBe(401);
876
+ await assertUnauthorizedResponseBody(response);
803
877
  });
804
878
  (0, _8_10_1.test)('POST /v2/process-definitions/search returns 200 with items array', async ({ request, }) => {
805
879
  const response = await request.post(`${apiUrl()}/v2/process-definitions/search`, {
@@ -821,7 +895,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
821
895
  headers: { 'Content-Type': 'application/json' },
822
896
  data: { filter: {}, size: 10 },
823
897
  });
824
- (0, test_1.expect)(response.status()).toBe(401);
898
+ await assertUnauthorizedResponseBody(response);
825
899
  });
826
900
  (0, _8_10_1.test)('POST /v2/process-definitions/search with invalid token returns 401', async ({ request, }) => {
827
901
  const response = await request.post(`${apiUrl()}/v2/process-definitions/search`, {
@@ -831,7 +905,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
831
905
  },
832
906
  data: { filter: {}, size: 10 },
833
907
  });
834
- (0, test_1.expect)(response.status()).toBe(401);
908
+ await assertUnauthorizedResponseBody(response);
835
909
  });
836
910
  (0, _8_10_1.test)('POST /v2/process-definitions/search with size 1 returns pagination cursor', async ({ request, }) => {
837
911
  const response = await request.post(`${apiUrl()}/v2/process-definitions/search`, {
@@ -885,7 +959,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
885
959
  headers: { 'Content-Type': 'application/json' },
886
960
  data: { filter: {}, size: 10 },
887
961
  });
888
- (0, test_1.expect)(response.status()).toBe(401);
962
+ await assertUnauthorizedResponseBody(response);
889
963
  });
890
964
  (0, _8_10_1.test)('POST /v2/process-instances/search with invalid token returns 401', async ({ request, }) => {
891
965
  const response = await request.post(`${apiUrl()}/v2/process-instances/search`, {
@@ -895,7 +969,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
895
969
  },
896
970
  data: { filter: {}, size: 10 },
897
971
  });
898
- (0, test_1.expect)(response.status()).toBe(401);
972
+ await assertUnauthorizedResponseBody(response);
899
973
  });
900
974
  (0, _8_10_1.test)('POST /v2/user-tasks/search returns 200 with items array', async ({ request, }) => {
901
975
  const response = await request.post(`${apiUrl()}/v2/user-tasks/search`, {
@@ -914,7 +988,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
914
988
  headers: { 'Content-Type': 'application/json' },
915
989
  data: { filter: {}, size: 10 },
916
990
  });
917
- (0, test_1.expect)(response.status()).toBe(401);
991
+ await assertUnauthorizedResponseBody(response);
918
992
  });
919
993
  (0, _8_10_1.test)('POST /v2/user-tasks/search with invalid token returns 401', async ({ request, }) => {
920
994
  const response = await request.post(`${apiUrl()}/v2/user-tasks/search`, {
@@ -924,7 +998,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
924
998
  },
925
999
  data: { filter: {}, size: 10 },
926
1000
  });
927
- (0, test_1.expect)(response.status()).toBe(401);
1001
+ await assertUnauthorizedResponseBody(response);
928
1002
  });
929
1003
  (0, _8_10_1.test)('POST /v2/variables/search returns 200 with items array', async ({ request, }) => {
930
1004
  const response = await request.post(`${apiUrl()}/v2/variables/search`, {
@@ -943,7 +1017,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
943
1017
  headers: { 'Content-Type': 'application/json' },
944
1018
  data: { filter: {}, size: 10 },
945
1019
  });
946
- (0, test_1.expect)(response.status()).toBe(401);
1020
+ await assertUnauthorizedResponseBody(response);
947
1021
  });
948
1022
  (0, _8_10_1.test)('POST /v2/variables/search with invalid token returns 401', async ({ request, }) => {
949
1023
  const response = await request.post(`${apiUrl()}/v2/variables/search`, {
@@ -953,7 +1027,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
953
1027
  },
954
1028
  data: { filter: {}, size: 10 },
955
1029
  });
956
- (0, test_1.expect)(response.status()).toBe(401);
1030
+ await assertUnauthorizedResponseBody(response);
957
1031
  });
958
1032
  (0, _8_10_1.test)('POST /v2/incidents/search returns 200 with items array', async ({ request, }) => {
959
1033
  const response = await request.post(`${apiUrl()}/v2/incidents/search`, {
@@ -972,7 +1046,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
972
1046
  headers: { 'Content-Type': 'application/json' },
973
1047
  data: { filter: {}, size: 10 },
974
1048
  });
975
- (0, test_1.expect)(response.status()).toBe(401);
1049
+ await assertUnauthorizedResponseBody(response);
976
1050
  });
977
1051
  (0, _8_10_1.test)('POST /v2/incidents/search with invalid token returns 401', async ({ request, }) => {
978
1052
  const response = await request.post(`${apiUrl()}/v2/incidents/search`, {
@@ -982,7 +1056,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
982
1056
  },
983
1057
  data: { filter: {}, size: 10 },
984
1058
  });
985
- (0, test_1.expect)(response.status()).toBe(401);
1059
+ await assertUnauthorizedResponseBody(response);
986
1060
  });
987
1061
  (0, _8_10_1.test)('POST /v2/decision-definitions/search returns 200 with items array', async ({ request, }) => {
988
1062
  const response = await request.post(`${apiUrl()}/v2/decision-definitions/search`, {
@@ -1004,7 +1078,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
1004
1078
  headers: { 'Content-Type': 'application/json' },
1005
1079
  data: { filter: {}, size: 10 },
1006
1080
  });
1007
- (0, test_1.expect)(response.status()).toBe(401);
1081
+ await assertUnauthorizedResponseBody(response);
1008
1082
  });
1009
1083
  (0, _8_10_1.test)('POST /v2/decision-definitions/search with invalid token returns 401', async ({ request, }) => {
1010
1084
  const response = await request.post(`${apiUrl()}/v2/decision-definitions/search`, {
@@ -1014,7 +1088,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
1014
1088
  },
1015
1089
  data: { filter: {}, size: 10 },
1016
1090
  });
1017
- (0, test_1.expect)(response.status()).toBe(401);
1091
+ await assertUnauthorizedResponseBody(response);
1018
1092
  });
1019
1093
  (0, _8_10_1.test)('POST /v2/decision-instances/search returns 200 with items array', async ({ request, }) => {
1020
1094
  const response = await request.post(`${apiUrl()}/v2/decision-instances/search`, {
@@ -1036,7 +1110,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
1036
1110
  headers: { 'Content-Type': 'application/json' },
1037
1111
  data: { filter: {}, size: 10 },
1038
1112
  });
1039
- (0, test_1.expect)(response.status()).toBe(401);
1113
+ await assertUnauthorizedResponseBody(response);
1040
1114
  });
1041
1115
  (0, _8_10_1.test)('POST /v2/decision-instances/search with invalid token returns 401', async ({ request, }) => {
1042
1116
  const response = await request.post(`${apiUrl()}/v2/decision-instances/search`, {
@@ -1046,7 +1120,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
1046
1120
  },
1047
1121
  data: { filter: {}, size: 10 },
1048
1122
  });
1049
- (0, test_1.expect)(response.status()).toBe(401);
1123
+ await assertUnauthorizedResponseBody(response);
1050
1124
  });
1051
1125
  (0, _8_10_1.test)('POST /v2/flownode-instances/search returns 200 with items array', async ({ request, }) => {
1052
1126
  const response = await request.post(`${apiUrl()}/v2/flownode-instances/search`, {
@@ -1068,7 +1142,7 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
1068
1142
  headers: { 'Content-Type': 'application/json' },
1069
1143
  data: { filter: {}, size: 10 },
1070
1144
  });
1071
- (0, test_1.expect)(response.status()).toBe(401);
1145
+ await assertUnauthorizedResponseBody(response);
1072
1146
  });
1073
1147
  (0, _8_10_1.test)('POST /v2/flownode-instances/search with invalid token returns 401', async ({ request, }) => {
1074
1148
  const response = await request.post(`${apiUrl()}/v2/flownode-instances/search`, {
@@ -1078,6 +1152,6 @@ _8_10_1.test.describe('API V2 tests on SaaS cluster', () => {
1078
1152
  },
1079
1153
  data: { filter: {}, size: 10 },
1080
1154
  });
1081
- (0, test_1.expect)(response.status()).toBe(401);
1155
+ await assertUnauthorizedResponseBody(response);
1082
1156
  });
1083
1157
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.689",
3
+ "version": "0.0.690",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",