edx/edx-platform — pull request #140 by JonahStanley (2013-06-12 13:52:45+00:00)
Title: Jonahstanley/add courseteam tests

Suggested reviewers: @wedaly @jzoldak
In these files, I have added the following testing features:
1. CMS tests now pull from their own contentstore database. This mirrors the behavior of how cms interacts with the modulestore databse and allows for it to be refreshed upon each scenario.

2. Upload
This tests the file uploading page. These tests mostly cover uploading a file and making sure if the same file is uploaded twice, it only appears once. At the moment, it was not feasible to be able to download a file, access it, and clean up at the end during the test. This would allow for making sure the download / update worked by checking the hash of the file.

3. Course Team
The ability to add and remove other users to the course team was tested. When another user is added, they can then access the course in their studio. Also, it is not possible to add a user who does not exist. Lastly, the added user is not able to add or delete other users. I also changed the common.py such that the course name/org/number are constants that can be changed at the top of the file and also allows for other tests to import those names.

4. Static Pages
The ability to add, delete and edit static pages was tested. Also, ostensibly, the sortability was tested. As of this pull request, selenium does not interact well with jQuery Sortable items. Thus, I had to introduce a somewhat hack in order to at least gain the visual affects of sorting. However, it is very fragile upon refreshing the page, the order does not necessarily propagate. This is due to the amount of events that sorting fires during the moving process and the difficulty in manually firing all of the dependent events. This method was also added to the world such that it could be possible to test reordering in other places. It takes the css class of the items, the 2 indicies, and the css class of the sortable table/thing.

5. Course Updates/Handouts
The ability to add/delete/edit course updates was tested as well as the ability to update the dates of the updates and the ability to change the handouts.

Hopefully, with these new testing features, every page of studio is now tested. The only known thing that isn't tested is drag and drop / sortability of subsections and sections. This is due to the aforementioned issue with drag and drop as well as when I manually tested it, it was a bit buggy.