@digital-ai/devops-page-object-release 1.0.9 → 1.0.11
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 +13 -0
- package/dist/main.js +128 -9
- package/dist/main.js.map +1 -1
- package/dist/module.js +128 -9
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +26 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @digital-ai/devops-page-object-release
|
|
2
2
|
|
|
3
|
+
## 1.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d300ac1: S-136050 Add new dialog and update tests
|
|
8
|
+
- d300ac1: Playwright tests for Archive on Demand
|
|
9
|
+
|
|
10
|
+
## 1.0.10
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 7c4000f: S-136057: Update release-variables page selectors
|
|
15
|
+
|
|
3
16
|
## 1.0.9
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -1343,6 +1343,60 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $e403098cd4f59faa$ex
|
|
|
1343
1343
|
await this.page.locator('.modal-footer .primary').click();
|
|
1344
1344
|
return this;
|
|
1345
1345
|
}
|
|
1346
|
+
// Archive on Demand: bulk archive toolbar button
|
|
1347
|
+
bulkActionButton(buttonText) {
|
|
1348
|
+
return this.page.locator('action-toolbar button').filter({
|
|
1349
|
+
hasText: buttonText
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
async expectBulkActionButtonEnabled(buttonText, enabled = true) {
|
|
1353
|
+
const button = this.bulkActionButton(buttonText);
|
|
1354
|
+
await (0, $kKeXs$playwrighttest.expect)(button).toBeVisible();
|
|
1355
|
+
if (enabled) await (0, $kKeXs$playwrighttest.expect)(button).toBeEnabled();
|
|
1356
|
+
else await (0, $kKeXs$playwrighttest.expect)(button).toBeDisabled();
|
|
1357
|
+
return this;
|
|
1358
|
+
}
|
|
1359
|
+
async expectBulkActionButtonHidden(buttonText) {
|
|
1360
|
+
await (0, $kKeXs$playwrighttest.expect)(this.bulkActionButton(buttonText)).toHaveCount(0);
|
|
1361
|
+
return this;
|
|
1362
|
+
}
|
|
1363
|
+
// Archive on Demand: single archive action in the release overflow (three-dot) menu
|
|
1364
|
+
async clickArchiveOption(releaseTitle) {
|
|
1365
|
+
await this.clickReleaseOptions(releaseTitle);
|
|
1366
|
+
await this.page.locator('#context-menu-container a', {
|
|
1367
|
+
hasText: 'Archive release'
|
|
1368
|
+
}).click({
|
|
1369
|
+
force: true
|
|
1370
|
+
});
|
|
1371
|
+
return this;
|
|
1372
|
+
}
|
|
1373
|
+
async expectArchiveOptionHidden(releaseTitle) {
|
|
1374
|
+
await this.clickReleaseOptions(releaseTitle);
|
|
1375
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('#context-menu-container a').filter({
|
|
1376
|
+
hasText: 'Archive release'
|
|
1377
|
+
})).toHaveCount(0);
|
|
1378
|
+
return this;
|
|
1379
|
+
}
|
|
1380
|
+
// Archive on Demand: confirmation dialog shown before the archive request is sent
|
|
1381
|
+
async expectArchiveConfirmationDialog(title, message) {
|
|
1382
|
+
const dialog = this.page.locator('.MuiDialog-root');
|
|
1383
|
+
await (0, $kKeXs$playwrighttest.expect)(dialog).toBeVisible();
|
|
1384
|
+
await (0, $kKeXs$playwrighttest.expect)(dialog).toContainText(title);
|
|
1385
|
+
await (0, $kKeXs$playwrighttest.expect)(dialog).toContainText(message);
|
|
1386
|
+
return this;
|
|
1387
|
+
}
|
|
1388
|
+
async confirmArchiveDialog() {
|
|
1389
|
+
await this.page.locator('.MuiDialog-root button', {
|
|
1390
|
+
hasText: 'Archive'
|
|
1391
|
+
}).last().click({
|
|
1392
|
+
force: true
|
|
1393
|
+
});
|
|
1394
|
+
return this;
|
|
1395
|
+
}
|
|
1396
|
+
async expectSnackbarToContain(text) {
|
|
1397
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.dot-snackbar')).toContainText(text);
|
|
1398
|
+
return this;
|
|
1399
|
+
}
|
|
1346
1400
|
}
|
|
1347
1401
|
|
|
1348
1402
|
|
|
@@ -4058,6 +4112,50 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
4058
4112
|
await this.page.getByPlaceholder('Set status text...').click();
|
|
4059
4113
|
await this.page.getByPlaceholder('Set status text...').fill(flagComment);
|
|
4060
4114
|
}
|
|
4115
|
+
// Archive on Demand: "Archive Release After (hours)" field
|
|
4116
|
+
archiveAfterHoursField() {
|
|
4117
|
+
return this.page.locator('#release-form-archive-after-hours');
|
|
4118
|
+
}
|
|
4119
|
+
async expectArchiveAfterFieldVisible() {
|
|
4120
|
+
await (0, $kKeXs$playwrighttest.expect)(this.archiveAfterHoursField()).toBeVisible();
|
|
4121
|
+
return this;
|
|
4122
|
+
}
|
|
4123
|
+
async expectArchiveAfterFieldEnabled(enabled = true) {
|
|
4124
|
+
if (enabled) await (0, $kKeXs$playwrighttest.expect)(this.archiveAfterHoursField()).toBeEnabled();
|
|
4125
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.archiveAfterHoursField()).toBeDisabled();
|
|
4126
|
+
return this;
|
|
4127
|
+
}
|
|
4128
|
+
async expectArchiveAfterPlaceholderToMatch(pattern) {
|
|
4129
|
+
await (0, $kKeXs$playwrighttest.expect).poll(async ()=>this.archiveAfterHoursField().getAttribute('placeholder')).toMatch(pattern);
|
|
4130
|
+
return this;
|
|
4131
|
+
}
|
|
4132
|
+
async expectArchiveAfterMinToBe(min) {
|
|
4133
|
+
await (0, $kKeXs$playwrighttest.expect)(this.archiveAfterHoursField()).toHaveAttribute('min', min);
|
|
4134
|
+
return this;
|
|
4135
|
+
}
|
|
4136
|
+
// The hint is only shown in the info-icon tooltip, never as a help block below the field.
|
|
4137
|
+
async expectNoArchiveAfterHelpBlock() {
|
|
4138
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.help-block').filter({
|
|
4139
|
+
hasText: 'archive'
|
|
4140
|
+
})).toHaveCount(0);
|
|
4141
|
+
return this;
|
|
4142
|
+
}
|
|
4143
|
+
async expectArchiveAfterTooltipToContain(text) {
|
|
4144
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('label[for="release-form-archive-after-hours"] .info-icon')).toHaveAttribute('uib-tooltip', new RegExp(text));
|
|
4145
|
+
return this;
|
|
4146
|
+
}
|
|
4147
|
+
async setArchiveAfterHours(hours) {
|
|
4148
|
+
const field = this.archiveAfterHoursField();
|
|
4149
|
+
await field.click();
|
|
4150
|
+
await field.fill('');
|
|
4151
|
+
await field.fill(`${hours}`);
|
|
4152
|
+
await field.blur();
|
|
4153
|
+
return this;
|
|
4154
|
+
}
|
|
4155
|
+
async expectArchiveAfterHoursToBe(hours) {
|
|
4156
|
+
await (0, $kKeXs$playwrighttest.expect)(this.archiveAfterHoursField()).toHaveValue(`${hours}`);
|
|
4157
|
+
return this;
|
|
4158
|
+
}
|
|
4061
4159
|
}
|
|
4062
4160
|
|
|
4063
4161
|
|
|
@@ -7903,7 +8001,30 @@ class $3fad6a9449b6416f$export$1a0994e9c202d529 extends (0, $f8721861c660dd88$ex
|
|
|
7903
8001
|
|
|
7904
8002
|
|
|
7905
8003
|
|
|
7906
|
-
|
|
8004
|
+
|
|
8005
|
+
|
|
8006
|
+
class $291bffc3fb5b079a$export$3a6aeb461146cd7c extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
8007
|
+
constructor(page){
|
|
8008
|
+
super(page);
|
|
8009
|
+
}
|
|
8010
|
+
getVariableSearchInputSelector() {
|
|
8011
|
+
return '.variables-search-filter input#variables-filter';
|
|
8012
|
+
}
|
|
8013
|
+
async expectVariablesCountToBe(count) {
|
|
8014
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.variable .data-row')).toHaveCount(count);
|
|
8015
|
+
}
|
|
8016
|
+
async expectFirstVariableWithName(name) {
|
|
8017
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.variable .data-row').first()).toContainText(name);
|
|
8018
|
+
}
|
|
8019
|
+
async searchForVariable(variableName) {
|
|
8020
|
+
await this.page.locator(this.getVariableSearchInputSelector()).fill(variableName);
|
|
8021
|
+
await this.expectVariablesCountToBe(1);
|
|
8022
|
+
await this.expectFirstVariableWithName(variableName);
|
|
8023
|
+
}
|
|
8024
|
+
}
|
|
8025
|
+
|
|
8026
|
+
|
|
8027
|
+
class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $291bffc3fb5b079a$export$3a6aeb461146cd7c) {
|
|
7907
8028
|
constructor(page){
|
|
7908
8029
|
super(page);
|
|
7909
8030
|
this.addListValue = this.page.locator('.variable-selector .xl-components-input-full input');
|
|
@@ -8049,25 +8170,22 @@ class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$ex
|
|
|
8049
8170
|
(0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(type);
|
|
8050
8171
|
}
|
|
8051
8172
|
async clickEditVariable(variableName) {
|
|
8052
|
-
await this.
|
|
8173
|
+
await this.searchForVariable(variableName);
|
|
8053
8174
|
await this.page.getByText('Edit').first().click();
|
|
8054
8175
|
return new $fd4eef3ad2b2e612$var$ReleaseVariableModal(this.page);
|
|
8055
8176
|
}
|
|
8056
8177
|
async clickDeleteVariable(variableName) {
|
|
8057
|
-
await this.
|
|
8178
|
+
await this.searchForVariable(variableName);
|
|
8058
8179
|
await this.page.locator('.action .delete-icon').first().click();
|
|
8059
8180
|
return new $fd4eef3ad2b2e612$var$DeleteVariableModel(this.page);
|
|
8060
8181
|
}
|
|
8061
|
-
async expectVariablesCountToBe(count) {
|
|
8062
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.variable .data-row')).toHaveCount(count);
|
|
8063
|
-
}
|
|
8064
8182
|
async expectVariableNotPresent(variableName) {
|
|
8065
8183
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.variable').filter({
|
|
8066
8184
|
hasText: variableName
|
|
8067
8185
|
})).not.toBeVisible();
|
|
8068
8186
|
}
|
|
8069
8187
|
async clearSearch() {
|
|
8070
|
-
await this.page.locator(
|
|
8188
|
+
await this.page.locator('.variables-search-filter button.clear-icon-button').click();
|
|
8071
8189
|
}
|
|
8072
8190
|
async switchPossibleValuesToVariable(variableName) {
|
|
8073
8191
|
await this.page.locator('.variable-toggle button').click();
|
|
@@ -8847,12 +8965,13 @@ class $b12db2561a3bf785$export$bad60adab28720fb extends (0, $f8721861c660dd88$ex
|
|
|
8847
8965
|
|
|
8848
8966
|
|
|
8849
8967
|
|
|
8850
|
-
|
|
8968
|
+
|
|
8969
|
+
class $170d32617f3aa58e$export$e0f84914460c3382 extends (0, $291bffc3fb5b079a$export$3a6aeb461146cd7c) {
|
|
8851
8970
|
constructor(page){
|
|
8852
8971
|
super(page);
|
|
8853
8972
|
}
|
|
8854
8973
|
async clickEditVariable(variableName) {
|
|
8855
|
-
await this.
|
|
8974
|
+
await this.searchForVariable(variableName);
|
|
8856
8975
|
await this.page.getByText('Edit').click();
|
|
8857
8976
|
return new $170d32617f3aa58e$var$TemplateVariableModal(this.page);
|
|
8858
8977
|
}
|