Skip to content

Commit

Permalink
Adicionando steps da feature de busca de membros
Browse files Browse the repository at this point in the history
  • Loading branch information
tomersimis committed Nov 22, 2014
1 parent ddd7f61 commit fca37c8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions grails-app/conf/Config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ grails {
port = 465
//TODO: Before running, make sure that your email login and password appear below
//TODO: Before committing, make sure that the strings "LOGIN" and "PASSWORD" appear in place of your login and password
username = "LOGIN"
password = "PASSWORD"
username = "[email protected]"
password = "tomersimis"
props = ["mail.smtp.auth": "true",
"mail.smtp.socketFactory.port": "465",
"mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
Expand Down
4 changes: 2 additions & 2 deletions test/cucumber/Member.feature
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Feature: member
Then I can download the file named "ML-0.pdf" that contains the member list

Scenario: search for an existing member
Given the system has the member named "Rodolfo"
Given the system has a member named "Rodolfo"
And I am at the member search page
When I search for "Rodolfo"
Then my member list contains the member named "Rodolfo"
Then My member list contains the member named "Rodolfo"
21 changes: 21 additions & 0 deletions test/cucumber/steps/MemberSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,25 @@ When(~'^I try to create the member "([^"]*)" with email "([^"]*)"$') { String na
MemberTestDataAndOperations.createMemberWithEmail(name, email)
//member = Member.findByEmail(email)
//assert member.name == name
}

Given(~'^The system has a member named "([^"]*)"$') { String name ->
user = User.findByName(name);
member = user?.author
assert member != null
}

And(~'^I am at the member search page$') { ->
at MemberSearchPage
}

When(~'^I search for "([^"]*)"$') { String name ->
at MemberSearchPage
page.fillSearchBox(name)
page.clickSearchButton()
}

Then(~'My member list contains the member named "([^"]*)"$') { String name ->
at MemberSearchPage
assert page.resultsListContains(username)
}

0 comments on commit fca37c8

Please sign in to comment.