This is a followup for #731724: Convert comment settings into a field to make them work with CMI and non-node entities and #1812034: Only use standard profile where necessary in comment.module tests (10% bot speed-up).

Currently, the comment module tests are slow, bloated, fragile, and tightly coupled.

Proposed resolution

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 #1806334: Replace the node listing at /node with a view from CommentNewIndicatorTest and CommentLinksTest, and test comment teaser rendering with a test implementation or direct API call instead of the frontpage node listing. (See #1847554: Decouple SummaryLengthTest from the node frontpage (and make it a bit faster).)
  • Use a proper xpath to check for the rendering of specific comments or comment elements instead of the weird regex in CommentTestBase::commentExists(). (See CommentThreadingTest::assertParentLink() for an example.)
  • Remove all the unnecessary debug() stuff.

Remaining tasks

This can happen later, and it doesn't make much sense to do it before #731724: Convert comment settings into a field to make them work with CMI and non-node entities, since that issue has already resolved its test failures. We can file individual issues for the above tasks then.

#7 irc_log.txt4.16 KBandypost


Issue summary:View changes

Updated issue summary.

I think this is a D9 issue now. Right?

@Gaelan Nah, changes to automated tests don't break backwards compatibility, so we can add them whenever. In this case, the issue we're waiting on is also still in progress for D8 because of its importance.

Status:Postponed» Active

Comment module - API changes
#2113323: Rename Comment::permalink() method to not be ambiguous with ::uri()
- #2010202-14: Comment permalinks are lacking context and present a Usability regression (for e.g.
#2028025: Expand CommentInterface to provide methods
#2188287: Split CommentManager in two
#2169361: Convert COMMENT_HIDDEN & COMMENT_CLOSED & COMMENT_OPEN to a constant on the comment field interface Assigned to: larowlan
#2097123: Deprecate comment_num_new() in favour of method on CommentManager
#2156089: Deprecate comment_get_thread() in favour of method on CommentManager
#2068331: Convert comment SQL queries to the Entity Query API Assigned to: roderik

History module (api clean-up)
#1029708: History table for any entity
#2081585: Introduce HistoryRepository service Assigned to: catch

Comment statistics - nice to have
#2101183: Move {comment_entity_statistics} to proper service Assigned to: larowlan
#148849: Refactor {comment_entity_statistics} into performant Field Assigned to: David Strauss

#2031883: Markup for: comment.html.twig
#1962846: Use field instance name for header of comment list, drop comment-wrapper template

#1903138: Move global comment permissions to field level Assigned to: larowlan
#2099421: Add an administrative description for a comment field
#1901110: Improve the UX for comment bundle pages and comment field settings

#2028025: Expand CommentInterface to provide methods
#2078387: Add an EntityOwnerInterface
#2099105: Clean-up render cache when permission changes

#1963340: Change field UI so that adding a field is a separate task Assigned to: amateescu
#552604: Adding new fields leads to a confusing "Field settings" form
#1875974: Abstract 'component type' specific code out of EntityDisplay

Clean-up - fixed
#2083895: Clean-up comment module doc blocks
#1978904: Convert comment_admin() to a Controller
#1975962: Move comment_links() into CommentRenderController
#1397282: Set comment #default_value to 'Hidden' for new node types

#2151427: Convert COMMENT_NOT_PUBLISHED & COMMENT_PUBLISHED to a constant on the comment interface
#2054993: Remove (untested, unused, broken) comment_get_recent() vs #1938062: Convert the recent_comments block to a view
#2111357: Get rid of comment_count_unpublished() in favor of CommentManager method
#2157695: Remove unused _comment_get_modes()
#2157703: Deprecate comment_int_to_alphadecimal() & comment_alphadecimal_to_int() in favour of methods in Number component

Issue summary:View changes

Updated issue summary.

Lets do this

Suppose #4 better move to subject or do we need separate issue

Issue summary:View changes
Related issues:+#2042165: Consider adding a 'deprecated' module
new4.16 KB

Discussed with catch at IRC, the suggestion is to preserve all old stuff by marking deprecated

For the record, I agree with points in #4

anyone mind if we re-title this 'Comment/Forum/History path to beta'?

awesome idea, I just editing comment to not send notifications to all followers

@andypost: Editing an existing comment on a meta issue defeats the purpose of a meta issue though. Most people who follow a meta issue do so with the intention to get notified when additional issues arise or to learn about new conclusions that are being drawn.

It would be best to move the comment in #4 into the issue summary.

That said, I've the impression that comment #4 suddenly started to re-purpose this meta issue to have a different goal than the original issue summary. → All issues that were originally referenced in the issue summary are closed as fixed already. So it might actually make most sense to move that comment into a new meta issue and mark this meta issue here as fixed, because apparently, all tasks of the original meta issue are done. ;)

Status:Fixed» Active

As far as I know the comment module tests still suffer all the deficiencies listed in the summary.