@camunda/e2e-test-suite 0.0.205 → 0.0.207

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.
@@ -13,12 +13,16 @@ const testUser = (0, users_1.getTestUser)('eighteenthUser');
13
13
  _8_9_1.test.describe.configure({ mode: 'parallel' });
14
14
  _8_9_1.test.describe('Console User Flow Tests @tasklistV2', () => {
15
15
  const clusterName = 'Test Cluster';
16
+ let inbox = '';
16
17
  _8_9_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
17
18
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
18
19
  });
19
20
  _8_9_1.test.afterEach(async ({ page }, testInfo) => {
20
21
  await (0, _setup_1.captureScreenshot)(page, testInfo);
21
22
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
23
+ if (inbox.length > 0) {
24
+ await (0, mailSlurpClient_1.deleteInbox)(inbox);
25
+ }
22
26
  });
23
27
  (0, _8_9_1.test)('Console Most Common Flow', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, }) => {
24
28
  const clientName = await (0, _setup_1.generateRandomStringAsync)(6);
@@ -65,14 +69,14 @@ _8_9_1.test.describe('Console User Flow Tests @tasklistV2', () => {
65
69
  await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTabProcessInstancePage, operateTabProcessInstancePage.completedIcon, 'completed icon in Operate', 60000);
66
70
  });
67
71
  });
68
- //Waiting infra team to provide DNS configuration for email testing, skipping for now
69
- _8_9_1.test.skip('Alert Trigger Flow - Email Notification', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, connectorSettingsPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
72
+ (0, _8_9_1.test)('Alert Trigger Flow - Email Notification', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, connectorSettingsPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
70
73
  _8_9_1.test.slow();
71
74
  const processName = 'Email_Alert_Process' + (await (0, _setup_1.generateRandomStringAsync)(3));
72
75
  const invalidURl = 'https://invalid';
73
76
  let lastTriggerTime = 0;
74
- const alertFlowClusterName = 'Alert Flow Cluster';
75
77
  const { id } = await (0, mailSlurpClient_1.createInbox)(testUser.username);
78
+ inbox = id;
79
+ const alertFlowClusterName = 'Alert Flow Cluster';
76
80
  await _8_9_1.test.step('Create Cluster', async () => {
77
81
  await homePage.clickClusters();
78
82
  await clusterPage.createClusterIfNotExists(alertFlowClusterName);
@@ -85,7 +85,8 @@ function buildZeebeApiUrl(resourcePath, environmentOverride) {
85
85
  const normalizedPath = resourcePath.startsWith('/')
86
86
  ? resourcePath
87
87
  : `/${resourcePath}`;
88
- const pathWithPrefix = environment === 'sm' ? `/orchestration${normalizedPath}` : normalizedPath;
88
+ const contextPath = process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration';
89
+ const pathWithPrefix = environment === 'sm' ? `${contextPath}${normalizedPath}` : normalizedPath;
89
90
  return `${baseUrl}${pathWithPrefix}`;
90
91
  }
91
92
  async function authAPI(environment, audience = process.env.ZEEBE_API_TOKEN_AUDIENCE) {
@@ -161,9 +162,15 @@ async function deployProcess(filePath, authToken, environment) {
161
162
  apiRequestContext = await getApiRequestContext();
162
163
  const fileContent = fs_1.default.readFileSync(filePath);
163
164
  const fileName = path_1.default.basename(filePath);
165
+ const ext = path_1.default.extname(fileName).toLowerCase();
166
+ const mimeType = ext === '.form'
167
+ ? 'application/json'
168
+ : ext === '.dmn'
169
+ ? 'application/vnd.dmn+xml'
170
+ : 'application/vnd.bpmn+xml';
164
171
  const resources = {
165
172
  name: fileName,
166
- mimeType: 'application/vnd.bpmn+xml',
173
+ mimeType,
167
174
  buffer: fileContent,
168
175
  };
169
176
  const url = buildZeebeApiUrl('/v2/deployments', environment);
@@ -173,6 +180,10 @@ async function deployProcess(filePath, authToken, environment) {
173
180
  },
174
181
  multipart: { resources },
175
182
  });
183
+ if (response.status() !== 200) {
184
+ const body = await response.text();
185
+ console.error(`deployProcess failed for ${fileName}: HTTP ${response.status()} - ${body}`);
186
+ }
176
187
  (0, test_1.expect)(response.status()).toBe(200);
177
188
  const responseJson = await response.json();
178
189
  if (!responseJson.deployments?.[0]?.processDefinition?.processDefinitionKey) {
@@ -11,8 +11,8 @@ async function createInbox(emailAddress, expriesIn = 1200000) {
11
11
  console.log(`Created inbox ${inbox.id}`);
12
12
  return inbox;
13
13
  }
14
- catch (e) {
15
- throw new Error('Failed to create inbox: ' + e);
14
+ catch (error) {
15
+ throw new Error('Failed to create inbox: ' + String(error));
16
16
  }
17
17
  }
18
18
  exports.createInbox = createInbox;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.205",
3
+ "version": "0.0.207",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",