Skip to content

Commit

Permalink
Cenários corrigidos e duas GUIs criadas, pelo fato que não existe cen…
Browse files Browse the repository at this point in the history
…ários de controller na minha feature.
  • Loading branch information
fmcs3 committed Apr 19, 2015
1 parent 7c883b1 commit eb26cb9
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions test/cucumber/steps/ReportsSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,86 @@ When(~'^I can fill the Conferencia details$') {->

//---------------------------------------------------------------------------------------------------

#if ($createanewresearchgroup)
Given(~'^I am at the publications menu page$') { ->
to LoginPage
at LoginPage
page.add("admin","adminadmin")
at PublicationsPage
}

When(~'^I select the "([^"]*)" option at the publications menu page$') { String option ->
at PublicationsPage
page.select(option)
}

And(~'^I select the "New Research Group" option at research group list page$') { ->
at ResearchGroupListPage
page.select("create")
}

Then(~'^I can fill the field "Nome" with value "([^"]*)"$') { String field, String name ->
at ResearchGroupCreatePage
page.fillResearchGroupName(name)
}

And(~'I can fill the field "Twitter" with value "([^"]*)"$') { String field, String twitter ->
at ResearchGroupCreatePage
page.fillResearchGroupTwitter(twitter)
}

And(~'^I can fill the field "Descrição" with value "([^"]*)"$') { String field, String description ->
at ResearchGroupCreatePage
page.fillResearchGroupDescription(description)
}

And(~'^I can fill the field "Sigla" with value "([^"]*)"$') { String field, String sigla ->
at ResearchGroupCreatePage
page.fillResearchGroupSigla(sigla)
}

And(~'^I select a member "([^"]*)" at member list') { String memberId ->
at ResearchGroupCreatePage
page.selectMember(memberId)
page.clickOnCreate()
}

Then(~'^I should see the new research group named "([^"]*)" in Research Group list$') { String groupName ->
at ResearchGroupPage
assert page.findByName(groupName) != null /* Checando se o grupo foi criado */
}

#end

//---------------------------------------------------------------------------------------------------

#if ($invalidvalueinfielderrorwhencreatinganewMember)
// invalid value in field error when creating a new Member
Given(~'^I am at the Member list page$') { ->
to MemberListPage
at MemberListPage
}

When(~'^I select the "([^"]*)" option$') { String option ->
at MemberListPage
page.getMenuOption(option)
}

And(~'^I can fill a field with an invalid value "([^"]*)"') { String value ->
at MemberCreatePage
page.fillMemberDetails(value)
}

And(~'^I select "([^"]*)" option') { String value ->
at MemberCreatePage
page.clickOnCreate()
}

Then(~'^I should see an error message'){ ->
at MemberListPage
}

#end

//---------------------------------------------------------------------------------------------------

Expand Down

1 comment on commit eb26cb9

@fmcs3
Copy link
Author

@fmcs3 fmcs3 commented on eb26cb9 Apr 19, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Desconsiderar esse Commit, meu intelliji bugou e acabou gerando esse commit adicional.

Please sign in to comment.