@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/dist/module.js CHANGED
@@ -409,6 +409,60 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $b34a21212642e54d$ex
409
409
  await this.page.locator('.modal-footer .primary').click();
410
410
  return this;
411
411
  }
412
+ // Archive on Demand: bulk archive toolbar button
413
+ bulkActionButton(buttonText) {
414
+ return this.page.locator('action-toolbar button').filter({
415
+ hasText: buttonText
416
+ });
417
+ }
418
+ async expectBulkActionButtonEnabled(buttonText, enabled = true) {
419
+ const button = this.bulkActionButton(buttonText);
420
+ await (0, $hOLA6$expect)(button).toBeVisible();
421
+ if (enabled) await (0, $hOLA6$expect)(button).toBeEnabled();
422
+ else await (0, $hOLA6$expect)(button).toBeDisabled();
423
+ return this;
424
+ }
425
+ async expectBulkActionButtonHidden(buttonText) {
426
+ await (0, $hOLA6$expect)(this.bulkActionButton(buttonText)).toHaveCount(0);
427
+ return this;
428
+ }
429
+ // Archive on Demand: single archive action in the release overflow (three-dot) menu
430
+ async clickArchiveOption(releaseTitle) {
431
+ await this.clickReleaseOptions(releaseTitle);
432
+ await this.page.locator('#context-menu-container a', {
433
+ hasText: 'Archive release'
434
+ }).click({
435
+ force: true
436
+ });
437
+ return this;
438
+ }
439
+ async expectArchiveOptionHidden(releaseTitle) {
440
+ await this.clickReleaseOptions(releaseTitle);
441
+ await (0, $hOLA6$expect)(this.page.locator('#context-menu-container a').filter({
442
+ hasText: 'Archive release'
443
+ })).toHaveCount(0);
444
+ return this;
445
+ }
446
+ // Archive on Demand: confirmation dialog shown before the archive request is sent
447
+ async expectArchiveConfirmationDialog(title, message) {
448
+ const dialog = this.page.locator('.MuiDialog-root');
449
+ await (0, $hOLA6$expect)(dialog).toBeVisible();
450
+ await (0, $hOLA6$expect)(dialog).toContainText(title);
451
+ await (0, $hOLA6$expect)(dialog).toContainText(message);
452
+ return this;
453
+ }
454
+ async confirmArchiveDialog() {
455
+ await this.page.locator('.MuiDialog-root button', {
456
+ hasText: 'Archive'
457
+ }).last().click({
458
+ force: true
459
+ });
460
+ return this;
461
+ }
462
+ async expectSnackbarToContain(text) {
463
+ await (0, $hOLA6$expect)(this.page.locator('.dot-snackbar')).toContainText(text);
464
+ return this;
465
+ }
412
466
  }
413
467
 
414
468
 
@@ -3124,6 +3178,50 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
3124
3178
  await this.page.getByPlaceholder('Set status text...').click();
3125
3179
  await this.page.getByPlaceholder('Set status text...').fill(flagComment);
3126
3180
  }
3181
+ // Archive on Demand: "Archive Release After (hours)" field
3182
+ archiveAfterHoursField() {
3183
+ return this.page.locator('#release-form-archive-after-hours');
3184
+ }
3185
+ async expectArchiveAfterFieldVisible() {
3186
+ await (0, $hOLA6$expect)(this.archiveAfterHoursField()).toBeVisible();
3187
+ return this;
3188
+ }
3189
+ async expectArchiveAfterFieldEnabled(enabled = true) {
3190
+ if (enabled) await (0, $hOLA6$expect)(this.archiveAfterHoursField()).toBeEnabled();
3191
+ else await (0, $hOLA6$expect)(this.archiveAfterHoursField()).toBeDisabled();
3192
+ return this;
3193
+ }
3194
+ async expectArchiveAfterPlaceholderToMatch(pattern) {
3195
+ await (0, $hOLA6$expect).poll(async ()=>this.archiveAfterHoursField().getAttribute('placeholder')).toMatch(pattern);
3196
+ return this;
3197
+ }
3198
+ async expectArchiveAfterMinToBe(min) {
3199
+ await (0, $hOLA6$expect)(this.archiveAfterHoursField()).toHaveAttribute('min', min);
3200
+ return this;
3201
+ }
3202
+ // The hint is only shown in the info-icon tooltip, never as a help block below the field.
3203
+ async expectNoArchiveAfterHelpBlock() {
3204
+ await (0, $hOLA6$expect)(this.page.locator('.help-block').filter({
3205
+ hasText: 'archive'
3206
+ })).toHaveCount(0);
3207
+ return this;
3208
+ }
3209
+ async expectArchiveAfterTooltipToContain(text) {
3210
+ await (0, $hOLA6$expect)(this.page.locator('label[for="release-form-archive-after-hours"] .info-icon')).toHaveAttribute('uib-tooltip', new RegExp(text));
3211
+ return this;
3212
+ }
3213
+ async setArchiveAfterHours(hours) {
3214
+ const field = this.archiveAfterHoursField();
3215
+ await field.click();
3216
+ await field.fill('');
3217
+ await field.fill(`${hours}`);
3218
+ await field.blur();
3219
+ return this;
3220
+ }
3221
+ async expectArchiveAfterHoursToBe(hours) {
3222
+ await (0, $hOLA6$expect)(this.archiveAfterHoursField()).toHaveValue(`${hours}`);
3223
+ return this;
3224
+ }
3127
3225
  }
3128
3226
 
3129
3227