uninstall(['contextual']); \Drupal::service('module_installer')->install(['views_ui']); // Ensure that contextual links don't get called for admin users. $admin_user = User::load(1); $admin_user->setPassword('new_password'); $admin_user->passRaw = 'new_password'; $admin_user->save(); $this->drupalCreateContentType(['type' => 'page']); $this->drupalCreateNode(['promote' => 1]); $this->drupalLogin($admin_user); $this->drupalGet('node'); } }