@digital-ai/devops-page-object-release 0.0.102 → 0.0.103
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.
- package/CHANGELOG.md +6 -0
- package/dist/main.js +71 -12
- package/dist/main.js.map +1 -1
- package/dist/module.js +71 -12
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +8 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -5032,32 +5032,80 @@ class $112122b844be02a3$export$e2613a7eee3a1b1b extends (0, $9626bc9256ce31f7$ex
|
|
|
5032
5032
|
constructor(page){
|
|
5033
5033
|
super(page);
|
|
5034
5034
|
}
|
|
5035
|
-
async
|
|
5035
|
+
async removePermission(permission, team) {
|
|
5036
5036
|
const row = this.page.locator('table tr', {
|
|
5037
5037
|
hasText: permission
|
|
5038
5038
|
});
|
|
5039
5039
|
const tag = row.locator('.tag', {
|
|
5040
5040
|
hasText: team
|
|
5041
5041
|
});
|
|
5042
|
-
await (
|
|
5042
|
+
await tag.locator('.close-icon').click();
|
|
5043
5043
|
}
|
|
5044
|
-
async
|
|
5045
|
-
const
|
|
5044
|
+
async expectPermissionReadOnly(permission, team, readOnly) {
|
|
5045
|
+
const rowLocator = this.page.locator('table').getByRole('row').filter({
|
|
5046
5046
|
hasText: permission
|
|
5047
|
+
}).filter({
|
|
5048
|
+
has: this.page.getByText(team, {
|
|
5049
|
+
exact: true
|
|
5050
|
+
})
|
|
5047
5051
|
});
|
|
5048
|
-
const
|
|
5049
|
-
|
|
5052
|
+
const tagLocator = rowLocator.getByText(team, {
|
|
5053
|
+
exact: true
|
|
5050
5054
|
});
|
|
5051
|
-
|
|
5055
|
+
const closeIconLocator = tagLocator.locator('+ .tag-close');
|
|
5056
|
+
if (readOnly) {
|
|
5057
|
+
await (0, $hOLA6$expect)(tagLocator).toBeVisible();
|
|
5058
|
+
await (0, $hOLA6$expect)(closeIconLocator).toHaveCount(0);
|
|
5059
|
+
} else {
|
|
5060
|
+
await (0, $hOLA6$expect)(tagLocator).toBeVisible();
|
|
5061
|
+
await (0, $hOLA6$expect)(closeIconLocator).toBeVisible();
|
|
5062
|
+
}
|
|
5052
5063
|
}
|
|
5053
|
-
async
|
|
5054
|
-
const
|
|
5064
|
+
async expectTeamNotInPermission(permission, team) {
|
|
5065
|
+
const rowLocator = this.page.locator('table').getByRole('row').filter({
|
|
5055
5066
|
hasText: permission
|
|
5056
5067
|
});
|
|
5057
|
-
const
|
|
5058
|
-
|
|
5068
|
+
const teamTag = rowLocator.getByText(team, {
|
|
5069
|
+
exact: true
|
|
5059
5070
|
});
|
|
5060
|
-
await (0, $hOLA6$expect)(
|
|
5071
|
+
await (0, $hOLA6$expect)(teamTag).toHaveCount(0);
|
|
5072
|
+
}
|
|
5073
|
+
async expectTeamsReadonly(teams, readOnly) {
|
|
5074
|
+
for (const team of teams){
|
|
5075
|
+
const teamRow = this.page.locator('table').first().locator('tr').filter({
|
|
5076
|
+
has: this.page.locator('td').first().filter({
|
|
5077
|
+
hasText: team
|
|
5078
|
+
})
|
|
5079
|
+
});
|
|
5080
|
+
if (readOnly) {
|
|
5081
|
+
await (0, $hOLA6$expect)(teamRow).toBeVisible();
|
|
5082
|
+
await (0, $hOLA6$expect)(teamRow.getByTitle('Delete')).toHaveCount(0);
|
|
5083
|
+
} else {
|
|
5084
|
+
await (0, $hOLA6$expect)(teamRow).toBeVisible();
|
|
5085
|
+
await (0, $hOLA6$expect)(teamRow.getByTitle('Delete')).toHaveCount(1);
|
|
5086
|
+
}
|
|
5087
|
+
}
|
|
5088
|
+
}
|
|
5089
|
+
async expectInheritTeamsDisabled() {
|
|
5090
|
+
const inheritCheckbox = this.page.locator('.inherit-checkbox input');
|
|
5091
|
+
await (0, $hOLA6$expect)(inheritCheckbox).toBeVisible();
|
|
5092
|
+
await (0, $hOLA6$expect)(inheritCheckbox).toBeDisabled();
|
|
5093
|
+
}
|
|
5094
|
+
async expectNewTeamButtonDisabled() {
|
|
5095
|
+
const addTeamButton = this.page.locator('.button-add-team');
|
|
5096
|
+
await (0, $hOLA6$expect)(addTeamButton).toBeDisabled();
|
|
5097
|
+
}
|
|
5098
|
+
async expectRemoveTeamButtonNotToExist() {
|
|
5099
|
+
await (0, $hOLA6$expect)(this.page.locator('#teams-permissions-table table tr .action-label')).toHaveCount(0);
|
|
5100
|
+
return this;
|
|
5101
|
+
}
|
|
5102
|
+
async expectSaveButtonDisabled() {
|
|
5103
|
+
const saveButton = this.page.getByRole('button', {
|
|
5104
|
+
name: 'Save'
|
|
5105
|
+
});
|
|
5106
|
+
await (0, $hOLA6$expect)(saveButton).toBeVisible();
|
|
5107
|
+
await (0, $hOLA6$expect)(saveButton).toBeDisabled();
|
|
5108
|
+
return this;
|
|
5061
5109
|
}
|
|
5062
5110
|
async removeTeam(teamName) {
|
|
5063
5111
|
const row = this.page.locator('#teams-permissions-table table tr', {
|
|
@@ -9243,6 +9291,17 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
9243
9291
|
await this.page.waitForSelector('#releases-content');
|
|
9244
9292
|
return new (0, $50c91328c9110668$export$b453f08936c58edb)(this.page);
|
|
9245
9293
|
}
|
|
9294
|
+
async openFolderByName(folderName) {
|
|
9295
|
+
const folder = this.page.getByTitle(folderName);
|
|
9296
|
+
await (0, $hOLA6$expect)(folder).toBeVisible({
|
|
9297
|
+
timeout: 5000
|
|
9298
|
+
});
|
|
9299
|
+
await folder.click();
|
|
9300
|
+
await (0, $hOLA6$expect)(this.page.locator('.MuiBreadcrumbs-li').getByRole('link', {
|
|
9301
|
+
name: folderName
|
|
9302
|
+
})).toBeVisible();
|
|
9303
|
+
return new (0, $50c91328c9110668$export$b453f08936c58edb)(this.page);
|
|
9304
|
+
}
|
|
9246
9305
|
async openProfilePage() {
|
|
9247
9306
|
await this.page.goto(`./#/profile`);
|
|
9248
9307
|
return new (0, $a5932af323ac015a$export$3cf9c90f870f31bd)(this.page);
|