-
Notifications
You must be signed in to change notification settings - Fork 80
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
First Cypress integration test: user login. #328
Comments
Hi @dadiorchen , the Cypress tests are supposed to run in the development and release candidates only right? Not on production? |
Hi, @phips30 I already on this for a while. It's a little difficult to make these all stuff work together, please check my work on this branch: https://github.com/Greenstand/treetracker-admin/tree/organization on client-side: to run cypress: npm run cypress |
Currently, in admin panel, we have installed Cypress and have some experimental tests under client/cypress/integration, now we need to put them together to work correctly, requirements:
to run a special server for the integration tests only. The major difference from the normal server is that it would seed data for test automatically.
Currently, just need minimal data for user login. Like: a user record in 'amdin_user', and some necessary data like: admin roles. With these data, we can emulate user login in the first integration test.
Build a test to login using the data seeded in DB by the step above. (We already have some basic setting for Cypress and example tests under client/cypress/integration folder)
So in this way, we can run the login test and all the data is self-sufficient, we just need a connection to connect to the database.
The text was updated successfully, but these errors were encountered: