The way project_issue integrates with comment is some of the key functionality in issue queue, and it's also some of the most fragile. I'm not sure if this should be a meta issue to track other issues for each subtask, or if I should just list some of the major areas here and folks can attach patches for them all here. Anyway, things we desperately need tests for:

A) The right issue metadata fields exist on the comment form (and e.g. Version isn't there without project_release enabled and release nodes existing -- this part is probably blocked on #775052: Automated tests for project_release module)

B) Adding a comment that changes properties -- make sure the properties of the issue change

C) Previewing the changes to an issue based on a comment

D) What happens during cross posting (see #218066: Prevent cross posting from reverting metadata fields)?

There's almost certainly more, but those were some of the main areas I had in mind. Just wondering if it makes sense to tackle all these in this one issue or not...

CommentFileSizeAuthor
#3 775102-issue_comments_tests-A-3.patch3.77 KBdmitrig01

Comments

dww’s picture

p.s. I don't think project_issue.test should be testing comment_upload itself. We're not doing anything special to alter the comment_upload behavior, so I'd rather see tests for that in comment_upload.test itself.

dmitrig01’s picture

Assigned: Unassigned » dmitrig01
dmitrig01’s picture

StatusFileSize
new3.77 KB
dww’s picture

Reconciled #3 with HEAD, then committed. Yay! Still active for B and C.

D is going to be a pain in the butt, and should move into #218066: Prevent cross posting from reverting metadata fields...

mikey_p’s picture

+++ project_issue.test	20 Apr 2010 18:44:36 -0000
@@ -38,8 +39,12 @@ class ProjectIssueWebTestCase extends Pr
+    return $edit;

I'd like to see if we could return something more helpful here. These are just the values passed to post, and there is no verification that they actually made it into the DB, or were saved correctly.

+++ project_issue.test	20 Apr 2010 18:44:36 -0000
@@ -73,6 +78,61 @@ class ProjectIssueCreationTestCase exten
+class ProjectIssueCommentTestCase extends ProjectIssueWebTestCase {

Do we need to break each of these type of test out into a separate class? Doesn't this increase testing time, to setup and teardown a new site?

+++ project_issue.test	20 Apr 2010 18:44:36 -0000
@@ -73,6 +78,61 @@ class ProjectIssueCreationTestCase exten
+    $html = $this->drupalGet('comment/reply/' . $issue->nid);

$html is not used anywhere else in this method.

I'll try to roll some changes to this in a new patch this afternoon.

Powered by Dreditor.

dww’s picture

@mikey_p: Yeah, so long as they're separate test methods, I agree it'd be better to have a single ProjectIssueTestCase class for most of the setup. Good point. Thanks!