Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/joaovlm/rgms
Browse files Browse the repository at this point in the history
Conflicts:
	COMANDO GEBS
	test/cucumber/Dissertacao.feature
	test/cucumber/steps/DissertacaoSteps.groovy
	test/functional/steps/TestDataAndOperations.groovy
  • Loading branch information
raonybenjamim committed Aug 4, 2013
2 parents 9a2dc4b + 993228b commit b5f1ec1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
2 changes: 1 addition & 1 deletion COMANDO GEBS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Dgeb.env=chrome -Dwebdriver.chrome.driver=/Users/Rodrigo/Documents/workspaces/TAES/gitsource/rgms/chromedrivers/chromedrivermac test-app functional:cucumber
-Dgeb.env=chrome -Dwebdriver.chrome.driver=/Users/Rodrigo/Documents/workspaces/TAES/gitsource/rgms/chromedrivers/chromedrivermac test-app functional:cucumber
15 changes: 12 additions & 3 deletions test/cucumber/Dissertacao.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ Feature: Dissertation Tests
When I create the dissertation "Dissertation duplicated" with file name "Dissertationduplicated2.txt" and school "UFPE"
Then the dissertation "Dissertation duplicated" is not stored twice

Scenario: first dissertation and delete
Given the system has no dissertation stored
When I create the dissertation "New dissertation" with file name "dissertation.txt" and school "federal"
And I am at the publications menu
And I select the "Dissertacao" option at the program menu
And I select "Delete dissertation" at the dissertation page
And I delete "New dissertation"
Then the system has no dissertation stored

Scenario: new dissertation without file
Given I am at the publications menu
When I select the "Dissertacao" option at the program menu
Expand All @@ -52,7 +61,7 @@ Feature: Dissertation Tests
Then the system has a dissertation entitled "Dissertacao Teste 1"

Scenario: edit dissertation
Given the dissertation "Edit dissertation" is stored in the system with file name "Editdissertation.txt"
Given the dissertation "Edit dissertation" is stored in the system with file name "Editdissertation.txt", has no dissertation entitled "Edit dissertation reviewed"
Given the system has no dissertation entitled "Edit dissertation reviewed"
When I edit the dissertation title from "Edit dissertation" to "Edit dissertation reviewed"
Then the dissertation "Edit dissertation" is properly updated by the system
Expand All @@ -72,7 +81,7 @@ Feature: Dissertation Tests
Then I'm still on dissertation page

Scenario: upload dissertation with a file
Given the system has some dissertation stored
Given the system has some dissertation stored, has no dissertation entitled "New dissertation"
Given the system has no dissertation entitled "New dissertation"
When I upload a new dissertation "curriculo.xml" with title "New dissertation"
Then the system has more dissertations now
Expand All @@ -81,7 +90,7 @@ Feature: Dissertation Tests
Given the system has no dissertation entitled "New dissertation"
When I upload a new dissertation "curriculo.xml" with title "New dissertation"
Then the system has more dissertations now

Scenario: first dissertation and delete
Given the system has no dissertation stored
When I create the dissertation "New dissertation" with file name "dissertation.txt" and school "federal"
Expand Down
30 changes: 30 additions & 0 deletions test/cucumber/steps/DissertacaoSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@ When(~'^I upload a new dissertation "([^"]*)" with title "([^"]*)"$') { filenam
// não consegui fazer de uma maneira que todos os passos sejam independentes
}

assert inicialSize<finalSize
//para funcionar é necessario que tenha um FilePath válido
// não consegui fazer de uma maneira que todos os passos sejam independentes
}

Given(~'^the dissertation "([^"]*)" is stored in the system with file name "([^"]*)", has no dissertation entitled "([^"]*)"$') { String title, filename, String newtitle ->
article = Dissertacao.findByTitle(title)
assert article == null

TestDataAndOperations.createDissertacao(title, filename, "UFPE")
article = Dissertacao.findByTitle(title)
assert article != null
}

Then(~'^I see my user listed as an author member of dissertation by default$') {->
at DissertationCreate
userData = Member.findByUsername('admin').id.toString()
Expand All @@ -161,6 +175,22 @@ Given(~'^the system has no dissertation stored$') {->
}


Given(~'^the dissertation "([^"]*)" is stored in the system with file name "([^"]*)", has no dissertation entitled "([^"]*)"$') { String title, filename, String newtitle ->
article = Dissertacao.findByTitle(title)
assert article == null

TestDataAndOperations.createDissertacao(title, filename, "UFPE")
article = Dissertacao.findByTitle(title)
assert article != null
}
inicialSize = Dissertacao.findAll().size()
TestDataAndOperations.uploadDissertacao(path)
finalSize = Dissertacao.findAll().size()
assert inicialSize<finalSize
//para funcionar é necessario que tenha um FilePath válido
// não consegui fazer de uma maneira que todos os passos sejam independentes
}

Given(~'^the dissertation "([^"]*)" is stored in the system with file name "([^"]*)", has no dissertation entitled "([^"]*)"$') { String title, filename, String newtitle ->
article = Dissertacao.findByTitle(title)
assert article == null
Expand Down

0 comments on commit b5f1ec1

Please sign in to comment.