Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dennisinteractive/dennisdigital-cucumberjs

A collection of common Cucumber JS step definitions for Dennis Digital.
https://github.com/dennisinteractive/dennisdigital-cucumberjs

Last synced: 6 days ago
JSON representation

A collection of common Cucumber JS step definitions for Dennis Digital.

Awesome Lists containing this project

README

        

# Dennis Digital: Common step definitions for CucumberJS

A collections of common and reusable step defintions for Dennis Digital BDD testing stack. Run using CucumberJS and PhantomJS via NodeJS.

## Installation

`npm install dennisdigital-cucumberjs`

## Usgae

Your features folder should be in the same directory as you `package.json` run tests with the command:

`./node_modules/.bin/cucumber-js --require node_modules/dennisdigital-cucumberjs --require features`

Alternatively you can add this as an NPM script:

```
"scripts": {
"tests": "node_modules/.bin/cucumber-js --require node_modules/dennisdigital-cucumberjs --require features"
}
```

`npm run tests`

And then options can be passed like so:

`npm run tests -- --tags @mytesttag`

The base url can and should be set in your `package.json`:

```
"options": {
"baseUrl": "localhost:3000"
}
```

Example feature:

```
Feature: Post page
In order browse posts,
as a User,
I want see the post element and read the title.

@posts @mytesttag
Scenario: Go on post 1
Given I am on "/a-site-url"
Then I should a ".css-selector" element
And I should see "Post-1"
```

### Dependencies:
- chai-as-promised
- chromedriver
- cucumber
- selenium-webdriver

### Notes

Still very much a work in progress!