Skip to content

Commit

Permalink
Merge pull request #1 from revjet-qa/feature/basic-infrastructure
Browse files Browse the repository at this point in the history
Added basic infrastructure
  • Loading branch information
Marketionist authored Nov 17, 2017
2 parents 5d38e31 + 013d511 commit d6ce862
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

## v0.0.1

**Adding basic infrastructure**

Details:

- [added basic infrastructure](https://github.com/revjet-qa/wdio-cucumber-steps/pull/1)

## TODO

- add step definitions
- add tests for step definitions
148 changes: 148 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Contributer's Guide

We welcome contributions - thanks for taking the time to contribute! Here are
some guidelines to help you get started. These are just guidelines, not rules,
so use your best judgment and feel free to propose changes to this document in
a pull request.

## Discussion

While not absolutely required, it is encouraged that you first open an
[issue](https://github.com/revjet-qa/wdio-cucumber-steps/issues)
for any bug or feature request. This allows discussion on the proper course of
action to take before coding begins.

## Building

```shell
npm install
```

## Changing

Most of the information you need to contribute code changes can [be found here](https://guides.github.com/activities/contributing-to-open-source/).
In short: fork, make your changes and submit a pull request (PR).

### Fork

Fork the project [on Github](https://github.com/revjet-qa/wdio-cucumber-steps)
and check out your copy locally:

```shell
git clone https://github.com/revjet-qa/wdio-cucumber-steps.git
cd wdio-cucumber-steps
```

### Create your branch

Create a feature branch and start hacking:

```shell
git checkout -b feature/name-of-the-feature origin/master
```

We practice HEAD-based development, which means all changes are applied
directly on top of master.

### Commit

First make sure git knows your name and email address:

```shell
git config --global user.name 'John Doe'
git config --global user.email 'john@example.com'
```

**Writing good commit message is important.** A commit message should be around
50 characters or less and contain a short description of the change and
reference issues fixed (if any). Include `Fixes #N`, where _N_ is the issue
number the commit fixes, if any.

### Rebase

Use `git rebase` (not `git merge`) to sync your work with the core repository
from time to time:

```shell
git remote add upstream https://github.com/revjet-qa/wdio-cucumber-steps.git
git fetch upstream
git rebase upstream/master
```

### Test

Bug fixes and features **should have tests**. Look at other tests to see how
they should be structured.

This project makes use of code linting and e2e tests to make sure we don't break
anything. Before you submit your pull request make sure you pass all the tests -
they can be executed locally or remotely using Travis CI. Remote tests run is
triggered by each pull request.

### Push

```shell
git push origin my-feature-branch
```

Go to https://github.com/yourusername/wdio-cucumber-steps.git and press the
_New pull request_ button and fill out the form.

A good PR comment message can look like this:

```text
Explain PR normatively in one line
Details of PR message are a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc.
Fixes #143
```

Pull requests are usually reviewed within a few days. If there are comments to
address, apply your changes in new commits (preferably
[fixups](http://git-scm.com/docs/git-commit)) and push to the same branch.

### Integration

When code review is complete, a committer will take your PR and integrate it on
wdio-cucumber-steps master branch. Because we like to keep a linear history
on the master branch, we will normally squash and rebase your branch history.

## Publishing

Before you can actually publish wdio-cucumber-steps to npm make sure the
following statements are true:

- All tests should be green.
- The version number in [package.json](package.json) has been incremented.
- The [changelog](CHANGELOG.md) has been updated with details of the changes in
this release. Where possible include the details of the
[issues](https://github.com/revjet-qa/wdio-cucumber-steps/issues)
affected and the [PRs](https://github.com/revjet-qa/wdio-cucumber-steps/pulls)
raised.

OK, we are almost ready to publish - follow the next steps:

- Clone wdio-cucumber-steps from the main repo with this command:
`git clone https://github.com/revjet-qa/wdio-cucumber-steps.git`
- [Login to npm](https://docs.npmjs.com/cli/adduser) if you need to: `npm login`
- Install wdio-cucumber-steps packages with: `npm install`
- Run linting to check the code: `npm run lint`
- Run the tests to ensure all is still good: `npm test`

If all the tests passed then we are going to ship:
- Tag the release in git. You can see existing tags with the command: `git tag`.
If the version in your `package.json` is `"1.0.1"` then you would tag the
release like so: `git tag v1.0.1`. For more on type of tags we are using read
[here](https://git-scm.com/book/en/v2/Git-Basics-Tagging#Lightweight-Tags).
- Push the tag so the new version will show up in the
[releases](https://github.com/revjet-qa/wdio-cucumber-steps/releases):
`git push origin --tags`.
- On the releases page, click the "Draft a new release button" and, on the
presented page, select the version you have just released, name it and copy
in the new markdown that you added to the [changelog](CHANGELOG.md).
- Now the big moment of publishing updated package to npm: `npm publish`.

You have just shipped the release - relax and enjoy your accomplishment!
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# wdio-cucumber-steps

Cucumber step definitions written with WebdriverIO for end-to-end tests

## Supported versions
[Node.js](http://nodejs.org/):
- 6.x

[WebdriverIO](https://www.npmjs.com/package/webdriverio):
- 4.x

## Installation
To install this package and add it to your package.json just run:
```
npm install wdio-cucumber-steps --save-dev
```

## Thanks
If this plugin was helpful for you, please give it a **★ Star** on
[Github](https://github.com/revjet-qa/wdio-cucumber-steps)
39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "wdio-cucumber-steps",
"version": "0.0.1",
"description": "Cucumber step definitions written with WebdriverIO",
"main": "index.js",
"engines": {
"node": ">=6.9.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/revjet-qa/wdio-cucumber-steps.git"
},
"keywords": [
"cucumber",
"cucumber steps",
"step definitions",
"automated tests",
"e2e tests",
"end-to-end tests",
"webdriver",
"selenium",
"webdriverio",
"wdio",
"cucumber",
"gherkin",
"bdd"
],
"author": "Alex Krechik, Dmytro Shpakovskyi",
"license": "MIT",
"bugs": {
"url": "https://github.com/revjet-qa/wdio-cucumber-steps/issues"
},
"devDependencies": {
"webdriverio": "^4.9.8"
}
}

0 comments on commit d6ce862

Please sign in to comment.