@qavajs/cypress 0.1.0 → 0.2.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/CHANGELOG.md +7 -1
- package/lib/setup.js +20 -20
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,13 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
|
|
|
9
9
|
:x: - deprecation/removal
|
|
10
10
|
:pencil: - chore
|
|
11
11
|
:microscope: - experimental
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
## [0.2.0]
|
|
14
|
+
- :rocket: added memory write logs support
|
|
15
|
+
|
|
16
|
+
## [0.1.1]
|
|
17
|
+
- :beetle: fix wrong import
|
|
18
|
+
|
|
13
19
|
## [0.1.0]
|
|
14
20
|
- :rocket: initial implementation
|
|
15
21
|
|
package/lib/setup.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {po} from '@qavajs/po-cypress';
|
|
2
|
-
import App from '../test-e2e/page_object';
|
|
1
|
+
import { po } from '@qavajs/po-cypress';
|
|
3
2
|
import memory from '@qavajs/memory';
|
|
4
|
-
import Memory from '../test-e2e/memory';
|
|
5
3
|
import { setWorldConstructor } from '@qavajs/cypress-runner-adapter';
|
|
6
4
|
|
|
5
|
+
const logger = {
|
|
6
|
+
log: (value) => {
|
|
7
|
+
const [displayName, divider, message] = value.split(/\s(->|<-)\s/);
|
|
8
|
+
Cypress.log({
|
|
9
|
+
displayName: `${displayName} ${divider}`,
|
|
10
|
+
message,
|
|
11
|
+
type: 'parent',
|
|
12
|
+
consoleProps: () => {
|
|
13
|
+
return {
|
|
14
|
+
Key: displayName,
|
|
15
|
+
Value: message,
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
7
22
|
export class QavajsCypressWorld {
|
|
8
23
|
|
|
9
24
|
constructor() {
|
|
10
|
-
po.init(cy, { logger
|
|
11
|
-
const [displayName, message] = value.split(/\s->\s/);
|
|
12
|
-
Cypress.log({
|
|
13
|
-
displayName,
|
|
14
|
-
message
|
|
15
|
-
})
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
});
|
|
25
|
+
po.init(cy, { logger });
|
|
19
26
|
po.register(window.pageObject);
|
|
20
27
|
memory.register(window.memory);
|
|
21
|
-
memory.setLogger(
|
|
22
|
-
const [displayName, message] = value.split(/\s->\s/);
|
|
23
|
-
Cypress.log({
|
|
24
|
-
displayName,
|
|
25
|
-
message
|
|
26
|
-
})
|
|
27
|
-
}
|
|
28
|
-
});
|
|
28
|
+
memory.setLogger(logger);
|
|
29
29
|
this.po = po;
|
|
30
30
|
this.memory = memory;
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qavajs/cypress",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "qavajs compatible framework on cypress runner",
|
|
5
5
|
"main": "",
|
|
6
6
|
"scripts": {
|
|
@@ -14,12 +14,9 @@
|
|
|
14
14
|
"author": "Alexandr Galichenko",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@qavajs/cypress-runner-adapter": "^0.
|
|
18
|
-
"@qavajs/memory": "^1.
|
|
17
|
+
"@qavajs/cypress-runner-adapter": "^0.2.0",
|
|
18
|
+
"@qavajs/memory": "^1.9.0",
|
|
19
19
|
"@qavajs/po-cypress": "^0.2.0",
|
|
20
|
-
"cypress": "^13.
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@qavajs/validation": "^0.8.0"
|
|
20
|
+
"cypress": "^13.15.0"
|
|
24
21
|
}
|
|
25
22
|
}
|