Merge pull request #8377 from creative-commoners/pulls/4.3/bootstrap-alerts

NEW Use Bootstrap alerts throughout the CMS
This commit is contained in:
Robbie Averill 2018-11-09 14:27:38 +02:00 committed by GitHub
commit a12a5b7168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -7,7 +7,7 @@
<body class="cms cms-security fill-height">
<% with $Form %>
<% if $Message %>
<div class="cms-security__container__error message $MessageType">
<div class="cms-security__container__error alert $AlertType">
<p id="{$FormName}_error">$Message</p>
</div>
<% end_if %>

View File

@ -85,7 +85,13 @@ class CmsUiContext implements Context
*/
public function iShouldSeeAMessage($message)
{
$page = $this->getMainContext()->getSession()->getPage();
if ($page->find('css', '.message')) {
$this->getMainContext()->assertElementContains('.message', $message);
} else {
// Support for new Bootstrap alerts
$this->getMainContext()->assertElementContains('.alert', $message);
}
}
protected function getCmsTabsElement()