@camunda/e2e-test-suite 0.0.712 → 0.0.714

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.
@@ -86,8 +86,11 @@ class ClusterDetailsPage {
86
86
  this.rbaDisableButton = page.getByRole('button', { name: 'Disable' });
87
87
  this.dialog = page.getByRole('dialog');
88
88
  this.deleteButton = page.getByRole('button', { name: 'Delete' });
89
- this.deleteSubButton = page.getByRole('button', {
90
- name: 'danger Delete',
89
+ // Scoped to the confirmation dialog and matched on "Delete" so it works
90
+ // both before and after Carbon dropped the "danger" assistive-text prefix
91
+ // from cds--btn--danger (the old accessible name was "danger Delete").
92
+ this.deleteSubButton = this.dialog.getByRole('button', {
93
+ name: 'Delete',
91
94
  });
92
95
  this.createClientCredentialsDialog = page.getByRole('dialog', {
93
96
  name: 'Create new client credentials',
@@ -187,10 +187,9 @@ class ModelerCreatePage {
187
187
  this.secondPlacedElement = page.locator('g:nth-child(2) > .djs-element > .djs-hit');
188
188
  this.payloadInput = page.locator('[class="fjs-input"]');
189
189
  this.marketPlaceButton = page.getByTitle('Browse Marketplace for more Connectors');
190
- this.publicHolidayConnectorOption = page.getByRole('listitem', {
191
- name: 'Worldwide Public Holiday',
192
- exact: true,
193
- });
190
+ this.publicHolidayConnectorOption = page
191
+ .locator('[data-test="modeler"]')
192
+ .getByText('Worldwide Public Holiday');
194
193
  this.publicHolidayYearOption = page.getByLabel('Year');
195
194
  this.publicHolidayCountryCodeOption = page.getByLabel('Countrycode');
196
195
  this.implementationSection = page.locator('[data-group-id="group-userTaskImplementation"]');
@@ -786,21 +785,21 @@ class ModelerCreatePage {
786
785
  await this.clickMarketPlaceButton();
787
786
  const connectorMarketplacePage = new ConnectorMarketplacePage_1.ConnectorMarketplacePage(this.page);
788
787
  await connectorMarketplacePage.clickSearchForConnectorTextbox();
789
- await connectorMarketplacePage.fillSearchForConnectorTextbox('Public Holiday Connector');
788
+ await connectorMarketplacePage.fillSearchForConnectorTextbox('Worldwide Public Holiday');
790
789
  await (0, sleep_1.sleep)(10000);
791
790
  await connectorMarketplacePage.downloadConnectorToProject();
792
- await this.clickCanvas();
793
- await this.secondElement.click({ timeout: 60000 });
794
- await this.clickChangeTypeButton();
795
791
  }
792
+ // Always open the change-type popup before trying to click the option
793
+ await this.clickCanvas();
794
+ await this.secondElement.click({ timeout: 60000 });
795
+ await this.clickChangeTypeButton();
796
+ await (0, test_1.expect)(this.marketPlaceButton).toBeVisible({ timeout: 60000 });
796
797
  // Filter the virtualized change-element popup so the option scrolls into view
797
798
  const changeElementSearch = this.page.locator('.djs-popup-search input');
798
799
  if (await changeElementSearch
799
800
  .isVisible({ timeout: 5000 })
800
801
  .catch(() => false)) {
801
- await changeElementSearch.pressSequentially('Worldwide Public Holiday', {
802
- delay: 50,
803
- });
802
+ await changeElementSearch.pressSequentially('Worldwide Public Holiday', { delay: 50 });
804
803
  }
805
804
  await this.publicHolidayConnectorOption.waitFor({
806
805
  state: 'visible',
@@ -815,9 +814,6 @@ class ModelerCreatePage {
815
814
  break;
816
815
  await this.page.reload();
817
816
  await new Promise((resolve) => setTimeout(resolve, 10000));
818
- await this.clickCanvas();
819
- await this.secondElement.click({ timeout: 60000 });
820
- await this.clickChangeTypeButton();
821
817
  }
822
818
  }
823
819
  throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
@@ -40,7 +40,7 @@ class OperateProcessInstancePage {
40
40
  }
41
41
  async completedIconAssertion() {
42
42
  let retryCount = 0;
43
- const maxRetries = 6;
43
+ const maxRetries = 8;
44
44
  while (retryCount < maxRetries) {
45
45
  try {
46
46
  await (0, test_1.expect)(this.completedIcon).toBeVisible({
@@ -47,8 +47,10 @@ c8Run_8_9_1.test.describe('API tests for V2 @tasklistV2', () => {
47
47
  }).toPass({ ...constants_1.defaultAssertionOptions, timeout: 120000 });
48
48
  });
49
49
  (0, c8Run_8_9_1.test)('Get a inbound connectors list', async ({ request }) => {
50
- const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/inbound');
51
- await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
50
+ await (0, test_1.expect)(async () => {
51
+ const connectorsInboundList = await request.get(process.env.C8RUN_CONNECTORS_API_URL_LATEST + '/inbound');
52
+ await (0, apiHelpers_1.assertResponseStatus)(connectorsInboundList, 200);
53
+ }).toPass({ ...constants_1.defaultAssertionOptions, timeout: 120000 });
52
54
  });
53
55
  (0, c8Run_8_9_1.test)('Search for tasks', async ({ request }) => {
54
56
  const taskList = await request.post('/v2/user-tasks/search');
@@ -274,18 +274,35 @@ exports.validateMcpServerHealth = validateMcpServerHealth;
274
274
  // Guards against the c8Run startup race where the connectors runtime on :8086
275
275
  // comes up later than Zeebe/Operate, leaving process instances stuck "active"
276
276
  // and webhook endpoints unregistered.
277
- async function waitForConnectorsReady(baseUrl = process.env.C8RUN_CONNECTORS_API_URL_LATEST, timeoutMs = 120000) {
277
+ async function waitForConnectorsReady(baseUrl = process.env.C8RUN_CONNECTORS_API_URL_LATEST, timeoutMs = 300000) {
278
278
  if (!baseUrl) {
279
279
  throw new Error('waitForConnectorsReady: missing connectors API URL ' +
280
280
  '(C8RUN_CONNECTORS_API_URL_LATEST).');
281
281
  }
282
282
  const healthEndpoint = `${baseUrl}/actuator/health`;
283
283
  apiRequestContext = await getApiRequestContext();
284
+ // Require several consecutive healthy responses so we proceed only once the
285
+ // runtime has settled, not on a transient early 200 that flips back while
286
+ // connector job workers are still subscribing.
287
+ const requiredConsecutive = 3;
288
+ let consecutiveHealthy = 0;
284
289
  await (0, test_1.expect)(async () => {
285
- const response = await apiRequestContext.get(healthEndpoint, {
286
- timeout: 10000,
287
- });
288
- (0, test_1.expect)(response.status()).toBe(200);
290
+ let response;
291
+ try {
292
+ response = await apiRequestContext.get(healthEndpoint, {
293
+ timeout: 10000,
294
+ });
295
+ }
296
+ catch (error) {
297
+ consecutiveHealthy = 0;
298
+ throw error;
299
+ }
300
+ if (response.status() !== 200) {
301
+ consecutiveHealthy = 0;
302
+ throw new Error(`connectors runtime health returned ${response.status()}`);
303
+ }
304
+ consecutiveHealthy += 1;
305
+ (0, test_1.expect)(consecutiveHealthy).toBeGreaterThanOrEqual(requiredConsecutive);
289
306
  }).toPass({ intervals: [5000, 10000, 15000], timeout: timeoutMs });
290
307
  }
291
308
  exports.waitForConnectorsReady = waitForConnectorsReady;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.712",
3
+ "version": "0.0.714",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",