Update functional tests to more fully check that the eRegs user interface is working as expected
Additions
Added tests for search
Added tests for responsiveness
Changes
Updated tests for diffs
Updated tests for the table of contents
Updated tests for navigation
Updated tests for interpretation
Testing
Break out those terminal tabs!
In one tab, start up regulations-site (e.g. python manage.py runserver 8001)
In a second tab, go to the root of regulations-site and start up the dummy API with ./dummy_api/start.sh 0.0.0.0:8282 (or whatever port you usually run the real API from regulations-core on)
In a third tab, start up Sauce Connect however you usually do that
Visit http://localhost:8001/ (or whatever port you're running regulations-site on) in a browser; you should see only a single regulation, 1005, on the home screen, and all the content for that regulation should be placeholder gibberish
In a fourth terminal tab, go to the root of regulations-site and run grunt test
Waaaaaaaaiiiiiiit for all the functional tests to run in both Chrome and IE on Sauce Labs (it'll take 6–7 minutes for everything to finish)
Verify that all the tests pass
If you want to, log into Sauce Labs to watch the recordings of the tests to make sure they're doing the right things
Screenshots
You should see this in your terminal when grunt test finishes:
Notes
I know almost nothing about Python, yet here you are reviewing a bunch of Python code I wrote 😄 . Definitely let me know if it would make sense to refactor anything (at least I managed not to use any terminal semicolons, I think).
Todos
As noted in search_test.py, search isn't actually working locally. When you search for any term, the app returns every section of the dummy reg as a result. So right now the search test can't fully test searching a reg, but it does check to make sure that all the UI elements used to do a search work. When we get search working locally, it should be pretty easy to update search_test.py to account for correct search results. Should we hold off on adding search_test.py until then, though?
Update functional tests to more fully check that the eRegs user interface is working as expected
Additions
Changes
Testing
regulations-site
(e.g.python manage.py runserver 8001
)regulations-site
and start up the dummy API with./dummy_api/start.sh 0.0.0.0:8282
(or whatever port you usually run the real API fromregulations-core
on)http://localhost:8001/
(or whatever port you're runningregulations-site
on) in a browser; you should see only a single regulation, 1005, on the home screen, and all the content for that regulation should be placeholder gibberishregulations-site
and rungrunt test
Screenshots
You should see this in your terminal when
grunt test
finishes:Notes
Todos
search_test.py
, search isn't actually working locally. When you search for any term, the app returns every section of the dummy reg as a result. So right now the search test can't fully test searching a reg, but it does check to make sure that all the UI elements used to do a search work. When we get search working locally, it should be pretty easy to updatesearch_test.py
to account for correct search results. Should we hold off on addingsearch_test.py
until then, though?