Skip to content
Snippets Groups Projects
Verified Commit 71ac91d7 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #221761 by mohit_aghera, pameeela, dixon_, catch, ged3000, sun,...

Issue #221761 by mohit_aghera, pameeela, dixon_, catch, ged3000, sun, deepakaryan1988, smustgrave, stefank, jredding, dawehner, harshit97, xjm, jhedstrom, geertvd, alexpott, Dries: Hide reply link for unpublished comments

(cherry picked from commit 6067ed42)
parent 0a457780
No related branches found
No related tags found
9 merge requests!10602Issue #3438769 by vinmayiswamy, antonnavi, michelle, amateescu: Sub workspace does not clear,!10301Issue #3469309 by mstrelan, smustgrave, moshe weitzman: Use one-time login...,!10187Issue #3487488 by dakwamine: ExtensionMimeTypeGuesser::guessMimeType must support file names with "0" (zero) like foo.0.zip,!9929Issue #3445469 by pooja_sharma, smustgrave: Add additional test coverage for...,!9787Resolve issue 3479427 - bootstrap barrio issue under Windows,!9742Issue #3463908 by catch, quietone: Split OptionsFieldUiTest into two,!6502Draft: Resolve #2938524 "Plach testing issue",!38582585169-10.1.x,!3226Issue #2987537: Custom menu link entity type should not declare "bundle" entity key
Pipeline #292413 passed with warnings
Pipeline: drupal

#292442

    Pipeline: drupal

    #292436

      Pipeline: drupal

      #292427

        +1
        ......@@ -184,7 +184,8 @@ protected function buildLinks(CommentInterface $entity, EntityInterface $comment
        ];
        }
        $field_definition = $commented_entity->getFieldDefinition($entity->getFieldName());
        if ($entity->access('create')
        if ($entity->isPublished()
        && $entity->access('create')
        && $field_definition->getSetting('default_mode') === CommentManagerInterface::COMMENT_MODE_THREADED) {
        $links['comment-reply'] = [
        'title' => t('Reply'),
        ......
        ......@@ -18,6 +18,31 @@ class CommentThreadingTest extends CommentTestBase {
        */
        protected $defaultTheme = 'stark';
        /**
        * Check the reply link on unpublished comments.
        */
        public function testCommentReplyLinkUnpublished(): void {
        // Set comments to have a subject with preview disabled.
        $this->setCommentPreview(DRUPAL_DISABLED);
        $this->setCommentForm(FALSE);
        $this->setCommentSettings('default_mode', CommentManagerInterface:: COMMENT_MODE_THREADED, 'Comment paging changed.');
        // Create a node.
        $this->drupalLogin($this->adminUser);
        $this->node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1, 'uid' => $this->webUser->id()]);
        // Post comment #1.
        $comment_text = $this->randomMachineName();
        $comment1 = $this->postComment($this->node, $comment_text, '', TRUE);
        $this->drupalGet($this->node->toUrl());
        $this->assertSession()->pageTextContains('Reply');
        $comment1->setUnpublished();
        $comment1->save();
        $this->drupalGet($this->node->toUrl());
        $this->assertSession()->pageTextNotContains('Reply');
        }
        /**
        * Tests the comment threading.
        */
        ......@@ -33,7 +58,6 @@ public function testCommentThreading(): void {
        $this->node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1, 'uid' => $this->webUser->id()]);
        // Post comment #1.
        $this->drupalLogin($this->webUser);
        $subject_text = $this->randomMachineName();
        $comment_text = $this->randomMachineName();
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment