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 tests with selenium #406

Open
dakaza98 opened this issue Mar 21, 2023 · 5 comments
Open

Add tests with selenium #406

dakaza98 opened this issue Mar 21, 2023 · 5 comments

Comments

@dakaza98
Copy link
Member

Our application needs tests in order to prevent bugs from slipping in. A good way to do this would be to use selenium which can test our application by clicking around and interacting with it. This makes it possible to test all parts that involve websockets. It also makes the tests perform the actions that uses will do

@sgronlund
Copy link
Collaborator

I'd assume this also require some initial menu items for the test to interact with?

@dakaza98
Copy link
Member Author

Yes it will be necessary

@albinantti
Copy link
Member

Could it be combined with django? I long for a dev-set up that includes auto-populating menu items, users and orders

@sgronlund
Copy link
Collaborator

sgronlund commented Mar 26, 2023

There is a feature in Django which is called fixtures which can be used to seed or initialize an environment. To get one from an existing environment, you can do python3 ./managepy dumpdata >> seed.json and then supply the file created to initialize.

NOTE: dumpdata includes every action a user has done when interacting with the system, e.g. as an admin created a menu item or deleted an order.

@dakaza98
Copy link
Member Author

Ah sweet! Though I think we should open a separate issue for creating initial data

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

No branches or pull requests

3 participants