File tree 6 files changed +2710
-6
lines changed
6 files changed +2710
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class CustomHelper extends Helper {
8
8
}
9
9
10
10
printHelpers ( ) {
11
- console . log ( this . helpers [ 'Puppeteer' ] )
11
+ console . log ( 'Helpers enabled' , Object . keys ( this . helpers ) )
12
12
}
13
13
}
14
14
Original file line number Diff line number Diff line change
1
+ # CodeceptJS TypeScript Boilerplate
2
+
3
+ This is a boilerplate project which includes CodeceptJS + Playwright setup using TypeScript.
4
+
5
+ Clone this repository to start:
6
+
7
+ ```
8
+ git clone https://github.com/codeceptjs/typescript-boilerplate
9
+ ```
10
+
11
+ > Remove ` .git ` folder as you won't need it anymore
12
+
13
+ Install dependencies:
14
+
15
+ ```
16
+ npm i
17
+ ```
18
+
19
+ ## Contents
20
+
21
+ * ` codecept.conf.js ` - main configuration file
22
+ * ` tests/**_test.ts ` - test files
23
+ * ` homePage.ts ` , ` loginPage.ts ` - page objects
24
+ * ` CustomHelper ` - a custom helper
25
+ * ` presettings.ts ` - placeholder for bootstrap / teardown scripts
26
+
Original file line number Diff line number Diff line change 1
1
require ( 'ts-node/register' )
2
2
const { setHeadlessWhen } = require ( '@codeceptjs/configure' ) ;
3
+ const { bootstrap } = require ( './presettings.ts' ) ;
3
4
4
5
// turn on headless mode when running with HEADLESS=true environment variable
5
6
// HEADLESS=true npx codecept run
6
7
setHeadlessWhen ( process . env . HEADLESS ) ;
7
8
8
9
exports . config = {
9
- tests : './*_test.ts' ,
10
+ tests : './tests/* *_test.ts' ,
10
11
output : './output' ,
11
12
helpers : {
12
13
Puppeteer : {
13
- url : 'http ://tinkoff.ru ' ,
14
+ url : 'https ://github.com ' ,
14
15
show : false ,
15
16
windowSize : '1200x900'
16
17
} ,
17
18
CustomHelper : {
18
19
require : './CustomHelper.ts'
19
20
}
20
21
} ,
21
- bootstrap : require ( './presettings.ts' ) . bootstrap ,
22
- mocha : { } ,
22
+ bootstrap,
23
23
include : {
24
24
loginPage : './loginPage.ts' ,
25
25
homePage : './homePage.ts'
You can’t perform that action at this time.
0 commit comments