/**
* Tests installing experimental themes and dependencies in the UI.
*/
public function testExperimentalConfirmForm(): void
{ // Only experimental themes should be marked as such with a parenthetical.
$this->
drupalGet('admin/appearance'
);
$this->
assertSession()->
responseContains(sprintf('Experimental test %s (experimental theme)', \Drupal::VERSION
));
$this->
assertSession()->
responseContains(sprintf('Experimental dependency test %s', \Drupal::VERSION
));
// First, test installing a non-experimental theme with no dependencies.
// There should be no confirmation form and no experimental theme warning.
$this->
cssSelect('a[title="Install <strong>Test theme</strong> theme"]'
)[0
]->
click();
$this->
assertSession()->
pageTextContains('The <strong>Test theme</strong> theme has been installed.'
);
$this->
assertSession()->
pageTextNotContains('Experimental modules are provided for testing purposes only.'
);
// Next, test installing an experimental theme with no dependencies.
// There should be a confirmation form with an experimental warning, but no
// list of dependencies.
$this->
drupalGet('admin/appearance'
);
$this->
cssSelect('a[title="Install Experimental test theme"]'
)[0
]->
click();
$this->
assertSession()->
pageTextContains('Experimental themes are provided for testing purposes only. Use at your own risk.'
);
// The module should not be enabled and there should be a warning and a