Skip to content

Commit

Permalink
[WIP] Cucumber / Gherkin support (codeceptjs#1099)
Browse files Browse the repository at this point in the history
* basic parsing

* imitial implementation

* simplified parameter matching

* added Background and Scenario Outline

* updated tests

* basic running version

* examples tests

* fixed tests

* implemented step lists and snippet generators

* fixed tests

* including extra gherkin steps

* added docs and few more tests

* fixed before/after events

* run helper hooks only for root suite

* removed gherkin from config

* fixed tests and CI setup

* fixed formatting for CircleCI

* fixed formatting for CircleCI

* added --tests, features, options; fixed Protractor issue

* updated docs

* fixed codestyle
  • Loading branch information
DavertMik authored Jun 23, 2018
1 parent 3115afb commit e5f09dc
Show file tree
Hide file tree
Showing 59 changed files with 1,813 additions and 380 deletions.
3 changes: 2 additions & 1 deletion .circleci/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cd test

docker-compose build
docker-compose pull php selenium.chrome
docker-compose pull php selenium.chrome

25 changes: 24 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,30 @@ defaults: &defaults
steps:
- checkout
- run: .circleci/build.sh
- run: .circleci/test.sh
- run:
command: docker-compose run --rm test-unit
working_directory: test
when: always
- run:
command: docker-compose run --rm test-rest
working_directory: test
when: always
- run:
command: docker-compose run --rm test-acceptance.webdriverio
working_directory: test
when: always
- run:
command: docker-compose run --rm test-acceptance.nightmare
working_directory: test
when: always
- run:
command: docker-compose run --rm test-acceptance.puppeteer
working_directory: test
when: always
- run:
command: docker-compose run --rm test-acceptance.protractor
working_directory: test
when: always

jobs:
docker:
Expand Down
12 changes: 6 additions & 6 deletions .circleci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -e

cd test

docker-compose run --rm test-unit
docker-compose run --rm test-rest
docker-compose run --rm test-acceptance.webdriverio
docker-compose run --rm test-acceptance.nightmare
docker-compose run --rm test-acceptance.puppeteer
docker-compose run --rm test-acceptance.protractor
docker-compose run --rm test-unit &&
docker-compose run --rm test-rest &&
docker-compose run --rm test-acceptance.webdriverio &&
docker-compose run --rm test-acceptance.nightmare &&
docker-compose run --rm test-acceptance.puppeteer &&
docker-compose run --rm test-acceptance.protractor &&
22 changes: 22 additions & 0 deletions bin/codecept.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ program.command('def [path]')
.option('-c, --config [file]', 'configuration file to be used')
.action(require('../lib/command/definitions'));

program.command('gherkin:init [path]')
.alias('bdd:init')
.description('Prepare CodeceptJS to run feature files.')
.option('-c, --config [file]', 'configuration file to be used')
.action(require('../lib/command/gherkin/init'));

program.command('gherkin:steps [path]')
.alias('bdd:steps')
.description('Prints all defined gherkin steps.')
.option('-c, --config [file]', 'configuration file to be used')
.action(require('../lib/command/gherkin/steps'));

program.command('gherkin:snippets [path]')
.alias('bdd:snippets')
.description('Generate step defintions from steps.')
.option('--dry-run', "don't save snippets to file")
.option('-c, --config [file]', 'configuration file to be used')
.action(require('../lib/command/gherkin/snippets'));


program.command('generate:test [path]')
.alias('gt')
.description('Generates an empty test')
Expand Down Expand Up @@ -67,6 +87,8 @@ program.command('run [test]')
.option('-o, --override [value]', 'override current config options')
.option('--profile [value]', 'configuration profile to be used')
.option('-c, --config [file]', 'configuration file to be used')
.option('--features', 'run only *.feature files and skip tests')
.option('--tests', 'run only JS test files and skip features')

// mocha options
.option('--colors', 'force enabling of colors')
Expand Down
Loading

0 comments on commit e5f09dc

Please sign in to comment.