@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/CHANGELOG.md +6 -0
- package/dist/main.js +46 -6
- package/dist/main.js.map +1 -1
- package/dist/module.js +46 -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/CHANGELOG.md
CHANGED
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();
|
|
@@ -6920,6 +6942,20 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
|
|
|
6920
6942
|
}).click();
|
|
6921
6943
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(tokenName)).not.toBeVisible();
|
|
6922
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
|
+
}
|
|
6923
6959
|
async setDefaultGlobalPage(option) {
|
|
6924
6960
|
const dropdown = this.page.getByRole('combobox', {
|
|
6925
6961
|
name: 'Default global page select'
|
|
@@ -8915,8 +8951,12 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
|
|
|
8915
8951
|
await this.page.goto(url);
|
|
8916
8952
|
}
|
|
8917
8953
|
async searchBy(criteria) {
|
|
8918
|
-
await this.page.
|
|
8919
|
-
|
|
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);
|
|
8920
8960
|
}
|
|
8921
8961
|
async copy(originTitle, targetTitle) {
|
|
8922
8962
|
await this.page.locator('.title').filter({
|