@digital-ai/devops-page-object-release 1.0.0 → 1.0.2
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 +12 -0
- package/dist/main.js +21 -9
- package/dist/main.js.map +1 -1
- package/dist/module.js +21 -9
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -1256,12 +1256,13 @@ class $e44e9af564fb00f7$export$64c93bc7fb9ca44e extends (0, $9626bc9256ce31f7$ex
|
|
|
1256
1256
|
}
|
|
1257
1257
|
async getAllOptionsFromCi(propertyName) {
|
|
1258
1258
|
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1259
|
-
|
|
1259
|
+
const texts = await this.railLocator.locator(`.dot-popper ul li[role="option"]`).allInnerTexts();
|
|
1260
|
+
return texts.map((text)=>text.split('\n')[0].trim());
|
|
1260
1261
|
}
|
|
1261
1262
|
async setValueFromCi(propertyName, value) {
|
|
1262
1263
|
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
1263
1264
|
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1264
|
-
await this.railLocator.locator(`.dot-popper ul li`, {
|
|
1265
|
+
await this.railLocator.locator(`.dot-popper ul li[role="option"]`, {
|
|
1265
1266
|
hasText: value
|
|
1266
1267
|
}).click();
|
|
1267
1268
|
}
|
|
@@ -1318,12 +1319,13 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
1318
1319
|
}
|
|
1319
1320
|
async getAllOptionsFromCi(propertyName) {
|
|
1320
1321
|
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1321
|
-
|
|
1322
|
+
const texts = await this.railLocator.locator(`.dot-popper ul li[role="option"]`).allInnerTexts();
|
|
1323
|
+
return texts.map((text)=>text.split('\n')[0].trim());
|
|
1322
1324
|
}
|
|
1323
1325
|
async setValueFromCi(propertyName, value) {
|
|
1324
1326
|
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
1325
1327
|
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1326
|
-
await this.railLocator.locator(`.dot-popper ul li`, {
|
|
1328
|
+
await this.railLocator.locator(`.dot-popper ul li[role="option"]`, {
|
|
1327
1329
|
hasText: value
|
|
1328
1330
|
}).click();
|
|
1329
1331
|
}
|
|
@@ -5902,11 +5904,21 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
|
|
|
5902
5904
|
return this;
|
|
5903
5905
|
}
|
|
5904
5906
|
async save() {
|
|
5905
|
-
const
|
|
5906
|
-
await
|
|
5907
|
+
const saveButton = this.page.getByTestId('save-button');
|
|
5908
|
+
await saveButton.waitFor({
|
|
5909
|
+
state: 'visible',
|
|
5910
|
+
timeout: 5000
|
|
5911
|
+
});
|
|
5912
|
+
await (0, $hOLA6$expect)(saveButton).toBeEnabled();
|
|
5913
|
+
await saveButton.click();
|
|
5914
|
+
// Wait for the toast or saved text to appear
|
|
5915
|
+
const toast = this.page.getByText('Changes saved successfully').first();
|
|
5916
|
+
await toast.waitFor({
|
|
5917
|
+
state: 'visible',
|
|
5907
5918
|
timeout: 5000
|
|
5919
|
+
}).catch(()=>{
|
|
5920
|
+
undefined;
|
|
5908
5921
|
});
|
|
5909
|
-
await saveBtn.click();
|
|
5910
5922
|
return this;
|
|
5911
5923
|
}
|
|
5912
5924
|
async clearEmailInput() {
|
|
@@ -5990,7 +6002,7 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
|
|
|
5990
6002
|
await (0, $hOLA6$expect)(dropdown).toHaveText(option);
|
|
5991
6003
|
await (0, $hOLA6$expect)(saveButton).toBeEnabled();
|
|
5992
6004
|
await saveButton.click();
|
|
5993
|
-
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully')).toBeVisible();
|
|
6005
|
+
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully').first()).toBeVisible();
|
|
5994
6006
|
}
|
|
5995
6007
|
async setDefaultFolderPage(option) {
|
|
5996
6008
|
const dropdown = this.page.getByRole('combobox', {
|
|
@@ -6010,7 +6022,7 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
|
|
|
6010
6022
|
await (0, $hOLA6$expect)(dropdown).toHaveText(option);
|
|
6011
6023
|
await (0, $hOLA6$expect)(saveButton).toBeEnabled();
|
|
6012
6024
|
await saveButton.click();
|
|
6013
|
-
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully')).toBeVisible();
|
|
6025
|
+
await (0, $hOLA6$expect)(this.page.getByText('Changes saved successfully').first()).toBeVisible();
|
|
6014
6026
|
}
|
|
6015
6027
|
}
|
|
6016
6028
|
|