Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add contribution guidelines #1083

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions e2e-testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Locators folder has files that have custom element selectors. Locator files sit

Named to match the associated test file. Functions file has the core functions for the tests. The main test file calls from from the functions file located in the Functions folder.

For instance the login test will have the main `login.cy.js` file, it has its associated `loginlocators.js` and the main function file is `loginfunctions.js`

## Getting Set Up

### Installation
Expand Down Expand Up @@ -73,12 +75,38 @@ npm run cy:open

This will launch the test runner laying out available tests, and individual tests can be run on a browser on a visual interface.

The site under test runs on a remote staging server - https://mzima.staging.ush.zone/
The site under test runs headless on a remote staging server in the CI

## Contributing to the e2e testing suite
Before writing any automation tests, it may be a good idea to manually check out the application (or at least your target functionality) to understand the functionality and know the steps around it.
Before you start making changes or improvements to the e2e testing suite, ensure there's an issue on github that describes the changes.
We currently have issues labelled `e2e-test-automation` that are for the e2e-tests. The issues describe a change that needs to be made. Pick an unassigned issue and start work on it. Most issues will have steps and a description, but where there's none, you can comment seeking more information or clarification where needed.
Where there's no issue on github that covers the changes you want to make, create an issue describing your changes.

Except where you are explicitly requested to create your branch from another branch, always create your new branch from the `development` branch:

````
git checkout development
````

````
git checkout -b replace-this-part-with-the-name-of-your-new-branch
````

Make the desired changes you wish to submit to the project, add, commit and push your changes:

````
git add .
````

The tests would require logging into the site. User credentials are declared in the cypress.env.json file. Contact the site owners for admin credentials to run the tests.
````
git commit -m "replace this part with a commit message that describes your changes"
````

## Contributing
````
git push origin replace-this-part-with-the-name-of-your-branch
````

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A contributor from outside from Ushahidi would work from their own fork, but maybe that is too much info in the readme? You could link to the docs too: https://docs.ushahidi.com/platform-developer-documentation/v/set-up-the-developer-environment-for-ushahidi/set-up-your-developer-environment/workflow-for-adding-code#id-6.-submit-your-code

Refer to the [CONTRIBUTING.md]() guide for details.
Then send a pull request for your changes to be reviewed.

[Code of Conduct](https://docs.ushahidi.com/platform-developer-documentation/code-of-conduct)
Loading