Skip to content

Commit 4d84e8f

Browse files
committed
fix: runner tests
1 parent 49baa89 commit 4d84e8f

File tree

4 files changed

+35
-28
lines changed

4 files changed

+35
-28
lines changed
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
const { I } = inject();
1+
const { I } = inject()
22

33
class Base {
44
async type(s) {
5-
await I.printMessage(s);
5+
await I.printMessage(s)
66
}
77
}
88

99
class PageObject extends Base {
1010
constructor() {
11-
super();
12-
this.user = 'User1';
13-
this.method1 = () => { console.log(123); };
11+
super()
12+
this.user = 'User1'
13+
this.method1 = () => {
14+
console.log(123)
15+
}
1416
}
1517

1618
purgeDomains() {
17-
console.log('user =>', this.user);
18-
I.printMessage('purgeDomains');
19+
console.log('user =>', this.user)
20+
I.printMessage('purgeDomains')
1921
}
2022
}
2123

22-
module.exports = new PageObject();
24+
export default new PageObject()
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
const { I } = inject();
1+
const { I } = inject()
22

33
class PageObject {
44
constructor() {
5-
this.method1 = () => { console.log(123); };
5+
this.method1 = () => {
6+
console.log(123)
7+
}
68
}
79

810
async type(s) {
9-
await I.printMessage(s);
11+
await I.printMessage(s)
1012
}
1113

1214
purgeDomains() {
13-
I.printMessage('purgeDomains');
15+
I.printMessage('purgeDomains')
1416
}
1517
}
1618

17-
module.exports = new PageObject();
19+
export default new PageObject()
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
let I;
1+
let I
22

3-
module.exports = {
3+
const LogsPage = {
44
_init() {
5-
I = actor();
6-
this.value = 'Logs Page Value';
5+
I = actor()
6+
this.value = 'Logs Page Value'
77
},
88

99
print(arg) {
10-
I.printMessage('Logs Page Message');
10+
I.printMessage('Logs Page Message')
1111
},
1212

1313
toString() {
14-
return this.value;
14+
return this.value
1515
},
16-
};
16+
}
17+
18+
export default LogsPage
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
let I;
2-
3-
module.exports = {
1+
let I
42

3+
const MyPage = {
54
_init() {
6-
I = actor();
5+
I = actor()
76
},
87

98
hasFile(arg) {
10-
I.seeFile('codecept.class.js');
11-
I.seeFile('codecept.po.js');
9+
I.seeFile('codecept.class.js')
10+
I.seeFile('codecept.po.js')
1211
},
1312

1413
failedMethod() {
15-
I.seeFile('notexistfile.js');
14+
I.seeFile('notexistfile.js')
1615
},
17-
};
16+
}
17+
18+
export default MyPage

0 commit comments

Comments
 (0)