You can contribute in the following ways:
- Finding and reporting bugs
- Fixing bugs or implementing new features
- Improving the documentation
- Improving the code structure
- Fork this repository to your own GitHub account and then clone it to your computer;
- Install the dev dependencies using NPM:
npm install
; - Make the necessary changes and ensure that the tests are passing using
npm test
(implement new tests if needed); - Send a pull request and I'll be happy to review it 🙌;
- Wait for feedback or approval (this should not take too long).
Pull requests that do not pass the coding static analysis and the automated tests on Github Actions, and the code quality verification on Better Code Hub will not be reviewed.
After changes to master branch all tests are executed and the build status can be seen below.
We use basic ESLint configuration as our coding style guide, together with Prettier.
Run npm run lint
to lint source and test files.
Run npm run lint:fix
to automatically fix lint issues on source and test files.
There are unit and end-to-end tests available to exercise the library's code.
For the unit tests, we use Jasmine.
For the end-to-end tests, we use Protractor and the protractor-helper lib itself, and a sample application using HTML, CSS, and JS is included in the repo in order for such tests to run against.
Run npm t
to run the tests.
If all tests have passed you should see a result like this:
$ npm t
> protractor-helper@4.0.4 pretest /Users/walmyr/www/protractor-helper
> webdriver-manager update --gecko false
[02:28:41] I/update - chromedriver: file exists /Users/walmyr/www/protractor-helper/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_77.0.3865.40.zip
[02:28:41] I/update - chromedriver: unzipping chromedriver_77.0.3865.40.zip
[02:28:41] I/update - chromedriver: setting permissions to 0755 for /Users/walmyr/www/protractor-helper/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_77.0.3865.40
[02:28:41] I/update - chromedriver: chromedriver_77.0.3865.40 up to date
[02:28:41] I/update - selenium standalone: file exists /Users/walmyr/www/protractor-helper/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar
[02:28:41] I/update - selenium standalone: selenium-server-standalone-3.141.59.jar up to date
> protractor-helper@4.0.4 test /Users/walmyr/www/protractor-helper
> jasmine test/spec/*.spec.js && protractor test/e2e/protractor.conf.js
Randomized with seed 67067
Started
..............
14 specs, 0 failures
Finished in 0.017 seconds
Randomized with seed 67067 (jasmine --random=true --seed=67067)
[02:28:41] I/launcher - Running 1 instances of WebDriver
[02:28:41] I/direct - Using ChromeDriver directly...
Randomized with seed 09749
Started
........................................
40 specs, 0 failures
Finished in 3.681 seconds
Randomized with seed 09749
[02:28:45] I/launcher - 0 instance(s) of WebDriver still running
[02:28:45] I/launcher - chrome #01 passed