Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 06febbf

Browse files
committed
Add e2e tests
1 parent 9249471 commit 06febbf

File tree

21 files changed

+5213
-2
lines changed

21 files changed

+5213
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ script:
2222
- npm run lint
2323
- npm run test
2424
- npm run coveralls
25+
- npm run test-e2e:ci
2526
- 'if [ -n "$SONAR_TOKEN" ]; then sonar-scanner -Dsonar.login=${SONAR_TOKEN}; fi'
2627

2728
deploy:

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
"main": "index.js",
2828
"scripts": {
2929
"coveralls": "cat ./coverage/lcov.info | coveralls",
30-
"lint": "eslint src test index.js jest.config.js",
30+
"lint": "eslint src test index.js jest.config.js test-e2e/cypress test-e2e/mocks test-e2e/app-fetch/public",
3131
"lint-staged": "lint-staged",
32-
"test": "jest"
32+
"test": "jest",
33+
"test-e2e": "cd test-e2e && npm run test:app-fetch",
34+
"test-e2e:ci": "cd test-e2e && npm i && npm run cypress:install && cd app-fetch && npm i && cd .. && npm run test:app-fetch"
3335
},
3436
"dependencies": {
3537
"@data-provider/core": "^1.7.0",
@@ -51,6 +53,9 @@
5153
"cypress": "^2.1.0 || ^3.0.0"
5254
},
5355
"lint-staged": {
56+
"test-e2e/app-fetch/public/*.js": "eslint",
57+
"test-e2e/mocks/**/*.js": "eslint",
58+
"test-e2e/cypress/**/*.js": "eslint",
5459
"jest.config.js": "eslint",
5560
"index.js": "eslint",
5661
"src/**/*.js": "eslint",

test-e2e/.eslintrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"parserOptions": {
7+
"sourceType": "module"
8+
},
9+
"parser": "babel-eslint",
10+
"globals": {
11+
},
12+
"settings": {
13+
"react": {
14+
"pragma": "React",
15+
"version": "^16.7.0"
16+
}
17+
}
18+
}

test-e2e/.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
#environment variables
4+
.env
5+
6+
# dependencies
7+
/node_modules
8+
9+
# tests
10+
/coverage
11+
/cypress/fixtures
12+
/cypress/screenshots
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# ides
26+
.idea
27+
.vs

test-e2e/app-fetch/.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
#environment variables
4+
.env
5+
6+
# dependencies
7+
/node_modules
8+
9+
# tests
10+
/coverage
11+
/dist
12+
13+
# misc
14+
.DS_Store
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
24+
# ides
25+
.idea
26+
.vs

0 commit comments

Comments
 (0)