diff -u b/core/modules/views/src/Tests/Handler/FieldDropButtonTest.php b/core/modules/views/src/Tests/Handler/FieldDropButtonTest.php --- b/core/modules/views/src/Tests/Handler/FieldDropButtonTest.php +++ b/core/modules/views/src/Tests/Handler/FieldDropButtonTest.php @@ -32,6 +32,16 @@ public static $modules = array('node'); /** + * {@inheritdoc} + */ + public function setUp() { + parent::setUp(); + + $admin_user = $this->drupalCreateUser(['access content overview', 'administer nodes', 'bypass node access']); + $this->drupalLogin($admin_user); + } + + /** * Tests dropbutton field. */ public function testDropbutton() { @@ -50,11 +60,10 @@ } // Check if the dropbutton.js library is available. - $admin_user = $this->drupalCreateUser(['access content overview', 'administer nodes', 'bypass node access']); - $this->drupalLogin($admin_user); $this->drupalGet('admin/content'); $this->assertRaw('dropbutton.js'); - // Check if the dropbutton.js library is available on a cached page. + // Check if the dropbutton.js library is available on a cached page to + // ensure that bubbleable metadata is not lost in the views render workflow. $this->drupalGet('admin/content'); $this->assertRaw('dropbutton.js'); }