@qavajs/cypress 2.0.0 → 2.0.1
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 +3 -0
- package/lib/pageObjects.js +4 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,9 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
|
|
|
10
10
|
:pencil: - chore
|
|
11
11
|
:microscope: - experimental
|
|
12
12
|
|
|
13
|
+
## [2.0.1]
|
|
14
|
+
- :beetle: fixed issue with getting child element
|
|
15
|
+
|
|
13
16
|
## [2.0.0]
|
|
14
17
|
- :rocket: implemented new page object approach
|
|
15
18
|
|
package/lib/pageObjects.js
CHANGED
|
@@ -69,13 +69,14 @@ export function query(root, path) {
|
|
|
69
69
|
export function element(path) {
|
|
70
70
|
const chain = query(this.pageObject, path);
|
|
71
71
|
let current = this.cy;
|
|
72
|
+
let method = 'get';
|
|
72
73
|
for (const item of chain) {
|
|
73
74
|
switch (item.type) {
|
|
74
75
|
case 'simple':
|
|
75
|
-
current = current
|
|
76
|
+
current = current[method](item.selector);
|
|
76
77
|
break;
|
|
77
78
|
case 'template':
|
|
78
|
-
current = current
|
|
79
|
+
current = current[method](item.selector(item.argument));
|
|
79
80
|
break;
|
|
80
81
|
case 'native':
|
|
81
82
|
current = item.selector({
|
|
@@ -85,6 +86,7 @@ export function element(path) {
|
|
|
85
86
|
});
|
|
86
87
|
break;
|
|
87
88
|
}
|
|
89
|
+
method = 'find';
|
|
88
90
|
}
|
|
89
91
|
return current
|
|
90
92
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qavajs/cypress",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "qavajs for cypress runner",
|
|
5
5
|
"main": "",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "Alexandr Galichenko",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@qavajs/cypress-runner-adapter": "^1.0.
|
|
17
|
+
"@qavajs/cypress-runner-adapter": "^1.0.1",
|
|
18
18
|
"@qavajs/memory": "^1.10.2",
|
|
19
19
|
"cypress": "^13.17.0"
|
|
20
20
|
}
|