@camunda/e2e-test-suite 0.0.107 → 0.0.109
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.
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OCIdentityRolesPage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const UtilitiesPage_1 = require("../SM-8.8/UtilitiesPage");
|
|
6
|
+
const expectLocatorWithPagination_1 = require("../../utils/assertionHelpers/expectLocatorWithPagination");
|
|
6
7
|
class OCIdentityRolesPage {
|
|
7
8
|
page;
|
|
8
9
|
selectResourceTypeTab;
|
|
@@ -124,11 +125,11 @@ class OCIdentityRolesPage {
|
|
|
124
125
|
await this.createNameField.fill(role.name);
|
|
125
126
|
await this.createRoleModalCreateButton.click();
|
|
126
127
|
await (0, test_1.expect)(this.createRoleModal).not.toBeVisible();
|
|
127
|
-
await (0,
|
|
128
|
+
await (0, expectLocatorWithPagination_1.expectLocatorWithPagination)(this.page, this.rolesList
|
|
128
129
|
.getByRole('cell', {
|
|
129
130
|
name: role.name,
|
|
130
131
|
})
|
|
131
|
-
.first()
|
|
132
|
+
.first());
|
|
132
133
|
}
|
|
133
134
|
async deleteRole(name, options) {
|
|
134
135
|
const { throwError = true } = options || {};
|
|
@@ -4,6 +4,7 @@ exports.IdentityTenantPage = void 0;
|
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
6
|
const expectLocatorWithPagination_1 = require("../../utils/assertionHelpers/expectLocatorWithPagination");
|
|
7
|
+
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
7
8
|
class IdentityTenantPage {
|
|
8
9
|
page;
|
|
9
10
|
createTenantMainButton;
|
|
@@ -41,7 +42,7 @@ class IdentityTenantPage {
|
|
|
41
42
|
this.assignUsersButton = page.getByRole('button', { name: 'Assign users' });
|
|
42
43
|
this.searchUsersInput = page.getByPlaceholder('Search users');
|
|
43
44
|
this.assignUserFinalButton = page
|
|
44
|
-
.
|
|
45
|
+
.getByRole('dialog', { name: 'Assign users' })
|
|
45
46
|
.getByRole('button', { name: 'Assign users' });
|
|
46
47
|
this.removeUserButton = page.getByLabel('Remove user');
|
|
47
48
|
this.removeButton = page.getByRole('button', { name: 'danger Remove' });
|
|
@@ -89,8 +90,11 @@ class IdentityTenantPage {
|
|
|
89
90
|
await this.enterTenantIdInput.fill(tenantId);
|
|
90
91
|
}
|
|
91
92
|
async clickAssignedUsersTab() {
|
|
92
|
-
await (0,
|
|
93
|
-
|
|
93
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.assignedUsersTab, {
|
|
94
|
+
postAction: async () => {
|
|
95
|
+
await this.page.reload();
|
|
96
|
+
},
|
|
97
|
+
});
|
|
94
98
|
}
|
|
95
99
|
async clickAssignUsersButton() {
|
|
96
100
|
await (0, test_1.expect)(this.assignUsersButton).toBeVisible({ timeout: 60000 });
|
|
@@ -32,9 +32,11 @@ async function expectLocatorWithPagination(page, locator, options) {
|
|
|
32
32
|
catch (error) {
|
|
33
33
|
if (attempt < maxRetries - 1) {
|
|
34
34
|
console.warn(`Attempt ${attempt + 1} failed for asserting ${locator}. Retrying...`);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
if (!page.isClosed()) {
|
|
36
|
+
await page.waitForLoadState('domcontentloaded');
|
|
37
|
+
await page.reload();
|
|
38
|
+
await (0, sleep_1.sleep)(1000);
|
|
39
|
+
}
|
|
38
40
|
}
|
|
39
41
|
else {
|
|
40
42
|
throw new Error(`Assertion ${locator} failed after ${maxRetries} attempts` + error);
|