only in patch2: unchanged: --- /dev/null +++ b/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php @@ -0,0 +1,42 @@ +placeBlock('system_branding_block', ['id' => 'branding']); + $this->drupalLogin($this->drupalCreateUser([ + 'access contextual links' + ])); + } + + /** + * Tests the visibility of contextual links. + */ + public function testContextualLinksVisibility() { + $this->drupalGet('user'); + $this->assertSession()->elementNotExists('css', '.contextual button'); + + // Ensure visibility remains correct after cached paged load. + $this->drupalGet('user'); + $this->assertSession()->elementNotExists('css', '.contextual button'); + } +}