From 88aeaf923c4f2b20e4a1c0f6ef8534af876bb877 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Mon, 30 Mar 2015 15:52:26 -0300 Subject: [PATCH 01/32] =?UTF-8?q?Definicao=20de=20cen=C3=A1rios=20baseados?= =?UTF-8?q?=20na=20GUI=20e=20nos=20controladores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/XMLImport.feature | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/cucumber/XMLImport.feature b/test/cucumber/XMLImport.feature index cc0dcc6a..b2fde250 100644 --- a/test/cucumber/XMLImport.feature +++ b/test/cucumber/XMLImport.feature @@ -327,6 +327,23 @@ Feature: XMLImport When I cancel the import of the master's orientation entitled "Structuring Adaptive Aplications using AspectJ" with status "conflicted" And the master's orientation entitled "Structuring Adaptive Aplications using AspectJ" with status "conflicted" is removed from the list of imported orientations And the previously stored orientations do not change + + @ignore + Scenario: publications with similar names should be considered as duplicates, according to the tolerance level + Given the system has a master's orientation entitled "Intraprocedural Dataflow Analysis for Software Product Lines" with year "2013", among several orientations + And the similarity tolerance is configured to "5" + When I upload the file "cv-duplicatedOrientationC.xml" which contains a master's orientation entitled "Intraprocedurall dataflow analysis for software product lines" with year "2014" + Then the system outputs a list of imported orientations which contains the master's orientation entitled "Intraprocedural Dataflow Analysis for Software Product Lines" with status "conflicted" + And no new orientation is stored by the system + And the previously stored orientations do not change + + @ignore + Scenario: the tolerance level is not informed + Given I am at the "Import XML File" Page + And I have selected a xml file + When I click on "upload" without inform the tolerance level + Then the system outputs an error message + #end # o que acontece quando o arquivo tem publicações já cadastradas? e # publicações com mesmos títulos mas outras partes diferentes? e From 5d435f705c0190d4f3982a941e5b87b4e6f9e92c Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Mon, 30 Mar 2015 18:42:25 -0300 Subject: [PATCH 02/32] =?UTF-8?q?Alteracao=20de=20cen=C3=A1rios=20baseados?= =?UTF-8?q?=20na=20GUI=20e=20nos=20controladores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/XMLImport.feature | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/test/cucumber/XMLImport.feature b/test/cucumber/XMLImport.feature index b2fde250..d6d1372d 100644 --- a/test/cucumber/XMLImport.feature +++ b/test/cucumber/XMLImport.feature @@ -10,8 +10,6 @@ Feature: XMLImport When I select the "upload" button And I upload the file "cv.pdf" Then the system outputs an error message - And no new publication is stored by the system - And the previously stored publications do not change @ignore Scenario: invalid file @@ -30,20 +28,15 @@ Feature: XMLImport @ignore Scenario: no file web Given I am at the "Import XML File" Page - And the system has some publications stored When I click on "upload" without select a xml file Then the system outputs an error message - And no new publication is stored by the system - And the previously stored publications do not change @ignore - Scenario: new publication + Scenario: create a new publication Given the system has some publications stored - And the system has no journal article entitled "An Abstract Equivalence Notion for Object Models" authored by me - When I upload the file "cv.xml" which contains a journal article entitled "An Abstract Equivalence Notion for Object Models" authored by me - Then the system outputs a list of imported publications which contains the journal article entitled "An Abstract Equivalence Notion for Object Models" with status "stable" - And no new publication is stored by the system - And the previously stored publications do not change + And the system has no journal article entitled "An Abstract Equivalence Notion for Object Models” + When I upload the file "cv.xml" which contains a journal article entitled "An Abstract Equivalence Notion for Object Models” + Then a journal article entitled "An Abstract Equivalence Notion for Object Models” is stored by the system @ignore Scenario: confirm import of new publication @@ -328,6 +321,9 @@ Feature: XMLImport And the master's orientation entitled "Structuring Adaptive Aplications using AspectJ" with status "conflicted" is removed from the list of imported orientations And the previously stored orientations do not change + + + #if($ToleranceLevel) @ignore Scenario: publications with similar names should be considered as duplicates, according to the tolerance level Given the system has a master's orientation entitled "Intraprocedural Dataflow Analysis for Software Product Lines" with year "2013", among several orientations From 38e9aa01206e465a8353ac514cdf24b5ad31fe0d Mon Sep 17 00:00:00 2001 From: RomeroBarata Date: Tue, 31 Mar 2015 10:22:28 +1100 Subject: [PATCH 03/32] New scenarios added: - Duplicate citation-key generation - Generate new BibTex from a subset of publications - Publications with multiple authors must have authors' names separated by an and --- test/cucumber/BibtexGenerateFile.feature | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/cucumber/BibtexGenerateFile.feature b/test/cucumber/BibtexGenerateFile.feature index 566bfa51..eeebd94e 100644 --- a/test/cucumber/BibtexGenerateFile.feature +++ b/test/cucumber/BibtexGenerateFile.feature @@ -8,3 +8,19 @@ Feature: all bibtex When I select the export bibtex file option at the publications menu And I select Generate All BibTex option at the export bibtex page Then I can see the bibtex details + + Scenario: Duplicate citation-key generation + Given I have an article named "A theory of software product line refinement" + And I have an article named "A new approach to large-scale software development" + When I generate a BibTex file + Then the BibTex file has unique citation-keys for each article + + Scenario: Generate new BibTex from a subset of publications + Given I am on the "Publications" menu + When I select the "Generate BibTex" option + Then I can select which files to include in the BibTex generation + + Scenario: Publications with multiple authors must have authors' names separated by an and + Given I have an article with multiple authors + When I generate a BibTex file + Then the BibTex file author field must have the authors' names separated by an and \ No newline at end of file From a3fa14de12059ae14202c67f9ba347441784eb38 Mon Sep 17 00:00:00 2001 From: luisdelgado Date: Mon, 30 Mar 2015 23:13:26 -0300 Subject: [PATCH 04/32] =?UTF-8?q?Atividade=203=20Foram=20feitos=20dois=20t?= =?UTF-8?q?ipos=20de=20acrescimos=20nos=20cen=C3=A1rios.=20Todas=20s=C3=A3?= =?UTF-8?q?o=20do=20tipo=20GUI=20e=20eles=20visam:=20-=20Invalidar=20entra?= =?UTF-8?q?das=20que=20estejam=20erradas=20de=20acordo=20com=20as=20normas?= =?UTF-8?q?=20para=20gerar=20o=20arquivo=20BibTex.=20-=20Validar=20entrada?= =?UTF-8?q?s=20corretas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/BibtexGenerateFile.feature | 53 ++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/test/cucumber/BibtexGenerateFile.feature b/test/cucumber/BibtexGenerateFile.feature index 566bfa51..608c0e7f 100644 --- a/test/cucumber/BibtexGenerateFile.feature +++ b/test/cucumber/BibtexGenerateFile.feature @@ -8,3 +8,56 @@ Feature: all bibtex When I select the export bibtex file option at the publications menu And I select Generate All BibTex option at the export bibtex page Then I can see the bibtex details + + #if ($InvalidEntryOfBibtex) + Scenario: Tags are not separated by commas + Given: I am logged into the system + And: I am at the main menu + And: A BibTeX entry is "@article{mrx05 + auTHor = "Mr. X", + Title = {Something Great}, + publisher = "nob" # "ody", + YEAR = 2005, + }" + When: I click to "generate BibTex" + Then: the request is not done by the system because are not separated by commas + + Scenario: Incompatible tags for type of publication chosen + Given: I am logged into the system + And: I am at the main menu + And: A BibTeX entry is "@article{mrx05, + auTHor = "Mr. X", + Title = {Something Great}, + publisher = "nob" # "ody", + YEAR = 2005, + chapter = 8, + }" + When: I click to "generate BibTex" + Then: the request is not done by the system because these tags are incompatible + + Scenario: Lack mandatory tags for type of publication chosen + Given: I am logged into the system + And: I am at the main menu + And: A BibTeX entry is "@article{mrx05, + auTHor = "Mr. X", + Title = {Something Great}, + publisher = "nob" # "ody", + }" + When: I click to "generate BibTex" + Then: the request is not done by the system because mandatory tags are not complete + #end + + #if ($CorrectEntryOfBibtex) + Scenario: Bibtex file is generated + Given: I am logged into the system + And: I am at the main menu + And: A Bibtex entry is "@article{mrx05, + auTHor = "Mr. X", + Title = {Something Great}, + publisher = "nob" # "ody", + YEAR = 2005, + }" + When: I click to "generate BibTex" + Then: the request is done by the system + And: a BibTex file is generated + #end \ No newline at end of file From dd75fc9bb5fca48c0642d2f4c1f35a5b590453ae Mon Sep 17 00:00:00 2001 From: marciojr Date: Tue, 31 Mar 2015 16:09:40 -0300 Subject: [PATCH 05/32] Adicionados novos scenarios a feature Reports --- test/cucumber/Reports.feature | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/test/cucumber/Reports.feature b/test/cucumber/Reports.feature index bf58123a..33c518a9 100644 --- a/test/cucumber/Reports.feature +++ b/test/cucumber/Reports.feature @@ -94,3 +94,51 @@ Feature: Reports And I select the option Export to HTML at the News list page Then The system generate a HTML report with the news "The first news" in it #end + + Scenario: export a existent research group report to html + Given I am in research group list page + When I select "RGMSGroup" option at the resourch group list + And I select the option export to html at the resourch group show + Then I export a html report about resourch group "RGMSGroup" + + Scenario: export a existent news report to html + Given I am in News list page + When I select "RGMSNews" option at the News list + And I select the option export to html at the News show + Then I export a html report about News "RGMSNews" + + Scenario: export a existent research group report to pdf + Given I am in research group list page + When I select "RGMSGroup" option at the resourch group list + And I select the option export to PDF at the resourch group show + Then I export a PDF report about resourch group "RGMSGroup" + + Scenario: export a existent news report to PDF + Given I am in News list page + When I select "RGMSNews" option at the News list + And I select the option export to PDF at the News show + Then I export a PDF report about News "RGMSNews" + + Scenario: export a existent research group report to xml + Given I am in research group list page + When I select "RGMSGroup" option at the resourch group list + And I select the option export to XML at the resourch group show + Then I export a XML report about resourch group "RGMSGroup" + + Scenario: export a existent news report to xml + Given I am in News list page + When I select "RGMSNews" option at the News list + And I select the option export to XML at the News show + Then I export a XML report about News "RGMSNews" + + Scenario: export report to html link not enable when there is not resourch group created + Given I am in resourch group list page + And there is not resourch group created + When I try to select the Export to html option at the resourch group list page + Then I can not select the option Export to HTML at the News list page + + Scenario: export report to html link not enable when there is not members report created + Given I am at the member list page + And there is not Member created + When I try to select the Export to html option at the Member list page + Then I can not select the option Export to HTML at the Member list page \ No newline at end of file From 2681a87f9f18af1169c09d8c4d40ed22f902252a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADzio?= Date: Tue, 31 Mar 2015 18:50:41 -0300 Subject: [PATCH 06/32] Update Conferencia.feature --- test/cucumber/Conferencia.feature | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/cucumber/Conferencia.feature b/test/cucumber/Conferencia.feature index 8553a4a3..c1ef9d7d 100644 --- a/test/cucumber/Conferencia.feature +++ b/test/cucumber/Conferencia.feature @@ -144,4 +144,23 @@ Feature: conferencia And I select the option Serach for Conference at the conference page Then a list of all conferences containing that date will be presented in the conference screen +Scenario: Publish a new article + Given I am at the article registration page + When I am filling in the author field + And As I type the name, they come up suggestions of names containing the string entered as "And" may appear names like " Anderson " or " Candido " + Then I choose the right name if it appears , otherwise we fill the whole field + +Scenario: new article + Given I am at the publications + When I select the "conferencia" option at the publications menu + And I select the new article + Then I can fill the article details + +Scenario: remove article + Given I am at the publications menu + When I select the "conferencia" option at the publications menu + And a list of articles stored by the system is displayed at the conferencia page + Then I select the desired article + Then I can remove the article + # voces podem criar cenários para ordenar a lista de conferencia, filtrar a lista, verificar se alguns campos podem ser opcionais, etc. From 6740394609efe525da26dd4029e910449edf7c2c Mon Sep 17 00:00:00 2001 From: almeidaeduardo Date: Tue, 31 Mar 2015 20:08:21 -0300 Subject: [PATCH 07/32] New Scenarios Conferencia.feature --- test/cucumber/Conferencia.feature | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/cucumber/Conferencia.feature b/test/cucumber/Conferencia.feature index c1ef9d7d..2df8fd82 100644 --- a/test/cucumber/Conferencia.feature +++ b/test/cucumber/Conferencia.feature @@ -164,3 +164,21 @@ Scenario: remove article Then I can remove the article # voces podem criar cenários para ordenar a lista de conferencia, filtrar a lista, verificar se alguns campos podem ser opcionais, etc. + + + Scenario: new article from an existing conference + Given the conference "I International Conference on software Engineering" is stored in the system + When I type the letter "I" in the conference field to publish a new article + Then the system suggests "I International Conference on software Engineering" + + Scenario: author suggestion for a new article (existing author) + Given I am adding a new article + When I type the first letter in the Author field + Then a list is displayed suggesting names from Authors who already published an article + And I select the name I want + + Scenario: Search conference web by existing Author + Given I am at the Search Conference page + When I write a name from an Author who already published an article at the Search field + And I click on the Search button + Then a list of all conferences with articles from that Author are displayed From 93acd30721eecc84d722153c65f644b52709d949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Silva=20de=20Luna?= Date: Tue, 31 Mar 2015 20:12:09 -0300 Subject: [PATCH 08/32] =?UTF-8?q?Modifica=C3=A7=C3=B5es=20nos=20cen=C3=A1r?= =?UTF-8?q?ios=20da=20feature=20reports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/Reports.feature | 115 ++++++++++++++++++++++++++++------ 1 file changed, 95 insertions(+), 20 deletions(-) diff --git a/test/cucumber/Reports.feature b/test/cucumber/Reports.feature index 33c518a9..979a4281 100644 --- a/test/cucumber/Reports.feature +++ b/test/cucumber/Reports.feature @@ -7,6 +7,9 @@ Feature: Reports When I select the "1" option at the Member list And I can select the option Export to HTML at the Member show Then I can generate a HTML report about Member "1" + And I can see a photography of the Member + And I can see a description about the member + And I can see a list of Menber publications Scenario: export existent member report to xml Given I am at the Member list page @@ -14,41 +17,113 @@ Feature: Reports And I can select the option Export to XML at the Member show Then I can generate a XML report about Member "1" - Scenario: export recently created member report to pdf - Given I am at the publications menu - When I select the Novo Member option - Then I fill the Member details with "John Smith" "JohnSmith" "JohnSmith@gmail.cin.ufpe.br" "UFPE" and create a new one - Then I select the "2" option at the Member list + Scenario: export existent member report to pdf + Given I am at the Member list page + When I select the "1" option at the Member list And I can select the option Export to PDF at the Member show - Then I can generate a PDF report about Member "2" + Then I can generate a PDF report about Member "1" - Scenario: export report to pdf of recently created research group + Scenario: create a new Menber + Given I am at the Member list page + When I select the Novo Member option + And I can fill the Member "Name" with "John Smith" + And I can fill the Member "Username" with "JohnSmith" + And I can fill the Member "Email" with "JohnSmith@gmail.cin.ufpe.br" + And I can fill the Member "University" "UFPE" + And I can select "Criar" option + Then I can see the new user in Member Listagem + + Scenario: missing field error when creating a new Menber + Given I am at the Member list page + When I select the Novo Member option + And I dont fill a field with "*" symbol + And I can select "Criar" option + Then I can see a error message + + Scenario: invalid value in field error when creating a new Menber + Given I am at the Member list page + When I select the Novo Member option + And I can fill a field with an invalid value + And I can select "Criar" option + Then I can see a error message + + Scenario: export recently created member report to pdf + Given I am at the Member list page + When I can create a new Member named "João Paulo Silva" + Then I can export to PDF the existent member named "João Paulo Silva" + + Scenario: export recently created member report to xml + Given I am at the Member list page + When I can create a new Member named "João Paulo Silva" + Then I can export to XML the existent member named "João Paulo Silva" + + Scenario: export recently created member report to html + Given I am at the Member list page + When I can create a new Member named "João Paulo Silva" + Then I can export to HTML the existent member named "João Paulo Silva" + + Scenario: create a new research group Given I am at the publications menu When I select the "Research Group" option at the publications menu And I select the new research group option at research group list page - Then I can fill the research group details with name "RGroup" and create a new one - And I select the "RGroup" option at the Research Group list - And I can select the option Export to PDF at the Research Group show - And I can generate a PDF report about Research Group "RGroup" + And I can fill the field "Nome" with value "Grupo1" + And I can fill the field "Twitter" with value "@Grupo1" + And I can fill the field "Descrição" with value "Grupo de pesquisa 1" + And I can select some members at member list + And I can select "Criar" option + Then I can see the new research group in Research Group list - Scenario: export report to html of recently created research group + Scenario: missing field error when creating a research group Given I am at the publications menu When I select the "Research Group" option at the publications menu And I select the new research group option at research group list page - Then I can fill the research group details with name "RGroup" and create a new one - And I select the "RGroup" option at the Research Group list - And I can select the option Export to HTML at the Research Group show - And I can generate a HTML report about Research Group "RGroup" + And I dont fill a field with "*" symbol + And I can select "Criar" option + Then I can see a error message - Scenario: export report to xml of recently created research group + + Scenario: invalid value in field error when creating a research group Given I am at the publications menu When I select the "Research Group" option at the publications menu And I select the new research group option at research group list page - Then I can fill the research group details with name "RGroup" and create a new one + And I can fill a field with an invalid value + And I can select "Criar" option + Then I can see a error message + + Scenario: export report to pdf of existent research group + Given I am at the publications menu + And I select the "RGroup" option at the Research Group list + And I can select the option Export to PDF at the Research Group show page + Then I can generate a PDF report about Research Group "RGroup" + + Scenario: export report to xml of existent research group + Given I am at the publications menu + And I select the "RGroup" option at the Research Group list + And I can select the option Export to PDF at the Research Group show page + Then I can generate a XML report about Research Group "RGroup" + + Scenario: export report to html of existent research group + Given I am at the publications menu And I select the "RGroup" option at the Research Group list - And I can select the option Export to XML at the Research Group show - And I can generate a XML report about Research Group "RGroup" + And I can select the option Export to PDF at the Research Group show page + Then I can generate a HMTL report about Research Group "RGroup" + + Scenario: export report to pdf of recently created research group + Given I am at the publications menu + When I create a new Research Group named "RGroup" + Then I can generate a PDF report about existent Research Group "RGroup" + + + Scenario: export report to html of recently created research group + Given I am at the publications menu + When I create a new Research Group named "RGroup" + Then I can generate a HTML report about existent Research Group "RGroup" + + Scenario: export report to xml of recently created research group + Given I am at the publications menu + When I create a new Research Group named "RGroup" + Then I can generate a XML report about existent Research Group "RGroup" Scenario: export existent member report to html and access bibtex from him Given I am at the Member list page From 06e9ffea50bdba779ff6e0362ca8757584d07efd Mon Sep 17 00:00:00 2001 From: HoracioFilho Date: Fri, 3 Apr 2015 10:45:07 -0300 Subject: [PATCH 09/32] =?UTF-8?q?Pequenas=20mudan=C3=A7as=20e=20adi=C3=A7?= =?UTF-8?q?=C3=A3o=20de=20novos=20cen=C3=A1rios=20para=20Confer=C3=AAncia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/Conferencia.feature | 39 ++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/test/cucumber/Conferencia.feature b/test/cucumber/Conferencia.feature index 2df8fd82..25bfd043 100644 --- a/test/cucumber/Conferencia.feature +++ b/test/cucumber/Conferencia.feature @@ -1,8 +1,8 @@ @i9n Feature: conferencia As a member of a research group - I want to add, remove and modify conferencias I have published - so that I can generate web pages and reports containing these conferencias + So that I can add, remove and modify conferencias I had published + I want to generate web pages and reports containing these conferencias Scenario: new conferencia Given the system has no conferencia entitled "IV Conference on Software Product Lines" @@ -144,28 +144,25 @@ Feature: conferencia And I select the option Serach for Conference at the conference page Then a list of all conferences containing that date will be presented in the conference screen -Scenario: Publish a new article + Scenario: Publish a new article Given I am at the article registration page When I am filling in the author field And As I type the name, they come up suggestions of names containing the string entered as "And" may appear names like " Anderson " or " Candido " Then I choose the right name if it appears , otherwise we fill the whole field -Scenario: new article + Scenario: new article Given I am at the publications When I select the "conferencia" option at the publications menu And I select the new article Then I can fill the article details -Scenario: remove article + Scenario: remove article Given I am at the publications menu When I select the "conferencia" option at the publications menu And a list of articles stored by the system is displayed at the conferencia page Then I select the desired article Then I can remove the article -# voces podem criar cenários para ordenar a lista de conferencia, filtrar a lista, verificar se alguns campos podem ser opcionais, etc. - - Scenario: new article from an existing conference Given the conference "I International Conference on software Engineering" is stored in the system When I type the letter "I" in the conference field to publish a new article @@ -182,3 +179,29 @@ Scenario: remove article When I write a name from an Author who already published an article at the Search field And I click on the Search button Then a list of all conferences with articles from that Author are displayed + + Scenario: System can suggest one author for new conferencia being created (good path) + Given I am at Add new conferencia page + And I had previously published only with "Júnior" + When I try to fill "J" in Authors + Then the system should suggest "Júnior" as an possible author + When I select "Júnior" + Then "Júnior" should be added in "Authors" + + Scenario: System can suggest many authors for new conferencia being created (good path) + Given I am at Add new conferencia page + And I had previously published with "Jorge", "Junior Lima" and "Fábio Jr" + When I try to fill "J" in Authors + Then the system should suggest "Jorge", "Junior Lima" and "Fábio Jr" as possible authors in lexicographical order + When I select "Jorge" and other suggested authors + Then the selected authors should be added in "Authors" + + Scenario: System can try to suggest many authors for new conferencia being created (bad path) + Given I am at Add new conferencia page + And I had previously published with "Jorge", "Junior Lima" and "Fábio Jr" + When I try to fill "K" in Authors + Then the system should suggest the latest 5 authors I had published as possible authors + When I select any suggested author + Then the selected author should be added in "Authors" + +# voces podem criar cenários para ordenar a lista de conferencia, filtrar a lista, verificar se alguns campos podem ser opcionais, etc. \ No newline at end of file From dbb0f3984dbec5645d3ed5d3534a9d6774e32fcb Mon Sep 17 00:00:00 2001 From: HoracioFilho Date: Sat, 4 Apr 2015 12:09:41 -0300 Subject: [PATCH 10/32] =?UTF-8?q?Pequenas=20modifica=C3=A7=C3=B5es=20nos?= =?UTF-8?q?=20cen=C3=A1rios=20em=20comformidade=20com=20os=20coment=C3=A1r?= =?UTF-8?q?ios=20de=20@RomeroBarata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/Conferencia.feature | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/cucumber/Conferencia.feature b/test/cucumber/Conferencia.feature index 25bfd043..98af17e5 100644 --- a/test/cucumber/Conferencia.feature +++ b/test/cucumber/Conferencia.feature @@ -182,23 +182,23 @@ Feature: conferencia Scenario: System can suggest one author for new conferencia being created (good path) Given I am at Add new conferencia page - And I had previously published only with "Júnior" + And I had previously published only with "Júnior" When I try to fill "J" in Authors Then the system should suggest "Júnior" as an possible author When I select "Júnior" Then "Júnior" should be added in "Authors" - Scenario: System can suggest many authors for new conferencia being created (good path) + Background: Start from the Add new conferencia page with conferencias yet published Given I am at Add new conferencia page - And I had previously published with "Jorge", "Junior Lima" and "Fábio Jr" + And I had previously published with "Jorge", "Junior Lima" and "Fábio Jr" + + Scenario: System can suggest some authors for new conferencia being created (good path) When I try to fill "J" in Authors Then the system should suggest "Jorge", "Junior Lima" and "Fábio Jr" as possible authors in lexicographical order When I select "Jorge" and other suggested authors Then the selected authors should be added in "Authors" - Scenario: System can try to suggest many authors for new conferencia being created (bad path) - Given I am at Add new conferencia page - And I had previously published with "Jorge", "Junior Lima" and "Fábio Jr" + Scenario: System can try to suggest some authors for new conferencia being created (bad path) When I try to fill "K" in Authors Then the system should suggest the latest 5 authors I had published as possible authors When I select any suggested author From fcf961c3754038768bcb9ac1db444bf5c1b7f961 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Wed, 15 Apr 2015 19:40:49 -0300 Subject: [PATCH 11/32] =?UTF-8?q?Correcao=20de=20cen=C3=A1rios=20em=20XMLI?= =?UTF-8?q?mport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/XMLImport.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cucumber/XMLImport.feature b/test/cucumber/XMLImport.feature index d6d1372d..36acc058 100644 --- a/test/cucumber/XMLImport.feature +++ b/test/cucumber/XMLImport.feature @@ -34,7 +34,7 @@ Feature: XMLImport @ignore Scenario: create a new publication Given the system has some publications stored - And the system has no journal article entitled "An Abstract Equivalence Notion for Object Models” + And the system has no journal article entitled "An Abstract Equivalence Notion for Object Models” authored by me When I upload the file "cv.xml" which contains a journal article entitled "An Abstract Equivalence Notion for Object Models” Then a journal article entitled "An Abstract Equivalence Notion for Object Models” is stored by the system @@ -336,8 +336,8 @@ Feature: XMLImport @ignore Scenario: the tolerance level is not informed Given I am at the "Import XML File" Page - And I have selected a xml file - When I click on "upload" without inform the tolerance level + And I select a xml file + When I click on "upload" without informing the tolerance level Then the system outputs an error message #end From e0f525621d8078f69f366bdd750e95b889759cf1 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Sat, 18 Apr 2015 20:36:02 -0300 Subject: [PATCH 12/32] =?UTF-8?q?Correcao=20de=20cen=C3=A1rios=20em=20XMLI?= =?UTF-8?q?mport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/XMLImport.feature | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/test/cucumber/XMLImport.feature b/test/cucumber/XMLImport.feature index 36acc058..b61f1d12 100644 --- a/test/cucumber/XMLImport.feature +++ b/test/cucumber/XMLImport.feature @@ -324,18 +324,16 @@ Feature: XMLImport #if($ToleranceLevel) - @ignore - Scenario: publications with similar names should be considered as duplicates, according to the tolerance level - Given the system has a master's orientation entitled "Intraprocedural Dataflow Analysis for Software Product Lines" with year "2013", among several orientations + + Scenario: dissertations with similar names should be considered as duplicates, according to the tolerance level + Given the system has a dissertation entitled "Semantics and Refinement for a Concurrent Object Oriented Language" stored And the similarity tolerance is configured to "5" - When I upload the file "cv-duplicatedOrientationC.xml" which contains a master's orientation entitled "Intraprocedurall dataflow analysis for software product lines" with year "2014" - Then the system outputs a list of imported orientations which contains the master's orientation entitled "Intraprocedural Dataflow Analysis for Software Product Lines" with status "conflicted" - And no new orientation is stored by the system - And the previously stored orientations do not change + When I upload the file "curriculo5.xml" which contains a dissertation entitled "Semantics an refinement for a concurrent object oriented Language" + Then the system outputs a list of imported dissertations which contains the dissertation entitled "Semantics and Refinement for a Concurrent Object Oriented Language" + And no new dissertation entitled "Semantics an refinement for a concurrent object oriented Language" is stored by the system - @ignore Scenario: the tolerance level is not informed - Given I am at the "Import XML File" Page + Given I am at the XMLImport Page And I select a xml file When I click on "upload" without informing the tolerance level Then the system outputs an error message From 39e3937f6a14ed9103cf3018784dbf58e47affa6 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Sat, 18 Apr 2015 20:38:32 -0300 Subject: [PATCH 13/32] Implementacao de testes em XMLImport --- .../rgms/publication/XMLController.groovy | 16 +++++- grails-app/services/rgms/XMLService.groovy | 32 +++++++++++ grails-app/views/XML/home.gsp | 2 +- test/cucumber/steps/XMLImportSteps.groovy | 54 +++++++++++++++++++ test/functional/pages/XMLImportPage.groovy | 13 +++++ .../steps/TestDataDissertacao.groovy | 24 +++++++++ 6 files changed, 139 insertions(+), 2 deletions(-) diff --git a/grails-app/controllers/rgms/publication/XMLController.groovy b/grails-app/controllers/rgms/publication/XMLController.groovy index 62fb08ad..0777a924 100644 --- a/grails-app/controllers/rgms/publication/XMLController.groovy +++ b/grails-app/controllers/rgms/publication/XMLController.groovy @@ -14,6 +14,7 @@ import rgms.member.Member */ class XMLController { + def home() {} def upload() { @@ -95,6 +96,11 @@ class XMLController { XMLService.createDissertations(xmlFile) } + def boolean verifyDissertations(String title, Node xmlFile) + { + return XMLService.verifyDissertations(title, xmlFile) + } + def enviarConferenciaXML() { String flashMessage = message(code: 'default.importedMsg.message') @@ -110,7 +116,7 @@ class XMLController { def uploadOrientationXML() { String flashMessage = 'default.orientation.imported.message' - if (!XMLService.Import(saveOrientations, returnWithMessage, flashMessage, "Orientation", request)) + if (!XMLService.Import(this.&saveOrientations, returnWithMessage, flashMessage, "Orientation", request)) return } @@ -163,4 +169,12 @@ class XMLController { User user = User.findByUsername(SecurityUtils.getSubject()?.getPrincipal().toString()) return user?.author } + + int similarityTolerance = 0 + + def setSimilarityTolerance(int value) { + similarityTolerance = value; + } + + } diff --git a/grails-app/services/rgms/XMLService.groovy b/grails-app/services/rgms/XMLService.groovy index 107c729b..69e9a78f 100644 --- a/grails-app/services/rgms/XMLService.groovy +++ b/grails-app/services/rgms/XMLService.groovy @@ -293,6 +293,38 @@ class XMLService { newDissertation.save(flush: false) } + static boolean verifyDissertations (String title, Node xmlFile ) + { + Node dadosGerais = (Node) xmlFile.children()[0] + Node formacaoAcademica = getNodeFromNode(dadosGerais, "FORMACAO-ACADEMICA-TITULACAO") + Node mestrado = (Node) formacaoAcademica.children()[1] + Node doutorado = (Node) formacaoAcademica.children()[2] + + if(analizeDissertationNode(title, mestrado) || analizeDissertationNode(title, doutorado)) + { + return true + } + else + { + return false + } + + } + + static boolean analizeDissertationNode(String title, Node node) + { + Dissertacao newDissertation = new Dissertacao() + newDissertation.title = getAttributeValueFromNode(node, "TITULO-DA-DISSERTACAO-TESE") + if(newDissertation.title == title) + { + return true + } + else + { + return false + } + } + static void createConferencias(Node xmlFile) { Node trabalhosEmEventos = (Node) ((Node) xmlFile.children()[1]).children()[0] diff --git a/grails-app/views/XML/home.gsp b/grails-app/views/XML/home.gsp index d6edee2a..4f493774 100644 --- a/grails-app/views/XML/home.gsp +++ b/grails-app/views/XML/home.gsp @@ -17,7 +17,7 @@
- + diff --git a/test/cucumber/steps/XMLImportSteps.groovy b/test/cucumber/steps/XMLImportSteps.groovy index df70dccb..deebe11f 100644 --- a/test/cucumber/steps/XMLImportSteps.groovy +++ b/test/cucumber/steps/XMLImportSteps.groovy @@ -6,7 +6,12 @@ import pages.LoginPage import pages.OrientationPages.OrientationsPage import pages.XMLImportPage import pages.ferramenta.FerramentaPage +import rgms.member.Orientation import rgms.publication.* +import steps.OrientationTestDataAndOperations +import steps.TestDataAndOperationsPublication +import steps.TestDataDissertacao + import static cucumber.api.groovy.EN.* import steps.TestDataAndOperations import CommonSteps @@ -104,4 +109,53 @@ And(~'^the publications are not stored by the system$') {-> to OrientationsPage at OrientationsPage page.checkIfOrientationListIsEmpty() +} + +Given(~'^the system has a dissertation entitled "([^"]*)" stored$') { String title-> + TestDataDissertacao.createDissertacao(title, "dissertation.txt", "University of Oxford") + def dissertation = Dissertacao.findByTitle(title); + assert dissertation != null +} + +And(~'^the similarity tolerance is configured to "([^"]*)"$') { int similarityTolerance-> + assert TestDataDissertacao.verifySimilarityTolerance(similarityTolerance) +} + +When(~'^I upload the file "([^"]*)" which contains a dissertation entitled "([^"]*)"$') { String filename, title-> + + + String path = new File(".").getCanonicalPath() + File.separator + "test" + File.separator + "functional" + File.separator + "steps" + File.separator + filename + boolean result = TestDataDissertacao.verifyDissertationXML(title, path) + assert result + +} + +Then(~'^the system outputs a list of imported dissertations which contains the dissertation entitled "([^"]*)"$') { String title-> + def dissertation = Dissertacao.findByTitle(title) + assert dissertation != null +} + +And(~'^no new dissertation entitled "([^"]*)" is stored by the system$') { String title-> + def dissertation = Dissertacao.findByTitle(title) + assert dissertation == null +} + +Given(~'^I am at the XMLImport Page$') {-> + to LoginPage + at LoginPage + page.fillLoginData("admin", "adminadmin") + to XMLImportPage + at XMLImportPage +} + +And(~'^I select a xml file$') { -> + page.selectFile() +} + +When(~'^I click on "upload" without informing the tolerance level$') { -> + page.uploadClick() +} + +Then(~'^the system outputs an error message$') { -> + assert page.readFlashMessage() != null } \ No newline at end of file diff --git a/test/functional/pages/XMLImportPage.groovy b/test/functional/pages/XMLImportPage.groovy index 49ee322d..e0d32c09 100644 --- a/test/functional/pages/XMLImportPage.groovy +++ b/test/functional/pages/XMLImportPage.groovy @@ -20,6 +20,11 @@ class XMLImportPage extends Page { title ==~ currentTitle } + static content = { + readFlashMessage(){ $("div .message").text() } + readErrorsMessage() { $("div.errors").text() } + } + def selectButton(String name) { $('form').find('a', text: name).click() } @@ -27,4 +32,12 @@ class XMLImportPage extends Page { def uploadWithoutFile(){ $('input.save').click() } + + def selectFile(){ + $("fileInput").value("C:\\fakepath\\curriculo5.xml") + } + + def uploadClick(){ + $('input.save').click() + } } diff --git a/test/functional/steps/TestDataDissertacao.groovy b/test/functional/steps/TestDataDissertacao.groovy index a7e034fa..a49575a1 100644 --- a/test/functional/steps/TestDataDissertacao.groovy +++ b/test/functional/steps/TestDataDissertacao.groovy @@ -59,4 +59,28 @@ class TestDataDissertacao cont.delete() } + static public boolean verifySimilarityTolerance(int value) + { + def cont = new XMLController() + if(cont.similarityTolerance == value) + { + return true + } + else + { + return false + } + //cont.setSimilarityTolerance(value) + } + + static public boolean verifyDissertationXML(String title, String filename) + { + def cont = new XMLController() + def xml = new File(filename); + def records = new XmlParser() + boolean result = cont.verifyDissertations(title, records.parse(xml)); + cont.response.reset() + return result; + } + } \ No newline at end of file From e41e8c3953629d3eaddbe2fa02f4820058a1a472 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Sat, 18 Apr 2015 20:39:54 -0300 Subject: [PATCH 14/32] Arquivo para execucao de testes --- test/functional/steps/curriculo5.xml | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/functional/steps/curriculo5.xml diff --git a/test/functional/steps/curriculo5.xml b/test/functional/steps/curriculo5.xml new file mode 100644 index 00000000..dcc159f0 --- /dev/null +++ b/test/functional/steps/curriculo5.xml @@ -0,0 +1 @@ +Algebraic SemanticsTheorem Proving and AlgebraEngenharia de SoftwareIntroduo a Programao (Orientada a Objetos com Java)Programao Orientada a Objetos (e Java)Trabalho de Graduao em Engenharia de SoftwareEspecificao de Sistemas DistribudosIntroduo ao RUP--Rational Unified ProcessMtodos Formais (Especificaes Algbricas)Novos Conceitos de Modularidade de SoftwareParadigmas de Linguagens de ProgramaoProgramao Orientada a Aspectos com AspectJTrabalho Individual em Engenharia de SoftwareProgramao Orientada a Objetos (e Java)Orientao a Objetos com Java e J2ME (dezembro de 2002 e janeiro de 2003, junho e julho de 2003, janeiro e fevereiro de 2004, outubro de 2004, janeiro e fevereiro de 2005, junho e julho de 2005, maro de 2006, setembro e outubro de 2006, abril de 200Engenharia de Software (Programa de Capacitao Tecnolgica da Motorola)Introduo e Administrao de Sistemas UNIX (Extenso para a FISEPE)Orientao a Objetos e Java (InfoCampus, UFPE)Programming, Testing and Distribution with Java (Summer School on Object-Oriented Processes and Technologies) \ No newline at end of file From 7e123d63b715a13b4f095e201a823d6ebdcaf289 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Sat, 18 Apr 2015 20:44:03 -0300 Subject: [PATCH 15/32] Ajuste de erro --- grails-app/controllers/rgms/publication/XMLController.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/controllers/rgms/publication/XMLController.groovy b/grails-app/controllers/rgms/publication/XMLController.groovy index 0777a924..e0bb1de4 100644 --- a/grails-app/controllers/rgms/publication/XMLController.groovy +++ b/grails-app/controllers/rgms/publication/XMLController.groovy @@ -116,7 +116,7 @@ class XMLController { def uploadOrientationXML() { String flashMessage = 'default.orientation.imported.message' - if (!XMLService.Import(this.&saveOrientations, returnWithMessage, flashMessage, "Orientation", request)) + if (!XMLService.Import(saveOrientations, returnWithMessage, flashMessage, "Orientation", request)) return } From 1be3b458ba7cdd5004dfd1d11f4811175849d409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADzio?= Date: Sat, 18 Apr 2015 21:17:27 -0300 Subject: [PATCH 16/32] =?UTF-8?q?Corre=C3=A7=C3=A3o=20dos=20cen=C3=A1rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/Conferencia.feature | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/cucumber/Conferencia.feature b/test/cucumber/Conferencia.feature index 98af17e5..edd3b77b 100644 --- a/test/cucumber/Conferencia.feature +++ b/test/cucumber/Conferencia.feature @@ -203,5 +203,20 @@ Feature: conferencia Then the system should suggest the latest 5 authors I had published as possible authors When I select any suggested author Then the selected author should be added in "Authors" + +Scenario: Fill in the field "Author Name" + Given I'm registering a new Article + And I'm filling the field " Author Name" + When I type "and" if there author names as " Anderson " or " Candido " registered in the system + And the names " Anderson " and " Candido " will be suggested by the system + The I choose between " Anderso " and " Candido " or if it is not neither I fill with the desired name + +Scenario: Remove Article Web + Given I want to remove the article "A theory of software" with the file name "ATOS.pdf" + When I click on "A theory of software" that is on the list of articles published in the conference page + And I click with the mouse in the article "A theory of software" + And appear the options to edit or remove the article + Then I click the button to remove and the "A theory of software" is removed from the list of articles + And the aquirvo "ATOS.pdf" is removed from the system -# voces podem criar cenários para ordenar a lista de conferencia, filtrar a lista, verificar se alguns campos podem ser opcionais, etc. \ No newline at end of file +# voces podem criar cenários para ordenar a lista de conferencia, filtrar a lista, verificar se alguns campos podem ser opcionais, etc. From 41bcb5bdf16e3b17c7b38ac88217f94fa87acce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADzio?= Date: Sat, 18 Apr 2015 22:10:28 -0300 Subject: [PATCH 17/32] Update Conferencia.feature --- test/cucumber/Conferencia.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cucumber/Conferencia.feature b/test/cucumber/Conferencia.feature index edd3b77b..909f244b 100644 --- a/test/cucumber/Conferencia.feature +++ b/test/cucumber/Conferencia.feature @@ -209,7 +209,7 @@ Scenario: Fill in the field "Author Name" And I'm filling the field " Author Name" When I type "and" if there author names as " Anderson " or " Candido " registered in the system And the names " Anderson " and " Candido " will be suggested by the system - The I choose between " Anderso " and " Candido " or if it is not neither I fill with the desired name + Then I choose between " Anderso " and " Candido " or if it is not neither I fill with the desired name Scenario: Remove Article Web Given I want to remove the article "A theory of software" with the file name "ATOS.pdf" From 37f62e95ee0e61529607683c22d8286d9e6a4051 Mon Sep 17 00:00:00 2001 From: Fillipe De Menezes Date: Sat, 18 Apr 2015 22:11:23 -0300 Subject: [PATCH 18/32] =?UTF-8?q?Cen=C3=A1rios=20corrigidos=20e=20duas=20G?= =?UTF-8?q?UIs=20criadas,=20pelo=20fato=20que=20n=C3=A3o=20existe=20cen?= =?UTF-8?q?=C3=A1rios=20de=20controller=20na=20minha=20feature.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/Reports.feature | 27 +++--- test/cucumber/steps/ReportsSteps.groovy | 83 +++++++++++++++++++ .../ResearchGroupCreatePage.groovy | 16 ++++ .../ResearchGroupListPage.groovy | 4 + 4 files changed, 117 insertions(+), 13 deletions(-) diff --git a/test/cucumber/Reports.feature b/test/cucumber/Reports.feature index 979a4281..7094a69f 100644 --- a/test/cucumber/Reports.feature +++ b/test/cucumber/Reports.feature @@ -23,7 +23,7 @@ Feature: Reports And I can select the option Export to PDF at the Member show Then I can generate a PDF report about Member "1" - Scenario: create a new Menber + Scenario: create a new Member Given I am at the Member list page When I select the Novo Member option And I can fill the Member "Name" with "John Smith" @@ -33,18 +33,18 @@ Feature: Reports And I can select "Criar" option Then I can see the new user in Member Listagem - Scenario: missing field error when creating a new Menber + Scenario: missing field error when creating a new Member Given I am at the Member list page When I select the Novo Member option And I dont fill a field with "*" symbol And I can select "Criar" option Then I can see a error message - Scenario: invalid value in field error when creating a new Menber + Scenario: invalid value in field error when creating a new Member Given I am at the Member list page - When I select the Novo Member option - And I can fill a field with an invalid value - And I can select "Criar" option + When I select the "Novo Member" option + And I can fill a field with an invalid value "&%(#@" + And I select "Create" option Then I can see a error message Scenario: export recently created member report to pdf @@ -63,15 +63,16 @@ Feature: Reports Then I can export to HTML the existent member named "João Paulo Silva" Scenario: create a new research group - Given I am at the publications menu - When I select the "Research Group" option at the publications menu - And I select the new research group option at research group list page - And I can fill the field "Nome" with value "Grupo1" + Given I am at the publications menu page + When I select the "Research Group" option at the publications menu page + And I select the "New Research Group" at research group list page + Then I can fill the field "Nome" with value "Grupo1" And I can fill the field "Twitter" with value "@Grupo1" And I can fill the field "Descrição" with value "Grupo de pesquisa 1" - And I can select some members at member list - And I can select "Criar" option - Then I can see the new research group in Research Group list + And I can fill the field "Sigla" with value "G1" + And I select a member "1" at member list + And I select "Criar" option + Then I should see the new research group named "Grupo1" in Research Group list Scenario: missing field error when creating a research group diff --git a/test/cucumber/steps/ReportsSteps.groovy b/test/cucumber/steps/ReportsSteps.groovy index ff682686..5b640cfa 100644 --- a/test/cucumber/steps/ReportsSteps.groovy +++ b/test/cucumber/steps/ReportsSteps.groovy @@ -204,6 +204,89 @@ 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 + +//--------------------------------------------------------------------------------------------------- + def Login(String user, String password) { to LoginPage at LoginPage diff --git a/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy b/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy index 77266b93..129a6717 100644 --- a/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy +++ b/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy @@ -18,6 +18,22 @@ class ResearchGroupCreatePage extends Page { $("form").description = "A research group called " + name } + def fillResearchGroupName(String name) { + $("form").name = name + } + + def fillResearchGroupTwitter(String twitter) { + $("form").twitter = twitter + } + + def fillResearchGroupDescription(String description) { + $("form").description = description + } + + def fillResearchGroupSigla(String sigla) { + $("form").sigla = sigla + } + def clickOnCreate() { $("input", name: "create").click() } diff --git a/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy b/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy index 9ad36b2c..9b78ed35 100644 --- a/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy +++ b/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy @@ -15,6 +15,10 @@ class ResearchGroupListPage extends Page { static content = { } + def select(String s) { + $('div', id: 'status').find('a', text: s).click() + } + def selectResearchGroup(String s) { $('div').find('a', text: s).click() } From bed6a6c7cb2377a8830f642b9c3c8e4375fa2fb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADzio?= Date: Sat, 18 Apr 2015 22:18:45 -0300 Subject: [PATCH 19/32] Update ConferenciaSteps.groovy --- test/cucumber/steps/ConferenciaSteps.groovy | 38 ++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/test/cucumber/steps/ConferenciaSteps.groovy b/test/cucumber/steps/ConferenciaSteps.groovy index f11e0542..1e71b977 100644 --- a/test/cucumber/steps/ConferenciaSteps.groovy +++ b/test/cucumber/steps/ConferenciaSteps.groovy @@ -144,4 +144,40 @@ And(~'^the conferencias are not stored by the system$') {-> at ConferenciaPage page.checkIfConferenciaListIsEmpty() -} \ No newline at end of file +} + + +Given(~'^I'm registering a new Article$') {String authorName -> + at articleResgitrationPage + page.fillArticleAuthorName(authorName, null) +} + +When(~'^I type "([^"]*)" if there author names as "([^"]*)" or "([^"]*)" registered in the system) { String authorName -> + page.fillArticleAuthorName(ArticleTestDataAndOperations.path() + authorName) + at page.fillArticleAuthorName.suggest("([^"]*)" for aurthorName) +} + +Then(~'^I choose between " Anderso " and " Candido " or if it is not neither I fill with the desired name) { String authorName -> + at page.fillArticleAuthorName("([^"*])" or type "authorName") +} + + +Given(~'^I want to remove the article "([^"]*)" with the file name "([^"]*)") { String title, filename -> + + ArticleTestDataAndOperations.createArticle(title, filename,null,null) + assert Periodico.findByTitle(title) != null +} + +When(~'^I click on "([^"]*)" that is on the list of articles published in the conference page) { String title -> + ArticleTestDataAndOperations.removeArticles(title) + + def testDeleteArticle1 = Periodico.findByTitle(title) + assert testDeleteArticle == null +} + +Then(~'^I click the button to remove and the "A theory of software" is removed from the list of articles) { string title -> + assert periodicoNoExist(title) +} +And(~'^the aquirvo "ATOS.pdf" is removed from the system) {String fileName -> + assert fileNoExist(fileName) +} From 264898b38096e9a92668909c57426828d9bd6b83 Mon Sep 17 00:00:00 2001 From: Fillipe de Menezes Date: Sat, 18 Apr 2015 22:49:16 -0300 Subject: [PATCH 20/32] =?UTF-8?q?Removendo=20Classe=20N=C3=A3o=20Usada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../steps/TestDataAndOperationsMembers.groovy | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 test/functional/steps/TestDataAndOperationsMembers.groovy diff --git a/test/functional/steps/TestDataAndOperationsMembers.groovy b/test/functional/steps/TestDataAndOperationsMembers.groovy new file mode 100644 index 00000000..27e7968d --- /dev/null +++ b/test/functional/steps/TestDataAndOperationsMembers.groovy @@ -0,0 +1,55 @@ +package steps + +import rgms.member.ResearchGroup +import rgms.member.ResearchGroupController + +/** + * Created with IntelliJ IDEA. + * User: Alberto Junior + * Date: 27/08/13 + * Time: 21:43 + * To change this template use File | Settings | File Templates. + */ +class TestDataAndOperationsMembers { + + static public void createResearchGroup(String name, description) { + def researchGroupController = new ResearchGroupController() + researchGroupController.params << [name: name] << [description: description] + researchGroupController.request.setContent(new byte[1000]) // Could also vary the request content. + researchGroupController.create() + researchGroupController.save() + researchGroupController.response.reset() + } + + static public void editResearchGroup(def researchGroup, String newName, String newDescription) { + def researchGroupController = new ResearchGroupController() + researchGroupController.params << [name: newName] << [description: newDescription] << [id: researchGroup.getId()] + researchGroupController.request.setContent(new byte[1000]) // Could also vary the request content. + researchGroupController.edit() + researchGroupController.save() + researchGroupController.response.reset() + } + + //#if($researchGroupHierarchy) + static public void editResearchGroupChildOf(ResearchGroup researchGroup, ResearchGroup researchGroupParent) { + def researchGroupController = new ResearchGroupController() + researchGroupController.params << [name: researchGroup.name] + researchGroupController.params << [description: researchGroup.description] + researchGroupController.params << [id: researchGroup.id] + researchGroupController.params << [childOf: researchGroupParent] + researchGroupController.request.setContent(new byte[1000]) // Could also vary the request content. + + try { + researchGroupController.update() + } catch (Exception e) {} + } + //#end + + static public void deleteResearchGroup(def researchGroup) { + def researchGroupController = new ResearchGroupController() + researchGroupController.params << [id: researchGroup.getId()] + researchGroupController.request.setContent(new byte[1000]) // Could also vary the request content. + researchGroupController.delete() + researchGroupController.response.reset() + } +} From 7c883b1ab856b96420af4f5c08b337e971fa60df Mon Sep 17 00:00:00 2001 From: Fillipe de Menezes Date: Sat, 18 Apr 2015 23:07:03 -0300 Subject: [PATCH 21/32] =?UTF-8?q?Cen=C3=A1rios=20corrigidos=20e=20duas=20G?= =?UTF-8?q?UIs=20criadas,=20pelo=20fato=20que=20n=C3=A3o=20existe=20cen?= =?UTF-8?q?=C3=A1rios=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 deletions(-) diff --git a/test/cucumber/steps/ReportsSteps.groovy b/test/cucumber/steps/ReportsSteps.groovy index 5b640cfa..d1b20df8 100644 --- a/test/cucumber/steps/ReportsSteps.groovy +++ b/test/cucumber/steps/ReportsSteps.groovy @@ -204,86 +204,7 @@ 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 //--------------------------------------------------------------------------------------------------- From eb26cb9f623659b4e855e39a1a177f32d18a5755 Mon Sep 17 00:00:00 2001 From: Fillipe de Menezes Date: Sat, 18 Apr 2015 23:07:23 -0300 Subject: [PATCH 22/32] =?UTF-8?q?Cen=C3=A1rios=20corrigidos=20e=20duas=20G?= =?UTF-8?q?UIs=20criadas,=20pelo=20fato=20que=20n=C3=A3o=20existe=20cen?= =?UTF-8?q?=C3=A1rios=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 //--------------------------------------------------------------------------------------------------- From a151b38a48af0fa8c9beb8664fe926d7c3292afd Mon Sep 17 00:00:00 2001 From: Fillipe de Menezes Date: Sat, 18 Apr 2015 23:09:21 -0300 Subject: [PATCH 23/32] =?UTF-8?q?Cen=C3=A1rios=20corrigidos=20e=20duas=20G?= =?UTF-8?q?UIs=20criadas,=20pelo=20fato=20que=20n=C3=A3o=20existe=20cen?= =?UTF-8?q?=C3=A1rios=20de=20controller=20na=20minha=20feature.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ResearchGroupCreatePage.groovy | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy b/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy index 129a6717..8ad941b4 100644 --- a/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy +++ b/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy @@ -17,22 +17,7 @@ class ResearchGroupCreatePage extends Page { $("form").twitter = "spg" $("form").description = "A research group called " + name } - - def fillResearchGroupName(String name) { - $("form").name = name - } - - def fillResearchGroupTwitter(String twitter) { - $("form").twitter = twitter - } - - def fillResearchGroupDescription(String description) { - $("form").description = description - } - - def fillResearchGroupSigla(String sigla) { - $("form").sigla = sigla - } + def clickOnCreate() { $("input", name: "create").click() From a08c9e4e8a60a12661893147f68f28811ec79fc0 Mon Sep 17 00:00:00 2001 From: Fillipe de Menezes Date: Sat, 18 Apr 2015 23:09:56 -0300 Subject: [PATCH 24/32] =?UTF-8?q?Cen=C3=A1rios=20corrigidos=20e=20duas=20G?= =?UTF-8?q?UIs=20criadas,=20pelo=20fato=20que=20n=C3=A3o=20existe=20cen?= =?UTF-8?q?=C3=A1rios=20de=20controller=20na=20minha=20feature.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/ResearchGroup/ResearchGroupListPage.groovy | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy b/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy index 9b78ed35..9ad36b2c 100644 --- a/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy +++ b/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy @@ -15,10 +15,6 @@ class ResearchGroupListPage extends Page { static content = { } - def select(String s) { - $('div', id: 'status').find('a', text: s).click() - } - def selectResearchGroup(String s) { $('div').find('a', text: s).click() } From e178ca58524bdd8995d2f6c9d1a7b8b23f782731 Mon Sep 17 00:00:00 2001 From: Fillipe de Menezes Date: Sat, 18 Apr 2015 23:11:06 -0300 Subject: [PATCH 25/32] =?UTF-8?q?Mudan=C3=A7as=20=20em=20ResearchGroupCrea?= =?UTF-8?q?tePage=20e=20=20ResearchGroupListPage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ResearchGroupCreatePage.groovy | 17 ++++++++++++++++- .../ResearchGroup/ResearchGroupListPage.groovy | 4 ++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy b/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy index 8ad941b4..129a6717 100644 --- a/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy +++ b/test/functional/pages/ResearchGroup/ResearchGroupCreatePage.groovy @@ -17,7 +17,22 @@ class ResearchGroupCreatePage extends Page { $("form").twitter = "spg" $("form").description = "A research group called " + name } - + + def fillResearchGroupName(String name) { + $("form").name = name + } + + def fillResearchGroupTwitter(String twitter) { + $("form").twitter = twitter + } + + def fillResearchGroupDescription(String description) { + $("form").description = description + } + + def fillResearchGroupSigla(String sigla) { + $("form").sigla = sigla + } def clickOnCreate() { $("input", name: "create").click() diff --git a/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy b/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy index 9ad36b2c..9b78ed35 100644 --- a/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy +++ b/test/functional/pages/ResearchGroup/ResearchGroupListPage.groovy @@ -15,6 +15,10 @@ class ResearchGroupListPage extends Page { static content = { } + def select(String s) { + $('div', id: 'status').find('a', text: s).click() + } + def selectResearchGroup(String s) { $('div').find('a', text: s).click() } From 2fde2d6fd9b5656e334763aceb708f4efe19b021 Mon Sep 17 00:00:00 2001 From: RomeroBarata Date: Sat, 18 Apr 2015 23:13:43 -0300 Subject: [PATCH 26/32] - A few modifications on BibtexGenerateFile.feature to comply with Thais' suggestions. - Tried to implement a few scenarios tests without success. --- test/cucumber/BibtexGenerateFile.feature | 11 +++--- .../steps/BibtexGenerateFileSteps.groovy | 38 +++++++++++++++++++ 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/test/cucumber/BibtexGenerateFile.feature b/test/cucumber/BibtexGenerateFile.feature index 870c958d..1ad21f7a 100644 --- a/test/cucumber/BibtexGenerateFile.feature +++ b/test/cucumber/BibtexGenerateFile.feature @@ -15,15 +15,16 @@ Feature: all bibtex When I generate a BibTex file Then the BibTex file has unique citation-keys for each article - Scenario: Generate new BibTex from a subset of publications + Scenario: Generate new BibTex from a subset of publications web Given I am on the "Publications" menu - When I select the "Generate BibTex" option - Then I can select which files to include in the BibTex generation + When I select a subset of publications + And I click on the "Generate BibTex" option + Then the system generates a BibTex file containing only the publications from the selected subset - Scenario: Publications with multiple authors must have authors' names separated by an and + Scenario: Publications with multiple authors must have authors' names separated by and Given I have an article with multiple authors When I generate a BibTex file - Then the BibTex file author field must have the authors' names separated by an and + Then the BibTex file author field must have the authors' names separated by "and" #if ($InvalidEntryOfBibtex) Scenario: Tags are not separated by commas diff --git a/test/cucumber/steps/BibtexGenerateFileSteps.groovy b/test/cucumber/steps/BibtexGenerateFileSteps.groovy index 849cd8bd..1265b4a9 100644 --- a/test/cucumber/steps/BibtexGenerateFileSteps.groovy +++ b/test/cucumber/steps/BibtexGenerateFileSteps.groovy @@ -1,4 +1,5 @@ import pages.BibtexGenerateFilePage +import rgms.publication.Periodico import static cucumber.api.groovy.EN.* @@ -14,4 +15,41 @@ When(~'^I select Generate All BibTex option at the export bibtex page$') {-> Then(~'^I can see the bibtex details$') {-> } +Given(~'^I have an article named "([^"]*)"$') {String title -> + article = Periodico.findByTitle(title) + assert article != null +} + +And(~'^I have an article named "([^"]*)"$') {String title -> + article = Periodico.findByTitle(title) + assert article != null +} + +When(~'^I generate a BibTex file$') {-> + // Do something that I have no idea at the moment +} + +Then(~'^the BibTex file has unique citation-keys for each article$') {-> + // Do something that I have no idea at the moment +} + +Given(~'^I am on the "Publications" menu$') {-> + to LoginPage + at LoginPage + page.add("admin", "adminadmin") + at PublicationsPage +} + +When(~'^I select a subset of publications$') {-> + // Do something that I have no idea at the moment +} + +And(~'^I click on the "([^"]*)" option$') {String o -> + at PublicationsPage + page.select(o) +} +Then(~'^the system generates a BibTex file containing only the publications from the selected subset$') {-> + // Do something that I have no idea at the moment + // I guess I am mixing GUI and controller stuff here +} \ No newline at end of file From afaf2586d3ec1f53d023d34d348f8add83784457 Mon Sep 17 00:00:00 2001 From: luisdelgado Date: Sat, 18 Apr 2015 23:24:06 -0300 Subject: [PATCH 27/32] =?UTF-8?q?Atividade=205:=20-=20Corre=C3=A7ao=20de?= =?UTF-8?q?=20cenarios=20antigos=20-=20Implementa=C3=A7ao=20e=20ajustes=20?= =?UTF-8?q?para=20testes=20de=202=20cenarios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/BibtexGenerateFile.feature | 37 +++++++++---------- .../steps/BibtexGenerateFileSteps.groovy | 29 +++++++++++++++ .../pages/BibTexMainMenuPage.groovy | 27 ++++++++++++++ 3 files changed, 74 insertions(+), 19 deletions(-) create mode 100644 test/functional/pages/BibTexMainMenuPage.groovy diff --git a/test/cucumber/BibtexGenerateFile.feature b/test/cucumber/BibtexGenerateFile.feature index 870c958d..ddb4439b 100644 --- a/test/cucumber/BibtexGenerateFile.feature +++ b/test/cucumber/BibtexGenerateFile.feature @@ -26,54 +26,53 @@ Feature: all bibtex Then the BibTex file author field must have the authors' names separated by an and #if ($InvalidEntryOfBibtex) - Scenario: Tags are not separated by commas + Scenario: Tags of entry of BibTex are not separated by commas Given: I am logged into the system - And: I am at the main menu + And: I am at the "Main menu" And: A BibTeX entry is "@article{mrx05 auTHor = "Mr. X", Title = {Something Great}, publisher = "nob" # "ody", YEAR = 2005, }" - When: I click to "generate BibTex" - Then: the request is not done by the system because are not separated by commas + When: I click to "Generate BibTex" + Then: I see an error message - Scenario: Incompatible tags for type of publication chosen - Given: I am logged into the system - And: I am at the main menu - And: A BibTeX entry is "@article{mrx05, + Scenario: Tags of entry of BibTex are incompatible with type of publication chosen + Given: I am logged int the system + And: I am at the "Main menu" + And: A BibTex entry is "@article{mrx05, auTHor = "Mr. X", Title = {Something Great}, publisher = "nob" # "ody", YEAR = 2005, chapter = 8, }" - When: I click to "generate BibTex" - Then: the request is not done by the system because these tags are incompatible + When: I click to "Generate BibTex" + Then: I see an error message - Scenario: Lack mandatory tags for type of publication chosen + Scenario: Lack mandatory tags in entry of BibTex with type of publication chosen Given: I am logged into the system - And: I am at the main menu + And: I am at the "Main menu" And: A BibTeX entry is "@article{mrx05, auTHor = "Mr. X", Title = {Something Great}, publisher = "nob" # "ody", }" - When: I click to "generate BibTex" - Then: the request is not done by the system because mandatory tags are not complete + When: I click to "Generate BibTex" + Then: I see an error message #end #if ($CorrectEntryOfBibtex) - Scenario: Bibtex file is generated + Scenario: BibTex file is generated Given: I am logged into the system - And: I am at the main menu + And: I am at the "Main menu" And: A Bibtex entry is "@article{mrx05, auTHor = "Mr. X", Title = {Something Great}, publisher = "nob" # "ody", YEAR = 2005, }" - When: I click to "generate BibTex" - Then: the request is done by the system - And: a BibTex file is generated + When: I click to "Generate BibTex" + Then: a BibTex file is generated #end \ No newline at end of file diff --git a/test/cucumber/steps/BibtexGenerateFileSteps.groovy b/test/cucumber/steps/BibtexGenerateFileSteps.groovy index 849cd8bd..73ca9a3d 100644 --- a/test/cucumber/steps/BibtexGenerateFileSteps.groovy +++ b/test/cucumber/steps/BibtexGenerateFileSteps.groovy @@ -14,4 +14,33 @@ When(~'^I select Generate All BibTex option at the export bibtex page$') {-> Then(~'^I can see the bibtex details$') {-> } +#if ($InvalidEntryOfBibtex) +Given(~'I am logged into the system$') {-> + to LoginPage + at LoginPage + page.add("admin","adminadmin") +} + +And(~'I am at the "([^"]*)"$') {-> + at BibTexMainMenuPage +} + +And(~'A BibTeX entry is "([^"]*)"$') {String entrada -> + at BibTexMainMenuPage + page.verificarEntrada(entrada) +} +When(~'I click to "([^"]*)"$') {String o -> + at BibTexMainMenuPage + page.select(o) +} + +Then(~'I see an error message$'){-> + at BibTexMainMenuPage +} +#end + +#if ($CorrectEntryOfBibtex) +Then(~'a BibTex file is generated$'){-> +} +#end diff --git a/test/functional/pages/BibTexMainMenuPage.groovy b/test/functional/pages/BibTexMainMenuPage.groovy new file mode 100644 index 00000000..bbdf717e --- /dev/null +++ b/test/functional/pages/BibTexMainMenuPage.groovy @@ -0,0 +1,27 @@ +package pages + +import geb.Page + +/** + * Created by luisdelgado on 18/04/15. + */ +class BibTexMainMenuPage extends Page{ + static url = "/bibtexMainMenu/home" + + static at = { + title ==~ /Member Listagem/ + } + + static content = { + + + } + + def verificarEntrada(entrada){ + $(entrada).click() + } + + def select(o){ + $(o).click() + } +} From 631e73708730f8423c3ad8ded493acd3208f6bde Mon Sep 17 00:00:00 2001 From: almeidaeduardo Date: Sat, 18 Apr 2015 23:28:35 -0300 Subject: [PATCH 28/32] scenario update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Atualização de cenários após a revisão para a criação de testes --- test/cucumber/Conferencia.feature | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/cucumber/Conferencia.feature b/test/cucumber/Conferencia.feature index 909f244b..3d4a6188 100644 --- a/test/cucumber/Conferencia.feature +++ b/test/cucumber/Conferencia.feature @@ -220,3 +220,29 @@ Scenario: Remove Article Web And the aquirvo "ATOS.pdf" is removed from the system # voces podem criar cenários para ordenar a lista de conferencia, filtrar a lista, verificar se alguns campos podem ser opcionais, etc. + +@ignore + Scenario: new article from an existing conference + Given the conference "I International Conference on software Engineering" is stored in the system + When I type the letter "I" in the conference field to publish a new article + Then the system suggests "I International Conference on software Engineering" +@ignore + Scenario: author suggestion for a new article (existing author) + Given I am adding a new article + When I type the first letter in the Author field + Then a list is displayed suggesting names from Authors who already published an article + And I select the name I want + + Scenario: Search conference articles by Author web + Given I am at the Conference Articles page + And the system has some conference articles authored by "Junior", among several publications + When I write "J" at the Search field + And I click on the Search button + Then a list of all conference articles by "Junior" is displayed + + Scenario: Search for conferences which an Author have published web + Given I am at the Conference page + And an Author named "Junior" had published 3 article for 3 different conferences + When I write "Junior" at the search field + And I click on the search button + Then a list of all conferences that "Junior" published an article is displayed From f1b8deabdc926be21fbdc62dfb42824554481786 Mon Sep 17 00:00:00 2001 From: almeidaeduardo Date: Sat, 18 Apr 2015 23:29:57 -0300 Subject: [PATCH 29/32] Update ConferenceSteps --- test/cucumber/steps/ConferenciaSteps.groovy | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/test/cucumber/steps/ConferenciaSteps.groovy b/test/cucumber/steps/ConferenciaSteps.groovy index 1e71b977..f6811aea 100644 --- a/test/cucumber/steps/ConferenciaSteps.groovy +++ b/test/cucumber/steps/ConferenciaSteps.groovy @@ -181,3 +181,46 @@ Then(~'^I click the button to remove and the "A theory of software" is removed f And(~'^the aquirvo "ATOS.pdf" is removed from the system) {String fileName -> assert fileNoExist(fileName) } + + +Given(~'^I am at the conferece articles page') {-> + to LoginPage + at LoginPage + page.fillLoginData("admin","adminadmin") + at ConferenciaPage +} +And(~'^the system has some conference articles authored by "([^"]*)", among several publications') { -> String author + assert article = TestDataAndOperationsPublication.containsUser(author) != null + assert article != null +} +When(~'^I write the name "([^"]*)" at the search field') {-> String author + at ConferenciaPage + page.fillSearch(author) +} +And (~'^I click on the search button'){ + page.select("search") +} +Then (~'^a list of all conference articles by "([^"]*)" is displayed'){-> String author + page.listConferenceArticles(author) +} + +Given(~'^I am at the Conference page'){ + to LoginPage + at LoginPage + page.fillLoginData("admin","adminadmin") + at ConferenciaPage + } +And(~'^an Author named ([^"]*)" had published 3 article for 3 different confereces') {-> String author + assert article = TestDataAndOperationsPublication.containsUser(author) != null + assert article != null +} +When(~'^I write ([^"]*)" at the search field') {-> String author + at ConferenciaPage + page.fillSearch(author) +} +And(~'^ I click on the search button'){ + page.select("search") +} +Then(~'^a list of all conferences that ([^"]*)" published an article is displayed') {-> String author + page.listConferencia(author) +} From b3537ac7bb4ee21922a1aa9d428307f51c7b6249 Mon Sep 17 00:00:00 2001 From: marciojr Date: Mon, 20 Apr 2015 18:33:41 -0300 Subject: [PATCH 30/32] modification of scenarios and tests about gui --- test/cucumber/Reports.feature | 42 ++++++++-------- test/cucumber/steps/ReportsSteps.groovy | 67 +++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 20 deletions(-) diff --git a/test/cucumber/Reports.feature b/test/cucumber/Reports.feature index 7094a69f..7e64a247 100644 --- a/test/cucumber/Reports.feature +++ b/test/cucumber/Reports.feature @@ -25,13 +25,13 @@ Feature: Reports Scenario: create a new Member Given I am at the Member list page - When I select the Novo Member option + When I select the "New Member" option And I can fill the Member "Name" with "John Smith" And I can fill the Member "Username" with "JohnSmith" And I can fill the Member "Email" with "JohnSmith@gmail.cin.ufpe.br" And I can fill the Member "University" "UFPE" And I can select "Criar" option - Then I can see the new user in Member Listagem + Then I can see the new user at the Member List Scenario: missing field error when creating a new Member Given I am at the Member list page @@ -173,48 +173,50 @@ Feature: Reports Scenario: export a existent research group report to html Given I am in research group list page - When I select "RGMSGroup" option at the resourch group list - And I select the option export to html at the resourch group show + When I select "RGMSGroup" option at the research group list + And I select the option "export to html" at the research group show Then I export a html report about resourch group "RGMSGroup" Scenario: export a existent news report to html Given I am in News list page When I select "RGMSNews" option at the News list - And I select the option export to html at the News show + And I select the option "export to html" at the News show Then I export a html report about News "RGMSNews" Scenario: export a existent research group report to pdf Given I am in research group list page - When I select "RGMSGroup" option at the resourch group list - And I select the option export to PDF at the resourch group show - Then I export a PDF report about resourch group "RGMSGroup" + When I select "RGMSGroup" option at the research group list + And I select the option "export to PDF" at the resourch group show + Then I export a PDF report about research group "RGMSGroup" Scenario: export a existent news report to PDF Given I am in News list page When I select "RGMSNews" option at the News list - And I select the option export to PDF at the News show + And I select the option "export to PDF" at the News show Then I export a PDF report about News "RGMSNews" Scenario: export a existent research group report to xml Given I am in research group list page When I select "RGMSGroup" option at the resourch group list - And I select the option export to XML at the resourch group show + And I select the option "export to XML" at the research group show Then I export a XML report about resourch group "RGMSGroup" Scenario: export a existent news report to xml Given I am in News list page When I select "RGMSNews" option at the News list - And I select the option export to XML at the News show + And I select the option "export to XML" at the News show Then I export a XML report about News "RGMSNews" - Scenario: export report to html link not enable when there is not resourch group created - Given I am in resourch group list page - And there is not resourch group created - When I try to select the Export to html option at the resourch group list page - Then I can not select the option Export to HTML at the News list page + Scenario: export report to html link not enable when there is not research group created + Given I am at "publications" menu + And there is not research group created + When I select the "Research Group" option + Then I view that the research group list is empty + And I can not select the option "Export to html" Scenario: export report to html link not enable when there is not members report created - Given I am at the member list page - And there is not Member created - When I try to select the Export to html option at the Member list page - Then I can not select the option Export to HTML at the Member list page \ No newline at end of file + Given I am at "publications" menu + And there is not member created + When I select the "Member" option + Then I view that the member list is empty + And I can not select the option "Export to html" \ No newline at end of file diff --git a/test/cucumber/steps/ReportsSteps.groovy b/test/cucumber/steps/ReportsSteps.groovy index 3b0ee8c8..9aa268a6 100644 --- a/test/cucumber/steps/ReportsSteps.groovy +++ b/test/cucumber/steps/ReportsSteps.groovy @@ -1,6 +1,7 @@ import pages.Conferencia.ConferenciaCreatePage import pages.Conferencia.ConferenciaPage import pages.LoginPage +import pages.ResearchGroup.ResearchGroupCreatePage import pages.member.MemberListPage import pages.member.MemberPage import pages.member.MemberCreatePage @@ -10,6 +11,9 @@ import pages.Report.ReportHTMLPage import pages.ResearchGroup.ResearchGroupPage import pages.ResearchGroup.ResearchGroupListPage import pages.ResearchGroup.ResearchGroupShowPage +import rgms.member.Member +import rgms.member.ResearchGroup +import rgms.member.ResearchGroupController import static cucumber.api.groovy.EN.* @@ -287,6 +291,69 @@ Then(~'^I should see an error message'){ -> //--------------------------------------------------------------------------------------------------- +//created by marcio mendes github: marciojr + +//if ($createanewMember) + + Given(~'^I am at the Member menu page$') { -> + to LoginPage + at LoginPage + page.add("admin","adminadmin") + to MemberPage + } + +When(~'^I select the "New Member" option$') { -> + at MemberPage + MemberPage.select("create") + to MemberCreatePage +} + +And(~'^I can fill the Member "Name" with "([^"]*)"$') { String field, String name, String username, String email, String university -> + at MemberCreatePage + MemberCreatePage.fillSomeMemberDetails(name,username,email,university) + // all fields was created and the input "create" was called on the fillSomeMem... methods +} + +Then(~'^I should see the new user at the Member list$') { String MemberName -> + at MemberPage +} + +//end + +//----------------------------------------------------------------------------------------------------------------------------------------------------- + +// created by marcio mendes github: marciojr + +//if ($export a existent research group report to html) + + Given(~'^I am at the Research Group List page$') { -> + to LoginPage + at LoginPage + page.add("admin","adminadmin") + to ResearchGroupListPage + } + +When(~'^I select the "([^"]*)" option at the Research Group List$') { String name -> + at ResearchGroupListPage + ResearchGroupListPage.selectResearchGroup(name) +} + +And(~'^I select the option "([^"]*)" at the research group show$') { String name-> + at ResearchGroupListPage + ResearchGroupShowPage.checkHtml(name) // check if there is the name created +} + +Then(~'^I export a html report about resourch group "([^"]*)"$') { -> + at ResearchGroupListPage + ResearchGroupController.show() // show html using the own params.id +} + +//end + +//----------------------------------------------------------------------------------------------------------------------------------------------- + + +//------------------------------------------------------------------------- def Login(String user, String password) { to LoginPage at LoginPage From 7e9dfa6857396664cc0cc3a21de8c453136300cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Silva=20de=20Luna?= Date: Tue, 21 Apr 2015 13:19:32 -0300 Subject: [PATCH 31/32] testes atividade2 --- test/cucumber/Reports.feature | 4 +- test/cucumber/steps/ReportsSteps.groovy | 56 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/test/cucumber/Reports.feature b/test/cucumber/Reports.feature index 7e64a247..4ca01497 100644 --- a/test/cucumber/Reports.feature +++ b/test/cucumber/Reports.feature @@ -36,8 +36,8 @@ Feature: Reports Scenario: missing field error when creating a new Member Given I am at the Member list page When I select the Novo Member option - And I dont fill a field with "*" symbol - And I can select "Criar" option + And I dont fill a field with * symbol + And I can select Criar option Then I can see a error message Scenario: invalid value in field error when creating a new Member diff --git a/test/cucumber/steps/ReportsSteps.groovy b/test/cucumber/steps/ReportsSteps.groovy index 9aa268a6..0a4b29f4 100644 --- a/test/cucumber/steps/ReportsSteps.groovy +++ b/test/cucumber/steps/ReportsSteps.groovy @@ -350,6 +350,62 @@ Then(~'^I export a html report about resourch group "([^"]*)"$') { -> //end +//----------------------------------------------------------------------------------------------------------------------------------------------------- +//if ($missing field error when creating a new Member) + +Given(~'^I am at the Member list page$'){ -> + at MemberListPage +} + +When(~'^I select the Novo Member option$') { -> + to MemberCreatePage +} + +And(~'^I dont fill a field with * symbol$'){ -> + assert (page.name.value() != null && + page.username.value() != null && + page.email.value() != null && + page.university.value() != null) +} + +And(~'^I can select Criar option$'){ -> + page.select("create") +} + +Then(~'^I can see a error message$'){ -> + assert (page.readFlashMessage() != null) +} + +//----------------------------------------------------------------------------------------------------------------------------------------------- +//----------------------------------------------------------------------------------------------------------------------------------------------------- +//if ($missing field error when creating a research group) + + +Given(~'^I am at the publications menu$'){ -> + at PublicationsPage +} + +When(~'^I select the "Research Group" option at the publications menu') { -> + to ResearchGroupListPage +} + +And(~'^I select the new research group option at research group list page'){-> + to ResearchGroupCreatePage +} + +And(~'^I dont fill a field with * symbol$'){ -> + assert (page.name.value() != null && + page.twitter.value() != null && + page.description.value() != null) +} + +And(~'^I can select Criar option$'){ -> + page.select("create") +} + +Then(~'^I can see a error message$'){ -> + assert (page.readFlashMessage() != null) +} //----------------------------------------------------------------------------------------------------------------------------------------------- From 8c98be9e005664ee6a789d8d2e1ce7dc9a7f82bb Mon Sep 17 00:00:00 2001 From: RomeroBarata Date: Sat, 25 Apr 2015 21:40:02 +1000 Subject: [PATCH 32/32] Reorganized the BibTexGenerateFileStesp.groovy because the commits from different students got mixed. --- .../steps/BibtexGenerateFileSteps.groovy | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/cucumber/steps/BibtexGenerateFileSteps.groovy b/test/cucumber/steps/BibtexGenerateFileSteps.groovy index df049718..2f167a4c 100644 --- a/test/cucumber/steps/BibtexGenerateFileSteps.groovy +++ b/test/cucumber/steps/BibtexGenerateFileSteps.groovy @@ -19,12 +19,6 @@ Given(~'^I have an article named "([^"]*)"$') {String title -> assert article != null } -Given(~'I am logged into the system$') {-> - to LoginPage - at LoginPage - page.add("admin","adminadmin") -} - And(~'^I have an article named "([^"]*)"$') {String title -> article = Periodico.findByTitle(title) assert article != null @@ -57,7 +51,15 @@ And(~'^I click on the "([^"]*)" option$') {String o -> Then(~'^the system generates a BibTex file containing only the publications from the selected subset$') {-> // Do something that I have no idea at the moment // I guess I am mixing GUI and controller stuff here -}And(~'I am at the "([^"]*)"$') {-> +} + +Given(~'I am logged into the system$') {-> + to LoginPage + at LoginPage + page.add("admin","adminadmin") +} + +And(~'I am at the "([^"]*)"$') {-> at BibTexMainMenuPage }