@digital-ai/devops-page-object-release 1.0.2 → 1.0.4

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();
@@ -3400,7 +3422,7 @@ class $19b7e7e46cfe3be0$export$649fde34d823ece7 extends (0, $9626bc9256ce31f7$ex
3400
3422
  await this.closeContextMenu();
3401
3423
  }
3402
3424
  async closeContextMenu() {
3403
- await this.page.locator('#release-header').click();
3425
+ await this.page.locator('.release-sidebar-header h1').click();
3404
3426
  }
3405
3427
  async expectDisabledActions(actionName) {
3406
3428
  await (0, $hOLA6$expect)(this.page.getByTestId(`release-grid-${actionName}-btn`)).toBeDisabled();
@@ -3874,8 +3896,8 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
3874
3896
  })).toBeVisible();
3875
3897
  return this;
3876
3898
  }
3877
- async expectTitleToBeInBreadcrumbLink(title) {
3878
- await (0, $hOLA6$expect)(this.page.locator('.dot-breadcrumbs a', {
3899
+ async expectTitleInSidebar(title) {
3900
+ await (0, $hOLA6$expect)(this.page.locator('.release-sidebar-header h1', {
3879
3901
  hasText: title
3880
3902
  })).toBeVisible();
3881
3903
  }
@@ -5550,6 +5572,15 @@ class $2174535b78371022$export$36d69433c4f81145 extends (0, $9626bc9256ce31f7$ex
5550
5572
  await (0, $hOLA6$expect)(this.viewModeButton).toBeVisible();
5551
5573
  await this.viewModeButton.click();
5552
5574
  }
5575
+ async verifyDefaultTilesPresent(expectedTileNames) {
5576
+ const homeTiles = this.page.locator('.xlr-tile-container[data-title]');
5577
+ await (0, $hOLA6$expect)(homeTiles).toHaveCount(expectedTileNames.length);
5578
+ for (const tileName of expectedTileNames){
5579
+ const tile = this.page.locator(`.xlr-tile-container[data-title="${tileName}"]`);
5580
+ await (0, $hOLA6$expect)(tile).toHaveCount(1);
5581
+ await (0, $hOLA6$expect)(tile).toBeVisible();
5582
+ }
5583
+ }
5553
5584
  async addReleaseTiles() {
5554
5585
  await this.configureButton.click();
5555
5586
  await this.page.getByRole('button', {
@@ -5897,6 +5928,18 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
5897
5928
  await (0, $hOLA6$expect)(this.page.locator('input[name="firstDayOfWeek"]')).toHaveValue(firstDayOfWeek);
5898
5929
  return this;
5899
5930
  }
5931
+ async setTimezone(timezone) {
5932
+ await this.page.locator('input[name="Timezone"]').fill(timezone);
5933
+ await this.page.locator('.dot-popper', {
5934
+ hasText: timezone
5935
+ }).click();
5936
+ return this;
5937
+ }
5938
+ async expectTimezonePillToContain(text, contain = true) {
5939
+ if (contain) await (0, $hOLA6$expect)(this.page.locator('action-toolbar .dot-pill')).toContainText(text);
5940
+ else await (0, $hOLA6$expect)(this.page.locator('action-toolbar .dot-pill')).not.toContainText(text);
5941
+ return this;
5942
+ }
5900
5943
  async clickOnSaveButton() {
5901
5944
  await this.page.getByRole('button', {
5902
5945
  name: 'Save'
@@ -5986,6 +6029,20 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
5986
6029
  }).click();
5987
6030
  await (0, $hOLA6$expect)(this.page.getByText(tokenName)).not.toBeVisible();
5988
6031
  }
6032
+ async copyAccessToken() {
6033
+ const origin = new URL(this.page.url()).origin;
6034
+ await this.page.context().grantPermissions([
6035
+ 'clipboard-read',
6036
+ 'clipboard-write'
6037
+ ], {
6038
+ origin: origin
6039
+ });
6040
+ await this.page.getByRole('button', {
6041
+ name: 'Copy token'
6042
+ }).click();
6043
+ const token = await this.page.evaluate(async ()=>navigator.clipboard.readText());
6044
+ return token;
6045
+ }
5989
6046
  async setDefaultGlobalPage(option) {
5990
6047
  const dropdown = this.page.getByRole('combobox', {
5991
6048
  name: 'Default global page select'
@@ -7981,8 +8038,12 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
7981
8038
  await this.page.goto(url);
7982
8039
  }
7983
8040
  async searchBy(criteria) {
7984
- await this.page.locator('input#title-filter').clear();
7985
- await this.page.locator('input#title-filter').fill(criteria);
8041
+ await this.page.getByRole('textbox', {
8042
+ name: 'Filter by title'
8043
+ }).click();
8044
+ await this.page.getByRole('textbox', {
8045
+ name: 'Filter by title'
8046
+ }).fill(criteria);
7986
8047
  }
7987
8048
  async copy(originTitle, targetTitle) {
7988
8049
  await this.page.locator('.title').filter({