Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
[mesut] regex for string
Browse files Browse the repository at this point in the history
  • Loading branch information
gunesmes committed Oct 23, 2018
1 parent 63122a8 commit c94fb44
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Binary file modified .DS_Store
Binary file not shown.
12 changes: 6 additions & 6 deletions features/002_register.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ Feature: Register
# | John | Doe | NewEmail | Pass1234 | Success |

Scenario: Register Failed - email format
When I enter "John" "Doe" "xjohndoe" and "Pass1234" for registration
Then I should see the "Fail"
When I enter 'John' 'Doe' 'xjohndoe' and 'Pass1234' for registration
Then I should see the 'Fail'

Scenario: Register Failed - already member
When I enter "John" "Doe" "xjohndoe@gmail.com" and "Pass1234" for registration
Then I should see the "Fail"
When I enter 'John' 'Doe' 'xjohndoe@gmail.com' and 'Pass1234' for registration
Then I should see the 'Fail'

Scenario: Register Success
When I enter "John" "Doe" "NewEmail" and "Pass1234" for registration
Then I should see the "Success"
When I enter 'John' 'Doe' 'NewEmail' and 'Pass1234' for registration
Then I should see the 'Success'

8 changes: 4 additions & 4 deletions features/ios/pages/register_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ def fill_registration_form(name, lastname, email, pass)
puts email
end

enter_text "* text:'First name'", name
enter_text "* text:'First name'", "#{name}"

scroll "scrollView", :down
enter_text "* text:'Last name'", lastname
enter_text "* text:'Last name'", "#{lastname}"

enter_text "* text:'Email'", email
enter_text "* text:'Email'", "#{email}"

scroll "scrollView", :down
enter_text "* text:'Password'", pass
enter_text "* text:'Password'", "#{pass}"

scroll "scrollView", :down
touch "UIButtonLabel text:'Register'"
Expand Down
2 changes: 1 addition & 1 deletion features/step_definitions/register.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@current_page.go_to_register_page
end

When(/^I enter (.*) (.*) (.*) and (.*) for registration$/) do |name, lastname, email, pass|
When("I enter {string} {string} {string} and {string} for registration") do |name, lastname, email, pass|
@current_page = page(RegisterPage).await(timeout: 300)
@current_page.fill_registration_form(name, lastname, email, pass)
end
Expand Down

0 comments on commit c94fb44

Please sign in to comment.