This is a followup forand .
Currently, the comment module tests are slow, bloated, fragile, and tightly coupled.
Once comment is decoupled from node, we can clean up the existing tests. Tasks:
- Use more unit tests.
- Use more API calls instead of performing every single CRUD operation through the UI.
- Use test entities instead of nodes for testing basic comment functionality.
- Remove the Views dependency added in
CommentLinksTest, and test comment teaser rendering with a test implementation or direct API call instead of the frontpage node listing. (See .)
- Use a proper xpath to check for the rendering of specific comments or comment elements instead of the weird regex in
CommentThreadingTest::assertParentLink()for an example.)
- Remove all the unnecessary
This can happen later, and it doesn't make much sense to do it before, since that issue has already resolved its test failures. We can file individual issues for the above tasks then.