mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Behat: Adding context for 'Given I should not see a "xxx" button'
This commit is contained in:
parent
ff5624c57e
commit
17bca1db86
@ -108,4 +108,15 @@ class CmsFormsContext extends BehatContext
|
|||||||
$element = $page->find('named', array('link_or_button', "'$text'"));
|
$element = $page->find('named', array('link_or_button', "'$text'"));
|
||||||
assertNotNull($element, sprintf('%s button not found', $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));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user