Posted by wulff on May 20, 2009 at 3:09pm
| Project: | Nodequeue |
| Version: | 7.x-2.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (to be ported) |
| Issue tags: | Simpletest |
Issue Summary
To make sure my patch from #234004: Drag and drop node ordering doesn't break anything, it seems like a good idea to add test cases to the module.
(I'm aware of the old D5 cases in http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/nodequeue/t...)
First set of tests attached.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| nodequeue.test | 12.54 KB | Ignored: Check issue status. | None | None |
Comments
#1
Thanks!
Marking as needs review.
#2
Adding tests for users with the 'administer nodequeue' permissions.
Next on the list: Tests for the API functions.
#3
Added some more test cases.
#4
Added some more test cases. Current coverage is 70%.
#5
Please accept my delayed and large thanks.
When I ran these tests, almost all pass with only a few exceptions, and then I encounter a 500 error. I need to fix my testing environment so I can finish making sure that the tests pass and then this will be committed.
#6
Finally hit 90% coverage. This set of test cases will result in a few fails until we fix a few minor issues.
#7
The 500 errors were happening in part because of undefined functions called in the tests ($document->setMultiValue($key, $sqid) in nodequeue_apachesolr_update_index ) and nodequeue_ajax_add being removed from Nodequeue.module when we implemented #234004: Drag and drop node ordering. Of course, that move broke many of the tests here ;). With the nodequeue_ajax_add tests removed (and $document->setMultiValue temporarily commented out) , I'm showing 623 passes, 32 fails, and 43 exceptions.
The test results are attached as a png, which seems kind of wrong, but allows us to see the results without running the tests again.
@wulff: I'll unassign but of course feel free to join in here again ;).
#8
Here's one with all tests passing as of today, other than ApacheSolr, which I moved into a new group so that I could not run it with the rest. Mostly, there needed to be some small changes made to stay in step with error messages. In addition, I removed the up/down testing, since the table view is now draggable.
#9
Review, please!
#10
Whoops. _nodequeue_ajax_add() is no more.
Here's a new patch. It also has some tests and a mock module in place for a reroll of #606150: Hook for queue deletion .
#11
Some of these still fail when the site is in a subfolder. Further patch coming.
#12
Okay - here we go. Support for running in a subdirectory or at the site root, and a couple last fixes around how the test nodequeues were being populated.
#13
Hooray! All tests pass on the latest 6.x-2.x branch. Committed, and marking as needs porting for 7.x-2.x :).
http://drupal.org/cvs?commit=463068
Huzzaaaah!