diff --git a/test/cucumber/Book.feature b/test/cucumber/Book.feature index 1e0293b6..c219bd72 100644 --- a/test/cucumber/Book.feature +++ b/test/cucumber/Book.feature @@ -55,9 +55,11 @@ Scenario: new book web And I select the new book option at the book page Then I can fill the book details + # if(listExistingBooksOrderedByVolumeInAscendingOrder) Scenario: list existing books ordered by volume in ascending order Given I am at the books page And the system has some books created When I select to view the list of books And I select to order the list of books by "volume" Then my book list shows the books ordered by "volume" + #end diff --git a/test/cucumber/Funder.feature b/test/cucumber/Funder.feature index 1ce2bd0c..9f765f9f 100644 --- a/test/cucumber/Funder.feature +++ b/test/cucumber/Funder.feature @@ -23,9 +23,11 @@ Feature: Funder When I fill the funder code with "12345" Then the funder with code "12345" is properly stored by the system + #if(filterExistingFundersByName) Scenario: filter existing funders by name Given I am at the funders page And I create some funder named "Paulo" When I select to view the list of funders And I select to filter the list of funders by name "Paulo" - Then my article list shows only the funders named "Paulo" \ No newline at end of file + Then my article list shows only the funders named "Paulo" + #end \ No newline at end of file diff --git a/test/cucumber/Member.feature b/test/cucumber/Member.feature index a4f2b237..96767e5a 100644 --- a/test/cucumber/Member.feature +++ b/test/cucumber/Member.feature @@ -71,14 +71,18 @@ Feature: member Given I am at the register page Then I see default data filled on register form #end - + #if ($downloadMemberListFile) Scenario: download member list file Given I am the member list page and the system has members When I select the member list download button Then I can download the file named "ML-0.pdf" that contains the member list +<<<<<<< HEAD Scenario: search for an existing member 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" +======= + #end +>>>>>>> spm2 diff --git a/test/cucumber/Thesis.feature b/test/cucumber/Thesis.feature index 31872a89..678407bc 100644 --- a/test/cucumber/Thesis.feature +++ b/test/cucumber/Thesis.feature @@ -121,8 +121,9 @@ Feature: Thesis Tests # o arquivo depois, address deveria ser opcional, deveria ter universidade e # centro/departamento, deveria ter apenas um autor e a possibilidade de um # orientador e co-orientador - + #if(downloadThesisListFile) Scenario: download thesis list file Given I am the thesis list page and the system has thesis When I select the thesis list download button Then I can download the file named "TL-0.pdf" that contains the thesis list + #end \ No newline at end of file diff --git a/test/cucumber/steps/BookSteps.groovy b/test/cucumber/steps/BookSteps.groovy index 9a42c259..76c64bb1 100644 --- a/test/cucumber/steps/BookSteps.groovy +++ b/test/cucumber/steps/BookSteps.groovy @@ -103,6 +103,21 @@ Then(~'^the book "([^"]*)" was stored by the system$') { String title -> at BookPage } +When(~'^I select to view the list of books$') {-> + at BooksPage + page.selectViewBookList() +} + +And(~'^I select to order the list of books by "([^"]*)"$') {String sortType-> + at BookPage + page.selectOrderBy(sortType) +} + +Then(~'^my article list shows the articles ordered by "([^"]*)"$') { String sortType -> + at BookPage + page.checkOrderedBy(sortType); +} + def checkIfExists(String title) { book = Book.findByTitle(title) assert book == null diff --git a/test/cucumber/steps/FunderSteps.groovy b/test/cucumber/steps/FunderSteps.groovy index 255232e7..66922722 100644 --- a/test/cucumber/steps/FunderSteps.groovy +++ b/test/cucumber/steps/FunderSteps.groovy @@ -54,6 +54,22 @@ Then(~'^I fill the funder code with "([^"]*)"$'){ String code -> } +Given(~'^I am at the create funder page$'){ -> + to LoginPage + at LoginPage + page.fillLoginData("admin", "adminadmin") + at PublicationsPage + to FunderPage +} + +When(~'I select to view the list of funders with name "([^"]*)"$ '){String name -> + assert page.clickListOfFunder(name) +} + +Then(~'My article list show only the funders named'){ + +} + private void checkIfFunderExists(String code){ funder = Funder.findByCode(code) assert funder != null diff --git a/test/cucumber/steps/MemberSteps.groovy b/test/cucumber/steps/MemberSteps.groovy index 1da1e24b..3a4bffd6 100644 --- a/test/cucumber/steps/MemberSteps.groovy +++ b/test/cucumber/steps/MemberSteps.groovy @@ -1,6 +1,7 @@ import pages.LoginPage import pages.RegisterPage import pages.member.MemberCreatePage +import pages.member.MemberPage import pages.member.MemberViewPage import rgms.authentication.User import rgms.member.Member @@ -193,6 +194,7 @@ When(~'^I try to create the member "([^"]*)" with email "([^"]*)"$') { String na //assert member.name == name } +<<<<<<< HEAD Given(~'^The system has a member named "([^"]*)"$') { String name -> user = User.findByName(name); member = user?.author @@ -212,4 +214,22 @@ When(~'^I search for "([^"]*)"$') { String name -> Then(~'My member list contains the member named "([^"]*)"$') { String name -> at MemberSearchPage assert page.resultsListContains(username) +======= +Given(~'^I am at the members page$') { -> + to LoginPage + at LoginPage + page.fillLoginData("admin", "adminadmin") + at PublicationsPage + to MemberPage +} + ++When(~'^I select the download button$') { -> + at MemberPage + page.selectDownloadFunder() +} + +Then(~'^I can download the file named "([^"]*)"$') { String name-> + at MemberPage + assert page.clickDownloadLink(name) +>>>>>>> spm2 } \ No newline at end of file diff --git a/test/cucumber/steps/ThesisSteps.groovy b/test/cucumber/steps/ThesisSteps.groovy index 90129b91..022ed1bf 100644 --- a/test/cucumber/steps/ThesisSteps.groovy +++ b/test/cucumber/steps/ThesisSteps.groovy @@ -269,6 +269,23 @@ And(~'^the system stores properly the thesis entitled "([^"]*)"$') { title -> } +Given(~'^I am at the thesis page$') { -> + to LoginPage + at LoginPage + page.fillLoginData("admin", "adminadmin") + at PublicationsPage + to ThesisPage +} + ++When(~'^I select the download button$') { -> + at ThesisPage + page.selectDownloadThesis() +} + +Then(~'^I can download the file named "([^"]*)"$') { String name-> + at ThesisPage + assert page.clickDownloadLink(name) +} //FUNÇÔES AUXILIARES def thesisDoNotExists(title) { tese = Tese.findByTitle(title)