Skip to content

Commit

Permalink
chore(build): run cucumber tests using NPM scripts instead of Grunt (#…
Browse files Browse the repository at this point in the history
…3476)

The main reason for this change is to be able to update Cucumber library as `grunt-cucumberjs` (mavdi/grunt-cucumberjs#110) does not support cucumber@4 and looks pretty abandoned.

Grunt ecosystem is not very active for a while, so we can expect more issues of this sort in the future. Because of this and to keep docs consistent I've also added NPM scripts to run other test types (for now they just proxy to Grunt) and removed Grunt examples from the documentation.

In the next PR I will update `cucumber` and perform some cleanup of the step definitions.
  • Loading branch information
devoto13 committed Apr 20, 2020
1 parent 39648b5 commit 652e24e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 252 deletions.
14 changes: 14 additions & 0 deletions cucumber.js
@@ -0,0 +1,14 @@
// Shared configuration for Cucumber.js tests.
// See https://github.com/cucumber/cucumber-js/blob/master/docs/cli.md#profiles
const options = [
'--format progress',
'--require test/e2e/support/env.js',
'--require test/e2e/support/world.js',
'--require test/e2e/step_definitions/core_steps.js',
'--require test/e2e/step_definitions/hooks.js',
'--tags "not @not-jenkins"'
]

module.exports = {
'default': options.join(' ')
}
13 changes: 6 additions & 7 deletions docs/dev/02-making-changes.md
Expand Up @@ -34,18 +34,17 @@ Here are some tips on how to set up a Karma workspace and how to send a good pul
- Run the tests via:
```bash
$ npm test
# or if you have grunt-cli installed globally you can also
$ grunt test:unit
$ grunt test:e2e
$ grunt test:client

# All tests.
$ grunt test
# or you can run test suits individually
$ npm run test:unit
$ npm run test:e2e
$ npm run test:client
```

- Lint the code via:
```bash
$ npm run lint
# or you can also apply auto-fixes where possible
$ npm run lint:fix
```

- Build the client code via:
Expand Down
27 changes: 1 addition & 26 deletions gruntfile.js
Expand Up @@ -20,8 +20,7 @@ module.exports = function (grunt) {
},
test: {
unit: 'mochaTest:unit',
client: 'test/client/karma.conf.js',
e2e: 'cucumberjs:ci'
client: 'test/client/karma.conf.js'
},
watch: {
client: {
Expand All @@ -43,30 +42,6 @@ module.exports = function (grunt) {
]
}
},
cucumberjs: {
options: {
steps: 'test/e2e/step_definitions',
format: 'progress',
require: ['test/e2e/support/env.js', 'test/e2e/support/world.js']
},
all: 'test/e2e/*.feature',
current: {
files: {
src: 'test/e2e/*.feature'
},
options: {
tags: '@current'
}
},
ci: {
files: {
src: 'test/e2e/*.feature'
},
options: {
tags: 'not @not-jenkins'
}
}
},
eslint: {
options: {
quiet: true
Expand Down
217 changes: 0 additions & 217 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 652e24e

Please sign in to comment.