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...
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 775102-issue_comments_tests-A-3.patch | 3.77 KB | dmitrig01 |
Comments
Comment #1
dwwp.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.
Comment #2
dmitrig01 commentedComment #3
dmitrig01 commentedComment #4
dwwReconciled #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...
Comment #5
mikey_p commentedI'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.
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?
$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.
Comment #6
dww@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!