Loading sveltejs/public/build/bundle.js +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file sveltejs/public/build/bundle.js.map +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file sveltejs/src/ModulePage.svelte +11 −1 Changes for sveltejs/src/ModulePage.svelte: 11 added lines, 1 removed line. Original line number Diff line number Diff line <script> import { onMount } from 'svelte'; import ActionButton from './Project/ActionButton.svelte'; import Image from './Project/Image.svelte'; import ImageCarousel from './ImageCarousel.svelte'; Loading @@ -14,6 +15,15 @@ $page = 0; window.location.href = `${ORIGIN_URL}/admin/modules/browse`; } onMount(() => { const anchors = document .getElementById('description-wrapper') .getElementsByTagName('a'); for (let i = 0; i < anchors.length; i++) { anchors[i].setAttribute('target', '_blank'); } }); </script> <ol class="pb-breadcrumb"> Loading Loading @@ -90,7 +100,7 @@ <ImageCarousel sources={project.project_images} /> </div> {/if} <div>{@html project.body.value}</div> <div id="description-wrapper">{@html project.body.value}</div> </div> </div> Loading tests/fixtures/projects_fixture.json +1 −1 Changes for tests/fixtures/projects_fixture.json: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -475,7 +475,7 @@ "status": "1", "project_data": { "body": { "summary": "<p>Text here for fake summary content.</p>" "summary": "<p>Text here for fake summary content. <a href=\"http://example.com\">Example</a></p>" }, "field_project_images": [], "field_project_machine_name": "helvetica", Loading tests/src/FunctionalJavascript/ProjectBrowserUiTest.php +16 −0 Changes for tests/src/FunctionalJavascript/ProjectBrowserUiTest.php: 16 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -216,6 +216,22 @@ class ProjectBrowserUiTest extends WebDriverTestBase { $this->assertTrue($assert_session->waitForText('23 Results')); } /** * Tests the Target blank functionality. */ public function testTargetBlank(): void { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); $this->drupalGet('admin/modules/browse'); $this->svelteInitHelper('text', 'Helvetica'); $page->clickLink('Helvetica'); $this->assertTrue($assert_session->waitForText('Categories:')); $link = $page->find('css', '.box-2 a'); $target = $link->getAttribute('target'); $this->assertEquals('_blank', $target); } /** * Tests paging through results. */ Loading Loading
sveltejs/public/build/bundle.js +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file
sveltejs/public/build/bundle.js.map +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file
sveltejs/src/ModulePage.svelte +11 −1 Changes for sveltejs/src/ModulePage.svelte: 11 added lines, 1 removed line. Original line number Diff line number Diff line <script> import { onMount } from 'svelte'; import ActionButton from './Project/ActionButton.svelte'; import Image from './Project/Image.svelte'; import ImageCarousel from './ImageCarousel.svelte'; Loading @@ -14,6 +15,15 @@ $page = 0; window.location.href = `${ORIGIN_URL}/admin/modules/browse`; } onMount(() => { const anchors = document .getElementById('description-wrapper') .getElementsByTagName('a'); for (let i = 0; i < anchors.length; i++) { anchors[i].setAttribute('target', '_blank'); } }); </script> <ol class="pb-breadcrumb"> Loading Loading @@ -90,7 +100,7 @@ <ImageCarousel sources={project.project_images} /> </div> {/if} <div>{@html project.body.value}</div> <div id="description-wrapper">{@html project.body.value}</div> </div> </div> Loading
tests/fixtures/projects_fixture.json +1 −1 Changes for tests/fixtures/projects_fixture.json: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -475,7 +475,7 @@ "status": "1", "project_data": { "body": { "summary": "<p>Text here for fake summary content.</p>" "summary": "<p>Text here for fake summary content. <a href=\"http://example.com\">Example</a></p>" }, "field_project_images": [], "field_project_machine_name": "helvetica", Loading
tests/src/FunctionalJavascript/ProjectBrowserUiTest.php +16 −0 Changes for tests/src/FunctionalJavascript/ProjectBrowserUiTest.php: 16 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -216,6 +216,22 @@ class ProjectBrowserUiTest extends WebDriverTestBase { $this->assertTrue($assert_session->waitForText('23 Results')); } /** * Tests the Target blank functionality. */ public function testTargetBlank(): void { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); $this->drupalGet('admin/modules/browse'); $this->svelteInitHelper('text', 'Helvetica'); $page->clickLink('Helvetica'); $this->assertTrue($assert_session->waitForText('Categories:')); $link = $page->find('css', '.box-2 a'); $target = $link->getAttribute('target'); $this->assertEquals('_blank', $target); } /** * Tests paging through results. */ Loading