From eb26cb9f623659b4e855e39a1a177f32d18a5755 Mon Sep 17 00:00:00 2001 From: Fillipe de Menezes <fmcs3@cin.ufpe.br> Date: Sat, 18 Apr 2015 23:07:23 -0300 Subject: [PATCH] =?UTF-8?q?Cen=C3=A1rios=20corrigidos=20e=20duas=20GUIs=20?= =?UTF-8?q?criadas,=20pelo=20fato=20que=20n=C3=A3o=20existe=20cen=C3=A1rio?= =?UTF-8?q?s=20de=20controller=20na=20minha=20feature.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/steps/ReportsSteps.groovy | 79 +++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/test/cucumber/steps/ReportsSteps.groovy b/test/cucumber/steps/ReportsSteps.groovy index d1b20df8..3b0ee8c8 100644 --- a/test/cucumber/steps/ReportsSteps.groovy +++ b/test/cucumber/steps/ReportsSteps.groovy @@ -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 //---------------------------------------------------------------------------------------------------