mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge branch '4.7' into 4
This commit is contained in:
commit
a6a3b3829c
@ -33,9 +33,9 @@ Feature: Create a page
|
||||
Scenario: I cannot add root level pages without permission
|
||||
When I go to "/admin/settings"
|
||||
And I click the "Access" CMS tab
|
||||
And I click the "#Form_EditForm_CanCreateTopLevelType_OnlyTheseUsers" element
|
||||
And I click on the "#Form_EditForm_CanCreateTopLevelType_OnlyTheseUsers" element
|
||||
And I press the "Save" button
|
||||
And I click the ".cms-login-status__logout-link" element
|
||||
And I click on the ".cms-login-status__logout-link" element
|
||||
When I am logged in with "AUTHOR" permissions
|
||||
And I press the "Add new" button
|
||||
Then I see the "Top level" radio button "disabled" attribute equals "1"
|
||||
|
@ -85,7 +85,7 @@ Feature: Publish a page
|
||||
# Use a css-selector instead of the the "Archive" button otherwise it will get confused with
|
||||
# the "Archive" model admin
|
||||
Then I see the "#Form_EditForm_action_archive" element
|
||||
When I click the "#Form_EditForm_action_archive" element, confirming the dialog
|
||||
When I click on the "#Form_EditForm_action_archive" element, confirming the dialog
|
||||
|
||||
Then I should see a "Restore" button
|
||||
And I should not see a "Published" button
|
||||
|
@ -80,33 +80,6 @@ class FixtureContext extends BehatFixtureContext
|
||||
$obj->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^I click the "([^"]+)" element$/
|
||||
* @param $selector
|
||||
*/
|
||||
public function iClickTheElement($selector)
|
||||
{
|
||||
/** @var DocumentElement $page */
|
||||
$page = $this->getMainContext()->getSession()->getPage();
|
||||
$element = $page->find('css', $selector);
|
||||
|
||||
assertNotNull($element, sprintf('Element %s not found', $selector));
|
||||
|
||||
$element->click();
|
||||
}
|
||||
|
||||
/**
|
||||
* Needs to be in single command to avoid "unexpected alert open" errors in Selenium.
|
||||
*
|
||||
* @When /^I click the "([^"]+)" element, confirming the dialog$/
|
||||
* @param $selector
|
||||
*/
|
||||
public function iClickTheElementConfirmingTheDialog($selector)
|
||||
{
|
||||
$this->iClickTheElement($selector);
|
||||
$this->basicContext->iConfirmTheDialog();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^I see the "([^"]+)" element$/
|
||||
* @param $selector
|
||||
|
Loading…
Reference in New Issue
Block a user