File tree Expand file tree Collapse file tree 4 files changed +35
-28
lines changed
test/data/sandbox/configs/pageObjects/pages Expand file tree Collapse file tree 4 files changed +35
-28
lines changed Original file line number Diff line number Diff line change 1
- const { I } = inject ( ) ;
1
+ const { I } = inject ( )
2
2
3
3
class Base {
4
4
async type ( s ) {
5
- await I . printMessage ( s ) ;
5
+ await I . printMessage ( s )
6
6
}
7
7
}
8
8
9
9
class PageObject extends Base {
10
10
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
+ }
14
16
}
15
17
16
18
purgeDomains ( ) {
17
- console . log ( 'user =>' , this . user ) ;
18
- I . printMessage ( 'purgeDomains' ) ;
19
+ console . log ( 'user =>' , this . user )
20
+ I . printMessage ( 'purgeDomains' )
19
21
}
20
22
}
21
23
22
- module . exports = new PageObject ( ) ;
24
+ export default new PageObject ( )
Original file line number Diff line number Diff line change 1
- const { I } = inject ( ) ;
1
+ const { I } = inject ( )
2
2
3
3
class PageObject {
4
4
constructor ( ) {
5
- this . method1 = ( ) => { console . log ( 123 ) ; } ;
5
+ this . method1 = ( ) => {
6
+ console . log ( 123 )
7
+ }
6
8
}
7
9
8
10
async type ( s ) {
9
- await I . printMessage ( s ) ;
11
+ await I . printMessage ( s )
10
12
}
11
13
12
14
purgeDomains ( ) {
13
- I . printMessage ( 'purgeDomains' ) ;
15
+ I . printMessage ( 'purgeDomains' )
14
16
}
15
17
}
16
18
17
- module . exports = new PageObject ( ) ;
19
+ export default new PageObject ( )
Original file line number Diff line number Diff line change 1
- let I ;
1
+ let I
2
2
3
- module . exports = {
3
+ const LogsPage = {
4
4
_init ( ) {
5
- I = actor ( ) ;
6
- this . value = 'Logs Page Value' ;
5
+ I = actor ( )
6
+ this . value = 'Logs Page Value'
7
7
} ,
8
8
9
9
print ( arg ) {
10
- I . printMessage ( 'Logs Page Message' ) ;
10
+ I . printMessage ( 'Logs Page Message' )
11
11
} ,
12
12
13
13
toString ( ) {
14
- return this . value ;
14
+ return this . value
15
15
} ,
16
- } ;
16
+ }
17
+
18
+ export default LogsPage
Original file line number Diff line number Diff line change 1
- let I ;
2
-
3
- module . exports = {
1
+ let I
4
2
3
+ const MyPage = {
5
4
_init ( ) {
6
- I = actor ( ) ;
5
+ I = actor ( )
7
6
} ,
8
7
9
8
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' )
12
11
} ,
13
12
14
13
failedMethod ( ) {
15
- I . seeFile ( 'notexistfile.js' ) ;
14
+ I . seeFile ( 'notexistfile.js' )
16
15
} ,
17
- } ;
16
+ }
17
+
18
+ export default MyPage
You can’t perform that action at this time.
0 commit comments