@camunda/e2e-test-suite 0.0.534 → 0.0.536

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.
@@ -14,7 +14,12 @@ class LoginPage {
14
14
  passwordHeading;
15
15
  constructor(page) {
16
16
  this.page = page;
17
- this.usernameInput = page.getByLabel('Email address');
17
+ // The Console app embeds a hidden invite-user email input also labeled
18
+ // "Email address" (id="c4-invite-email"). Exclude it so the locator only
19
+ // resolves to the auth0 email input, regardless of redirect timing.
20
+ this.usernameInput = page
21
+ .getByLabel('Email address')
22
+ .and(page.locator(':not(#c4-invite-email)'));
18
23
  this.passwordInput = page.getByLabel('Password *');
19
24
  this.continueButton = page.getByRole('button', {
20
25
  name: 'Continue',
@@ -55,6 +60,14 @@ class LoginPage {
55
60
  }
56
61
  async loginWithTestUser(credentials = {}) {
57
62
  const { username = process.env.C8_USERNAME_TEST, password = process.env.C8_PASSWORD_TEST, } = credentials;
63
+ // Navigate to app root to trigger auth redirect. The Console app (at
64
+ // console.* hostnames) embeds a hidden invite-user email input also labeled
65
+ // "Email address" that would otherwise satisfy the locator below before the
66
+ // auth0 redirect has had a chance to complete.
67
+ await this.page.goto('/');
68
+ await this.page
69
+ .waitForURL((url) => !url.hostname.includes('console'), { timeout: 60000 })
70
+ .catch(() => { });
58
71
  await (0, test_1.expect)(this.usernameInput).toBeVisible({ timeout: 120000 });
59
72
  await this.fillUsername(username);
60
73
  await this.clickContinueButton();
@@ -12,6 +12,15 @@ async function loginWithRetry(page, loginPage, testUser, timeout, maxRetries = 3
12
12
  for (let attempt = 0; attempt < maxRetries; attempt++) {
13
13
  try {
14
14
  await page.goto('/');
15
+ // Wait for the auth redirect to leave the Console hostname before login.
16
+ // Console embeds a hidden invite-user email input also labeled "Email
17
+ // address" that would otherwise satisfy the locator inside login() before
18
+ // auth0 has had a chance to load.
19
+ await page
20
+ .waitForURL((url) => !url.hostname.includes('console'), {
21
+ timeout: 60000,
22
+ })
23
+ .catch(() => { });
15
24
  await (0, sleep_1.sleep)(timeout);
16
25
  if (skipOrgAssertion) {
17
26
  await loginPage.loginWithoutOrgAssertion(testUser);
@@ -34,7 +34,7 @@ class IdentityHomePage {
34
34
  this.dialog = page.getByRole('dialog');
35
35
  this.writePermissionCheckBox = page
36
36
  .locator('label')
37
- .filter({ hasText: 'write:* (Write permission)' });
37
+ .filter({ hasText: 'write:*' });
38
38
  this.readPermissionCheckBox = page
39
39
  .locator('label')
40
40
  .filter({ hasText: 'read:*' });
@@ -58,6 +58,7 @@ class IdentityHomePage {
58
58
  await this.assignPermissionsButton.click();
59
59
  await this.selectOptionFromDropdown('Tasklist API');
60
60
  await (0, test_1.expect)(this.dialog).toBeVisible();
61
+ await this.writePermissionCheckBox.waitFor({ state: 'visible' });
61
62
  await this.writePermissionCheckBox.click();
62
63
  await this.readPermissionCheckBox.click();
63
64
  await this.addButton.click();
@@ -79,6 +80,7 @@ class IdentityHomePage {
79
80
  await this.assignPermissionsButton.click();
80
81
  await this.selectOptionFromDropdown('Operate API');
81
82
  await (0, test_1.expect)(this.dialog).toBeVisible();
83
+ await this.writePermissionCheckBox.waitFor({ state: 'visible' });
82
84
  await this.writePermissionCheckBox.click();
83
85
  await this.readPermissionCheckBox.click();
84
86
  await this.addButton.click();
@@ -40,8 +40,16 @@ const springComponents = [
40
40
  '/orchestration/oauth2/authorization/oidc',
41
41
  'AUTH0_ORCHESTRATION_CLIENT_ID',
42
42
  ],
43
- ['identity', '/identity/oauth2/authorization/oidc', 'AUTH0_IDENTITY_CLIENT_ID'],
44
- ['optimize', '/optimize/oauth2/authorization/oidc', 'AUTH0_OPTIMIZE_CLIENT_ID'],
43
+ [
44
+ 'identity',
45
+ '/identity/oauth2/authorization/oidc',
46
+ 'AUTH0_IDENTITY_CLIENT_ID',
47
+ ],
48
+ [
49
+ 'optimize',
50
+ '/optimize/oauth2/authorization/oidc',
51
+ 'AUTH0_OPTIMIZE_CLIENT_ID',
52
+ ],
45
53
  ];
46
54
  // SPA components: assert a protected backend API returns 401.
47
55
  const spaComponents = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.534",
3
+ "version": "0.0.536",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",