mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Added iShouldSeeAButton assertion
This commit is contained in:
parent
7d6edccb0a
commit
ba7dfcfd54
@ -98,4 +98,14 @@ class CmsFormsContext extends BehatContext
|
|||||||
|
|
||||||
$this->getMainContext()->assertElementContains('#' . $inputField->getAttribute('id'), $value);
|
$this->getMainContext()->assertElementContains('#' . $inputField->getAttribute('id'), $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Given /^I should see a "([^"]*)" button$/
|
||||||
|
*/
|
||||||
|
public function iShouldSeeAButton($text)
|
||||||
|
{
|
||||||
|
$page = $this->getSession()->getPage();
|
||||||
|
$element = $page->find('named', array('link_or_button', "'$text'"));
|
||||||
|
assertNotNull($element, sprintf('%s button not found', $text));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user