@camunda/e2e-test-suite 0.0.140 → 0.0.142

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.
@@ -95,9 +95,12 @@ class Authorization {
95
95
  await this.createAuthorizationResourceTypeOption(authorization.resourceType).click({ timeout: 30000 });
96
96
  await this.createAuthorizationResourceIdField.fill(authorization.resourceId);
97
97
  for (const permission of authorization.accessPermissions) {
98
- await this.createAuthorizationAccessPermission(permission).click({
99
- force: true,
100
- });
98
+ await (0, test_1.expect)(await this.createAuthorizationAccessPermission(permission)).toBeVisible();
99
+ if (!(await this.createAuthorizationAccessPermission(permission).isChecked())) {
100
+ await this.createAuthorizationAccessPermission(permission).click({
101
+ force: true,
102
+ });
103
+ }
101
104
  }
102
105
  await this.createAuthorizationSubmitButton.click();
103
106
  await (0, test_1.expect)(this.createAuthorizationModal).not.toBeVisible();
@@ -850,10 +850,14 @@ class ModelerCreatePage {
850
850
  }
851
851
  async clickIntermediateWebhookConnectorOption() {
852
852
  try {
853
- await this.intermediateWebhookConnectorOption.click({ timeout: 20000 });
853
+ await (0, test_1.expect)(this.intermediateWebhookConnectorOption).toBeVisible({
854
+ timeout: 20000,
855
+ });
856
+ await this.intermediateWebhookConnectorOption.click();
854
857
  }
855
858
  catch (error) {
856
859
  await this.page.reload();
860
+ await (0, test_1.expect)(this.secondElement).toBeVisible({ timeout: 20000 });
857
861
  await this.secondElement.click();
858
862
  await this.changeTypeButton.click({ force: true });
859
863
  await this.intermediateWebhookConnectorOption.click();
@@ -5,7 +5,13 @@ const test_1 = require("@playwright/test");
5
5
  const LoginPage_1 = require("./LoginPage");
6
6
  const sleep_1 = require("../../utils/sleep");
7
7
  const constants_1 = require("../../utils/constants");
8
- const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
8
+ const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration';
9
+ const MODELER_CONTEXT_PATH = process.env.MODELER_CONTEXT_PATH ?? '/modeler';
10
+ const OPTIMIZE_CONTEXT_PATH = process.env.OPTIMIZE_CONTEXT_PATH ?? '/optimize';
11
+ const CONSOLE_CONTEXT_PATH = process.env.CONSOLE_CONTEXT_PATH ?? '/console';
12
+ const MANAGEMENT_IDENTITY_CONTEXT_PATH = process.env.MANAGEMENT_IDENTITY_CONTEXT_PATH ?? '/identity';
13
+ const IDENTITY_FIRSTUSER_USERNAME = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME || 'demo';
14
+ const IDENTITY_FIRSTUSER_PASSWORD = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD || 'demo';
9
15
  class NavigationPage {
10
16
  page;
11
17
  modelerPageBanner;
@@ -41,8 +47,7 @@ class NavigationPage {
41
47
  });
42
48
  this.keyboardPageBanner = page.locator('#keycloak-bg');
43
49
  }
44
- async goTo(url, banner, sleepTimeout, { username = 'demo', password = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD ??
45
- 'demo', } = {}, maxRetries = 3) {
50
+ async goTo(url, banner, sleepTimeout, { username = IDENTITY_FIRSTUSER_USERNAME, password = IDENTITY_FIRSTUSER_PASSWORD, } = {}, maxRetries = 3) {
46
51
  const startTime = Date.now();
47
52
  let timeout = constants_1._1_SECOND_IN_MS * 1;
48
53
  if (url === '/modeler') {
@@ -97,7 +102,7 @@ class NavigationPage {
97
102
  }
98
103
  }
99
104
  async goToModeler(sleepTimeout, credentials) {
100
- await this.goTo('/modeler', this.modelerPageBanner, sleepTimeout, credentials);
105
+ await this.goTo(MODELER_CONTEXT_PATH, this.modelerPageBanner, sleepTimeout, credentials);
101
106
  }
102
107
  async goToTasklist(sleepTimeout, credentials) {
103
108
  await this.goTo(`${ORCHESTRATION_CONTEXT_PATH}/tasklist`, this.tasklistPageBanner, sleepTimeout, credentials);
@@ -106,7 +111,7 @@ class NavigationPage {
106
111
  await this.goTo(`${ORCHESTRATION_CONTEXT_PATH}/operate`, this.operatePageBanner, sleepTimeout, credentials);
107
112
  }
108
113
  async goToOptimize(sleepTimeout, credentials) {
109
- await this.goTo('/optimize', this.optimizePageBanner, sleepTimeout, credentials);
114
+ await this.goTo(OPTIMIZE_CONTEXT_PATH, this.optimizePageBanner, sleepTimeout, credentials);
110
115
  }
111
116
  async goToKeycloak() {
112
117
  const keycloakUrl = process.env.KEYCLOAK_URL
@@ -119,10 +124,10 @@ class NavigationPage {
119
124
  await this.goTo(`${ORCHESTRATION_CONTEXT_PATH}/identity`, this.identityPageBanner, sleepTimeout, credentials);
120
125
  }
121
126
  async goToConsole(sleepTimeout, credentials) {
122
- await this.goTo('/console', this.consolePageBanner, sleepTimeout, credentials);
127
+ await this.goTo(CONSOLE_CONTEXT_PATH, this.consolePageBanner, sleepTimeout, credentials);
123
128
  }
124
129
  async goToManagementIdentity(sleepTimeout, credentials) {
125
- await this.goTo('/identity', this.managementIdentityPageBanner, sleepTimeout, credentials);
130
+ await this.goTo(MANAGEMENT_IDENTITY_CONTEXT_PATH, this.managementIdentityPageBanner, sleepTimeout, credentials);
126
131
  }
127
132
  }
128
133
  exports.NavigationPage = NavigationPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.140",
3
+ "version": "0.0.142",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",