mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
More specific Behat assertion for page editability
This commit is contained in:
parent
ec41cb38ce
commit
78b9ef2df3
@ -55,14 +55,13 @@ class FixtureContext extends \SilverStripe\BehatExtension\Context\FixtureContext
|
||||
* @Then /^pages should( not? |\s*)be editable by "([^"]*)"$/
|
||||
*/
|
||||
public function pagesShouldBeEditableBy($negative, $member){
|
||||
$edit = '"/admin/pages/edit"';
|
||||
$editable = 'I should'.$negative.'see an edit page form';
|
||||
$page = \Page::get()->First();
|
||||
|
||||
return array(
|
||||
new Step\Given('I am not logged in'),
|
||||
new Step\Given('I am logged in with "'.$member.'" permissions'),
|
||||
new Step\Given('I go to '.$edit),
|
||||
new Step\Given($editable),
|
||||
new Step\Given('I am logged in with "' . $member . '" permissions'),
|
||||
new Step\Given('I go to "/admin/pages/edit/show/' . $page->ID . '"'),
|
||||
new Step\Given('I should' . $negative . 'see a "Page name" field'),
|
||||
new Step\Then('I am on the homepage')
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user