Here's a stab at tests for issue status management. So far we've got tests creation and reordering of issue statuses. Deletion is close but currently it's failing. I'll see if I can't finish this up later this week.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

This is great, thanks! One quick thought. mikey_p is doing some good work over at #774890: Move some setup from PIFT tests to ensure that we put as much common setup code and helper functions as possible into a base class that's shared between project and project_issue. So, instead of this:

+class ProjectIssueWebTestCase extends DrupalWebTestCase {

It'd be better to extend ProjectWebTestCase instead, especially once we commit some of the goodness from #774890...

Otherwise, this looks like a great start.

Is it possible after you re-order the status values in the admin UI for you to try to create an issue and ensure that the options in the Status dropdown are in the same order? That's another important aspect to test. Eventually, it'd also be nice to test that we get the same order for the exposed filter on some of the issue views...

beeradb’s picture

Here's an update. Made text extend ProjectWebTestCase as suggested, also got deleting working, and confirmed default status was working as expected.

I'm not actually sure there's a good method for checking the ordering of options in a select using simpletest, but I'll look into that more once I have a chance.

dww’s picture

Great, thanks! Since this was written, a project_issue.test file has already landed, so this needs to be re-rolled to append code to that instead of starting one from scratch. Maybe someone at the sprint today can quickly deal with that. I'm fine with committing it once it's basically working, even if there's still /// @todo in there. ;) Haven't looked too closely at the test here, but a quick skim looks reasonable...