@camunda/e2e-test-suite 0.0.408 → 0.0.410

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.
@@ -3,6 +3,7 @@ declare class KeycloakAdminPage {
3
3
  private page;
4
4
  readonly keycloakBanner: Locator;
5
5
  readonly addUserButton: Locator;
6
+ readonly credentialsTab: Locator;
6
7
  constructor(page: Page);
7
8
  toBeVisible(): Promise<void>;
8
9
  switchToCamundaPlatform(): Promise<void>;
@@ -7,10 +7,12 @@ class KeycloakAdminPage {
7
7
  page;
8
8
  keycloakBanner;
9
9
  addUserButton;
10
+ credentialsTab;
10
11
  constructor(page) {
11
12
  this.page = page;
12
13
  this.keycloakBanner = page.locator('#kc-main-content-page-container');
13
14
  this.addUserButton = page.getByTestId('add-user');
15
+ this.credentialsTab = page.getByTestId('credentials');
14
16
  }
15
17
  async toBeVisible() {
16
18
  await (0, test_1.expect)(this.keycloakBanner).toBeVisible({ timeout: 10000 });
@@ -51,7 +53,8 @@ class KeycloakAdminPage {
51
53
  await this.page.getByTestId('user-creation-save').click();
52
54
  }
53
55
  async fillPassword(password) {
54
- await this.page.getByTestId('credentials').click();
56
+ await (0, test_1.expect)(this.credentialsTab).toBeVisible({ timeout: 30000 });
57
+ await this.credentialsTab.click();
55
58
  await this.page.getByTestId('no-credentials-empty-action').click();
56
59
  await this.page.getByTestId('passwordField').fill(password);
57
60
  await this.page.getByTestId('passwordConfirmationField').fill(password);
@@ -28,6 +28,7 @@ declare class OCIdentityRolesPage {
28
28
  readonly assignClientsButton: Locator;
29
29
  readonly clientIdTextBox: Locator;
30
30
  readonly assignClientIdSubButton: Locator;
31
+ readonly notFoundText: Locator;
31
32
  constructor(page: Page);
32
33
  clickMappingRulesTab(): Promise<void>;
33
34
  clickRole(roleID: string): Promise<void>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OCIdentityRolesPage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const UtilitiesPage_1 = require("../SM-8.10/UtilitiesPage");
6
+ const sleep_1 = require("../../utils/sleep");
6
7
  class OCIdentityRolesPage {
7
8
  page;
8
9
  selectResourceTypeTab;
@@ -32,9 +33,11 @@ class OCIdentityRolesPage {
32
33
  assignClientsButton;
33
34
  clientIdTextBox;
34
35
  assignClientIdSubButton;
36
+ notFoundText;
35
37
  constructor(page) {
36
38
  this.page = page;
37
39
  this.rolesList = page.getByRole('table');
40
+ this.notFoundText = page.getByText('404 not found');
38
41
  this.selectResourceTypeTab = (resourceType) => page.getByRole('tab', { name: resourceType });
39
42
  this.assignMappingRuleButton = page.getByRole('button', {
40
43
  name: /^(Assign mapping rule|assignMapping)$/,
@@ -104,16 +107,43 @@ class OCIdentityRolesPage {
104
107
  await this.roleCell(roleID).first().click();
105
108
  }
106
109
  async assignMappingRuleToRole(roleId, mappingId) {
107
- await this.clickRole(roleId);
108
- await this.clickMappingRulesTab();
109
- await (0, test_1.expect)(this.assignMappingRuleButton).toBeVisible({
110
- timeout: 60000,
111
- });
112
- await this.assignMappingRuleButton.click({ timeout: 60000 });
113
- await (0, test_1.expect)(this.assignMappingModal).toBeVisible({ timeout: 60000 });
114
- await this.mappingSearchBox.fill(mappingId);
115
- await this.assignMappingModalSearchResult.getByText(mappingId).click();
116
- await this.assignMappingModalAssignRuleButton.click();
110
+ const maxRetries = 3;
111
+ for (let attempt = 0; attempt < maxRetries; attempt++) {
112
+ await this.clickRole(roleId);
113
+ // After clicking the role, the detail page may show a 404 if the role
114
+ // was just created and the backend hasn't fully provisioned it yet.
115
+ const gotNotFound = await this.notFoundText
116
+ .isVisible({ timeout: 3000 })
117
+ .catch(() => false);
118
+ if (gotNotFound) {
119
+ console.warn(`Attempt ${attempt + 1}: Role detail page returned 404 for "${roleId}", retrying...`);
120
+ await this.page.goBack();
121
+ await (0, sleep_1.sleep)(3000);
122
+ continue;
123
+ }
124
+ try {
125
+ await this.clickMappingRulesTab();
126
+ await (0, test_1.expect)(this.assignMappingRuleButton).toBeVisible({
127
+ timeout: 60000,
128
+ });
129
+ await this.assignMappingRuleButton.click({ timeout: 60000 });
130
+ await (0, test_1.expect)(this.assignMappingModal).toBeVisible({ timeout: 60000 });
131
+ await this.mappingSearchBox.fill(mappingId);
132
+ await this.assignMappingModalSearchResult.getByText(mappingId).click();
133
+ await this.assignMappingModalAssignRuleButton.click();
134
+ return;
135
+ }
136
+ catch (error) {
137
+ if (attempt < maxRetries - 1) {
138
+ console.warn(`Attempt ${attempt + 1} failed to assign mapping rule to role "${roleId}". Retrying...`);
139
+ await this.page.goBack();
140
+ await (0, sleep_1.sleep)(2000);
141
+ }
142
+ else {
143
+ throw error;
144
+ }
145
+ }
146
+ }
117
147
  }
118
148
  async createRole(role) {
119
149
  await this.createRoleButton.click();
@@ -872,7 +872,12 @@ class ModelerCreatePage {
872
872
  // Reload to pick up newly-downloaded connector templates, then
873
873
  // re-select the intermediate event element and open the type picker.
874
874
  await this.page.reload();
875
- await this.secondElement.click({ force: true, timeout: 30000 });
875
+ await this.page.waitForLoadState('domcontentloaded');
876
+ await this.secondElement.waitFor({
877
+ state: 'visible',
878
+ timeout: 30000,
879
+ });
880
+ await this.secondElement.click({ timeout: 30000 });
876
881
  await this.changeTypeButton.click({ force: true, timeout: 30000 });
877
882
  }
878
883
  // Use a longer timeout to allow the connector to finish registering
@@ -187,7 +187,7 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
187
187
  await modelerCreatePage.clickIntermediateBoundaryEvent();
188
188
  await modelerCreatePage.clickChangeTypeButton();
189
189
  try {
190
- await (0, test_1.expect)(modelerCreatePage.webhookMessageStartEventConnectorOption).toBeVisible({
190
+ await (0, test_1.expect)(modelerCreatePage.intermediateWebhookConnectorOption).toBeVisible({
191
191
  timeout: 15000,
192
192
  });
193
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.408",
3
+ "version": "0.0.410",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",