mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Add support in "I should see a message" step definition for Bootstrap alerts
This commit is contained in:
parent
0a64b07b2c
commit
274657f4f8
@ -85,7 +85,13 @@ class CmsUiContext implements Context
|
|||||||
*/
|
*/
|
||||||
public function iShouldSeeAMessage($message)
|
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()
|
protected function getCmsTabsElement()
|
||||||
|
Loading…
Reference in New Issue
Block a user