@camunda/e2e-test-suite 0.0.910 → 0.0.912

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.
@@ -8,6 +8,7 @@ declare class LoginPage {
8
8
  readonly loginMessage: Locator;
9
9
  readonly errorMessage: Locator;
10
10
  readonly passwordHeading: Locator;
11
+ readonly rateLimitError: Locator;
11
12
  constructor(page: Page);
12
13
  fillUsername(username: string): Promise<void>;
13
14
  clickContinueButton(): Promise<void>;
@@ -12,6 +12,7 @@ class LoginPage {
12
12
  loginMessage;
13
13
  errorMessage;
14
14
  passwordHeading;
15
+ rateLimitError;
15
16
  constructor(page) {
16
17
  this.page = page;
17
18
  this.usernameInput = page
@@ -34,6 +35,9 @@ class LoginPage {
34
35
  exact: true,
35
36
  });
36
37
  this.errorMessage = page.getByText('Wrong email or password');
38
+ this.rateLimitError = page
39
+ .getByText(/rate limit has been reached/i)
40
+ .or(page.getByText(/We are sorry, an error occurred/i));
37
41
  }
38
42
  async fillUsername(username) {
39
43
  await this.usernameInput.waitFor({ state: 'visible', timeout: 60000 });
@@ -32,7 +32,7 @@ async function forceLogoutIfNeeded(page) {
32
32
  }
33
33
  }
34
34
  exports.forceLogoutIfNeeded = forceLogoutIfNeeded;
35
- async function loginWithRetry(page, loginPage, testUser, timeout, maxRetries = 3) {
35
+ async function loginWithRetry(page, loginPage, testUser, timeout, maxRetries = 5) {
36
36
  let lastError;
37
37
  // Stagger the first navigation across parallel workers. Without this, every
38
38
  // worker's initial page.goto('/') fires within the same second -- with 18+
@@ -64,6 +64,16 @@ async function loginWithRetry(page, loginPage, testUser, timeout, maxRetries = 3
64
64
  await page
65
65
  .waitForLoadState('networkidle', { timeout: 30000 })
66
66
  .catch(() => { });
67
+ // Auth0 serves a tenant-wide rate-limit error page that carries none of
68
+ // the usual auth controls. Bail out early on it so the outer retry backs
69
+ // off long enough to outlast the window instead of burning attempts
70
+ // against a 60s wait for a login form that will never render.
71
+ if (await loginPage.rateLimitError
72
+ .first()
73
+ .isVisible()
74
+ .catch(() => false)) {
75
+ throw new Error('AUTH0_RATE_LIMIT: identity provider returned an error page');
76
+ }
67
77
  await (0, test_1.expect)(loginPage.loginMessage.or(loginPage.passwordHeading)).toBeVisible({ timeout: 60000 });
68
78
  await loginPage.loginWithTestUser(testUser);
69
79
  return;
@@ -71,8 +81,16 @@ async function loginWithRetry(page, loginPage, testUser, timeout, maxRetries = 3
71
81
  catch (error) {
72
82
  lastError = error;
73
83
  if (attempt < maxRetries - 1) {
74
- console.warn(`Attempt ${attempt + 1} failed for logging in. Retrying with clean session...`);
75
- await (0, randomSleep_1.randomSleep)(10000, 20000);
84
+ const rateLimited = String(error).includes('AUTH0_RATE_LIMIT');
85
+ console.warn(`Attempt ${attempt + 1} failed for logging in. Retrying with clean session...`, error);
86
+ if (rateLimited) {
87
+ // Auth0 rate-limit windows commonly last 30-90s. Back off long
88
+ // enough to outlast the window before the next attempt.
89
+ await (0, randomSleep_1.randomSleep)(60000, 90000);
90
+ }
91
+ else {
92
+ await (0, randomSleep_1.randomSleep)(10000, 20000);
93
+ }
76
94
  }
77
95
  else {
78
96
  console.error(lastError);
@@ -80,8 +80,7 @@ c8Run_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
80
80
  });
81
81
  });
82
82
  });
83
- // Skipped due to bug #8233: https://github.com/camunda/connectors/issues/8233
84
- c8Run_8_9_1.test.skip('Start Event Webhook Connector No Auth User Flow', async ({ page, request, operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
83
+ (0, c8Run_8_9_1.test)('Start Event Webhook Connector No Auth User Flow', async ({ page, request, operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
85
84
  await c8Run_8_9_1.test.step('Make Authorization Request', async () => {
86
85
  await (0, apiHelpers_1.waitForInboundWebhookRegistered)('test-webhook-id');
87
86
  await (0, test_1.expect)(async () => {
@@ -99,8 +98,7 @@ c8Run_8_9_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
99
98
  await operateProcessInstancePage.completedIconAssertion();
100
99
  });
101
100
  });
102
- // Skipped due to bug #8233: https://github.com/camunda/connectors/issues/8233
103
- c8Run_8_9_1.test.skip('Intermediate Event Webhook Connector No Auth User Flow', async ({ request, operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
101
+ (0, c8Run_8_9_1.test)('Intermediate Event Webhook Connector No Auth User Flow', async ({ request, operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
104
102
  await c8Run_8_9_1.test.step('Make Authorization Request', async () => {
105
103
  await (0, apiHelpers_1.waitForInboundWebhookRegistered)('test-webhook-intermediate');
106
104
  await (0, test_1.expect)(async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.910",
3
+ "version": "0.0.912",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",