Skip to content

Commit

Permalink
Correção da feature
Browse files Browse the repository at this point in the history
  • Loading branch information
diogovss authored and rafaelbrandao committed Apr 25, 2013
1 parent 744e823 commit 589fec2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
21 changes: 12 additions & 9 deletions test/cucumber/BibtexImport.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ Feature: BibtexImport
I want to import a bibtex file
So that the system register yours corresponding publications

Scenario: import bibtex
Given the bibtex file
When I try to upload the bibtex file
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"
Then is created all corresponding publications
And all of then are stored

Scenario: bibtex file unformatted
Given the file bibtex unformatted
When I try to upload the bibtex file unformatted
Given I am on Import Bibtex File Menu
When I click "Choose file"
And selected a bibtex file unformatted and I click "Import"
Then the system output the message error "bibtex file unformatted"
And the file is not accepted*
And none publication is stored

Scenario: bibtex file with several publication types
Given the bibtex file with one Book Chapter and two Technical Report
When I try to upload the bibtex file
Given I am on Import Bibtex File Menu
When I click "Choose file"
And selected a bibtex file with one Book Chapter and two Technical Report and I click "Import"
Then is created one Book Chapter publication
And is created two Technical Report publications
And all of then are stored*
And one Book Chapter is stored and two Technical Report is stored
27 changes: 18 additions & 9 deletions test/cucumber/steps/BibtexImportSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,32 @@ import cucumber.runtime.PendingException;
import static cucumber.api.groovy.EN.*

//You can implement missing steps with the snippets below:

Given(~'^the bibtex file$') { ->
Given(~'^I am on Import Bibtex File Menu$') { ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}

When(~'^I try to upload the bibtex file$') { ->
When(~'^I click "([^"]*)"$') { String arg1 ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}

Then(~'^is created all corresponding publications$') { ->
When(~'^selected a bibtex file and I click "([^"]*)"$') { String arg1 ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}

Then(~'^all of then are stored$') { ->
Then(~'^is created all corresponding publications$') { ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}

Given(~'^the file bibtex unformatted$') { ->
Then(~'^all of then are stored$') { ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}

When(~'^I try to upload the bibtex file unformatted$') { ->
When(~'^selected a bibtex file unformatted and I click "([^"]*)"$') { String arg1 ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}
Expand All @@ -38,12 +37,12 @@ Then(~'^the system output the message error "([^"]*)"$') { String arg1 ->
throw new PendingException()
}

Then(~'^the file is not accepted$') { ->
Then(~'^none publication is stored$') { ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}

Given(~'^the bibtex file with one Book Chapter and two Technical Report$') { ->
When(~'^selected a bibtex file with one Book Chapter and two Technical Report and I click "([^"]*)"$') { String arg1 ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}
Expand All @@ -56,4 +55,14 @@ Then(~'^is created one Book Chapter publication$') { ->
Then(~'^is created two Technical Report publications$') { ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}

Then(~'^one Book Chapter is stored and two Technical Report is stored$') { ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}

When(~'^I click on "([^"]*)" option at Technical Report list$') { String arg1 ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}

0 comments on commit 589fec2

Please sign in to comment.