@agnos-ui/page-objects 0.4.3 → 0.5.0-next.0
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/lib/modal.po.ts +1 -1
- package/lib/pagination.po.ts +12 -4
- package/package.json +3 -3
- package/tsconfig.json +2 -1
- package/.eslintrc.json +0 -3
package/lib/modal.po.ts
CHANGED
|
@@ -44,7 +44,7 @@ export class ModalPO extends BasePO {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
async state() {
|
|
47
|
-
return this.locatorRoot.evaluate(
|
|
47
|
+
return this.locatorRoot.evaluate((rootNode: HTMLElement, selectors) => {
|
|
48
48
|
const closeButton = rootNode.querySelector<HTMLButtonElement>(selectors.closeButton)?.getAttribute('aria-label');
|
|
49
49
|
const header = rootNode.querySelector<HTMLDivElement>(selectors.header)?.innerText?.trim();
|
|
50
50
|
const title = rootNode.querySelector<HTMLDivElement>(selectors.title)?.innerText?.trim();
|
package/lib/pagination.po.ts
CHANGED
|
@@ -116,10 +116,18 @@ export class PaginationPO extends BasePO {
|
|
|
116
116
|
const previousElem = rootNode.querySelector('a.au-previous');
|
|
117
117
|
const nextElem = rootNode.querySelector('a.au-next');
|
|
118
118
|
const lastElem = rootNode.querySelector('a.au-last');
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
if (firstElem) {
|
|
120
|
+
hrefsNavigation.first = getHref(firstElem)!;
|
|
121
|
+
}
|
|
122
|
+
if (previousElem) {
|
|
123
|
+
hrefsNavigation.previous = getHref(previousElem)!;
|
|
124
|
+
}
|
|
125
|
+
if (nextElem) {
|
|
126
|
+
hrefsNavigation.next = getHref(nextElem)!;
|
|
127
|
+
}
|
|
128
|
+
if (lastElem) {
|
|
129
|
+
hrefsNavigation.last = getHref(lastElem)!;
|
|
130
|
+
}
|
|
123
131
|
|
|
124
132
|
for (const element of pagesElements) {
|
|
125
133
|
hrefs.push(element.getAttribute('href') || '');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/page-objects",
|
|
3
3
|
"description": "Page objects to be used when testing AgnosUI-based applications with Playwright.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0-next.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"e2e",
|
|
7
7
|
"page-object",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@agnos-ui/base-po": "0.
|
|
60
|
+
"@agnos-ui/base-po": "0.5.0-next.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@playwright/test": "^1.
|
|
63
|
+
"@playwright/test": "^1.48.2"
|
|
64
64
|
},
|
|
65
65
|
"license": "MIT",
|
|
66
66
|
"bugs": "https://github.com/AmadeusITGroup/AgnosUI/issues",
|
package/tsconfig.json
CHANGED
package/.eslintrc.json
DELETED