Skip to content
Snippets Groups Projects
Commit f4dd670f authored by Adam G-H's avatar Adam G-H Committed by Adam G-H
Browse files

Broaden the assertion

parent 2fd2fe7b
Branches
Tags
1 merge request!486Issue #3480568: Admin UI recipe creates a dashboard block but does not require Dashboard
Pipeline #414763 skipped
......@@ -35,6 +35,14 @@ class ComponentValidationTest extends BrowserTestBase {
$footer = $assert_session->elementExists('css', 'nav > h3:contains("Administrative toolbar footer")')
->getParent();
$assert_session->elementNotExists('named', ['link', 'Help'], $footer);
$this->drupalLogout();
// Ensure that there are no broken blocks in the navigation (or anywhere
// else). We need to test this with the root user because they have all
// permissions, and therefore any broken blocks in the navigation will be
// obvious to them.
$this->drupalLogin($this->rootUser);
$assert_session->pageTextNotContains('This block is broken or missing.');
}
}
<?php
declare(strict_types=1);
namespace Drupal\Tests\drupal_cms_admin_theme\Functional;
use Drupal\FunctionalTests\Core\Recipe\RecipeTestTrait;
use Drupal\Tests\BrowserTestBase;
/**
* @group drupal_cms_admin_ui
*/
class StandardCompatibilityTest extends BrowserTestBase {
use RecipeTestTrait;
/**
* {@inheritdoc}
*/
protected $profile = 'standard';
public function testNavigationHasNoBrokenBlocks(): void {
$dir = realpath(__DIR__ . '/../../..');
$this->applyRecipe($dir);
// We need to test with the root user because they have all permissions, and
// therefore any broken blocks in the navigation will be obvious to them.
$this->drupalLogin($this->rootUser);
$this->assertSession()->elementTextNotContains('css', '#admin-toolbar', 'This block is broken or missing.');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment