From 589fec29cf6423db0095afbceacafe54e848883d Mon Sep 17 00:00:00 2001 From: diogovss Date: Tue, 9 Apr 2013 11:42:24 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20da=20feature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/BibtexImport.feature | 21 ++++++++------- test/cucumber/steps/BibtexImportSteps.groovy | 27 +++++++++++++------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/test/cucumber/BibtexImport.feature b/test/cucumber/BibtexImport.feature index d6cb0fdd..d9cfe7e1 100644 --- a/test/cucumber/BibtexImport.feature +++ b/test/cucumber/BibtexImport.feature @@ -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* \ No newline at end of file + And one Book Chapter is stored and two Technical Report is stored \ No newline at end of file diff --git a/test/cucumber/steps/BibtexImportSteps.groovy b/test/cucumber/steps/BibtexImportSteps.groovy index af0c6e74..68155516 100644 --- a/test/cucumber/steps/BibtexImportSteps.groovy +++ b/test/cucumber/steps/BibtexImportSteps.groovy @@ -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() } @@ -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() } @@ -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() } \ No newline at end of file