@digital-ai/devops-page-object-release 0.0.108 → 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/CHANGELOG.md +6 -0
- package/dist/main.js +49 -20
- package/dist/main.js.map +1 -1
- package/dist/module.js +49 -20
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/main.js
CHANGED
|
@@ -6675,14 +6675,15 @@ class $00fc48341ebf7de4$export$2fb4351c41ce6e7a extends (0, $f8721861c660dd88$ex
|
|
|
6675
6675
|
await this.page.bringToFront();
|
|
6676
6676
|
}
|
|
6677
6677
|
async clickAvatarIcon(username) {
|
|
6678
|
-
await this.page.
|
|
6678
|
+
await this.page.getByRole('button', {
|
|
6679
|
+
name: username,
|
|
6679
6680
|
exact: true
|
|
6680
6681
|
}).click();
|
|
6681
6682
|
}
|
|
6682
|
-
async verifyUser(userFullName) {
|
|
6683
|
+
async verifyUser(username, userFullName) {
|
|
6683
6684
|
await this.page.locator('li').getByLabel(userFullName).click();
|
|
6684
6685
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole('heading', {
|
|
6685
|
-
name:
|
|
6686
|
+
name: `Account details for ${username}`
|
|
6686
6687
|
})).toBeVisible();
|
|
6687
6688
|
}
|
|
6688
6689
|
async clickAccessTokens() {
|
|
@@ -6770,12 +6771,21 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
|
|
|
6770
6771
|
super(page);
|
|
6771
6772
|
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
6772
6773
|
}
|
|
6774
|
+
getConfirmPasswordHelperTextSelector() {
|
|
6775
|
+
return '#confirmPassword-helper-text';
|
|
6776
|
+
}
|
|
6773
6777
|
async openProfile() {
|
|
6774
6778
|
await this.util.openSideNavMenu('Profile');
|
|
6775
6779
|
}
|
|
6776
6780
|
async openAccessToken() {
|
|
6777
6781
|
await this.util.openSideNavMenu('Access tokens');
|
|
6778
6782
|
}
|
|
6783
|
+
async expectResetButtonEnabled() {
|
|
6784
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('button:has-text("Reset")')).toBeEnabled({
|
|
6785
|
+
timeout: 5000
|
|
6786
|
+
});
|
|
6787
|
+
return this;
|
|
6788
|
+
}
|
|
6779
6789
|
async expectEmailDefined(email) {
|
|
6780
6790
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('#email')).toHaveValue(email);
|
|
6781
6791
|
return this;
|
|
@@ -6784,59 +6794,78 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
|
|
|
6784
6794
|
return this.expectEmailDefined('');
|
|
6785
6795
|
}
|
|
6786
6796
|
async expectFullNameDefined(fullName) {
|
|
6787
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('#
|
|
6797
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('#fullName')).toHaveValue(fullName);
|
|
6798
|
+
return this;
|
|
6799
|
+
}
|
|
6800
|
+
async expectConfirmPasswordErrorVisible() {
|
|
6801
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(this.getConfirmPasswordHelperTextSelector())).toBeVisible();
|
|
6802
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(this.getConfirmPasswordHelperTextSelector())).toContainText('Passwords do not match');
|
|
6803
|
+
return this;
|
|
6804
|
+
}
|
|
6805
|
+
async expectConfirmPasswordErrorNotVisible() {
|
|
6806
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(this.getConfirmPasswordHelperTextSelector())).toBeHidden();
|
|
6788
6807
|
return this;
|
|
6789
6808
|
}
|
|
6790
6809
|
async expectNoFullNameDefined() {
|
|
6791
6810
|
return this.expectFullNameDefined('');
|
|
6792
6811
|
}
|
|
6793
6812
|
async expectPasswordNotToBe(password) {
|
|
6794
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('
|
|
6813
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('#password')).not.toHaveValue(password);
|
|
6795
6814
|
return this;
|
|
6796
6815
|
}
|
|
6797
6816
|
async expectDateFormatToBe(dateFormat) {
|
|
6798
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('
|
|
6817
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('input[name="dateFormat"]')).toHaveValue(dateFormat);
|
|
6799
6818
|
return this;
|
|
6800
6819
|
}
|
|
6801
6820
|
async expectTimeFormatToBe(timeFormat) {
|
|
6802
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('
|
|
6821
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('input[name="timeFormat"]')).toHaveValue(timeFormat);
|
|
6803
6822
|
return this;
|
|
6804
6823
|
}
|
|
6805
6824
|
async expectFirstDayOfWeekToBe(firstDayOfWeek) {
|
|
6806
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('
|
|
6825
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('input[name="firstDayOfWeek"]')).toHaveValue(firstDayOfWeek);
|
|
6826
|
+
return this;
|
|
6827
|
+
}
|
|
6828
|
+
async clickOnSaveButton() {
|
|
6829
|
+
await this.page.locator('button:has-text("Save")').click();
|
|
6807
6830
|
return this;
|
|
6808
6831
|
}
|
|
6809
6832
|
async save() {
|
|
6810
|
-
await this.
|
|
6811
|
-
await this.page.locator('.
|
|
6812
|
-
|
|
6813
|
-
|
|
6833
|
+
await this.clickOnSaveButton();
|
|
6834
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.dot-snackbar')).toContainText('Changes saved successfully');
|
|
6835
|
+
return this;
|
|
6836
|
+
}
|
|
6837
|
+
async clearEmailInput() {
|
|
6838
|
+
await this.page.locator('#email').fill('');
|
|
6814
6839
|
return this;
|
|
6815
6840
|
}
|
|
6816
6841
|
async setEmail(email) {
|
|
6817
6842
|
await this.page.locator('#email').fill(email);
|
|
6843
|
+
await this.expectEmailDefined(email);
|
|
6844
|
+
await this.expectResetButtonEnabled();
|
|
6818
6845
|
return this.save();
|
|
6819
6846
|
}
|
|
6820
6847
|
async setFullName(fullName) {
|
|
6821
|
-
await this.page.locator('#
|
|
6848
|
+
await this.page.locator('#fullName').fill(fullName);
|
|
6849
|
+
await this.expectResetButtonEnabled();
|
|
6822
6850
|
return this.save();
|
|
6823
6851
|
}
|
|
6824
6852
|
async setPassword(previousPassword, password) {
|
|
6825
6853
|
await this.page.locator('#previousPassword').fill(previousPassword);
|
|
6826
|
-
await this.page.locator('
|
|
6827
|
-
await this.
|
|
6854
|
+
await this.page.locator('#password').fill(password);
|
|
6855
|
+
await this.expectConfirmPasswordErrorVisible();
|
|
6856
|
+
const confirmPasswordInput = this.page.locator('#confirmPassword');
|
|
6857
|
+
await confirmPasswordInput.fill(password);
|
|
6858
|
+
await confirmPasswordInput.blur();
|
|
6859
|
+
await this.expectConfirmPasswordErrorNotVisible();
|
|
6828
6860
|
return this.save();
|
|
6829
6861
|
}
|
|
6830
6862
|
async refresh() {
|
|
6831
6863
|
await this.page.reload();
|
|
6832
|
-
await this.page.waitForSelector('
|
|
6864
|
+
await this.page.waitForSelector('.profile-form');
|
|
6833
6865
|
return this;
|
|
6834
6866
|
}
|
|
6835
6867
|
async editUserProfile(email) {
|
|
6836
|
-
await this.
|
|
6837
|
-
await this.page.getByLabel('Email address').fill(email);
|
|
6838
|
-
await this.page.getByText('Save').click();
|
|
6839
|
-
(0, $kKeXs$playwrighttest.expect)(await this.page.locator('.saved-text').textContent()).toContain('Last saved on ');
|
|
6868
|
+
await this.setEmail(email);
|
|
6840
6869
|
}
|
|
6841
6870
|
async generateNewAccessToken(tokenName, expiryOptions) {
|
|
6842
6871
|
await this.page.getByRole('button', {
|