@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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 1.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - ab8b01c: S-129234: Fix locators for searchBy
8
+
9
+ ## 1.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 05e39e6: S-131806 : fix selectors for ci option for new grouped selection UI
14
+
3
15
  ## 1.0.1
4
16
 
5
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -2190,12 +2190,24 @@ class $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e extends (0, $f8721861c660dd88$ex
2190
2190
  }
2191
2191
  async getAllOptionsFromCi(propertyName) {
2192
2192
  await this.railLocator.locator(`input[id="${propertyName}"]`).click();
2193
- return this.railLocator.locator(`.dot-popper ul li`).allInnerTexts();
2193
+ const options = this.railLocator.locator(`.dot-popper .connection-children-list > li[role="option"]`);
2194
+ const count = await options.count();
2195
+ if (count === 0) {
2196
+ // Fallback for dropdowns without folder grouping
2197
+ const texts = await this.railLocator.locator(`.dot-popper ul li[role="option"]`).allInnerTexts();
2198
+ return texts.map((text)=>text.split('\n')[0].trim());
2199
+ }
2200
+ const titles = [];
2201
+ for(let i = 0; i < count; i++){
2202
+ const text = await options.nth(i).innerText();
2203
+ titles.push(text.split('\n')[0].trim());
2204
+ }
2205
+ return titles;
2194
2206
  }
2195
2207
  async setValueFromCi(propertyName, value) {
2196
2208
  await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
2197
2209
  await this.railLocator.locator(`input[id="${propertyName}"]`).click();
2198
- await this.railLocator.locator(`.dot-popper ul li`, {
2210
+ await this.railLocator.locator(`.dot-popper ul li[role="option"]`, {
2199
2211
  hasText: value
2200
2212
  }).click();
2201
2213
  }
@@ -2252,12 +2264,24 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2252
2264
  }
2253
2265
  async getAllOptionsFromCi(propertyName) {
2254
2266
  await this.railLocator.locator(`input[id="${propertyName}"]`).click();
2255
- return this.railLocator.locator(`.dot-popper ul li`).allInnerTexts();
2267
+ const options = this.railLocator.locator(`.dot-popper .connection-children-list > li[role="option"]`);
2268
+ const count = await options.count();
2269
+ if (count === 0) {
2270
+ // Fallback for dropdowns without folder grouping
2271
+ const texts = await this.railLocator.locator(`.dot-popper ul li[role="option"]`).allInnerTexts();
2272
+ return texts.map((text)=>text.split('\n')[0].trim());
2273
+ }
2274
+ const titles = [];
2275
+ for(let i = 0; i < count; i++){
2276
+ const text = await options.nth(i).innerText();
2277
+ titles.push(text.split('\n')[0].trim());
2278
+ }
2279
+ return titles;
2256
2280
  }
2257
2281
  async setValueFromCi(propertyName, value) {
2258
2282
  await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
2259
2283
  await this.railLocator.locator(`input[id="${propertyName}"]`).click();
2260
- await this.railLocator.locator(`.dot-popper ul li`, {
2284
+ await this.railLocator.locator(`.dot-popper ul li[role="option"]`, {
2261
2285
  hasText: value
2262
2286
  }).click();
2263
2287
  }
@@ -6918,6 +6942,20 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
6918
6942
  }).click();
6919
6943
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(tokenName)).not.toBeVisible();
6920
6944
  }
6945
+ async copyAccessToken() {
6946
+ const origin = new URL(this.page.url()).origin;
6947
+ await this.page.context().grantPermissions([
6948
+ 'clipboard-read',
6949
+ 'clipboard-write'
6950
+ ], {
6951
+ origin: origin
6952
+ });
6953
+ await this.page.getByRole('button', {
6954
+ name: 'Copy token'
6955
+ }).click();
6956
+ const token = await this.page.evaluate(async ()=>navigator.clipboard.readText());
6957
+ return token;
6958
+ }
6921
6959
  async setDefaultGlobalPage(option) {
6922
6960
  const dropdown = this.page.getByRole('combobox', {
6923
6961
  name: 'Default global page select'
@@ -8913,8 +8951,12 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
8913
8951
  await this.page.goto(url);
8914
8952
  }
8915
8953
  async searchBy(criteria) {
8916
- await this.page.locator('input#title-filter').clear();
8917
- await this.page.locator('input#title-filter').fill(criteria);
8954
+ await this.page.getByRole('textbox', {
8955
+ name: 'Filter by title'
8956
+ }).click();
8957
+ await this.page.getByRole('textbox', {
8958
+ name: 'Filter by title'
8959
+ }).fill(criteria);
8918
8960
  }
8919
8961
  async copy(originTitle, targetTitle) {
8920
8962
  await this.page.locator('.title').filter({