From 3f5483b58e8b019f5eeccb20979a1bb2901c4a8d Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 22 Nov 2014 17:48:20 -0300 Subject: [PATCH 1/8] =?UTF-8?q?adicionando=20nomes=20dos=20cen=C3=A1rios?= =?UTF-8?q?=20para=20implementa=C3=A7=C3=A3o=20de=20testes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/Book.feature | 2 ++ test/cucumber/Funder.feature | 4 +++- test/cucumber/Member.feature | 3 ++- test/cucumber/Thesis.feature | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/cucumber/Book.feature b/test/cucumber/Book.feature index 4eae43b9..b68b6687 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 3aa6961f..b8fe58d5 100644 --- a/test/cucumber/Member.feature +++ b/test/cucumber/Member.feature @@ -71,8 +71,9 @@ 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 + #end \ No newline at end of file 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 From e1b6dea173d11e4bb8eb04fcf72b5e0a467e5ef9 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 22 Nov 2014 18:14:56 -0300 Subject: [PATCH 2/8] Adicionando steps da feature de download de funder --- test/cucumber/steps/FunderSteps.groovy | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/cucumber/steps/FunderSteps.groovy b/test/cucumber/steps/FunderSteps.groovy index 255232e7..5e33b4c0 100644 --- a/test/cucumber/steps/FunderSteps.groovy +++ b/test/cucumber/steps/FunderSteps.groovy @@ -54,6 +54,24 @@ Then(~'^I fill the funder code with "([^"]*)"$'){ String code -> } +Given(~'^I am at the funders page$') { -> + to LoginPage + at LoginPage + page.fillLoginData("admin", "adminadmin") + at PublicationsPage + to FunderPage +} + ++When(~'^I select the download button$') { -> + at FunderPage + page.selectDownloadFunder() +} + +Then(~'^I can download the file named "([^"]*)"$') { String funder-> + at FunderPage + assert page.clickDownloadLink(funder) +} + private void checkIfFunderExists(String code){ funder = Funder.findByCode(code) assert funder != null From e0eca925a33dbbf5370e1a0a8313933a288138be Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 22 Nov 2014 18:23:17 -0300 Subject: [PATCH 3/8] =?UTF-8?q?removendo=20implementa=C3=A7=C3=A3o=20de=20?= =?UTF-8?q?download=20de=20funder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/steps/FunderSteps.groovy | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/test/cucumber/steps/FunderSteps.groovy b/test/cucumber/steps/FunderSteps.groovy index 5e33b4c0..aca2f05e 100644 --- a/test/cucumber/steps/FunderSteps.groovy +++ b/test/cucumber/steps/FunderSteps.groovy @@ -54,23 +54,6 @@ Then(~'^I fill the funder code with "([^"]*)"$'){ String code -> } -Given(~'^I am at the funders page$') { -> - to LoginPage - at LoginPage - page.fillLoginData("admin", "adminadmin") - at PublicationsPage - to FunderPage -} - -+When(~'^I select the download button$') { -> - at FunderPage - page.selectDownloadFunder() -} - -Then(~'^I can download the file named "([^"]*)"$') { String funder-> - at FunderPage - assert page.clickDownloadLink(funder) -} private void checkIfFunderExists(String code){ funder = Funder.findByCode(code) From 8ee9f1deb4ee5d19ee99875af9a075d70c7d81e6 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 22 Nov 2014 18:25:53 -0300 Subject: [PATCH 4/8] =?UTF-8?q?adicionando=20implementa=C3=A7=C3=A3o=20de?= =?UTF-8?q?=20download=20de=20lista=20de=20members?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/steps/MemberSteps.groovy | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/cucumber/steps/MemberSteps.groovy b/test/cucumber/steps/MemberSteps.groovy index 210c1aa6..eaf2f20c 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 @@ -191,4 +192,22 @@ When(~'^I try to create the member "([^"]*)" with email "([^"]*)"$') { String na MemberTestDataAndOperations.createMemberWithEmail(name, email) //member = Member.findByEmail(email) //assert member.name == name +} + +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) } \ No newline at end of file From 2bc97d96979cc23cce16735296f09a1313a60d88 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 22 Nov 2014 18:30:18 -0300 Subject: [PATCH 5/8] =?UTF-8?q?adicionando=20implementa=C3=A7=C3=A3o=20de?= =?UTF-8?q?=20download=20de=20lista=20de=20thesis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/steps/ThesisSteps.groovy | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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) From 07e81234211894664bb9292da97648b2a47c5136 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 22 Nov 2014 18:32:19 -0300 Subject: [PATCH 6/8] adicionando steps para download de arquivo thesis --- test/cucumber/steps/FunderSteps.groovy | 1 - 1 file changed, 1 deletion(-) diff --git a/test/cucumber/steps/FunderSteps.groovy b/test/cucumber/steps/FunderSteps.groovy index aca2f05e..255232e7 100644 --- a/test/cucumber/steps/FunderSteps.groovy +++ b/test/cucumber/steps/FunderSteps.groovy @@ -54,7 +54,6 @@ Then(~'^I fill the funder code with "([^"]*)"$'){ String code -> } - private void checkIfFunderExists(String code){ funder = Funder.findByCode(code) assert funder != null From 39631eab9ca0f14ef9bdc7a2f43ca0df35ae8f34 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 22 Nov 2014 18:45:43 -0300 Subject: [PATCH 7/8] =?UTF-8?q?Inserindo=20steps=20para=20ordena=C3=A7?= =?UTF-8?q?=C3=A3o=20de=20livros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/steps/BookSteps.groovy | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/cucumber/steps/BookSteps.groovy b/test/cucumber/steps/BookSteps.groovy index 45aae835..68234c2a 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 From 93fa300704e64f2e9d5de595185fed24f827ea89 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 22 Nov 2014 19:05:12 -0300 Subject: [PATCH 8/8] =?UTF-8?q?Inserindo=20steps=20para=20implementa=C3=A7?= =?UTF-8?q?=C3=A3o=20do=20cen=C3=A1rio=20de=20filtragem=20de=20funder=20po?= =?UTF-8?q?r=20nome?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/steps/FunderSteps.groovy | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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