Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #475: get rid of in-browser tests #654

Merged
merged 1 commit into from
Oct 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@ env:
- ACTION="build:lib"
- ACTION="test-all:ci"
- ACTION="cs-check"
- ACTION="test-browser"
matrix:
allow_failures:
- env: ACTION="test-browser"
script: npm run $ACTION
22 changes: 0 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Kinto-based systems.
- [Hacking on kinto-admin](#hacking-on-kinto-admin)
- [Development server](#development-server)
- [Tests](#tests)
- [Browser tests](#browser-tests)
- [FAQ](#faq)
- [Browser support](#browser-support)
- [How to display a nested field value using the collection displayFields property?](#how-to-display-a-nested-field-value-using-the-collection-displayfields-property)
Expand Down Expand Up @@ -187,27 +186,6 @@ $ npm run test-all
long time and may result in intermittent failures on Travis
(see [#146](https://github.com/Kinto/kinto-admin/pull/146)).

## Browser tests

The browser test suite uses [NightmareJS](http://www.nightmarejs.org/) and
[Electron](http://electron.atom.io/). To run browser tests:

```
$ npm run dist
$ npm run test-browser
```

To show the browser interactions while running them, set the `NIGHTMARE_SHOW` env var:

```
$ NIGHTMARE_SHOW=1 npm run test-browser
```

There's also a TDD mode:

```
$ npm run tdd-browser
```

## FAQ

Expand Down
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
"build": "rimraf build && NODE_ENV=production node_modules/.bin/webpack --progress --config webpack.prod.js && cp html/prod.html build/index.html",
"build:lib": "rimraf lib && NODE_ENV=production babel -d lib/ src/",
"build:readme": "toctoc README.md -w",
"cs-check": "prettier -l '{src,test,test-browser}/**/*.js'",
"cs-format": "prettier '{src,test,test-browser}/**/*.js' --write",
"cs-check": "prettier -l '{src,test}/**/*.js'",
"cs-format": "prettier '{src,test}/**/*.js' --write",
"flow-check": "node_modules/.bin/flow check",
"lint": "node_modules/.bin/eslint src test test-browser",
"lint": "node_modules/.bin/eslint src test",
"publish-to-gh-pages": "npm run build && gh-pages --add --dist build/",
"publish-to-npm": "npm run build:lib && npm publish",
"start": "NODE_ENV=development node server/dev.js",
"tdd": "npm run test -- --watch --bail",
"tdd-browser": "npm run test-browser --watch",
"test": "NODE_ENV=test node_modules/.bin/jest --setupTestFrameworkScriptFile=`pwd`/test/setup-jsdom.js --testRegex '.*_test.js' --testPathIgnorePatterns 'test-browser/'",
"test": "NODE_ENV=test node_modules/.bin/jest --setupTestFrameworkScriptFile=`pwd`/test/setup-jsdom.js --testRegex '.*_test.js'",
"test:ci": "npm run test -- --maxWorkers=4",
"test-browser": "NODE_ENV=test node_modules/.bin/babel-node node_modules/.bin/_mocha --recursive test-browser/ --testPathIgnorePatterns 'test/'",
"test-all": "npm run lint && npm run flow-check && npm run test",
"test-all:ci": "npm run lint && npm install flow-typed && flow-typed install && npm run flow-check && npm run test:ci"
},
Expand Down Expand Up @@ -68,6 +66,7 @@
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.0",
Expand All @@ -89,7 +88,6 @@
"kinto-node-test-server": "^1.0.2",
"mocha": "^5.0.2",
"mocha-generators": "^2.0.0",
"nightmare": "^3.0.0",
"prettier": "^1.14.2",
"react-test-renderer": "^16.5.1",
"redbox-react": "^1.2.6",
Expand All @@ -100,8 +98,7 @@
"webpack": "^4.16.2",
"webpack-cli": "^3.1.0",
"webpack-dev-middleware": "^3.0.0",
"webpack-hot-middleware": "^2.22.3",
"@babel/preset-flow": "^7.0.0"
"webpack-hot-middleware": "^2.22.3"
},
"repository": {
"type": "git",
Expand Down
5 changes: 0 additions & 5 deletions test-browser/.eslintrc

This file was deleted.

48 changes: 0 additions & 48 deletions test-browser/auth_test.js

This file was deleted.

78 changes: 0 additions & 78 deletions test-browser/bucket_test.js

This file was deleted.

78 changes: 0 additions & 78 deletions test-browser/collection_test.js

This file was deleted.

22 changes: 0 additions & 22 deletions test-browser/kinto.ini

This file was deleted.

Loading