@camunda/e2e-test-suite 0.0.956 → 0.0.957
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.
|
@@ -248,15 +248,27 @@ _8_8_1.test.describe('API optimize SaaS Tests', () => {
|
|
|
248
248
|
const status = response.status();
|
|
249
249
|
(0, test_1.expect)(status).toBe(401);
|
|
250
250
|
});
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
(0, _8_8_1.test)('Import to non-existent collection (404)', async ({ request }) => {
|
|
252
|
+
// Export inline rather than reusing `exportedEntities`: this file runs in
|
|
253
|
+
// `mode: 'parallel'`, so the variable populated by 'Import entities
|
|
254
|
+
// successfully (200)' is undefined in this worker. An empty body makes the
|
|
255
|
+
// endpoint fail before the collection lookup, returning 500 not 404.
|
|
256
|
+
const exportResponse = await request.post(`${baseUrl}/api/public/export/dashboard/definition/json`, {
|
|
257
|
+
headers: {
|
|
258
|
+
Authorization: optimizeBearerToken,
|
|
259
|
+
'Content-Type': 'application/json',
|
|
260
|
+
},
|
|
261
|
+
data: [dashboardIdValue],
|
|
262
|
+
});
|
|
263
|
+
await (0, apiHelpers_1.assertResponseStatus)(exportResponse, 200);
|
|
264
|
+
const entitiesToImport = await exportResponse.json();
|
|
253
265
|
const fakeCollectionId = 'nonexistent-collection-id';
|
|
254
266
|
const response = await request.post(`${baseUrl}/api/public/import?collectionId=${fakeCollectionId}`, {
|
|
255
267
|
headers: {
|
|
256
268
|
Authorization: optimizeBearerToken,
|
|
257
269
|
'Content-Type': 'application/json',
|
|
258
270
|
},
|
|
259
|
-
data:
|
|
271
|
+
data: entitiesToImport,
|
|
260
272
|
});
|
|
261
273
|
const status = response.status();
|
|
262
274
|
(0, test_1.expect)(status).toBe(404);
|