diff --git a/test/cucumber/Authentication.feature b/test/cucumber/Authentication.feature index 425b140e..39f338fd 100644 --- a/test/cucumber/Authentication.feature +++ b/test/cucumber/Authentication.feature @@ -6,34 +6,40 @@ Scenario: Login with user that doesn't exist fail message Given I am at the Login Page When I try to login with an user that does not exist Then I am redirected to the Login Page - And A login failure message is displayed +#if($Authentication Process) + And The login failure message "User doesn't exist!" is shown. +#end Scenario: Login with user's wrong password fail message Given I am at the Login Page When I try to login with an existent user, though with wrong password Then I am redirected to the Login Page - And A login failure message is displayed +#if($Authentication Process) + And The login failure message "Invalid password!" is shown. +#end Scenario:New user register success message Given I am at the User Register Page When I register a user with success Then I am redirected to the Login Page - And A message indicating the user was successfully registered is displayed + And the message "User logged in successfully." is shown. Scenario: New user register with invalid email fail message Given I am at the Login Page When I try to create a "newuser" username with the "invalid email abcde" email - Then A message indicating the email is invalid is displayed + Then the message "Invalid e-mail!" is shown. Scenario: Try to access Member List Page without being logged in Given I am not logged When I directly access the Member List Page Then I am redirected to the Login Page + And the message "Only logged users can access this page." is shown. Scenario: Try to access root page without being logged in Given I am not logged When I access the Root Page Then I am redirected to the Login Page + And the message "Only logged users can access this page." is shown. #if ($contextualInformation) Scenario: Field University filled with "Federal University of Pernambuco" diff --git a/test/cucumber/BibtexGenerateFile.feature b/test/cucumber/BibtexGenerateFile.feature index 566bfa51..ac5fd0d9 100644 --- a/test/cucumber/BibtexGenerateFile.feature +++ b/test/cucumber/BibtexGenerateFile.feature @@ -8,3 +8,12 @@ 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($all bibtex) + Scenario: search all publications of a specific topic + Given I am at the publications + When I select the export bibtex file option at the publications menu + And I type "Topic" at the search toolbar in export bibtex page + And I select Generate BibTex option at the export bibtex page + Then I can see all the publications related with "Topic" + #end diff --git a/test/cucumber/BibtexImport.feature b/test/cucumber/BibtexImport.feature index ec0b91ab..a0e008a7 100644 --- a/test/cucumber/BibtexImport.feature +++ b/test/cucumber/BibtexImport.feature @@ -7,9 +7,19 @@ Feature: BibtexImport Scenario: simple import bibtex Given I am on Import Bibtex File Menu When I click "Choose file" - And selected a bibtex file and I click "Import" + #if($BibtexImport) + And selected a bibtex file and I click "Import All" + #end Then is created all corresponding publications And all of then are stored + + #if($BibtexImport) + Scenario: list extracted publications from a bibtex file + Given I am on Import Bibtex File Menu + When I click "Choose file" + And I select a bibtex file + Then a list of publications extracted from the bibtex file is shown on the same screen + #end Scenario: bibtex file unformatted Given I am on Import Bibtex File Menu @@ -24,4 +34,5 @@ Feature: BibtexImport And selected a bibtex file with one Dissertation and two Thesis and I click "Import" Then is created one Dissertation publication And is created two Thesis publications - And one Dissertation is stored and two Thesis is stored \ No newline at end of file + And one Dissertation is stored and two Thesis is stored + diff --git a/test/cucumber/Book.feature b/test/cucumber/Book.feature index 3624ed38..c334a199 100644 --- a/test/cucumber/Book.feature +++ b/test/cucumber/Book.feature @@ -6,32 +6,81 @@ Feature: Book Scenario: new book Given the system has no book entitled "SPL Development" - When I create the book "SPL Development" with file name "HSPLE.pdf" + When I create the book "SPL Development" with file name "HSPLE.pdf" and author name "James" Then the book "SPL Development" is properly stored by the system Scenario: remove book Given the book "SPL Development" is stored in the system with file name "NGSPL-2.pdf" When I remove the book "SPL Development" Then the book "SPL Development" is properly removed by the system + +#if($book) + Scenario: list book + Given the book "SPL Development" is stored in the system with file name "NGSPL-2.pdf" + When I create the book "Next Generation Software Product Line Engineering" with file name "NGSPLE.pdf" + Then The system list "SPL Development" and "Next Generation Software Product Line Engineering" +#end Scenario: duplicate book Given the book "SPL Development" is stored in the system with file name "NGSPL-0.pdf" When I create the book "SPL Development" with file name "NGSPL-0.pdf" Then the book "SPL Development" is not stored twice + And an error message is displayed Scenario: edit existing book Given the book "SPL Development" is stored in the system with file name "HSPLE.pdf" When I edit the book title from "SPL Development" to "New Title" Then the book "New Title" is properly updated by the system + #if($book) + And the message "The edition has been successful" is displayed + #end +#if($book) + Scenario: edit existing book with duplicate title + Given the book "Book 1" is stored in the system with file name "B1.pdf" + And the book "Book 2" is stored in the system with file name "B2.pdf" + When I edit the book title from "Book 1" to "Book 2" + Then the book "Book 2" is not updated by the system +#end + Scenario: upload book with a file Given the system has no books stored When I upload the books of "curriculo.xml" Then the system has all the books of the xml file + + #if ($book) + Scenario: upload book without a file + Given the system has no books stored + When I create a book "SPL Development" + And I upload no file + Then the system has no book called "SPL Development" + And an error message is displayed + #end + + #if ($book) + Scenario: search book by tags + Given the book "Redes Neurais" is stored in the system with tag "Inteligencia Artificial" + And I am in the books menu + When I click search button + And I write "Inteligencia Artificial" in the bar + Then a list containing "Redes Neurais" is displayed + #end + + #if ($book) + Scenario: mouse over information + Given I am on the books menu + When I put the mouse over a book + And I wait 1 second + Then a window with information about the book is displayed until I remove the mouse from over the book + #end + + #if($book) Scenario: new book web Given I am at the book page And the system has no book entitled "Next Generation Software Product Line Engineering" When I go to new book page - And I use the webpage to create the book "Next Generation Software Product Line Engineering" with file name "Ngs.pdf" - Then the book "Next Generation Software Product Line Engineering" was stored by the system \ No newline at end of file + And I use the webpage to create the book "Next Generation Software Product Line Engineering" with file name "Ngs.pdf" and author name "James" + Then the book "Next Generation Software Product Line Engineering" was stored by the system + And the message "the book was sucessful stored" is displayed +#end diff --git a/test/cucumber/BookChapter.feature b/test/cucumber/BookChapter.feature index 9f21361b..812f143a 100644 --- a/test/cucumber/BookChapter.feature +++ b/test/cucumber/BookChapter.feature @@ -18,6 +18,19 @@ Feature: BookChapter Given the book chapter "Next Generation Software Product Line Engineering" is stored in the system with file name "NGSPL-2.pdf" When I remove the book chapter "Next Generation Software Product Line Engineering" * the book chapter "Next Generation Software Product Line Engineering" is properly removed by the system + + #if($BookChapter) + Scenario: edit book chapter's title + Given the book chapter entitled "SPL Development" is stored in the system with file name "NGSPL-0.pdf" + When I change the book chapter's title from "SPL Development" to "New Title" + Then the book chapter's name is properly updated to "New Title" by the system + + Scenario: edit inexistent book chapter's title + Given no book chapter entitled "SPL Development" is stored in the system + When I change the book chapter's title from "SPL Development" to "New Title" + Then an error message is shown + And no changes are made by the system + #end Scenario: register book chapter with invalid data Given I am at the book chapter page diff --git a/test/cucumber/Conferencia.feature b/test/cucumber/Conferencia.feature index 8553a4a3..44fc92f7 100644 --- a/test/cucumber/Conferencia.feature +++ b/test/cucumber/Conferencia.feature @@ -74,8 +74,15 @@ Feature: conferencia Given I am at the publications menu When I select the "Conferencia" option at the program menu And I select the upload button at the conferencia page - Then I'm still on conferencia page + Then I'm still at the publications menu + And "Conferencia" is selected And the conferencias are not stored by the system + + Scenario: upload conferencias without a file + Given I am at the publications menu + When I select the "Conferencia" option at the program menu + And I select the upload button at the conferencia page + Then a window opens with "You must select a file" appears @ignore Scenario: edit existing conference @@ -143,5 +150,26 @@ Feature: conferencia When I write "2007" at the date field 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 + + #if($conferencia) + Scenario: Search for conference by research line + Given I am at the Seach Conference page + And The system has some conferences of "Data Security" research line + When I write "Data Security" at the research line field + And I select the option Search for Conference at the conference page + Then a list of all conferencer containg that research line will be presented in the conference screen + #end + + #if($conferencia) + Scenario: Search for conference by Researcher + Given I am at the Seach Conference page + And The system has a conference with "Paulo Borba" as one of its researchers + When I write "Paulo Borba" at the researcher + And I select the option Search for Conference at the conference page + Then a list of all conferencer containg that researcher will be presented in the conference screen + #end + + + # voces podem criar cenĂ¡rios para ordenar a lista de conferencia, filtrar a lista, verificar se alguns campos podem ser opcionais, etc. diff --git a/test/cucumber/Dissertacao.feature b/test/cucumber/Dissertacao.feature index 98a20dd2..c65f251a 100644 --- a/test/cucumber/Dissertacao.feature +++ b/test/cucumber/Dissertacao.feature @@ -16,12 +16,17 @@ Feature: Dissertation Tests Given the system has no dissertation entitled "Dissertation without school" When I create the dissertation "Dissertation without school" with file name "Dissertationwithoutschool.txt" without school Then the system has no dissertation entitled "Dissertation without school" + #if($Dissertation) + And a failure message is shown + #end Scenario: new dissertation without address Given the system has no dissertation entitled "Dissertation without address" When I create the dissertation "Dissertation without address" with file name "Dissertationwithoutaddress.txt" without address Then the system has no dissertation entitled "Dissertation without address" - + #if($Dissertation) + And a failure message is shown + #end Scenario: new dissertation Given the system has no dissertation entitled "New dissertation" When I create the dissertation "New dissertation" with file name "Newdissertation.txt" and school "UFPE" @@ -82,6 +87,21 @@ Feature: Dissertation Tests When I upload a new dissertation "curriculo2.xml" with title "New dissertation" Then the system has more dissertations now + Scenario: seek a dissertation through keywords + Given there is a dissertation called "curriculo2" with the word "redes neurais" in it is stored. + When I select the option "search with keywords" + And I write "redes neurais" in it + Then a list with "curriculo2" is displayed + + Scenario: upload a dissertation with a incorrect file type + Given I am at the publications menu + When I select the "Dissertacao" option at the program menu + And I select the new dissertation option at the dissertation page + And I add the dissertation with "curriculo4.png" + Then the system has no new dissertation + And I am back at the publications menu + + #if ($contextualInformation) Scenario: create a new dissertation with user data already filled by default @@ -90,4 +110,4 @@ Feature: Dissertation Tests And I select the new dissertation option at the dissertation page Then I see my user listed as an author member of dissertation by default And I see my school name as school of dissertation by default -#end \ No newline at end of file +#end diff --git a/test/cucumber/Member.feature b/test/cucumber/Member.feature index 239da9ff..91a73adf 100644 --- a/test/cucumber/Member.feature +++ b/test/cucumber/Member.feature @@ -38,6 +38,13 @@ Feature: member When I fill the user details with a name, username, passoword1, password2, email, university, status "jose" "josesilva" "123456" "123456" "jose@ufpe.br" "UFPE" "Graduate Student" Then I am redirected to the Login Page And A message indicating the user was successfully registered is displayed + + Scenario: change password + Given the system has member with username "usernametest" + And the member has the password "12345" + When I change password of "usernametest" to "5555" + And I confirm the decision + Then the member named "usernametest" will have password "5555" # Scenario: create member web @@ -75,4 +82,4 @@ Feature: member Scenario: user registration with default data Given I am at the register page Then I see default data filled on register form -#end \ No newline at end of file +#end diff --git a/test/cucumber/News.feature b/test/cucumber/News.feature index ff54e938..7ff5bc8f 100644 --- a/test/cucumber/News.feature +++ b/test/cucumber/News.feature @@ -66,8 +66,20 @@ Feature: news And the news "Noticia1" is stored in the system And I select the option to remove in news show page Then the news "Noticia1" is properly removed by the system - + + Scenario: new invalid news (invalid date) Given the system has no news with description "teste" and date "31-02-2013" for "SPG" research group When I try to create a news with description "teste" and date "31-02-2013" for "SPG" research group Then the news with description "teste", date "31-02-2013" and "SPG" research group is not stored by the system because it is invalid + #if($news) + And the error message "Cannot create news: invalid date." is displayed + #end + + #if($news) + Scenario: export news to pdf + Given the system has a news with description "noticia para teste" + When I request this news "noticia para teste" download + Then the system creates a pdf file containing the description, date and research group of this news + And the system send this file for the client + #end diff --git a/test/cucumber/Record.feature b/test/cucumber/Record.feature index 848071c0..6ded6085 100644 --- a/test/cucumber/Record.feature +++ b/test/cucumber/Record.feature @@ -10,11 +10,15 @@ Feature: record When I remove the record with status "Graduate Student" Then the record with status "Graduate Student" is properly removed by the system + Scenario: Delete record with dependency Given the system has only one record with status "MSc Student" And the record with status "MSc Student" is associated to a member When I remove the record with status "MSc Student" Then the record with status "MSc Student" is not removed by the system + #if($Record) + And the system output the message error "Cannot remove an associated member!" + #end Scenario: Update record Given the system has only one record with status "MSc Student" and this record has a null end date @@ -54,4 +58,4 @@ Feature: record And the system has only one record with status "MSc Student" And the record with status "MSc Student" is associated to a member When I click to remove the record - Then I am still at the visualize page of the record with status "MSc Student" \ No newline at end of file + Then I am still at the visualize page of the record with status "MSc Student" diff --git a/test/cucumber/Thesis.feature b/test/cucumber/Thesis.feature index e664276f..44b4f78c 100644 --- a/test/cucumber/Thesis.feature +++ b/test/cucumber/Thesis.feature @@ -11,8 +11,16 @@ Feature: Thesis Tests Scenario: new thesis Given The system has no thesis entitled "New thesis" When I create the thesis "New thesis" with file name "Newthesis.txt" and school "UFPE" + And With publication date "10", "08", Publication year "1998" and author name "Pressman" Then The thesis "New thesis" is properly stored by the system - + +#if($thesis) + Scenario: list thesis + Given the thesis "New thesis" is stored in the system with file name "Newthesis.txt" and all of the details + When I create the thesis "New thesis2" with file name "Newthesis2.txt" and all of the details + Then The system list "New thesis" and "New thesis 2" +#end + Scenario: remove existing thesis Given the system has thesis entitled "New thesis2" When I delete the thesis "New thesis2" @@ -20,7 +28,7 @@ Feature: Thesis Tests Scenario: create thesis web Given I am at the create thesis page - When I fill the thesis details with "Software Engineering", "10", "8", "1998", "UFPE" and "Recife" + When I fill the thesis details with "Software Engineering", "10", "8", "1998", "Pressman", "UFPE" and "Recife" Then I am on the thesis show page And The thesis "Software Engineering" is properly stored by the system @@ -35,6 +43,22 @@ Feature: Thesis Tests And I select the remover option at the thesis show page Then the thesis "Software Enginnering2" is removed from the system +#if($publicationYear) + Scenario: filter thesis list by publication year web + Given At least on thesis is stored in the system + And I am at the thesis list page + When I select to filter by the publication year "1998" + Then The returned thesis list shows only the thesis with publication year "1998" +#end + +#if($authorName) + Scenario: filter thesis list by author name web + Given At least on thesis is stored in the system + And I am at the thesis list page + When I select to filter by the author name "Pressman" + Then The returned thesis list shows only the thesis with author name "Pressman" +#end + #if ($contextualInformation) Scenario: Add a new thesis with user data already filled by default Given I am at the publications menu