diff --git a/tests/behat/features/create-a-page.feature b/tests/behat/features/create-a-page.feature index eb776b26..1a689aa6 100644 --- a/tests/behat/features/create-a-page.feature +++ b/tests/behat/features/create-a-page.feature @@ -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" diff --git a/tests/behat/features/publish-a-page.feature b/tests/behat/features/publish-a-page.feature index 07ec109d..5181c914 100644 --- a/tests/behat/features/publish-a-page.feature +++ b/tests/behat/features/publish-a-page.feature @@ -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 diff --git a/tests/behat/src/FixtureContext.php b/tests/behat/src/FixtureContext.php index b2f7df6c..60f14317 100644 --- a/tests/behat/src/FixtureContext.php +++ b/tests/behat/src/FixtureContext.php @@ -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