Created
August 6, 2019 09:49
-
-
Save SihemBouhenniche/a6209830566a169a05c3f90d4d33b9ce to your computer and use it in GitHub Desktop.
Behavior driven design (BDD) example on web applications with cucumber and ruby
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 on search button$/) do | |
GoogleHomeHelpers.submit | |
end | |
Then(/^I can type "(.+)" in search field$/) do |value| | |
GoogleHomeHelpers.fill_keyword(value) | |
end | |
And(/^I click on first suggestion$/) do | |
GoogleHomeHelpers.click_first_suggestion | |
end | |
When(/^I am on google home page$/) do | |
NavigationHelpers.load_google_home | |
end | |
Then(/^I get "(.+)" in search results$/) do |value| | |
expect(page).to have_content(value) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment