piratar / wasa2il

Direct democracy system
https://x.piratar.is
Other
28 stars 16 forks source link

WIP: Add basic selenium tests. #198

Closed viktorsmari closed 6 years ago

viktorsmari commented 6 years ago

This will:

The following is still needed:

viktorsmari commented 6 years ago

I put the tests.py file in wasa2il/tests.py - Feel free to move it elsewhere.

Run it with: ./manage.py test wasa2il

But you need geckodriver https://github.com/mozilla/geckodriver/releases in /usr/local/bin

Also selenium is needed: pip install selenium

Is there a way in Django to have dependencies only for development environment? Rails does this but I am new to Django. Because Selenium won't be needed for the production server, I was reluctant to add it to the requirements.txt.

helgihg commented 6 years ago

I don't mind Selenium being a requirement for a production environment, seeing that it's required for testing purposes. So I wouldn't mind it being included in the general requirements file. What do you think, @smari ?

helgihg commented 6 years ago

I don't quite understand this merge request yet. Can you elaborate a bit on it, @viktorsmari ?

viktorsmari commented 6 years ago

The final objective was to have a 'front end' test. A test that clicks around and does stuff. This is still a 'work in progress' (WIP) - so I was hoping someone motivated would continue the work. Feel free to delete it if it is in your way ;)

helgihg commented 6 years ago

@viktorsmari Okay, cool, I'll close it for now, but feel free to re-open or re-submit when you feel it's appropriate. :) Thanks for your efforts, they are most surely appreciated!