@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/CHANGELOG.md +15 -0
- package/dist/main.js +70 -9
- package/dist/main.js.map +1 -1
- package/dist/module.js +70 -9
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +7 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @digital-ai/devops-page-object-release
|
|
2
2
|
|
|
3
|
+
## 1.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a28072f: S-127275 - Added page objects for new UI HomePage
|
|
8
|
+
- 0a57949: S-132325: Add timezone selector and expect pill
|
|
9
|
+
- 0a57949: S-131549: update breadcrumb selector
|
|
10
|
+
- 3b80a23: S 127275 - Tile Verification in New Home Page UI
|
|
11
|
+
|
|
12
|
+
## 1.0.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- ab8b01c: S-129234: Fix locators for searchBy
|
|
17
|
+
|
|
3
18
|
## 1.0.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -2190,8 +2190,19 @@ 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
|
-
const
|
|
2194
|
-
|
|
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;
|
|
2195
2206
|
}
|
|
2196
2207
|
async setValueFromCi(propertyName, value) {
|
|
2197
2208
|
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
@@ -2253,8 +2264,19 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
2253
2264
|
}
|
|
2254
2265
|
async getAllOptionsFromCi(propertyName) {
|
|
2255
2266
|
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
2256
|
-
const
|
|
2257
|
-
|
|
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;
|
|
2258
2280
|
}
|
|
2259
2281
|
async setValueFromCi(propertyName, value) {
|
|
2260
2282
|
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
@@ -4334,7 +4356,7 @@ class $c5c393ea4aecca6c$export$649fde34d823ece7 extends (0, $f8721861c660dd88$ex
|
|
|
4334
4356
|
await this.closeContextMenu();
|
|
4335
4357
|
}
|
|
4336
4358
|
async closeContextMenu() {
|
|
4337
|
-
await this.page.locator('
|
|
4359
|
+
await this.page.locator('.release-sidebar-header h1').click();
|
|
4338
4360
|
}
|
|
4339
4361
|
async expectDisabledActions(actionName) {
|
|
4340
4362
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId(`release-grid-${actionName}-btn`)).toBeDisabled();
|
|
@@ -4808,8 +4830,8 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
4808
4830
|
})).toBeVisible();
|
|
4809
4831
|
return this;
|
|
4810
4832
|
}
|
|
4811
|
-
async
|
|
4812
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.
|
|
4833
|
+
async expectTitleInSidebar(title) {
|
|
4834
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.release-sidebar-header h1', {
|
|
4813
4835
|
hasText: title
|
|
4814
4836
|
})).toBeVisible();
|
|
4815
4837
|
}
|
|
@@ -6484,6 +6506,15 @@ class $9ef669cf95557cb5$export$36d69433c4f81145 extends (0, $f8721861c660dd88$ex
|
|
|
6484
6506
|
await (0, $kKeXs$playwrighttest.expect)(this.viewModeButton).toBeVisible();
|
|
6485
6507
|
await this.viewModeButton.click();
|
|
6486
6508
|
}
|
|
6509
|
+
async verifyDefaultTilesPresent(expectedTileNames) {
|
|
6510
|
+
const homeTiles = this.page.locator('.xlr-tile-container[data-title]');
|
|
6511
|
+
await (0, $kKeXs$playwrighttest.expect)(homeTiles).toHaveCount(expectedTileNames.length);
|
|
6512
|
+
for (const tileName of expectedTileNames){
|
|
6513
|
+
const tile = this.page.locator(`.xlr-tile-container[data-title="${tileName}"]`);
|
|
6514
|
+
await (0, $kKeXs$playwrighttest.expect)(tile).toHaveCount(1);
|
|
6515
|
+
await (0, $kKeXs$playwrighttest.expect)(tile).toBeVisible();
|
|
6516
|
+
}
|
|
6517
|
+
}
|
|
6487
6518
|
async addReleaseTiles() {
|
|
6488
6519
|
await this.configureButton.click();
|
|
6489
6520
|
await this.page.getByRole('button', {
|
|
@@ -6831,6 +6862,18 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
|
|
|
6831
6862
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('input[name="firstDayOfWeek"]')).toHaveValue(firstDayOfWeek);
|
|
6832
6863
|
return this;
|
|
6833
6864
|
}
|
|
6865
|
+
async setTimezone(timezone) {
|
|
6866
|
+
await this.page.locator('input[name="Timezone"]').fill(timezone);
|
|
6867
|
+
await this.page.locator('.dot-popper', {
|
|
6868
|
+
hasText: timezone
|
|
6869
|
+
}).click();
|
|
6870
|
+
return this;
|
|
6871
|
+
}
|
|
6872
|
+
async expectTimezonePillToContain(text, contain = true) {
|
|
6873
|
+
if (contain) await (0, $kKeXs$playwrighttest.expect)(this.page.locator('action-toolbar .dot-pill')).toContainText(text);
|
|
6874
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator('action-toolbar .dot-pill')).not.toContainText(text);
|
|
6875
|
+
return this;
|
|
6876
|
+
}
|
|
6834
6877
|
async clickOnSaveButton() {
|
|
6835
6878
|
await this.page.getByRole('button', {
|
|
6836
6879
|
name: 'Save'
|
|
@@ -6920,6 +6963,20 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
|
|
|
6920
6963
|
}).click();
|
|
6921
6964
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(tokenName)).not.toBeVisible();
|
|
6922
6965
|
}
|
|
6966
|
+
async copyAccessToken() {
|
|
6967
|
+
const origin = new URL(this.page.url()).origin;
|
|
6968
|
+
await this.page.context().grantPermissions([
|
|
6969
|
+
'clipboard-read',
|
|
6970
|
+
'clipboard-write'
|
|
6971
|
+
], {
|
|
6972
|
+
origin: origin
|
|
6973
|
+
});
|
|
6974
|
+
await this.page.getByRole('button', {
|
|
6975
|
+
name: 'Copy token'
|
|
6976
|
+
}).click();
|
|
6977
|
+
const token = await this.page.evaluate(async ()=>navigator.clipboard.readText());
|
|
6978
|
+
return token;
|
|
6979
|
+
}
|
|
6923
6980
|
async setDefaultGlobalPage(option) {
|
|
6924
6981
|
const dropdown = this.page.getByRole('combobox', {
|
|
6925
6982
|
name: 'Default global page select'
|
|
@@ -8915,8 +8972,12 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
|
|
|
8915
8972
|
await this.page.goto(url);
|
|
8916
8973
|
}
|
|
8917
8974
|
async searchBy(criteria) {
|
|
8918
|
-
await this.page.
|
|
8919
|
-
|
|
8975
|
+
await this.page.getByRole('textbox', {
|
|
8976
|
+
name: 'Filter by title'
|
|
8977
|
+
}).click();
|
|
8978
|
+
await this.page.getByRole('textbox', {
|
|
8979
|
+
name: 'Filter by title'
|
|
8980
|
+
}).fill(criteria);
|
|
8920
8981
|
}
|
|
8921
8982
|
async copy(originTitle, targetTitle) {
|
|
8922
8983
|
await this.page.locator('.title').filter({
|