Skip to content

Commit ff4743e

Browse files
committed
small refactoring, readme added
1 parent 2992b95 commit ff4743e

6 files changed

+2710
-6
lines changed

Diff for: CustomHelper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class CustomHelper extends Helper {
88
}
99

1010
printHelpers() {
11-
console.log(this.helpers['Puppeteer'])
11+
console.log('Helpers enabled', Object.keys(this.helpers))
1212
}
1313
}
1414

Diff for: Readme.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+

Diff for: codecept.conf.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
require('ts-node/register')
22
const { setHeadlessWhen } = require('@codeceptjs/configure');
3+
const { bootstrap } = require('./presettings.ts');
34

45
// turn on headless mode when running with HEADLESS=true environment variable
56
// HEADLESS=true npx codecept run
67
setHeadlessWhen(process.env.HEADLESS);
78

89
exports.config = {
9-
tests: './*_test.ts',
10+
tests: './tests/**_test.ts',
1011
output: './output',
1112
helpers: {
1213
Puppeteer: {
13-
url: 'http://tinkoff.ru',
14+
url: 'https://github.com',
1415
show: false,
1516
windowSize: '1200x900'
1617
},
1718
CustomHelper: {
1819
require: './CustomHelper.ts'
1920
}
2021
},
21-
bootstrap: require('./presettings.ts').bootstrap,
22-
mocha: {},
22+
bootstrap,
2323
include: {
2424
loginPage: './loginPage.ts',
2525
homePage: './homePage.ts'

0 commit comments

Comments
 (0)