Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Hacktoberfest: Cypress E2E tests #392

Open
FredrikOseberg opened this issue Oct 5, 2021 · 6 comments
Open

Hacktoberfest: Cypress E2E tests #392

FredrikOseberg opened this issue Oct 5, 2021 · 6 comments

Comments

@FredrikOseberg
Copy link
Contributor

FredrikOseberg commented Oct 5, 2021

Want to contribute for hactoberfest? Help us improve our frontend E2E testing. We use a framework called Cypress and would like to extend the E2E testing to more CRUD based operations in our frontend application:

  • Custom strategies CRUD
  • Tag Types CRUD
  • Addons CRUD [In Progress ] @jyoungiv

Examples on how to implement the tests can be found in:

cypress/integration/feature.spec.js

The tests needs a user to run. Before you begin you should create a test user in the application. Currently the tests expects a user to exists with the following credentials:

test@test.com / qY70$NDcJNXA

After you've set up the test user, try running the tests by running yarn e2e.

@jyoungiv
Copy link

jyoungiv commented Oct 5, 2021

I would like to contribute, may I be assigned?

@FredrikOseberg
Copy link
Contributor Author

I would like to contribute, may I be assigned?

Certainly. I'll update the Addons (Create, Read, Update, Delete) to in progress. Please let me know if you need any help to get started. If you have any questions or need any input please reach out to me either here or through our slack community: https://join.slack.com/t/unleash-community/shared_invite/zt-8b6l1uut-LL67kLpIXm9bcN3~6RVaRQ

Thanks!

@devcer
Copy link

devcer commented Oct 14, 2021

Do you need any help? Can I contribute to this?

@ivarconr
Copy link
Member

yes please @devcer

@devcer
Copy link

devcer commented Oct 15, 2021

Hey @ivarconr , How do I run the unleash-api? I did not find any repo with that name. I'm getting this error without running api on yarn start

Screenshot 2021-10-15 at 1 19 21 PM

I started frontend with heroku using yarn run start:heroku but when I run cypress tests using yarn run e2e, it throws out an error probably because the password field isn't present on the UI. Any suggestions
Screenshot 2021-10-15 at 1 26 39 PM
?

@FredrikOseberg
Copy link
Contributor Author

FredrikOseberg commented Oct 15, 2021

Hey @ivarconr , How do I run the unleash-api? I did not find any repo with that name. I'm getting this error without running api on yarn start

Screenshot 2021-10-15 at 1 19 21 PM

I started frontend with heroku using yarn run start:heroku but when I run cypress tests using yarn run e2e, it throws out an error probably because the password field isn't present on the UI. Any suggestions Screenshot 2021-10-15 at 1 26 39 PM ?

@devcer

If you want to run the E2E tests against the heroku instance you must add omit the PASSWORD_AUTH=true parameter in the e2e test command. You can try running the same command without this parameter, or you could set up your own local instance of unleash as outlined here

I recommend you set up your own instance in order to run the test as without an API key the cleanup (deleting the toggles) won't work correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants