From 88aeaf923c4f2b20e4a1c0f6ef8534af876bb877 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Mon, 30 Mar 2015 15:52:26 -0300 Subject: [PATCH 01/43] =?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/43] =?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/43] 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/43] =?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/43] 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/43] 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/43] 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/43] =?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/43] =?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/43] =?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/43] =?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/43] =?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/43] 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/43] 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/43] 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/43] =?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/43] 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/43] =?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/43] 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/43] =?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/43] =?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/43] =?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/43] =?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/43] =?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/43] =?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/43] - 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/43] =?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/43] 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/43] 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/43] 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/43] 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/43] 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 } From f39164e0695d19016baeeec45c6a783aea55db71 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Sat, 2 May 2015 14:10:32 -0300 Subject: [PATCH 33/43] Implementacao da Feature "Tolerancia para deteccao de dissertacoes com titulos similares". --- .../rgms/publication/XMLController.groovy | 6 +-- .../controllers/rgms/tool/Levenshtein.groovy | 17 +++++++ grails-app/i18n/messages.properties | 1 + grails-app/i18n/messages_pt_BR.properties | 1 + grails-app/services/rgms/XMLService.groovy | 46 ++++++++++++++++++- grails-app/views/XML/home.gsp | 1 + 6 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 grails-app/controllers/rgms/tool/Levenshtein.groovy diff --git a/grails-app/controllers/rgms/publication/XMLController.groovy b/grails-app/controllers/rgms/publication/XMLController.groovy index e0bb1de4..6792b742 100644 --- a/grails-app/controllers/rgms/publication/XMLController.groovy +++ b/grails-app/controllers/rgms/publication/XMLController.groovy @@ -14,13 +14,15 @@ import rgms.member.Member */ class XMLController { + int similarityTolerance = 0 def home() {} def upload() { + similarityTolerance = Integer.parseInt(params.tolerance) String flashMessage = 'Publications imported!' String controller = "Publication" - if (!XMLService.Import(savePublication, returnWithMessage, flashMessage, controller, request)) + if (!XMLService.Import(savePublication, returnWithMessage, flashMessage, controller, request, similarityTolerance)) return } @@ -170,8 +172,6 @@ class XMLController { return user?.author } - int similarityTolerance = 0 - def setSimilarityTolerance(int value) { similarityTolerance = value; } diff --git a/grails-app/controllers/rgms/tool/Levenshtein.groovy b/grails-app/controllers/rgms/tool/Levenshtein.groovy new file mode 100644 index 00000000..d282299f --- /dev/null +++ b/grails-app/controllers/rgms/tool/Levenshtein.groovy @@ -0,0 +1,17 @@ +package rgms.tool + +class Levenshtein { + def static int distance(String str1, String str2) { + def str1_len = str1.length() + def str2_len = str2.length() + int[][] distance = new int[str1_len + 1][str2_len + 1] + (str1_len + 1).times { distance[it][0] = it } + (str2_len + 1).times { distance[0][it] = it } + (1..str1_len).each { i -> + (1..str2_len).each { j -> + distance[i][j] = [distance[i-1][j]+1, distance[i][j-1]+1, str1[i-1]==str2[j-1]?distance[i-1][j-1]:distance[i-1][j-1]+1].min() + } + } + distance[str1_len][str2_len] + } +} \ No newline at end of file diff --git a/grails-app/i18n/messages.properties b/grails-app/i18n/messages.properties index 05c696f1..92bb42ca 100644 --- a/grails-app/i18n/messages.properties +++ b/grails-app/i18n/messages.properties @@ -168,6 +168,7 @@ orientation.same.members=Um membro nao pode orientar a si mesmo default.xml.parserror.message=No file uploaded or it wasn't a valid XML default.xml.structure.message=The XML struct doesn't comply with Lattes default.xml.unknownerror.message=An unknown error occurred. Contact the administrator +default.xml.similar.dissertation.message = The file was not imported because there is a dissertation with a similar title registered xml.label=XMLImport file.already.exist.message=A file has already been saved with the same name diff --git a/grails-app/i18n/messages_pt_BR.properties b/grails-app/i18n/messages_pt_BR.properties index 6d3cc59d..9c015c9e 100644 --- a/grails-app/i18n/messages_pt_BR.properties +++ b/grails-app/i18n/messages_pt_BR.properties @@ -176,6 +176,7 @@ tese.month.label=Mês tese.arquivo.label=Arquivo tese.label=Tese tese.duplicatetitle.failure = Tese não cadastrada porque já existe uma tese com o mesmo título +default.xml.similar.dissertation.message = O arquivo não foi importado porque existe uma dissertação com um título semelhante registrada #end #if($news) diff --git a/grails-app/services/rgms/XMLService.groovy b/grails-app/services/rgms/XMLService.groovy index 69e9a78f..168b0bef 100644 --- a/grails-app/services/rgms/XMLService.groovy +++ b/grails-app/services/rgms/XMLService.groovy @@ -7,6 +7,7 @@ import rgms.member.Orientation import rgms.publication.* import rgms.researchProject.Funder import rgms.researchProject.ResearchProject +import rgms.tool.Levenshtein class XMLService { @@ -14,14 +15,25 @@ class XMLService { saveEntity - closure que salva a classe de domínio que está usando a importação */ + + static boolean Import(Closure saveEntity, Closure returnWithMessage, String flashMessage, String controller, - javax.servlet.http.HttpServletRequest request) { + javax.servlet.http.HttpServletRequest request, int similarityTolerance) { boolean errorFound = false try { Node xmlFile = parseReceivedFile(request) - saveEntity(xmlFile) + if(!checkExistenceWithSimilarityAnalysis(xmlFile, similarityTolerance)) + { + saveEntity(xmlFile) + } + else + { + flashMessage = 'default.xml.similar.dissertation.message' + + errorFound = true + } } //If file is not XML or if no file was uploaded catch (SAXParseException) { @@ -293,6 +305,36 @@ class XMLService { newDissertation.save(flush: false) } + static boolean checkExistenceWithSimilarityAnalysis(Node xmlFile, int toleranceLevel) + { + List dissertations = Dissertacao.findAll(); + + 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] + + String dissertacaoMestrado = getAttributeValueFromNode(mestrado, "TITULO-DA-DISSERTACAO-TESE") + + String dissertacaoDoutorado = getAttributeValueFromNode(doutorado, "TITULO-DA-DISSERTACAO-TESE") + + for (int i = 0; i < dissertations.size(); i++) + { + String current = dissertations.get(i) + if (Levenshtein.distance(current, dissertacaoMestrado) > toleranceLevel) + { + return true + } + else if(Levenshtein.distance(current, dissertacaoDoutorado) > toleranceLevel) + { + return true + } + } + return false + + + } + static boolean verifyDissertations (String title, Node xmlFile ) { Node dadosGerais = (Node) xmlFile.children()[0] diff --git a/grails-app/views/XML/home.gsp b/grails-app/views/XML/home.gsp index 4f493774..c62b7da8 100644 --- a/grails-app/views/XML/home.gsp +++ b/grails-app/views/XML/home.gsp @@ -18,6 +18,7 @@
+ From 13eca277ce8ff5f88ad704f444b8bda65686d46a Mon Sep 17 00:00:00 2001 From: almeidaeduardo Date: Sat, 2 May 2015 16:28:31 -0300 Subject: [PATCH 34/43] Update ConferenceSteps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Atualização somente dos 2 cenários utilizados para os testes --- test/cucumber/Conferencia.feature | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/test/cucumber/Conferencia.feature b/test/cucumber/Conferencia.feature index 3d4a6188..d7ca67e1 100644 --- a/test/cucumber/Conferencia.feature +++ b/test/cucumber/Conferencia.feature @@ -221,28 +221,16 @@ Scenario: Remove Article Web # 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 + And the system has some conference articles authored by "Jose", 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 + Then a list of all conference articles by "Jose" 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 + And an Author named "Junior" had published the articles "An Analysis and Survey of the Development of Mutation Testing", "A Systematic Survey of Program Comprehension through Dynamic Analysis", and "Engineering Privacy", for the conferences "International Conference on Software Engineering", "Information and Software Technology" and "International Symposium on Software Testing and Analysis" 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 + Then a list of all conferences, composed by "International Conference on Software Engineering", "Information and Software Technology" and "International Symposium on Software Testing and Analysis", that "Junior" published an article is displayed From f3ae3ebe110a6615dcddfb23bc0a8bd2239fd7c3 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Sat, 2 May 2015 20:19:00 -0300 Subject: [PATCH 35/43] Correcao de testes em XMLImport --- .../rgms/publication/XMLController.groovy | 7 ++- grails-app/services/rgms/XMLService.groovy | 46 +++++++++++++++++++ grails-app/views/XML/home.gsp | 2 +- test/cucumber/XMLImport.feature | 4 +- test/cucumber/steps/XMLImportSteps.groovy | 7 +-- test/functional/pages/XMLImportPage.groovy | 5 ++ .../steps/TestDataDissertacao.groovy | 21 ++++----- test/functional/steps/curriculo5.xml | 2 +- 8 files changed, 75 insertions(+), 19 deletions(-) diff --git a/grails-app/controllers/rgms/publication/XMLController.groovy b/grails-app/controllers/rgms/publication/XMLController.groovy index 6792b742..f31e4de7 100644 --- a/grails-app/controllers/rgms/publication/XMLController.groovy +++ b/grails-app/controllers/rgms/publication/XMLController.groovy @@ -14,7 +14,7 @@ import rgms.member.Member */ class XMLController { - int similarityTolerance = 0 + static int similarityTolerance = 0 def home() {} @@ -98,6 +98,11 @@ class XMLController { XMLService.createDissertations(xmlFile) } + private Closure saveDissertationsWithSimilarityAnalisys = { + Node xmlFile -> + XMLService.createDissertationsWithSimilarityAnalysis(xmlFile, similarityTolerance) + } + def boolean verifyDissertations(String title, Node xmlFile) { return XMLService.verifyDissertations(title, xmlFile) diff --git a/grails-app/services/rgms/XMLService.groovy b/grails-app/services/rgms/XMLService.groovy index 168b0bef..45578502 100644 --- a/grails-app/services/rgms/XMLService.groovy +++ b/grails-app/services/rgms/XMLService.groovy @@ -294,6 +294,52 @@ class XMLService { createDissertation(doutorado) } + static void createDissertationsWithSimilarityAnalysis(Node xmlFile, int toleranceLevel) { + + List dissertations = Dissertacao.findAll(); + + 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] + + String dissertacaoMestrado = getAttributeValueFromNode(mestrado, "TITULO-DA-DISSERTACAO-TESE") + + String dissertacaoDoutorado = getAttributeValueFromNode(doutorado, "TITULO-DA-DISSERTACAO-TESE") + + boolean mestradoOK = true + boolean doutoradoOK = true + + for (int i = 0; i < dissertations.size(); i++) + { + String current = dissertations.get(i) + int distanciaMestrado = Levenshtein.distance(current, dissertacaoMestrado) + if (( distanciaMestrado> toleranceLevel) && distanciaMestrado <= 10) + { + mestradoOK = false + + } + + int distanciaDoutorado = Levenshtein.distance(current, dissertacaoDoutorado) + if(distanciaDoutorado > toleranceLevel && distanciaDoutorado <=10) + { + doutoradoOK = false + + } + } + + if(mestradoOK) + { + createDissertation(mestrado) + } + + if(doutoradoOK) + { + createDissertation(doutorado) + } + + } + private static void createDissertation(Node xmlNode) { Dissertacao newDissertation = new Dissertacao() newDissertation.title = getAttributeValueFromNode(xmlNode, "TITULO-DA-DISSERTACAO-TESE") diff --git a/grails-app/views/XML/home.gsp b/grails-app/views/XML/home.gsp index c62b7da8..8f9bd30d 100644 --- a/grails-app/views/XML/home.gsp +++ b/grails-app/views/XML/home.gsp @@ -18,7 +18,7 @@
- + diff --git a/test/cucumber/XMLImport.feature b/test/cucumber/XMLImport.feature index b61f1d12..af8ef770 100644 --- a/test/cucumber/XMLImport.feature +++ b/test/cucumber/XMLImport.feature @@ -328,9 +328,9 @@ Feature: XMLImport 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 "curriculo5.xml" which contains a dissertation entitled "Semantics an refinement for a concurrent object oriented Language" + 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 + And no new dissertation entitled "Semantics an refinement for a concurrent object oriented language" is stored by the system Scenario: the tolerance level is not informed Given I am at the XMLImport Page diff --git a/test/cucumber/steps/XMLImportSteps.groovy b/test/cucumber/steps/XMLImportSteps.groovy index deebe11f..e513eaf0 100644 --- a/test/cucumber/steps/XMLImportSteps.groovy +++ b/test/cucumber/steps/XMLImportSteps.groovy @@ -118,13 +118,13 @@ Given(~'^the system has a dissertation entitled "([^"]*)" stored$') { String tit } And(~'^the similarity tolerance is configured to "([^"]*)"$') { int similarityTolerance-> - assert TestDataDissertacao.verifySimilarityTolerance(similarityTolerance) + TestDataDissertacao.setSimilarityTolerance(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 + TestDataDissertacao.uploadDissertacaoWithSimilarityAnalisys(path) boolean result = TestDataDissertacao.verifyDissertationXML(title, path) assert result @@ -157,5 +157,6 @@ When(~'^I click on "upload" without informing the tolerance level$') { -> } Then(~'^the system outputs an error message$') { -> - assert page.readFlashMessage() != null + //qualquer navegador por padrão mostra uma mensagem de erro quando o atributo "required" está configurado + assert page.isRequiredEnabledOnToleranceSelect() } \ No newline at end of file diff --git a/test/functional/pages/XMLImportPage.groovy b/test/functional/pages/XMLImportPage.groovy index e0d32c09..bf3cf6f1 100644 --- a/test/functional/pages/XMLImportPage.groovy +++ b/test/functional/pages/XMLImportPage.groovy @@ -2,6 +2,7 @@ package pages import geb.Page + /** * User: Raony Benjamim [RBAA] * Date: 29/08/13 @@ -40,4 +41,8 @@ class XMLImportPage extends Page { def uploadClick(){ $('input.save').click() } + + boolean isRequiredEnabledOnToleranceSelect(){ + return $("#toleranceSelect").getAttribute("required") + } } diff --git a/test/functional/steps/TestDataDissertacao.groovy b/test/functional/steps/TestDataDissertacao.groovy index a49575a1..67496101 100644 --- a/test/functional/steps/TestDataDissertacao.groovy +++ b/test/functional/steps/TestDataDissertacao.groovy @@ -51,6 +51,14 @@ class TestDataDissertacao cont.response.reset() } + static public void uploadDissertacaoWithSimilarityAnalisys(filename) { + def cont = new XMLController() + def xml = new File(filename); + def records = new XmlParser() + cont.saveDissertationsWithSimilarityAnalisys(records.parse(xml)); + cont.response.reset() + } + static public void removeDissertacao(String title) { def testDissertation = Dissertacao.findByTitle(title) def cont = new DissertacaoController() @@ -59,18 +67,9 @@ class TestDataDissertacao cont.delete() } - static public boolean verifySimilarityTolerance(int value) + static public void setSimilarityTolerance(int value) { - def cont = new XMLController() - if(cont.similarityTolerance == value) - { - return true - } - else - { - return false - } - //cont.setSimilarityTolerance(value) + XMLController.similarityTolerance = value } static public boolean verifyDissertationXML(String title, String filename) diff --git a/test/functional/steps/curriculo5.xml b/test/functional/steps/curriculo5.xml index dcc159f0..e9a18056 100644 --- a/test/functional/steps/curriculo5.xml +++ b/test/functional/steps/curriculo5.xml @@ -1 +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 +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 5ed146ec54e77eea26580e0662a911b92d2cdf7c Mon Sep 17 00:00:00 2001 From: RomeroBarata Date: Sun, 3 May 2015 11:23:05 +1000 Subject: [PATCH 36/43] - Fixed a few scenarios so they now reflect better how the tests are executed. - Fixed a few steps for the scenarios but they are still incomplete. - Started changing the BibTex Export page. - Changed the BuildConfig so now the system properly runs. --- grails-app/conf/BuildConfig.groovy | 2 + grails-app/views/bibtexGenerateFile/home.gsp | 48 +++++++++++++++++++ test/cucumber/BibtexGenerateFile.feature | 15 +++--- .../steps/BibtexGenerateFileSteps.groovy | 36 ++++++++++---- 4 files changed, 84 insertions(+), 17 deletions(-) diff --git a/grails-app/conf/BuildConfig.groovy b/grails-app/conf/BuildConfig.groovy index 42066943..5c5fdbab 100644 --- a/grails-app/conf/BuildConfig.groovy +++ b/grails-app/conf/BuildConfig.groovy @@ -28,6 +28,7 @@ grails.project.dependency.resolution = { grailsHome() grailsCentral() mavenCentral() + mavenRepo "http://repo.grails.org/grails/plugins" // uncomment these to enable remote dependency resolution from public Maven repositories //mavenCentral() @@ -46,6 +47,7 @@ grails.project.dependency.resolution = { compile('lib:itext-pdfa:5.4.0') compile('lib:itext-xtra:5.4.0') compile('lib:twitter4j-core:4.0.1') + compile('commons-codec:commons-codec:1.6') compile(group: 'org.apache.poi', name: 'poi', version: '3.7') { excludes 'xmlbeans' diff --git a/grails-app/views/bibtexGenerateFile/home.gsp b/grails-app/views/bibtexGenerateFile/home.gsp index f4538d83..9276df96 100644 --- a/grails-app/views/bibtexGenerateFile/home.gsp +++ b/grails-app/views/bibtexGenerateFile/home.gsp @@ -6,6 +6,7 @@ + <g:message code="default.list.label" args="[entityName]" /> @@ -84,7 +85,54 @@ +
+

+ +
${flash.message}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${fieldValue(bean: periodicoInstance, field: "title")}${fieldValue(bean: periodicoInstance, field: "file")}${fieldValue(bean: periodicoInstance, field: "researchLine")}${fieldValue(bean: periodicoInstance, field: "authors")}${fieldValue(bean: periodicoInstance, field: "journal")}
+
\ No newline at end of file diff --git a/test/cucumber/BibtexGenerateFile.feature b/test/cucumber/BibtexGenerateFile.feature index f7c03d01..075e6669 100644 --- a/test/cucumber/BibtexGenerateFile.feature +++ b/test/cucumber/BibtexGenerateFile.feature @@ -11,19 +11,20 @@ Feature: all bibtex 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 + And I have another article named "Modularity analysis of use case implementations" + When I generate a BibTex file from articles named "A theory of software product line refinement" and "Modularity analysis of use case implementations" + Then the BibTex file has unique citation-keys for the articles "A theory of software product line refinement" and "Modularity analysis of use case implementations" Scenario: Generate new BibTex from a subset of publications web Given I am on the "Publications" menu - When I select a subset of publications + When I select the publications "A theory of software product line refinement" and "Modularity analysis of use case implementations" And I click on the "Generate BibTex" option - Then the system generates a BibTex file containing only the publications from the selected subset + Then the BibTex details are showed + And It only contains the articles "A theory of software product line refinement" and "Modularity analysis of use case implementations" 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 + Given I have an article named "A theory of software product line refinement" with multiple authors + When I generate a BibTex file from the article named "A theory of software product line refinement" Then the BibTex file author field must have the authors' names separated by "and" #if ($InvalidEntryOfBibtex) diff --git a/test/cucumber/steps/BibtexGenerateFileSteps.groovy b/test/cucumber/steps/BibtexGenerateFileSteps.groovy index 2f167a4c..0618def9 100644 --- a/test/cucumber/steps/BibtexGenerateFileSteps.groovy +++ b/test/cucumber/steps/BibtexGenerateFileSteps.groovy @@ -1,4 +1,9 @@ import pages.BibtexGenerateFilePage +import pages.LoginPage +import pages.PublicationsPage +import rgms.publication.Periodico +import rgms.publication.BibtexGenerateFile + import static cucumber.api.groovy.EN.* @@ -19,17 +24,25 @@ Given(~'^I have an article named "([^"]*)"$') {String title -> assert article != null } -And(~'^I have an article named "([^"]*)"$') {String title -> +And(~'^I have another 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 +When(~'^I generate a BibTex file from articles named "([^"]*)" and "([^"]*)"$') { String title1, String title2 -> + article1 = Periodico.findByTitle(title1) + article2 = Periodico.findByTitle(title2) + bib1 = generateBibtexPeriodico(article1) + assert bib1 != null + bib2 = generateBibtexPeriodico(article2) + assert bib2 != null + bibtexFile = bib1 + "\n" + bib2 + assert bibtexFile != null } -Then(~'^the BibTex file has unique citation-keys for each article$') {-> - // Do something that I have no idea at the moment +Then(~'^the BibTex file has unique citation-keys for the articles "([^"]*)" and "([^"]*)"$') { String title1, String title2 -> + // The method that generates a BibTex does not include a citation-key + // Need to fix this issue first } Given(~'^I am on the "Publications" menu$') {-> @@ -39,8 +52,8 @@ Given(~'^I am on the "Publications" menu$') {-> at PublicationsPage } -When(~'^I select a subset of publications$') {-> - // Do something that I have no idea at the moment +When(~'^I select the publications "([^"]*)" and "([^"]*)"$') { String p1, String p2 -> + // Need to adjust the BibTex Export page in order to implement this } And(~'^I click on the "([^"]*)" option$') {String o -> @@ -48,9 +61,12 @@ And(~'^I click on the "([^"]*)" option$') {String o -> 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 +Then(~'^the BibTex details are showed$') {-> + +} + +And(~'^It only contains the articles "([^"]*)" and "([^"]*)"$') { String title1, String title2 -> + } Given(~'I am logged into the system$') {-> From 87e43639afcd0399f726bdbeb56d04929ac300dd Mon Sep 17 00:00:00 2001 From: Fillipe de Menezes Date: Sat, 2 May 2015 22:25:55 -0300 Subject: [PATCH 37/43] =?UTF-8?q?Implementa=C3=A7=C3=A3o=20em=20ReserachGr?= =?UTF-8?q?oup=20Controller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grails-app/conf/BuildConfig.groovy | 4 +- .../member/ResearchGroupController.groovy | 34 +++ .../domain/rgms/member/ResearchGroup.groovy | 4 +- grails-app/views/researchGroup/_form.gsp | 152 +++++----- grails-app/views/researchGroup/create.gsp | 84 ++--- grails-app/views/researchGroup/edit.gsp | 95 +++--- .../views/researchGroup/editMembers.gsp | 7 - grails-app/views/researchGroup/list.gsp | 129 ++++---- grails-app/views/researchGroup/show.gsp | 286 ++++++++---------- 9 files changed, 415 insertions(+), 380 deletions(-) delete mode 100644 grails-app/views/researchGroup/editMembers.gsp diff --git a/grails-app/conf/BuildConfig.groovy b/grails-app/conf/BuildConfig.groovy index 42066943..4ae91f11 100644 --- a/grails-app/conf/BuildConfig.groovy +++ b/grails-app/conf/BuildConfig.groovy @@ -28,6 +28,7 @@ grails.project.dependency.resolution = { grailsHome() grailsCentral() mavenCentral() + mavenRepo "http://repo.grails.org/grails/plugins" // uncomment these to enable remote dependency resolution from public Maven repositories //mavenCentral() @@ -46,6 +47,7 @@ grails.project.dependency.resolution = { compile('lib:itext-pdfa:5.4.0') compile('lib:itext-xtra:5.4.0') compile('lib:twitter4j-core:4.0.1') + compile('commons-codec:commons-codec:1.6') compile(group: 'org.apache.poi', name: 'poi', version: '3.7') { excludes 'xmlbeans' @@ -77,4 +79,4 @@ grails.project.dependency.resolution = { test ":cucumber:0.8.0" test ":spock:0.7" } -} +} \ No newline at end of file diff --git a/grails-app/controllers/rgms/member/ResearchGroupController.groovy b/grails-app/controllers/rgms/member/ResearchGroupController.groovy index c894c14f..6ffcfe65 100644 --- a/grails-app/controllers/rgms/member/ResearchGroupController.groovy +++ b/grails-app/controllers/rgms/member/ResearchGroupController.groovy @@ -46,6 +46,10 @@ class ResearchGroupController { def save() { def researchGroupInstance = new ResearchGroup(params) + + /* Checando Caracteres Não Permitidos Nos Nomes*/ + allowedChar(researchGroupInstance) + //#if($researchGroupHierarchy) try { validarChildOf(researchGroupInstance, researchGroupInstance.getChildOf()) @@ -266,4 +270,34 @@ class ResearchGroupController { researchGroupInstance.save() redirect(action: "show", id: researchGroupInstance.id) } + + def allowedChar(researchGroupInstance) { + def caracteres = ['#','%','*','@','!','$','¨','(',')','-','='] + + boolean pesquisa + pesquisa = false + + /* Procurando Caracteres não permitidos */ + for (x in caracteres){ + for (y in researchGroupInstance.name){ + if(x == y) + pesquisa = true; + } + + for (y in researchGroupInstance.twitter){ + if(x == y) + pesquisa = true; + } + + for (y in researchGroupInstance.sigla){ + if(x == y) + pesquisa = true; + } + } /* Fim for */ + + /* Checando se foi achado caracteres não permitidos */ + if (pesquisa){ + throw new RuntimeException("Não é possível registrar um grupo com Caracteres Especiais!") + } + } /* Fim allowedChar method*/ } diff --git a/grails-app/domain/rgms/member/ResearchGroup.groovy b/grails-app/domain/rgms/member/ResearchGroup.groovy index c942cf1a..aca68be2 100644 --- a/grails-app/domain/rgms/member/ResearchGroup.groovy +++ b/grails-app/domain/rgms/member/ResearchGroup.groovy @@ -7,6 +7,7 @@ class ResearchGroup { String name String description String twitter + String sigla //#if($researchGroupHierarchy) ResearchGroup childOf; @@ -15,9 +16,10 @@ class ResearchGroup { static hasMany = [memberships: Membership, news: News] static constraints = { - name(maxSize: 10, blank: false, unique: true) + name(maxSize: 15, blank: false, unique: true) description(maxSize: 1000, blank: false) twitter(nullable: true) + sigla(maxSize: 10, blank: true, unique: true) //#if($researchGroupHierarchy) childOf(nullable: true, blank: true) diff --git a/grails-app/views/researchGroup/_form.gsp b/grails-app/views/researchGroup/_form.gsp index fb13fbe0..fe582b6c 100644 --- a/grails-app/views/researchGroup/_form.gsp +++ b/grails-app/views/researchGroup/_form.gsp @@ -1,70 +1,82 @@ -<%@ page import="rgms.member.ResearchGroup" %> - - - - -
- - -
- -
- - -
- -
- - -
- - - -
- - -
- -
- - -
    - -
  • - -
  • -
    - -
-
- -
- - -
+<%@ page import="rgms.member.ResearchGroup" %> + + + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
    + +
  • ${m?.encodeAsHTML()}
  • +
    +
  • + ${message(code: 'default.add.label', args: [message(code: 'membership.label', default: 'Membership')])} +
  • +
+ +
+ +
+ + +
    + +
  • ${n?.encodeAsHTML()}
  • +
    +
  • + ${message(code: 'default.add.label', args: [message(code: 'news.label', default: 'News')])} +
  • +
+ +
+ diff --git a/grails-app/views/researchGroup/create.gsp b/grails-app/views/researchGroup/create.gsp index a7f21cfb..59c55ca1 100644 --- a/grails-app/views/researchGroup/create.gsp +++ b/grails-app/views/researchGroup/create.gsp @@ -1,39 +1,45 @@ -<%@ page import="rgms.member.ResearchGroup" %> - - - - - - <g:message code="default.create.label" args="[entityName]" /> - - - - -
-

- -
${flash.message}
-
- - - - -
- -
-
- -
-
-
- - +<%@ page import="rgms.member.ResearchGroup" %> + + + + + + <g:message code="default.create.label" args="[entityName]"/> + + + + + + + +
+

+ +
${flash.message}
+
+ + + + +
+ +
+
+ +
+
+
+ + diff --git a/grails-app/views/researchGroup/edit.gsp b/grails-app/views/researchGroup/edit.gsp index 0f8eb404..52f6a31f 100644 --- a/grails-app/views/researchGroup/edit.gsp +++ b/grails-app/views/researchGroup/edit.gsp @@ -1,43 +1,52 @@ -<%@ page import="rgms.member.ResearchGroup" %> - - - - - - <g:message code="default.edit.label" args="[entityName]" /> - - - - -
-

- -
${flash.message}
-
- - - - - - -
- -
-
- - -
-
-
- - +<%@ page import="rgms.member.ResearchGroup" %> + + + + + + <g:message code="default.edit.label" args="[entityName]"/> + + + + + + + +
+

+ +
${flash.message}
+
+ + + + + + +
+ +
+
+ + +
+
+
+ + diff --git a/grails-app/views/researchGroup/editMembers.gsp b/grails-app/views/researchGroup/editMembers.gsp deleted file mode 100644 index 34aceb06..00000000 --- a/grails-app/views/researchGroup/editMembers.gsp +++ /dev/null @@ -1,7 +0,0 @@ -
- - -
\ No newline at end of file diff --git a/grails-app/views/researchGroup/list.gsp b/grails-app/views/researchGroup/list.gsp index 30f2448a..e5f8e6e4 100644 --- a/grails-app/views/researchGroup/list.gsp +++ b/grails-app/views/researchGroup/list.gsp @@ -1,59 +1,70 @@ - -<%@ page import="rgms.member.ResearchGroup" %> - - - - - - <g:message code="default.list.label" args="[entityName]" /> - - - - -
-

- -
${ flash.message }
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
${ fieldValue(bean: researchGroupInstance, field: "name") }${ fieldValue(bean: researchGroupInstance, field: "description") } ${ fieldValue(bean: researchGroupInstance, field: "childOf") }
- -
- - - +<%@ page import="rgms.member.ResearchGroup" %> + + + + + + <g:message code="default.list.label" args="[entityName]"/> + + + + + + + +
+

+ +
${flash.message}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${fieldValue(bean: researchGroupInstance, field: "name")}${fieldValue(bean: researchGroupInstance, field: "description")}${fieldValue(bean: researchGroupInstance, field: "twitter")}${fieldValue(bean: researchGroupInstance, field: "sigla")}${fieldValue(bean: researchGroupInstance, field: "childOf")}
+ + +
+ + diff --git a/grails-app/views/researchGroup/show.gsp b/grails-app/views/researchGroup/show.gsp index 396c70a3..f8856c78 100644 --- a/grails-app/views/researchGroup/show.gsp +++ b/grails-app/views/researchGroup/show.gsp @@ -1,160 +1,126 @@ - -<%@ page import="rgms.member.ResearchGroup" %> - - - - - - <g:message code="default.show.label" args="[entityName]"/> - - - -- --
-- - - - - -- --
-- - - - - - --
-- - - - - - - - - - - - - - -
-

- -
${flash.message}
-
-
    - - -
  1. - - - - -
  2. -
    - - -
  3. - - - - -
  4. -
    - - -
  5. - - - - -
  6. -
    - - - -
  7. - - - ${researchGroupInstance?.childOf?.encodeAsHTML()} - -
  8. -
    - - - - - -
  9. - - - - ${m.member?.encodeAsHTML()} - - - -
  10. -
    - - -
  11. - - - - - - - - - -
    ${index + 1} -${n.description?.encodeAsHTML()}
    - -
  12. -
    - -
-
    -
  1. - - -
  2. -
- - -
- - - -
-
-
- - - +<%@ page import="rgms.member.ResearchGroup" %> + + + + + + <g:message code="default.show.label" args="[entityName]"/> + + + + + + + +
+

+ +
${flash.message}
+
+
    + + +
  1. + + + + +
  2. +
    + + +
  3. + + + + +
  4. +
    + + +
  5. + + + + +
  6. +
    + + +
  7. + + + + +
  8. +
    + + +
  9. + + + ${researchGroupInstance?.childOf?.encodeAsHTML()} + +
  10. +
    + + +
  11. + + + + ${m?.encodeAsHTML()} + + +
  12. +
    + + +
  13. + + + + ${n?.encodeAsHTML()} + + +
  14. +
    + +
+ +
+ + + +
+
+
+ + From a2fb7319174449e2b1ae441eb68f4c616102d7e5 Mon Sep 17 00:00:00 2001 From: luisdelgado Date: Sat, 2 May 2015 22:39:18 -0300 Subject: [PATCH 38/43] =?UTF-8?q?Atividade=206:=20Implementa=C3=A7ao=20de?= =?UTF-8?q?=20funcionalidades=20de=20forma=20que=20todos=20os=20testes=20f?= =?UTF-8?q?uncionem.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grails-app/conf/BuildConfig.groovy | 2 + test/cucumber/BibtexGenerateFile.feature | 26 +++++++----- .../steps/BibtexGenerateFileSteps.groovy | 40 +++++++++++++------ .../pages/BibTexMainMenuPage.groovy | 22 +++++----- .../pages/BibtexGenerateFilePage.groovy | 10 ++++- test/functional/pages/PublicationsPage.groovy | 4 ++ 6 files changed, 71 insertions(+), 33 deletions(-) diff --git a/grails-app/conf/BuildConfig.groovy b/grails-app/conf/BuildConfig.groovy index 42066943..5c5fdbab 100644 --- a/grails-app/conf/BuildConfig.groovy +++ b/grails-app/conf/BuildConfig.groovy @@ -28,6 +28,7 @@ grails.project.dependency.resolution = { grailsHome() grailsCentral() mavenCentral() + mavenRepo "http://repo.grails.org/grails/plugins" // uncomment these to enable remote dependency resolution from public Maven repositories //mavenCentral() @@ -46,6 +47,7 @@ grails.project.dependency.resolution = { compile('lib:itext-pdfa:5.4.0') compile('lib:itext-xtra:5.4.0') compile('lib:twitter4j-core:4.0.1') + compile('commons-codec:commons-codec:1.6') compile(group: 'org.apache.poi', name: 'poi', version: '3.7') { excludes 'xmlbeans' diff --git a/test/cucumber/BibtexGenerateFile.feature b/test/cucumber/BibtexGenerateFile.feature index f7c03d01..1ff934ad 100644 --- a/test/cucumber/BibtexGenerateFile.feature +++ b/test/cucumber/BibtexGenerateFile.feature @@ -29,19 +29,21 @@ Feature: all bibtex #if ($InvalidEntryOfBibtex) 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 BibTexGenerateFile page + When: I click to "Generate BibTex manually" And: A BibTeX entry is "@article{mrx05 auTHor = "Mr. X", Title = {Something Great}, publisher = "nob" # "ody", YEAR = 2005, }" - When: I click to "Generate BibTex" + And: I click on the other button "Generate BibTex" Then: I see an error message 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" + Given: I am logged into the system + And: I am at the BibTexGenerateFile page + When: I click to "Generate BibTex manually" And: A BibTex entry is "@article{mrx05, auTHor = "Mr. X", Title = {Something Great}, @@ -49,31 +51,33 @@ Feature: all bibtex YEAR = 2005, chapter = 8, }" - When: I click to "Generate BibTex" + And: I click on the other button "Generate BibTex" Then: I see an error message 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 BibTexGenerateFile page + When: I click to "Generate BibTex manually" And: A BibTeX entry is "@article{mrx05, auTHor = "Mr. X", Title = {Something Great}, publisher = "nob" # "ody", - }" - When: I click to "Generate BibTex" + } + And: I click on the other button "Generate BibTex" Then: I see an error message #end #if ($CorrectEntryOfBibtex) - Scenario: BibTex file is generated + Scenario: BibTex file is generated manually Given: I am logged into the system - And: I am at the "Main menu" + And: I am at the BibTexGenerateFile page + When: I click to "Generate BibTex manually" And: A Bibtex entry is "@article{mrx05, auTHor = "Mr. X", Title = {Something Great}, publisher = "nob" # "ody", YEAR = 2005, }" - When: I click to "Generate BibTex" + And: I click on the other button "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 2f167a4c..c9686eaf 100644 --- a/test/cucumber/steps/BibtexGenerateFileSteps.groovy +++ b/test/cucumber/steps/BibtexGenerateFileSteps.groovy @@ -53,29 +53,45 @@ Then(~'^the system generates a BibTex file containing only the publications from // I guess I am mixing GUI and controller stuff here } -Given(~'I am logged into the system$') {-> +#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(~'^I am at the BibTexGenerateFile page$') {-> + to BibtexGenerateFilePage + at BibtexGenerateFilePage } -And(~'A BibTeX entry is "([^"]*)"$') {String entrada -> - at BibTexMainMenuPage - page.verificarEntrada(entrada) +When(~'^I click to "([^"]*)"$') {String o -> + at BibtexGenerateFilePage + page.select(o) } -When(~'I click to "([^"]*)"$') {String o -> - at BibTexMainMenuPage - page.select(o) +And(~'^A BibTeX entry is "([^"]*)"$') {String entrada -> + to BibtexMainMenuPage + at BibtexMainMenuPage } -Then(~'I see an error message$'){-> - at BibTexMainMenuPage +And(~'^I click on the other button "([^"]*)"$') {String botao -> + at BibtexMainMenuPage + page.verificarEntrada(entrada) + page.select(botao) +} + +Then(~'^I see an error message$'){-> + at BibtexMainMenuPage + assert entrada == null + to BibtexGenerateFilePage + } +#end -Then(~'a BibTex file is generated$'){-> +#if ($CorrectEntryOfBibtex) +Then(~'^a BibTex file is generated$'){-> + at BibtexMainMenuPage + assert true == true } +#end \ No newline at end of file diff --git a/test/functional/pages/BibTexMainMenuPage.groovy b/test/functional/pages/BibTexMainMenuPage.groovy index bbdf717e..b37649d7 100644 --- a/test/functional/pages/BibTexMainMenuPage.groovy +++ b/test/functional/pages/BibTexMainMenuPage.groovy @@ -3,25 +3,29 @@ package pages import geb.Page /** - * Created by luisdelgado on 18/04/15. + * Created by Luís Delgado on 18/04/15. */ -class BibTexMainMenuPage extends Page{ - static url = "/bibtexMainMenu/home" +class BibTexMainMenuPage extends Page { + static url = "/bibtexmainmenu/home" static at = { title ==~ /Member Listagem/ } static content = { - - + bibTexEntry { + $("textarea", id: "bibtextManual") + } + buttonEntry { + $("input", id: "botao") + } } - def verificarEntrada(entrada){ - $(entrada).click() + def verificarEntrada(String bibtexManual){ + $(id: "bibtextManual").value() } - def select(o){ - $(o).click() + def select(String s) { + $(id: "botao").find('b', text: s).click() } } diff --git a/test/functional/pages/BibtexGenerateFilePage.groovy b/test/functional/pages/BibtexGenerateFilePage.groovy index 6ac1baca..ed3ec87d 100644 --- a/test/functional/pages/BibtexGenerateFilePage.groovy +++ b/test/functional/pages/BibtexGenerateFilePage.groovy @@ -19,4 +19,12 @@ class BibtexGenerateFilePage extends FormPage { def showBibtex() { $('a.Generate All BibTex').click() } -} + + def verificarEntrada(String entrada) { + + } + + def select(String s) { + $('div', id: 'status').find('a', text: s).click() + } +} \ No newline at end of file diff --git a/test/functional/pages/PublicationsPage.groovy b/test/functional/pages/PublicationsPage.groovy index 1607747c..f63eaac9 100644 --- a/test/functional/pages/PublicationsPage.groovy +++ b/test/functional/pages/PublicationsPage.groovy @@ -22,4 +22,8 @@ class PublicationsPage extends Page { def getLink(String linkName) { $('div#status a', text: linkName) } + + def verificarEntrada(String entrada) { + + } } From c965965fd7b08cf61b6fb75ca2660ae672e7bf0f Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Sat, 2 May 2015 23:26:07 -0300 Subject: [PATCH 39/43] Arquivo necessario para testes --- test/files/cv-duplicatedOrientationC.xml | 3429 ++++++++++++++++++++++ 1 file changed, 3429 insertions(+) create mode 100644 test/files/cv-duplicatedOrientationC.xml diff --git a/test/files/cv-duplicatedOrientationC.xml b/test/files/cv-duplicatedOrientationC.xml new file mode 100644 index 00000000..daa5b33f --- /dev/null +++ b/test/files/cv-duplicatedOrientationC.xml @@ -0,0 +1,3429 @@ + + + + + + + + + + + + + + + + + + + + + + + + Algebraic Semantics + Theorem Proving and Algebra + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Engenharia de Software + Introduo a Programao (Orientada a Objetos com Java) + Programao Orientada a Objetos (e Java) + Trabalho de Graduao em Engenharia de Software + + + Especificao de Sistemas Distribudos + Introduo ao RUP--Rational Unified Process + Mtodos Formais (Especificaes Algbricas) + Novos Conceitos de Modularidade de Software + Paradigmas de Linguagens de Programao + Programao Orientada a Aspectos com AspectJ + Trabalho Individual em Engenharia de Software + + + Programao 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 200 + + + Engenharia 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 d7144b768f6c1015bf810c3d50b055d6fa9dcc33 Mon Sep 17 00:00:00 2001 From: Tiago Nogueira Date: Sat, 2 May 2015 23:30:49 -0300 Subject: [PATCH 40/43] Arquivo necessario para testes --- test/files/cv-duplicatedOrientationC.xml | 979 ++++++++--------------- 1 file changed, 321 insertions(+), 658 deletions(-) mode change 100644 => 100755 test/files/cv-duplicatedOrientationC.xml diff --git a/test/files/cv-duplicatedOrientationC.xml b/test/files/cv-duplicatedOrientationC.xml old mode 100644 new mode 100755 index daa5b33f..8be42eea --- a/test/files/cv-duplicatedOrientationC.xml +++ b/test/files/cv-duplicatedOrientationC.xml @@ -1,740 +1,403 @@ - - - + - - + + - - + + - + - - + + - - Algebraic Semantics - Theorem Proving and Algebra + + Theorem Proving and Algebra + Algebraic Semantics - - - - - - - + + + + + + - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - + + - - - - - - + - - Engenharia de Software - Introduo a Programao (Orientada a Objetos com Java) - Programao Orientada a Objetos (e Java) - Trabalho de Graduao em Engenharia de Software - - - Especificao de Sistemas Distribudos - Introduo ao RUP--Rational Unified Process - Mtodos Formais (Especificaes Algbricas) - Novos Conceitos de Modularidade de Software - Paradigmas de Linguagens de Programao - Programao Orientada a Aspectos com AspectJ - Trabalho Individual em Engenharia de Software - - - Programao Orientada a Objetos (e Java) + + Introduo a Programao (Orientada a Objetos com + Java) + + Programao Orientada a Objetos (e Java) + Engenharia de Software + Trabalho de Graduao em Engenharia de Software + - - 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 200 - - - Engenharia 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) + + Paradigmas de Linguagens de Programao + Especificao de Sistemas Distribudos + Trabalho Individual em Engenharia de Software + + Introduo ao RUP--Rational Unified Process + Mtodos Formais + Programao Orientada a Objetos com AspectJ - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + - + + - - + + - + + + - + + + + - - + + - - - - + + + + - + - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - + - - - - - - + + - - - - - - - - + - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + From d4db8cfa07e8b6a630537a0a9649bd1eed8fa132 Mon Sep 17 00:00:00 2001 From: almeidaeduardo Date: Sat, 2 May 2015 23:56:54 -0300 Subject: [PATCH 41/43] Update ConferenceSteps Deixei o update todo comentado, pois tive problemas para o rodar o projeto --- test/cucumber/steps/ConferenciaSteps.groovy | 45 ++++++++++++++------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/test/cucumber/steps/ConferenciaSteps.groovy b/test/cucumber/steps/ConferenciaSteps.groovy index f6811aea..36846b0d 100644 --- a/test/cucumber/steps/ConferenciaSteps.groovy +++ b/test/cucumber/steps/ConferenciaSteps.groovy @@ -183,44 +183,61 @@ And(~'^the aquirvo "ATOS.pdf" is removed from the system) {String fileName -> } -Given(~'^I am at the conferece articles page') {-> + +/* +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 +And(~'^the system has some conference articles authored by "([^"]*)", among several publications$') { String author -> + article = TestDataAndOperationsPublication.containsUser(author) assert article != null } -When(~'^I write the name "([^"]*)" at the search field') {-> String author +When(~'^I write "([^"]*)" at the Search field$') { String author -> at ConferenciaPage page.fillSearch(author) } -And (~'^I click on the search button'){ +And (~'^I click on the Search button$'){ page.select("search") } -Then (~'^a list of all conference articles by "([^"]*)" is displayed'){-> String author +Then (~'^a list of all conference articles by "([^"]*)" is displayed$'){ String author -> + author = TestDataAndOperationsPublication.containsUser(author) + assert author != null page.listConferenceArticles(author) } -Given(~'^I am at the Conference page'){ +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 +And(~'^an Author named "([^"]*)" had published the articles "([^"]*)", "([^"]*)" and "([^"]*)" for the conferences "([^"]*)", "([^"]*)" and "([^"]*)"$'){ String author -> + assert Conferencia.findByTitle("International Conference on Software Engineering") != null + assert Conferencia.findByTitle("Information and Software Technology") != null + assert Conferencia.findByTitle("Scenario: Search for conferences which an Author have published web") != null + assert ArticleTestDataAndOperations.findArticleByTitle("An Analysis and Survey of the Development of Mutation Testing") != null + assert ArticleTestDataAndOperations.findArticleByTitle("A Systematic Survey of Program Comprehension through Dynamic Analysis") != null + assert ArticleTestDataAndOperations.findArticleByTitle("Engineering Privacy") != null + author = TestDataAndOperationsPublication.containsUser(author) + assert author != null +} +When(~'^I write ([^"]*)" at the search field$') { String author -> at ConferenciaPage page.fillSearch(author) } -And(~'^ I click on the search button'){ +And(~'^I click on the search button$'){ page.select("search") } -Then(~'^a list of all conferences that ([^"]*)" published an article is displayed') {-> String author +Then(~'^a list of all conferences, composed by "([^"]*)", "([^"]*)" and "([^"]*)", that "([^"]*)" published an article is displayed$') { String author -> + assert ArticleTestDataAndOperations.findArticleByTitle("An Analysis and Survey of the Development of Mutation Testing") != null + assert ArticleTestDataAndOperations.findArticleByTitle("A Systematic Survey of Program Comprehension through Dynamic Analysis") != null + assert ArticleTestDataAndOperations.findArticleByTitle("Engineering Privacy") != null + author = TestDataAndOperationsPublication.containsUser(author) + assert author != null page.listConferencia(author) } +*/ + From 7c9bb7631d8aa3ac2ccd5b68c82581b9c08f38ea Mon Sep 17 00:00:00 2001 From: luisdelgado Date: Tue, 5 May 2015 18:01:00 -0300 Subject: [PATCH 42/43] =?UTF-8?q?Complemento=20da=20atividade=206=20que=20?= =?UTF-8?q?n=C3=A3o=20foi=20comitado=20no=20prazo=20por=20bug=20do=20Intel?= =?UTF-8?q?lij,=20conforme=20relatado=20na=20lista=20de=20email.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BibTexMainMenuController.groovy | 15 +++++++ .../rgms/publication/BibTexMainMenu.groovy | 11 +++++ grails-app/views/bibTexMainMenu/_form.gsp | 4 ++ grails-app/views/bibTexMainMenu/create.gsp | 39 ++++++++++++++++ grails-app/views/bibTexMainMenu/edit.gsp | 43 ++++++++++++++++++ grails-app/views/bibTexMainMenu/list.gsp | 44 +++++++++++++++++++ grails-app/views/bibTexMainMenu/show.gsp | 36 +++++++++++++++ 7 files changed, 192 insertions(+) create mode 100644 grails-app/controllers/rgms/publication/BibTexMainMenuController.groovy create mode 100644 grails-app/domain/rgms/publication/BibTexMainMenu.groovy create mode 100644 grails-app/views/bibTexMainMenu/_form.gsp create mode 100644 grails-app/views/bibTexMainMenu/create.gsp create mode 100644 grails-app/views/bibTexMainMenu/edit.gsp create mode 100644 grails-app/views/bibTexMainMenu/list.gsp create mode 100644 grails-app/views/bibTexMainMenu/show.gsp diff --git a/grails-app/controllers/rgms/publication/BibTexMainMenuController.groovy b/grails-app/controllers/rgms/publication/BibTexMainMenuController.groovy new file mode 100644 index 00000000..895c2db6 --- /dev/null +++ b/grails-app/controllers/rgms/publication/BibTexMainMenuController.groovy @@ -0,0 +1,15 @@ +package rgms.publication + +/** + * Created by Luís Delgado on 02/05/15. + */ +class BibTexMainMenuController { + + def index() { + + } + + def list = { + } + +} diff --git a/grails-app/domain/rgms/publication/BibTexMainMenu.groovy b/grails-app/domain/rgms/publication/BibTexMainMenu.groovy new file mode 100644 index 00000000..4a7cdd46 --- /dev/null +++ b/grails-app/domain/rgms/publication/BibTexMainMenu.groovy @@ -0,0 +1,11 @@ +package rgms.publication + +/** + * Created by Luís Delgado on 02/05/15. + */ +class BibTexMainMenu { + + static constraints = { + } + +} \ No newline at end of file diff --git a/grails-app/views/bibTexMainMenu/_form.gsp b/grails-app/views/bibTexMainMenu/_form.gsp new file mode 100644 index 00000000..be7ea132 --- /dev/null +++ b/grails-app/views/bibTexMainMenu/_form.gsp @@ -0,0 +1,4 @@ +<%@ page import="rgms.publication.BibTexMainMenu" %> + + + diff --git a/grails-app/views/bibTexMainMenu/create.gsp b/grails-app/views/bibTexMainMenu/create.gsp new file mode 100644 index 00000000..f71f7706 --- /dev/null +++ b/grails-app/views/bibTexMainMenu/create.gsp @@ -0,0 +1,39 @@ +<%@ page import="rgms.publication.BibTexMainMenu" %> + + + + + + <g:message code="default.create.label" args="[entityName]" /> + + + + +
+

+ +
${flash.message}
+
+ + + + +
+ +
+
+ +
+
+
+ + diff --git a/grails-app/views/bibTexMainMenu/edit.gsp b/grails-app/views/bibTexMainMenu/edit.gsp new file mode 100644 index 00000000..09414bdc --- /dev/null +++ b/grails-app/views/bibTexMainMenu/edit.gsp @@ -0,0 +1,43 @@ +<%@ page import="rgms.publication.BibTexMainMenu" %> + + + + + + <g:message code="default.edit.label" args="[entityName]" /> + + + + +
+

+ +
${flash.message}
+
+ + + + + + +
+ +
+
+ + +
+
+
+ + diff --git a/grails-app/views/bibTexMainMenu/list.gsp b/grails-app/views/bibTexMainMenu/list.gsp new file mode 100644 index 00000000..56e9d250 --- /dev/null +++ b/grails-app/views/bibTexMainMenu/list.gsp @@ -0,0 +1,44 @@ + +<%@ page import="rgms.publication.BibTexMainMenu" %> + + + + + + <g:message code="default.list.label" args="[entityName]" /> + + + + +
+

+ +
${flash.message}
+
+ + + + + + + + + + + + + +
+ + + +
+ + diff --git a/grails-app/views/bibTexMainMenu/show.gsp b/grails-app/views/bibTexMainMenu/show.gsp new file mode 100644 index 00000000..d83ab69f --- /dev/null +++ b/grails-app/views/bibTexMainMenu/show.gsp @@ -0,0 +1,36 @@ + +<%@ page import="rgms.publication.BibTexMainMenu" %> + + + + + + <g:message code="default.show.label" args="[entityName]" /> + + + + +
+

+ +
${flash.message}
+
+
    + +
+ +
+ + + +
+
+
+ + From 45b6ef61808e2da46aad5132e06d8b4e55a4e4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo?= Date: Thu, 7 May 2015 17:22:02 -0300 Subject: [PATCH 43/43] Retorno dos reportes para a feature ResearchGroup --- grails-app/views/researchGroup/show.gsp | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/grails-app/views/researchGroup/show.gsp b/grails-app/views/researchGroup/show.gsp index f8856c78..ffbaec5f 100644 --- a/grails-app/views/researchGroup/show.gsp +++ b/grails-app/views/researchGroup/show.gsp @@ -8,6 +8,36 @@ + + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +