diff --git a/core/modules/simpletest/tests/src/FunctionalJavascript/BrowserWithJavascriptTest.php b/core/modules/simpletest/tests/src/FunctionalJavascript/BrowserWithJavascriptTest.php index 2439799..e39d90b 100644 --- a/core/modules/simpletest/tests/src/FunctionalJavascript/BrowserWithJavascriptTest.php +++ b/core/modules/simpletest/tests/src/FunctionalJavascript/BrowserWithJavascriptTest.php @@ -62,4 +62,29 @@ public function testCreateScreenshot() { $this->assertFileExists('public://screenshot.jpg'); } + /** + * Tests behaviors related to clicking on elements with nested elements. + */ + public function testNestedClick() { + $this->drupalGet(''); + $session = $this->getSession(); + + // Create an anchor element with a nested
. + $javascript = <<executeScript($javascript); + + // Attempt to click the anchor tag. + $this->click('#anchor-with-children'); + $this->assertContains('#my-anchor', $session->getCurrentUrl()); + } + }