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.

AttachmentSizeStatusTest resultOperations
nodequeue.test12.54 KBIgnored: Check issue status.NoneNone

Comments

#1

Status:active» needs review

Thanks!
Marking as needs review.

#2

Adding tests for users with the 'administer nodequeue' permissions.

Next on the list: Tests for the API functions.

AttachmentSizeStatusTest resultOperations
nodequeue.test16.82 KBIgnored: Check issue status.NoneNone

#3

Added some more test cases.

AttachmentSizeStatusTest resultOperations
nodequeue.test28.9 KBIgnored: Check issue status.NoneNone

#4

Added some more test cases. Current coverage is 70%.

AttachmentSizeStatusTest resultOperations
nodequeue.test36.43 KBIgnored: Check issue status.NoneNone
nodequeue_coverage.pdf234.15 KBIgnored: Check issue status.NoneNone

#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.

AttachmentSizeStatusTest resultOperations
nodequeue.test49.02 KBIgnored: Check issue status.NoneNone
nodequeue_coverage.pdf212.75 KBIgnored: Check issue status.NoneNone

#7

Assigned to:wulff» Anonymous
Status:needs review» needs work

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.

AttachmentSizeStatusTest resultOperations
nodequeue.test49.22 KBIgnored: Check issue status.NoneNone

#9

Status:needs work» needs review

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 .

AttachmentSizeStatusTest resultOperations
nodequeue.test49.07 KBIgnored: Check issue status.NoneNone
testqueue.info.txt187 bytesIgnored: Check issue status.NoneNone
testqueue.module.txt181 bytesIgnored: Check issue status.NoneNone

#11

Status:needs review» needs work

Some of these still fail when the site is in a subfolder. Further patch coming.

#12

Status:needs work» needs review

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.

AttachmentSizeStatusTest resultOperations
nodequeue.test48.42 KBIgnored: Check issue status.NoneNone

#13

Status:needs review» patch (to be ported)

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!

nobody click here