You are here

public function OliveroTest::testIsUninstallable in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php \Drupal\FunctionalTests\Theme\OliveroTest::testIsUninstallable()

Tests that the Olivero theme can be uninstalled.

File

core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php, line 120

Class

OliveroTest
Tests the Olivero theme.

Namespace

Drupal\FunctionalTests\Theme

Code

public function testIsUninstallable() {
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'access administration pages',
    'administer themes',
  ]));
  $this
    ->drupalGet('admin/appearance');
  $this
    ->cssSelect('a[title="Install <strong>Test theme</strong> as default theme"]')[0]
    ->click();
  $this
    ->cssSelect('a[title="Uninstall Olivero theme"]')[0]
    ->click();
  $this
    ->assertSession()
    ->pageTextContains('The Olivero theme has been uninstalled.');
}