Last active
December 12, 2015 07:08
-
-
Save jmolivas/4733870 to your computer and use it in GitHub Desktop.
Behat Mink check vs click
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @When /^I click "([^"]*)"$/ | |
*/ | |
public function iClick($selector) | |
{ | |
$element = $this->getSession()->getPage()->findField($selector); | |
$element->click(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@javascript | |
Scenario: Enable guest form ticket submissions | |
Given I am login as a Team Manager | |
And I have a Support Staff | |
And I am on "/settings/team/general" | |
# this one do not trigger the onClick event | |
When I check "Allow guest ticket submissions" | |
# we replace with this custom one | |
When I click "Allow guest ticket submissions" | |
And I wait for the "support-staff" to be enabled | |
And I select "Support Staff" from "Support staff" | |
And I press "Save" | |
Then I should see "Settings updated." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment