Behat: Adding context for 'Given I should not see a "xxx" button'

This commit is contained in:
Stig Lindqvist 2013-06-07 15:01:57 +12:00 committed by Ingo Schommer
parent ff5624c57e
commit 17bca1db86

View File

@ -108,4 +108,15 @@ class CmsFormsContext extends BehatContext
$element = $page->find('named', array('link_or_button', "'$text'"));
assertNotNull($element, sprintf('%s button not found', $text));
}
/**
* @Given /^I should not see a "([^"]*)" button$/
*/
public function iShouldNotSeeAButton($text)
{
$page = $this->getSession()->getPage();
$element = $page->find('named', array('link_or_button', "'$text'"));
assertNull($element, sprintf('%s button found', $text));
}
}