Last active
August 29, 2015 14:02
-
-
Save gunesmes/1d2eb71600c9b4e1ea8c to your computer and use it in GitHub Desktop.
Deterministic Way of Test Automation
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
Feature: New member | |
As A user | |
I Want to become member | |
So That I buy something | |
Background: User open sign-up page | |
Given I go to home page | |
When I click "sign-up button" | |
@javascript | |
Scenario: User should sign-up | |
When I fill e-mail as "test@test.com" | |
And I fill password as "password" | |
And I click "submit" button | |
Then I should see confirmation mail send to "test@test.com" | |
@javascript | |
Scenario: User should see warning for already used e-mail | |
When I fill e-mail as "test@test.com" | |
And I fill password as "password" | |
And I click "submit" button | |
Then I should see "Congrulation" page | |
Given I go to home page | |
When I click "sign-up button" | |
When I fill e-mail as "test@test.com" | |
And I fill password as "password" | |
And I click "submit" button | |
Then I should see warning for already used e-mail |
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
Given(/^I go to home page$/) do | |
pending # express the regexp above with the code you wish you had | |
end | |
When(/^I click "(.*?)"$/) do |button| | |
pending # express the regexp above with the code you wish you had | |
end | |
When(/^I fill e\-mail as "(.*?)"$/) do |email| | |
#check the database and delete if the user is exist | |
delete_user_from_database(email) | |
#we are sure that there is no user with email | |
fill_in "email_box_id" :with => email | |
end | |
When(/^I fill password as "(.*?)"$/) do |password| | |
pending # express the regexp above with the code you wish you had | |
end | |
When(/^I click "(.*?)" button$/) do |button| | |
pending # express the regexp above with the code you wish you had | |
end | |
Then(/^I should see confirmation mail send to "(.*?)"$/) do |email| | |
#check the page if it says congratulation | |
has_content? email | |
#then delete if the user is exist | |
delete_user_from_database(email) | |
end | |
Then(/^I should see "(.*?)" page$/) do |word| | |
#check the page if it says congratulation | |
has_content? word | |
end | |
Then(/^I should see warning for already used e\-mail$/) do | |
pending # express the regexp above with the code you wish you had | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment