-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BSS3 RLFS - Atividade 5 #254
Changes from all commits
89bbac3
0f3545a
7991e02
3e0c325
cf45268
4df5099
40cfe23
d17c0fb
731fb61
293b085
be78653
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,37 +5,78 @@ Feature: orientations | |
so that I can generate web pages and reports containing these orientations | ||
|
||
Scenario: new orientation | ||
Given the system has no orientations entitled "The Book is on the table 2" | ||
When I create a orientation for the thesis "The Book is on the table 2" | ||
Then the orientation "The Book is on the table 2" is properly stored by the system | ||
Given the system has no orientations entitled "The Book is on the table" | ||
When I create a new orientation entitled "The Book is on the table" | ||
Then the orientation "The Book is on the table" is properly stored by the system | ||
|
||
Scenario: remove existing orientation | ||
Given the system has thesis entitled "The Book is on the table" supervised for someone | ||
Given the system has an orientation entitled "The Book is on the table" supervised by someone | ||
When I delete the orientation for "The Book is on the table" | ||
Then the orientation for "The Book is on the table" is properly removed by the system | ||
|
||
Scenario: create orientation web | ||
Given I am at the create orientation page | ||
When I fill the orientation title with "The Book is on the table" | ||
Then I am on the orientation show page | ||
When I fill the orientation title with "The Book of Web Software" | ||
And I select the list orientation option | ||
Then the orientation "The Book of Web Software" is properly stored by the system | ||
|
||
Scenario: edit existing orientation web | ||
Given I am at the orientation page and the orientation "The Book is on the table" is stored in the system | ||
Given I am at the orientation page | ||
And the orientation "The Book of Software Engineering" is stored in the system | ||
When I select to view orientation "The Book of Software Engineering" in resulting list | ||
And I change the orientation title to "Hexa" | ||
And I select the change option at the orientation edit page | ||
Then the edited orientation "Hexa" is properly stored by the system | ||
|
||
#1 This scenario test are not working well, please check they implementation before undo the comment | ||
|
||
#Scenario: new orientation with registered member orientated | ||
# Given the system has no orientations entitled "The Book is on the table 2" | ||
# And Exists a member "Rubens Lopes" with username "rlfs" that has been an registered member | ||
#When I create a orientation for the thesis "The Book is on the table 2" with registered member "rlfs" | ||
#Then the orientation "The Book is on the table 2" is properly stored by the system | ||
|
||
|
||
#2 | ||
Scenario: duplicate orientation | ||
Given the system has an orientation entitled "The Book is on the table" supervised by someone | ||
When I create a new orientation entitled "The Book is on the table" | ||
Then the orientation for the thesis "The Book is on the table" is not stored twice | ||
|
||
#3 | ||
Scenario: create orientation web with invalid year | ||
Given I am at the create orientation page | ||
When I fill the orientation title with "The Book is on the table" and the year with -1 | ||
Then I am still on the create orientation page with an error message | ||
|
||
#5 | ||
Scenario: edit existing orientation web with invalid year | ||
Given I am at the orientation page | ||
And the orientation "The Book is on the table" is stored in the system | ||
When I select to view orientation "The Book is on the table" in resulting list | ||
And I change the orientation tituloTese to "Hexa" | ||
And I select the "Alterar" option | ||
Then I am on the orientation show page | ||
|
||
#if ($XMLUpload) | ||
Scenario: upload orientation with a file | ||
Given the system has some orientations stored | ||
When I upload a new orientation "testelattes.xml" | ||
Then the system has more orientations now | ||
|
||
Scenario: upload orientations with a file | ||
Given I am at the publications menu | ||
When I select the "Orientation" option at the program menu | ||
And I select the upload button at the orientations page | ||
Then I'm still on orientations page | ||
And the orientations are not stored by the system | ||
#end | ||
And I change the orientation title to "Hexa" | ||
And I fill the orientation publication year with -1 | ||
And I select the change option at the orientation edit page | ||
Then I am still on the change orientation page with an error message | ||
|
||
#9 extra | ||
Scenario: remove orientation web | ||
Given I am at the orientation page | ||
And the orientation "Hexa2" is stored in the system | ||
When I select to view "Hexa2" in the list of orientations | ||
And I select the option remove at the orientation show page | ||
Then The orientation "Hexa2" is properly removed by the system | ||
|
||
#if ($XMLUpload) | ||
Scenario: upload orientation with a file | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. por isso que é ruim mudar o texto de lugar no arquivo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Corrigido! |
||
Given the system has some orientations stored | ||
When I upload a new orientation "testelattes.xml" | ||
Then the system has more orientations now | ||
|
||
Scenario: upload orientations with a file | ||
Given I am at the publications menu | ||
When I select the "Orientation" option at the program menu | ||
And I select the upload button at the orientations page | ||
Then I'm still on orientations page | ||
And the orientations are not stored by the system | ||
#end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,12 +41,12 @@ Then(~'^the book chapter "([^"]*)" is properly removed by the system$') { String | |
checkIfExists(title) | ||
} | ||
|
||
When(~'^I select the Novo BookChapter option at the book chapter page$') {-> | ||
When(~'^I select the new book chapter option at the book chapter page$') { -> | ||
at BookChapterPage | ||
page.selectNewBookChapter() | ||
} | ||
|
||
Given(~'^I am at the book chapter page$') {-> | ||
Given(~'^I am at the book chapter page$') { -> | ||
to LoginPage | ||
at LoginPage | ||
page.fillLoginData("admin", "adminadmin") | ||
|
@@ -60,20 +60,20 @@ And(~'^I fill only the title field with the value "([^"]*)"$') { String title -> | |
page.fillTitle(title) | ||
} | ||
|
||
Then(~'^A failure message is displayed$') {-> | ||
assert ( page.readFlashMessage() != null ) | ||
Then(~'^A failure message is displayed$') { -> | ||
assert (page.readFlashMessage() != null) | ||
|
||
} | ||
And(~'^I still on the book chapter create page$'){-> | ||
And(~'^I still on the book chapter create page$') { -> | ||
at BookChapterCreatePage | ||
} | ||
|
||
Then(~'^I see my user listed as a member of book chapter by default$') {-> | ||
Then(~'^I see my user listed as a member of book chapter by default$') { -> | ||
at BookChapterCreatePage | ||
assert TestDataAndOperationsPublication.containsUser(page.selectedMembers()) | ||
} | ||
|
||
When(~'^I view the book chapter list$') {-> | ||
When(~'^I view the book chapter list$') { -> | ||
to BookChapterPage | ||
} | ||
|
||
|
@@ -82,7 +82,7 @@ Then(~'my book chapter list contains "([^"]*)"$') { String title -> | |
bookChapterList = BookChapter.findAll() | ||
assert BookChapterTestDataAndOperations.containsBookChapter(title, bookChapterList) | ||
} | ||
And(~'^the book chapter "([^"]*)" with file name "([^"]*)" was created before$'){ String title, filename -> | ||
And(~'^the book chapter "([^"]*)" with file name "([^"]*)" was created before$') { String title, filename -> | ||
page.selectNewBookChapter() | ||
to BookChapterCreatePage | ||
at BookChapterCreatePage | ||
|
@@ -95,30 +95,30 @@ Then(~'My resulting book chapter list contains "([^"]*)"$') { String title -> | |
at BookChapterPage | ||
page.checkBookChapterAtList(title, 0) | ||
} | ||
When(~'^I go to NewBookChapter page$'){-> | ||
to BookChapterPage | ||
When(~'^I go to new book chapter page$') { -> | ||
// to BookChapterPage | ||
at BookChapterPage | ||
page.selectNewBookChapter() | ||
at BookChapterCreatePage | ||
} | ||
And(~'^I use the webpage to create the book chapter "([^"]*)" with file name "([^"]*)"$'){ String title, filename -> | ||
And(~'^I use the webpage to create the book chapter "([^"]*)" with file name "([^"]*)"$') { String title, filename -> | ||
at BookChapterCreatePage | ||
createAndCheckBookOnBrowser(title, filename) | ||
to BookChapterPage | ||
at BookChapterPage | ||
} | ||
Then(~'^the book chapter "([^"]*)" was stored by the system$'){String title -> | ||
Then(~'^the book chapter "([^"]*)" was stored by the system$') { String title -> | ||
book = BookChapter.findByTitle(title) | ||
assert book != null | ||
to BookChapterPage | ||
at BookChapterPage | ||
} | ||
And(~'^it is shown in the book chapter list with title "([^"]*)"$'){ String title -> | ||
And(~'^it is shown in the book chapter list with title "([^"]*)"$') { String title -> | ||
to BookChapterPage | ||
at BookChapterPage | ||
page.checkBookChapterAtList(title, 0) | ||
} | ||
Given(~'^the system has some book chapters stored$') {-> | ||
Given(~'^the system has some book chapters stored$') { -> | ||
initialSize = BookChapter.findAll().size() | ||
} | ||
When(~'^I upload the book chapters of "([^"]*)"$') { filename -> | ||
|
@@ -128,7 +128,7 @@ When(~'^I upload the book chapters of "([^"]*)"$') { filename -> | |
finalSize = BookChapter.findAll().size() | ||
assert initialSize < finalSize | ||
} | ||
Then(~'^the system has all the book chapters of the xml file$') {-> | ||
Then(~'^the system has all the book chapters of the xml file$') { -> | ||
assert BookChapter.findByTitle("Refinement of Concurrent Object Oriented Programs") != null | ||
assert BookChapter.findByTitle("A RUP-Based Software Process Supporting Progressive Implementation") != null | ||
assert BookChapter.findByTitle("Transformation Laws for Sequential Object-Oriented Programming") != null | ||
|
@@ -137,26 +137,47 @@ Then(~'^the system has all the book chapters of the xml file$') {-> | |
assert BookChapter.findByTitle("An Introduction to Software Product Line Refactoring") != null | ||
} | ||
|
||
And(~'^I select the upload button at the book chapter page$') {-> | ||
|
||
And(~'^I select the upload button at the book chapter page$') { -> | ||
at BookChapterPage | ||
page.uploadWithoutFile() | ||
} | ||
Then(~'^I\'m still on book chapter page$') {-> | ||
Then(~'^I\'m still on book chapter page$') { -> | ||
at BookChapterPage | ||
} | ||
And(~'^the book chapters are not stored by the system$') {-> | ||
And(~'^the book chapters are not stored by the system$') { -> | ||
at BookChapterPage | ||
page.checkIfBookChapterListIsEmpty() | ||
} | ||
|
||
def createAndCheckBookOnBrowser(String title, String filename){ | ||
And(~'^the system has a book chapter entitled "([^"]*)" with file name "([^"]*)"$') { String title, String filename -> | ||
book = BookChapter.findByTitle(title) | ||
if (book == null) { | ||
BookChapterTestDataAndOperations.createBookChapter(title, filename) | ||
} | ||
} | ||
|
||
Then(~'^the book chapter "([^"]*)" was not stored twice$') { String entitled -> | ||
bookChapter = BookChapter.findAllByPublisher(entitled) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. é ByPublisher mesmo? não faz muito sentido. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Corrigido! |
||
assert bookChapter.size() < 2 | ||
} | ||
|
||
And(~'^the system shows an error message$') { -> | ||
at BookChapterPage | ||
//assert page.readFlashMessage() | ||
//Thread.sleep(100000) | ||
assert page.hasErrorUploadFile() | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. poderia ser mais específico comparando o conteúdo da mensagem? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Corrigido! Agora identificando de acordo com o conteúdo da mensagem! |
||
|
||
|
||
def createAndCheckBookOnBrowser(String title, String filename) { | ||
page.fillBookChapterDetails(title, filename) | ||
page.clickSaveBookChapter() | ||
book = BookChapter.findByTitle(title) | ||
assert book != null | ||
} | ||
|
||
def checkIfExists(String title){ | ||
def checkIfExists(String title) { | ||
bookChapter = BookChapter.findByTitle(title) | ||
assert bookChapter == null | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicar porque o cenário foi comentado
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
este foi trocado pela correção na implementação do cenário de teste "new orientation", e como esta sendo problemática a sua implementação, foi comentada, deixando-se como sugestão para futuras implementações por outros alunos.