@digital-ai/devops-page-object-release 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.
package/dist/module.js CHANGED
@@ -3162,7 +3162,7 @@ class $96c6280ff1c47b81$export$3bc3e140e0dcb075 extends (0, $9626bc9256ce31f7$ex
3162
3162
  class $19b7e7e46cfe3be0$export$649fde34d823ece7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
3163
3163
  constructor(page){
3164
3164
  super(page);
3165
- this.commentBox = this.page.locator(`.input-block-level`);
3165
+ this.commentBox = this.page.locator(`textarea[name="comment"]`);
3166
3166
  this.contextMenuButton = this.page.locator('#context-menu-container li');
3167
3167
  this.completeButton = this.page.getByTestId('release-grid-complete-btn');
3168
3168
  this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
@@ -3332,7 +3332,7 @@ class $19b7e7e46cfe3be0$export$649fde34d823ece7 extends (0, $9626bc9256ce31f7$ex
3332
3332
  'Reopen',
3333
3333
  'Retry',
3334
3334
  'Fail'
3335
- ].includes(menuItem)) await this.commentBox.fill('Automation Test Comment');
3335
+ ].includes(menuItem)) await this.page.locator(`.input-block-level`).fill('Automation Test Comment');
3336
3336
  await this.page.getByRole('button', {
3337
3337
  name: menuItem,
3338
3338
  exact: true
@@ -3971,7 +3971,7 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
3971
3971
  this.phaseLocator = page.locator('.phase', {
3972
3972
  hasText: phaseName
3973
3973
  });
3974
- this.commentBox = this.page.locator(`.input-block-level`);
3974
+ this.commentBox = this.page.locator(`textarea[name="comment"]`);
3975
3975
  this.contextMenuButton = this.page.locator('#context-menu-container li');
3976
3976
  this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
3977
3977
  }
@@ -5741,14 +5741,15 @@ class $aa1ba8c8de3c0679$export$2fb4351c41ce6e7a extends (0, $9626bc9256ce31f7$ex
5741
5741
  await this.page.bringToFront();
5742
5742
  }
5743
5743
  async clickAvatarIcon(username) {
5744
- await this.page.getByLabel(username, {
5744
+ await this.page.getByRole('button', {
5745
+ name: username,
5745
5746
  exact: true
5746
5747
  }).click();
5747
5748
  }
5748
- async verifyUser(userFullName) {
5749
+ async verifyUser(username, userFullName) {
5749
5750
  await this.page.locator('li').getByLabel(userFullName).click();
5750
5751
  await (0, $hOLA6$expect)(this.page.getByRole('heading', {
5751
- name: 'Personal settings for admin'
5752
+ name: `Account details for ${username}`
5752
5753
  })).toBeVisible();
5753
5754
  }
5754
5755
  async clickAccessTokens() {
@@ -5836,12 +5837,21 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
5836
5837
  super(page);
5837
5838
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
5838
5839
  }
5840
+ getConfirmPasswordHelperTextSelector() {
5841
+ return '#confirmPassword-helper-text';
5842
+ }
5839
5843
  async openProfile() {
5840
5844
  await this.util.openSideNavMenu('Profile');
5841
5845
  }
5842
5846
  async openAccessToken() {
5843
5847
  await this.util.openSideNavMenu('Access tokens');
5844
5848
  }
5849
+ async expectResetButtonEnabled() {
5850
+ await (0, $hOLA6$expect)(this.page.locator('button:has-text("Reset")')).toBeEnabled({
5851
+ timeout: 5000
5852
+ });
5853
+ return this;
5854
+ }
5845
5855
  async expectEmailDefined(email) {
5846
5856
  await (0, $hOLA6$expect)(this.page.locator('#email')).toHaveValue(email);
5847
5857
  return this;
@@ -5850,59 +5860,78 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
5850
5860
  return this.expectEmailDefined('');
5851
5861
  }
5852
5862
  async expectFullNameDefined(fullName) {
5853
- await (0, $hOLA6$expect)(this.page.locator('#full-name')).toHaveValue(fullName);
5863
+ await (0, $hOLA6$expect)(this.page.locator('#fullName')).toHaveValue(fullName);
5864
+ return this;
5865
+ }
5866
+ async expectConfirmPasswordErrorVisible() {
5867
+ await (0, $hOLA6$expect)(this.page.locator(this.getConfirmPasswordHelperTextSelector())).toBeVisible();
5868
+ await (0, $hOLA6$expect)(this.page.locator(this.getConfirmPasswordHelperTextSelector())).toContainText('Passwords do not match');
5869
+ return this;
5870
+ }
5871
+ async expectConfirmPasswordErrorNotVisible() {
5872
+ await (0, $hOLA6$expect)(this.page.locator(this.getConfirmPasswordHelperTextSelector())).toBeHidden();
5854
5873
  return this;
5855
5874
  }
5856
5875
  async expectNoFullNameDefined() {
5857
5876
  return this.expectFullNameDefined('');
5858
5877
  }
5859
5878
  async expectPasswordNotToBe(password) {
5860
- await (0, $hOLA6$expect)(this.page.locator('input[data-test="password-input"]')).not.toHaveValue(password);
5879
+ await (0, $hOLA6$expect)(this.page.locator('#password')).not.toHaveValue(password);
5861
5880
  return this;
5862
5881
  }
5863
5882
  async expectDateFormatToBe(dateFormat) {
5864
- await (0, $hOLA6$expect)(this.page.locator('select[ng-model="$ctrl.profile.dateFormat"]')).toHaveValue(dateFormat);
5883
+ await (0, $hOLA6$expect)(this.page.locator('input[name="dateFormat"]')).toHaveValue(dateFormat);
5865
5884
  return this;
5866
5885
  }
5867
5886
  async expectTimeFormatToBe(timeFormat) {
5868
- await (0, $hOLA6$expect)(this.page.locator('select[ng-model="$ctrl.profile.timeFormat"]')).toHaveValue(timeFormat);
5887
+ await (0, $hOLA6$expect)(this.page.locator('input[name="timeFormat"]')).toHaveValue(timeFormat);
5869
5888
  return this;
5870
5889
  }
5871
5890
  async expectFirstDayOfWeekToBe(firstDayOfWeek) {
5872
- await (0, $hOLA6$expect)(this.page.locator('select[ng-model="$ctrl.profile.firstDayOfWeek"]')).toHaveValue(firstDayOfWeek);
5891
+ await (0, $hOLA6$expect)(this.page.locator('input[name="firstDayOfWeek"]')).toHaveValue(firstDayOfWeek);
5892
+ return this;
5893
+ }
5894
+ async clickOnSaveButton() {
5895
+ await this.page.locator('button:has-text("Save")').click();
5873
5896
  return this;
5874
5897
  }
5875
5898
  async save() {
5876
- await this.page.locator('action-toolbar button:has-text("Save"):enabled').click();
5877
- await this.page.locator('.saved-text').waitFor({
5878
- state: 'visible'
5879
- });
5899
+ await this.clickOnSaveButton();
5900
+ await (0, $hOLA6$expect)(this.page.locator('.dot-snackbar')).toContainText('Changes saved successfully');
5901
+ return this;
5902
+ }
5903
+ async clearEmailInput() {
5904
+ await this.page.locator('#email').fill('');
5880
5905
  return this;
5881
5906
  }
5882
5907
  async setEmail(email) {
5883
5908
  await this.page.locator('#email').fill(email);
5909
+ await this.expectEmailDefined(email);
5910
+ await this.expectResetButtonEnabled();
5884
5911
  return this.save();
5885
5912
  }
5886
5913
  async setFullName(fullName) {
5887
- await this.page.locator('#full-name').fill(fullName);
5914
+ await this.page.locator('#fullName').fill(fullName);
5915
+ await this.expectResetButtonEnabled();
5888
5916
  return this.save();
5889
5917
  }
5890
5918
  async setPassword(previousPassword, password) {
5891
5919
  await this.page.locator('#previousPassword').fill(previousPassword);
5892
- await this.page.locator('input[data-test="password-input"]').fill(password);
5893
- await this.page.locator('#passwordConfirmation').fill(password);
5920
+ await this.page.locator('#password').fill(password);
5921
+ await this.expectConfirmPasswordErrorVisible();
5922
+ const confirmPasswordInput = this.page.locator('#confirmPassword');
5923
+ await confirmPasswordInput.fill(password);
5924
+ await confirmPasswordInput.blur();
5925
+ await this.expectConfirmPasswordErrorNotVisible();
5894
5926
  return this.save();
5895
5927
  }
5896
5928
  async refresh() {
5897
5929
  await this.page.reload();
5898
- await this.page.waitForSelector('#profileForm');
5930
+ await this.page.waitForSelector('.profile-form');
5899
5931
  return this;
5900
5932
  }
5901
5933
  async editUserProfile(email) {
5902
- await this.page.getByLabel('Email address').click();
5903
- await this.page.getByLabel('Email address').fill(email);
5904
- await this.page.getByText('Save').click();
5905
- (0, $hOLA6$expect)(await this.page.locator('.saved-text').textContent()).toContain('Last saved on ');
5934
+ await this.setEmail(email);
5906
5935
  }
5907
5936
  async generateNewAccessToken(tokenName, expiryOptions) {
5908
5937
  await this.page.getByRole('button', {
@@ -7076,7 +7105,7 @@ class $f48771b486a3eb8f$var$DeleteVariableModel extends (0, $9626bc9256ce31f7$ex
7076
7105
  class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $59c1d01bded91449$export$48c33d2414f51608) {
7077
7106
  constructor(page){
7078
7107
  super(page);
7079
- this.commentBox = this.page.locator(`.input-block-level`);
7108
+ this.commentBox = this.page.locator(`textarea[name="comment"]`);
7080
7109
  this.gridView = new $c37c93912f458e81$var$GridView(page);
7081
7110
  this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
7082
7111
  }
@@ -7123,8 +7152,7 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $59c1d01bded91449$ex
7123
7152
  await this.commentBox.click();
7124
7153
  await this.commentBox.fill(comment);
7125
7154
  await this.page.getByRole('button', {
7126
- name: 'Fail',
7127
- exact: true
7155
+ name: 'Fail'
7128
7156
  }).click();
7129
7157
  }
7130
7158
  async waitForTaskFailed(taskName) {
@@ -7340,8 +7368,8 @@ class $c37c93912f458e81$var$GridView extends (0, $9626bc9256ce31f7$export$2b65d1
7340
7368
  hasText: action
7341
7369
  }).click();
7342
7370
  if (action === 'Complete') {
7343
- await this.page.locator('#modal textarea[mentio]').fill('complete');
7344
- await this.page.locator('#modal button.primary').filter({
7371
+ await this.page.locator('.common-task-dialog textarea[name="comment"]').fill('complete');
7372
+ await this.page.locator('.common-task-dialog button').filter({
7345
7373
  hasText: 'Complete'
7346
7374
  }).click();
7347
7375
  return this;