Skip to content
Snippets Groups Projects
Verified Commit d8909624 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3308432 by devkinetic, BramDriesen, Shifali Baghel, cilefen,...

Issue #3308432 by devkinetic, BramDriesen, Shifali Baghel, cilefen, smustgrave, quietone, bnjmnm: The link on the Image tag is redirecting to an undefined page from the node preview screen

(cherry picked from commit bd6abf7c)
parent ee43e75b
Branches
Tags
5 merge requests!122353526426-warning-for-missing,!11958Issue #3490507 by alexpott, smustgrave: Fix bogus mocking in...,!11769Issue #3517987: Add option to contextual filters to encode slashes in query parameter.,!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #234121 passed with warnings
Pipeline: drupal

#234142

    Pipeline: drupal

    #234135

      Pipeline: drupal

      #234127

        ......@@ -46,7 +46,7 @@
        {
        text: Drupal.t('Leave preview'),
        click() {
        window.top.location.href = event.target.href;
        window.top.location.href = event.currentTarget.href;
        },
        },
        ],
        ......
        ......@@ -54,15 +54,29 @@ public function testPreviewLinks(): void {
        $assertSession = $this->assertSession();
        $this->drupalGet('node/add/test');
        $this->submitForm([
        'title[0][value]' => 'Test node',
        'body[0][value]' => '<a href="#foo">Anchor link</a><a href="/foo">Normal link</a>',
        'title[0][value]' => 'Test anchor link',
        'body[0][value]' => '<a href="#foo">Anchor link</a>',
        ], 'Preview');
        $this->clickLink('Anchor link');
        $assertSession->pageTextNotContains('Leave preview?');
        $this->drupalGet('node/add/test');
        $this->submitForm([
        'title[0][value]' => 'Test normal link',
        'body[0][value]' => '<a href="/foo">Normal link</a>',
        ], 'Preview');
        $this->clickLink('Normal link');
        $assertSession->pageTextContains('Leave preview?');
        $this->click('button:contains("Leave preview")');
        $this->assertStringEndsWith('/foo', $this->getUrl());
        $this->drupalGet('node/add/test');
        $this->submitForm([
        'title[0][value]' => 'Test child element link',
        'body[0][value]' => '<a href="/foo" class="preview-child-element"><span>Child element link</span></a>',
        ], 'Preview');
        $this->getSession()->getPage()->find('css', '.preview-child-element span')->click();
        $assertSession->pageTextContains('Leave preview?');
        $this->click('button:contains("Leave preview")');
        $this->assertStringEndsWith('/foo', $this->getUrl());
        }
        }
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment