@digital-ai/devops-page-object-release 1.0.2 → 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/dist/module.js CHANGED
@@ -1256,8 +1256,19 @@ 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
- const texts = await this.railLocator.locator(`.dot-popper ul li[role="option"]`).allInnerTexts();
1260
- return texts.map((text)=>text.split('\n')[0].trim());
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;
1261
1272
  }
1262
1273
  async setValueFromCi(propertyName, value) {
1263
1274
  await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
@@ -1319,8 +1330,19 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1319
1330
  }
1320
1331
  async getAllOptionsFromCi(propertyName) {
1321
1332
  await this.railLocator.locator(`input[id="${propertyName}"]`).click();
1322
- const texts = await this.railLocator.locator(`.dot-popper ul li[role="option"]`).allInnerTexts();
1323
- return texts.map((text)=>text.split('\n')[0].trim());
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;
1324
1346
  }
1325
1347
  async setValueFromCi(propertyName, value) {
1326
1348
  await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
@@ -5986,6 +6008,20 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
5986
6008
  }).click();
5987
6009
  await (0, $hOLA6$expect)(this.page.getByText(tokenName)).not.toBeVisible();
5988
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
+ }
5989
6025
  async setDefaultGlobalPage(option) {
5990
6026
  const dropdown = this.page.getByRole('combobox', {
5991
6027
  name: 'Default global page select'
@@ -7981,8 +8017,12 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
7981
8017
  await this.page.goto(url);
7982
8018
  }
7983
8019
  async searchBy(criteria) {
7984
- await this.page.locator('input#title-filter').clear();
7985
- await this.page.locator('input#title-filter').fill(criteria);
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);
7986
8026
  }
7987
8027
  async copy(originTitle, targetTitle) {
7988
8028
  await this.page.locator('.title').filter({