@digital-ai/devops-page-object-release 1.0.10 → 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 CHANGED
@@ -1,5 +1,12 @@
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
+
3
10
  ## 1.0.10
4
11
 
5
12
  ### 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