@camunda/e2e-test-suite 0.0.472 → 0.0.474

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.
@@ -65,7 +65,12 @@ const createIdentityUser = async (navigationPage, managementIdentity, username)
65
65
  await managementIdentity.clickAddButton();
66
66
  };
67
67
  const createOCUser = async (navigationPage, ocIdentityHomePage, ocIdentityRolesPage, username) => {
68
- await navigationPage.goToOCIdentity();
68
+ if (process.env.IS_MT === 'true') {
69
+ await navigationPage.goToOCAdmin();
70
+ }
71
+ else {
72
+ await navigationPage.goToOCIdentity();
73
+ }
69
74
  await ocIdentityHomePage.clickRolesTab();
70
75
  await ocIdentityRolesPage.clickAdminRole();
71
76
  await ocIdentityRolesPage.assignUserToRole(username);
@@ -35,6 +35,10 @@ declare class NavigationPage {
35
35
  username: string;
36
36
  password: string;
37
37
  }): Promise<void>;
38
+ goToOCAdmin(sleepTimeout?: number, credentials?: {
39
+ username: string;
40
+ password: string;
41
+ }): Promise<void>;
38
42
  goToConsole(sleepTimeout?: number, credentials?: {
39
43
  username: string;
40
44
  password: string;
@@ -29,9 +29,10 @@ class NavigationPage {
29
29
  this.optimizePageBanner = page.getByRole('link', {
30
30
  name: 'Camunda logo Optimize',
31
31
  });
32
- this.identityPageBanner = page.getByRole('link', {
33
- name: 'Camunda logo Identity',
34
- });
32
+ this.identityPageBanner = page
33
+ .locator('a')
34
+ .filter({ hasText: /^Camunda logo\s*(Identity|Admin)$/ })
35
+ .first();
35
36
  this.consolePageBanner = page.getByRole('link', {
36
37
  name: 'Camunda logo Console',
37
38
  });
@@ -117,6 +118,9 @@ class NavigationPage {
117
118
  async goToOCIdentity(sleepTimeout, credentials) {
118
119
  await this.goTo('/orchestration/identity', this.identityPageBanner, sleepTimeout, credentials);
119
120
  }
121
+ async goToOCAdmin(sleepTimeout, credentials) {
122
+ await this.goTo('/orchestration/admin', this.identityPageBanner, sleepTimeout, credentials);
123
+ }
120
124
  async goToConsole(sleepTimeout, credentials) {
121
125
  await this.goTo('/console', this.consolePageBanner, sleepTimeout, credentials);
122
126
  }
@@ -11,7 +11,7 @@ class OperateLoginPage {
11
11
  this.page = page;
12
12
  this.usernameInput = page.getByLabel('Username');
13
13
  this.passwordInput = page.getByRole('textbox', { name: 'password' });
14
- this.loginButton = page.getByRole('button', { name: 'Login' });
14
+ this.loginButton = page.getByRole('button', { name: /log.?in|sign.?in/i });
15
15
  }
16
16
  async fillUsername(username) {
17
17
  await this.usernameInput.fill(username);
@@ -26,12 +26,17 @@ class OperateLoginPage {
26
26
  await this.loginButton.click({ timeout: 60000 });
27
27
  }
28
28
  async login(username, password) {
29
- await (0, test_1.expect)(this.usernameInput).toBeVisible({ timeout: 180000 });
30
- await this.clickUsername();
31
- await this.fillUsername(username);
32
- await this.fillPassword(password);
33
- await (0, test_1.expect)(this.loginButton).toBeVisible({ timeout: 120000 });
34
- await this.clickLoginButton();
29
+ try {
30
+ await (0, test_1.expect)(this.usernameInput).toBeVisible();
31
+ await (0, test_1.expect)(this.passwordInput).toBeVisible();
32
+ await this.clickUsername();
33
+ await this.fillUsername(username);
34
+ await this.fillPassword(password);
35
+ await this.clickLoginButton();
36
+ }
37
+ catch {
38
+ await (0, test_1.expect)(this.page.getByRole('link', { name: 'Camunda logo Operate' })).toBeVisible();
39
+ }
35
40
  }
36
41
  }
37
42
  exports.OperateLoginPage = OperateLoginPage;
@@ -11,7 +11,7 @@ class TaskListLoginPage {
11
11
  this.page = page;
12
12
  this.usernameInput = page.getByLabel('Username');
13
13
  this.passwordInput = page.getByRole('textbox', { name: 'password' });
14
- this.loginButton = page.getByRole('button', { name: 'Login' });
14
+ this.loginButton = page.getByRole('button', { name: /log.?in|sign.?in/i });
15
15
  }
16
16
  async fillUsername(username) {
17
17
  await this.usernameInput.fill(username);
@@ -26,12 +26,17 @@ class TaskListLoginPage {
26
26
  await this.loginButton.click({ timeout: 60000 });
27
27
  }
28
28
  async login(username, password) {
29
- await (0, test_1.expect)(this.usernameInput).toBeVisible({ timeout: 180000 });
30
- await this.clickUsername();
31
- await this.fillUsername(username);
32
- await this.fillPassword(password);
33
- await (0, test_1.expect)(this.loginButton).toBeVisible({ timeout: 120000 });
34
- await this.clickLoginButton();
29
+ try {
30
+ await (0, test_1.expect)(this.usernameInput).toBeVisible();
31
+ await (0, test_1.expect)(this.passwordInput).toBeVisible();
32
+ await this.clickUsername();
33
+ await this.fillUsername(username);
34
+ await this.fillPassword(password);
35
+ await this.clickLoginButton();
36
+ }
37
+ catch {
38
+ await (0, test_1.expect)(this.page.getByRole('link', { name: 'Camunda logo Tasklist' })).toBeVisible();
39
+ }
35
40
  }
36
41
  }
37
42
  exports.TaskListLoginPage = TaskListLoginPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.472",
3
+ "version": "0.0.474",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",