@camunda/e2e-test-suite 0.0.1615 → 0.0.1617

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.
@@ -38,6 +38,7 @@ declare class IdentityTenantPage {
38
38
  clickRemoveButton(): Promise<void>;
39
39
  createTenant(tenantName: string): Promise<void>;
40
40
  clickTenant(tenantName: string): Promise<void>;
41
+ private isTenantDetailsOpen;
41
42
  private isRowVisible;
42
43
  assignUserToTenant(tenantName: string, user: string, userEmail: string): Promise<void>;
43
44
  removeUserFromTenant(tenantName: string): Promise<void>;
@@ -158,6 +158,13 @@ class IdentityTenantPage {
158
158
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
159
159
  try {
160
160
  await this.page.waitForLoadState('domcontentloaded').catch(() => { });
161
+ // A failed assignUserToTenant attempt reloads the tenant *details*
162
+ // page, which has no tenants list. Its "Name | Default" row matches
163
+ // this.row() but has no clickable list cell, so every retry timed
164
+ // out. If the tenant is already open, there is nothing to click.
165
+ if (await this.isTenantDetailsOpen(tenantName)) {
166
+ return;
167
+ }
161
168
  const tenantRow = this.row(tenantName);
162
169
  await (0, expectLocatorWithPagination_1.expectLocatorWithPagination)(this.page, tenantRow);
163
170
  await tenantRow.locator('td').first().click({ timeout: 30000 });
@@ -174,6 +181,14 @@ class IdentityTenantPage {
174
181
  }
175
182
  }
176
183
  }
184
+ async isTenantDetailsOpen(tenantName) {
185
+ const heading = this.page.getByRole('heading', {
186
+ level: 1,
187
+ name: tenantName,
188
+ exact: true,
189
+ });
190
+ return (await heading.isVisible()) && (await this.usersTab.isVisible());
191
+ }
177
192
  async isRowVisible(name) {
178
193
  await (0, sleep_1.sleep)(1000);
179
194
  if (await this.row(name).isVisible()) {
@@ -38,6 +38,7 @@ declare class IdentityTenantPage {
38
38
  clickRemoveButton(): Promise<void>;
39
39
  createTenant(tenantName: string): Promise<void>;
40
40
  clickTenant(tenantName: string): Promise<void>;
41
+ private isTenantDetailsOpen;
41
42
  private isRowVisible;
42
43
  assignUserToTenant(tenantName: string, user: string, userEmail: string): Promise<void>;
43
44
  removeUserFromTenant(tenantName: string): Promise<void>;
@@ -158,6 +158,13 @@ class IdentityTenantPage {
158
158
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
159
159
  try {
160
160
  await this.page.waitForLoadState('domcontentloaded').catch(() => { });
161
+ // A failed assignUserToTenant attempt reloads the tenant *details*
162
+ // page, which has no tenants list. Its "Name | Default" row matches
163
+ // this.row() but has no clickable list cell, so every retry timed
164
+ // out. If the tenant is already open, there is nothing to click.
165
+ if (await this.isTenantDetailsOpen(tenantName)) {
166
+ return;
167
+ }
161
168
  const tenantRow = this.row(tenantName);
162
169
  await (0, expectLocatorWithPagination_1.expectLocatorWithPagination)(this.page, tenantRow);
163
170
  await tenantRow.locator('td').first().click({ timeout: 30000 });
@@ -174,6 +181,14 @@ class IdentityTenantPage {
174
181
  }
175
182
  }
176
183
  }
184
+ async isTenantDetailsOpen(tenantName) {
185
+ const heading = this.page.getByRole('heading', {
186
+ level: 1,
187
+ name: tenantName,
188
+ exact: true,
189
+ });
190
+ return (await heading.isVisible()) && (await this.usersTab.isVisible());
191
+ }
177
192
  async isRowVisible(name) {
178
193
  await (0, sleep_1.sleep)(1000);
179
194
  if (await this.row(name).isVisible()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1615",
3
+ "version": "0.0.1617",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",