diff --git a/tests/behat/src/CmsUiContext.php b/tests/behat/src/CmsUiContext.php index 209835615..aea6f2ea1 100644 --- a/tests/behat/src/CmsUiContext.php +++ b/tests/behat/src/CmsUiContext.php @@ -85,7 +85,13 @@ class CmsUiContext implements Context */ public function iShouldSeeAMessage($message) { - $this->getMainContext()->assertElementContains('.message', $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()