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.
While not absolutely mandatory, it could be good if you first open an issue for any bug or feature request. This allows discussion on the proper course of action to take before coding begins.
Most of the information you need to start contributing code changes can be found here. In short: fork, make your changes and submit a pull request (PR).
In case your editor does not respect .editorconfig
, here is a summary of rules:
- spacing - use spaces not tabs
- 4 spaces for
.js
files - 2 spaces for
package.json
,.yml
and other configuration files that start with a.
- 4 spaces for
- semicolons - mandatory
- quotes - single-quote
- syntax - ES6/ES2015+
- variable declarations - use
const
andlet
Fork the project on Github and check out your copy locally:
git clone [email protected]:Marketionist/webdriverio-cucumber-steps.git
cd webdriverio-cucumber-steps
Create a feature branch and start hacking:
git checkout -b my-feature-branch origin/main
We practice HEAD-based development, which means all changes are applied directly on top of main.
First make sure git knows your name and email address:
git config --global user.name 'John Doe'
git config --global user.email '[email protected]'
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.
Use git rebase
(not git merge
) to sync your work with the core repository
from time to time:
git remote add upstream https://github.com/Marketionist/webdriverio-cucumber-steps.git
git fetch upstream
git rebase upstream/main
npm install
New 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:
You can run code linting with: npm run lint
.
You can run all the e2e tests with: npm test
.
Tests can be executed locally or remotely using Travis CI. Remote tests run is triggered by each pull request.
git push origin my-feature-branch
Go to https://github.com/yourusername/webdriverio-cucumber-steps and press the Pull request link and fill out the form.
A good PR comment message can look like this:
Explain PR normatively in one line
Details (optional):
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) and push to the same branch.
When code review is complete, a reviewer will take your PR and integrate it to webdriverio-cucumber-steps main branch.
That's it! Thanks a lot for your contribution!