Skip to content

Instantly share code, notes, and snippets.

@DavMorr
Created March 7, 2018 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavMorr/5a0abd548a0c95246db3919bab924087 to your computer and use it in GitHub Desktop.
Save DavMorr/5a0abd548a0c95246db3919bab924087 to your computer and use it in GitHub Desktop.
behat ~3.0 out of the box commands list
# $ vendor/bin/behat -dl
default | Given I am an anonymous user
default | Given I am not logged in
default | Given I am logged in as a user with the :role role(s)
default | Given I am logged in as a/an :role
default | Given I am logged in as a user with the :role role(s) and I have the following fields:
default | Given I am logged in as :name
default | Given I am logged in as a user with the :permissions permission(s)
default | Then I should see (the text ):text in the :rowText row
default | Then I should not see (the text ):text in the :rowText row
default | Given I click :link in the :rowText row
default | Then I (should )see the :link in the :rowText row
default | Given the cache has been cleared
default | Given I run cron
default | Given I am viewing a/an :type (content )with the title :title
default | Given a/an :type (content )with the title :title
default | Given I am viewing my :type (content )with the title :title
default | Given :type content:
default | Given I am viewing a/an :type( content):
default | Then I should be able to edit a/an :type( content)
default | Given I am viewing a/an :vocabulary term with the name :name
default | Given a/an :vocabulary term with the name :name
default | Given users:
default | Given :vocabulary terms:
default | Given the/these (following )languages are available:
default | Then (I )break
default | Given I am at :path
default | When I visit :path
default | When I click :link
default | Given for :field I enter :value
default | Given I enter :value for :field
default | Given I wait for AJAX to finish
default | When /^(?:|I )press "(?P<button>(?:[^"]|\\")*)"$/
default | When I press the :button button
default | Given I press the :char key in the :field field
default | Then I should see the link :link
default | Then I should not see the link :link
default | Then I should not visibly see the link :link
default | Then I (should )see the heading :heading
default | Then I (should )not see the heading :heading
default | Then I (should ) see the button :button
default | Then I (should ) see the :button button
default | Then I should not see the button :button
default | Then I should not see the :button button
default | When I follow/click :link in the :region( region)
default | Given I press :button in the :region( region)
default | Given I fill in :value for :field in the :region( region)
default | Given I fill in :field with :value in the :region( region)
default | Then I should see the heading :heading in the :region( region)
default | Then I should see the :heading heading in the :region( region)
default | Then I should see the link :link in the :region( region)
default | Then I should not see the link :link in the :region( region)
default | Then I should see( the text) :text in the :region( region)
default | Then I should not see( the text) :text in the :region( region)
default | Then I (should )see the text :text
default | Then I should not see the text :text
default | Then I should get a :code HTTP response
default | Then I should not get a :code HTTP response
default | Given I check the box :checkbox
default | Given I uncheck the box :checkbox
default | When I select the radio button :label with the id :id
default | When I select the radio button :label
default | Given /^(?:|I )am on (?:|the )homepage$/
default | When /^(?:|I )go to (?:|the )homepage$/
default | Given /^(?:|I )am on "(?P<page>[^"]+)"$/
default | When /^(?:|I )go to "(?P<page>[^"]+)"$/
default | When /^(?:|I )reload the page$/
default | When /^(?:|I )move backward one page$/
default | When /^(?:|I )move forward one page$/
default | When /^(?:|I )follow "(?P<link>(?:[^"]|\\")*)"$/
default | When /^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)"$/
default | When /^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with:$/
default | When /^(?:|I )fill in "(?P<value>(?:[^"]|\\")*)" for "(?P<field>(?:[^"]|\\")*)"$/
default | When /^(?:|I )fill in the following:$/
default | When /^(?:|I )select "(?P<option>(?:[^"]|\\")*)" from "(?P<select>(?:[^"]|\\")*)"$/
default | When /^(?:|I )additionally select "(?P<option>(?:[^"]|\\")*)" from "(?P<select>(?:[^"]|\\")*)"$/
default | When /^(?:|I )check "(?P<option>(?:[^"]|\\")*)"$/
default | When /^(?:|I )uncheck "(?P<option>(?:[^"]|\\")*)"$/
default | When /^(?:|I )attach the file "(?P<path>[^"]*)" to "(?P<field>(?:[^"]|\\")*)"$/
default | Then /^(?:|I )should be on "(?P<page>[^"]+)"$/
default | Then /^(?:|I )should be on (?:|the )homepage$/
default | Then /^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/
default | Then /^the response status code should be (?P<code>\d+)$/
default | Then /^the response status code should not be (?P<code>\d+)$/
default | Then /^(?:|I )should see "(?P<text>(?:[^"]|\\")*)"$/
default | Then /^(?:|I )should not see "(?P<text>(?:[^"]|\\")*)"$/
default | Then /^(?:|I )should see text matching (?P<pattern>"(?:[^"]|\\")*")$/
default | Then /^(?:|I )should not see text matching (?P<pattern>"(?:[^"]|\\")*")$/
default | Then /^the response should contain "(?P<text>(?:[^"]|\\")*)"$/
default | Then /^the response should not contain "(?P<text>(?:[^"]|\\")*)"$/
default | Then /^(?:|I )should see "(?P<text>(?:[^"]|\\")*)" in the "(?P<element>[^"]*)" element$/
default | Then /^(?:|I )should not see "(?P<text>(?:[^"]|\\")*)" in the "(?P<element>[^"]*)" element$/
default | Then /^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/
default | Then /^the "(?P<element>[^"]*)" element should not contain "(?P<value>(?:[^"]|\\")*)"$/
default | Then /^(?:|I )should see an? "(?P<element>[^"]*)" element$/
default | Then /^(?:|I )should not see an? "(?P<element>[^"]*)" element$/
default | Then /^the "(?P<field>(?:[^"]|\\")*)" field should contain "(?P<value>(?:[^"]|\\")*)"$/
default | Then /^the "(?P<field>(?:[^"]|\\")*)" field should not contain "(?P<value>(?:[^"]|\\")*)"$/
default | Then /^(?:|I )should see (?P<num>\d+) "(?P<element>[^"]*)" elements?$/
default | Then /^the "(?P<checkbox>(?:[^"]|\\")*)" checkbox should be checked$/
default | Then /^the "(?P<checkbox>(?:[^"]|\\")*)" checkbox is checked$/
default | Then /^the checkbox "(?P<checkbox>(?:[^"]|\\")*)" (?:is|should be) checked$/
default | Then /^the "(?P<checkbox>(?:[^"]|\\")*)" checkbox should (?:be unchecked|not be checked)$/
default | Then /^the "(?P<checkbox>(?:[^"]|\\")*)" checkbox is (?:unchecked|not checked)$/
default | Then /^the checkbox "(?P<checkbox>(?:[^"]|\\")*)" should (?:be unchecked|not be checked)$/
default | Then /^the checkbox "(?P<checkbox>(?:[^"]|\\")*)" is (?:unchecked|not checked)$/
default | Then /^print current URL$/
default | Then /^print last response$/
default | Then /^show last response$/
default | Then I should see the error message( containing) :message
default | Then I should see the following error message(s):
default | Given I should not see the error message( containing) :message
default | Then I should not see the following error messages:
default | Then I should see the success message( containing) :message
default | Then I should see the following success messages:
default | Given I should not see the success message( containing) :message
default | Then I should not see the following success messages:
default | Then I should see the warning message( containing) :message
default | Then I should see the following warning messages:
default | Given I should not see the warning message( containing) :message
default | Then I should not see the following warning messages:
default | Then I should see the message( containing) :message
default | Then I should not see the message( containing) :message
default | Given I run drush :command
default | Given I run drush :command :arguments
default | Then drush output should contain :output
default | Then drush output should match :regex
default | Then drush output should not contain :output
default | Then print last drush output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment