mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02: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 "([^"]*)"$/
|
* @Then /^pages should( not? |\s*)be editable by "([^"]*)"$/
|
||||||
*/
|
*/
|
||||||
public function pagesShouldBeEditableBy($negative, $member){
|
public function pagesShouldBeEditableBy($negative, $member){
|
||||||
$edit = '"/admin/pages/edit"';
|
$page = \Page::get()->First();
|
||||||
$editable = 'I should'.$negative.'see an edit page form';
|
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
new Step\Given('I am not logged in'),
|
new Step\Given('I am not logged in'),
|
||||||
new Step\Given('I am logged in with "'.$member.'" permissions'),
|
new Step\Given('I am logged in with "' . $member . '" permissions'),
|
||||||
new Step\Given('I go to '.$edit),
|
new Step\Given('I go to "/admin/pages/edit/show/' . $page->ID . '"'),
|
||||||
new Step\Given($editable),
|
new Step\Given('I should' . $negative . 'see a "Page name" field'),
|
||||||
new Step\Then('I am on the homepage')
|
new Step\Then('I am on the homepage')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user