@digital-ai/devops-page-object-release 1.0.1 → 1.0.3
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 +48 -6
- package/dist/main.js.map +1 -1
- package/dist/module.js +48 -6
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/module.js
CHANGED
|
@@ -1256,12 +1256,24 @@ 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 options = this.railLocator.locator(`.dot-popper .connection-children-list > li[role="option"]`);
|
|
1260
|
+
const count = await options.count();
|
|
1261
|
+
if (count === 0) {
|
|
1262
|
+
// Fallback for dropdowns without folder grouping
|
|
1263
|
+
const texts = await this.railLocator.locator(`.dot-popper ul li[role="option"]`).allInnerTexts();
|
|
1264
|
+
return texts.map((text)=>text.split('\n')[0].trim());
|
|
1265
|
+
}
|
|
1266
|
+
const titles = [];
|
|
1267
|
+
for(let i = 0; i < count; i++){
|
|
1268
|
+
const text = await options.nth(i).innerText();
|
|
1269
|
+
titles.push(text.split('\n')[0].trim());
|
|
1270
|
+
}
|
|
1271
|
+
return titles;
|
|
1260
1272
|
}
|
|
1261
1273
|
async setValueFromCi(propertyName, value) {
|
|
1262
1274
|
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
1263
1275
|
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1264
|
-
await this.railLocator.locator(`.dot-popper ul li`, {
|
|
1276
|
+
await this.railLocator.locator(`.dot-popper ul li[role="option"]`, {
|
|
1265
1277
|
hasText: value
|
|
1266
1278
|
}).click();
|
|
1267
1279
|
}
|
|
@@ -1318,12 +1330,24 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
1318
1330
|
}
|
|
1319
1331
|
async getAllOptionsFromCi(propertyName) {
|
|
1320
1332
|
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1321
|
-
|
|
1333
|
+
const options = this.railLocator.locator(`.dot-popper .connection-children-list > li[role="option"]`);
|
|
1334
|
+
const count = await options.count();
|
|
1335
|
+
if (count === 0) {
|
|
1336
|
+
// Fallback for dropdowns without folder grouping
|
|
1337
|
+
const texts = await this.railLocator.locator(`.dot-popper ul li[role="option"]`).allInnerTexts();
|
|
1338
|
+
return texts.map((text)=>text.split('\n')[0].trim());
|
|
1339
|
+
}
|
|
1340
|
+
const titles = [];
|
|
1341
|
+
for(let i = 0; i < count; i++){
|
|
1342
|
+
const text = await options.nth(i).innerText();
|
|
1343
|
+
titles.push(text.split('\n')[0].trim());
|
|
1344
|
+
}
|
|
1345
|
+
return titles;
|
|
1322
1346
|
}
|
|
1323
1347
|
async setValueFromCi(propertyName, value) {
|
|
1324
1348
|
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
1325
1349
|
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1326
|
-
await this.railLocator.locator(`.dot-popper ul li`, {
|
|
1350
|
+
await this.railLocator.locator(`.dot-popper ul li[role="option"]`, {
|
|
1327
1351
|
hasText: value
|
|
1328
1352
|
}).click();
|
|
1329
1353
|
}
|
|
@@ -5984,6 +6008,20 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
|
|
|
5984
6008
|
}).click();
|
|
5985
6009
|
await (0, $hOLA6$expect)(this.page.getByText(tokenName)).not.toBeVisible();
|
|
5986
6010
|
}
|
|
6011
|
+
async copyAccessToken() {
|
|
6012
|
+
const origin = new URL(this.page.url()).origin;
|
|
6013
|
+
await this.page.context().grantPermissions([
|
|
6014
|
+
'clipboard-read',
|
|
6015
|
+
'clipboard-write'
|
|
6016
|
+
], {
|
|
6017
|
+
origin: origin
|
|
6018
|
+
});
|
|
6019
|
+
await this.page.getByRole('button', {
|
|
6020
|
+
name: 'Copy token'
|
|
6021
|
+
}).click();
|
|
6022
|
+
const token = await this.page.evaluate(async ()=>navigator.clipboard.readText());
|
|
6023
|
+
return token;
|
|
6024
|
+
}
|
|
5987
6025
|
async setDefaultGlobalPage(option) {
|
|
5988
6026
|
const dropdown = this.page.getByRole('combobox', {
|
|
5989
6027
|
name: 'Default global page select'
|
|
@@ -7979,8 +8017,12 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
|
|
|
7979
8017
|
await this.page.goto(url);
|
|
7980
8018
|
}
|
|
7981
8019
|
async searchBy(criteria) {
|
|
7982
|
-
await this.page.
|
|
7983
|
-
|
|
8020
|
+
await this.page.getByRole('textbox', {
|
|
8021
|
+
name: 'Filter by title'
|
|
8022
|
+
}).click();
|
|
8023
|
+
await this.page.getByRole('textbox', {
|
|
8024
|
+
name: 'Filter by title'
|
|
8025
|
+
}).fill(criteria);
|
|
7984
8026
|
}
|
|
7985
8027
|
async copy(originTitle, targetTitle) {
|
|
7986
8028
|
await this.page.locator('.title').filter({
|