Skip to content

Commit

Permalink
Merge branch 'spm2'
Browse files Browse the repository at this point in the history
Conflicts:
	test/cucumber/Member.feature
	test/cucumber/steps/MemberSteps.groovy
  • Loading branch information
mucapaz committed Nov 22, 2014
2 parents 119024f + 93fa300 commit 203bb1e
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 3 deletions.
2 changes: 2 additions & 0 deletions test/cucumber/Book.feature
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ Scenario: new book web
And I select the new book option at the book page
Then I can fill the book details

# if(listExistingBooksOrderedByVolumeInAscendingOrder)
Scenario: list existing books ordered by volume in ascending order
Given I am at the books page
And the system has some books created
When I select to view the list of books
And I select to order the list of books by "volume"
Then my book list shows the books ordered by "volume"
#end
4 changes: 3 additions & 1 deletion test/cucumber/Funder.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ Feature: Funder
When I fill the funder code with "12345"
Then the funder with code "12345" is properly stored by the system

#if(filterExistingFundersByName)
Scenario: filter existing funders by name
Given I am at the funders page
And I create some funder named "Paulo"
When I select to view the list of funders
And I select to filter the list of funders by name "Paulo"
Then my article list shows only the funders named "Paulo"
Then my article list shows only the funders named "Paulo"
#end
6 changes: 5 additions & 1 deletion test/cucumber/Member.feature
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,18 @@ Feature: member
Given I am at the register page
Then I see default data filled on register form
#end

#if ($downloadMemberListFile)
Scenario: download member list file
Given I am the member list page and the system has members
When I select the member list download button
Then I can download the file named "ML-0.pdf" that contains the member list
<<<<<<< HEAD
Scenario: search for an existing member
Given the system has a member named "Rodolfo"
And I am at the member search page
When I search for "Rodolfo"
Then My member list contains the member named "Rodolfo"
=======
#end
>>>>>>> spm2
3 changes: 2 additions & 1 deletion test/cucumber/Thesis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ Feature: Thesis Tests
# o arquivo depois, address deveria ser opcional, deveria ter universidade e
# centro/departamento, deveria ter apenas um autor e a possibilidade de um
# orientador e co-orientador

#if(downloadThesisListFile)
Scenario: download thesis list file
Given I am the thesis list page and the system has thesis
When I select the thesis list download button
Then I can download the file named "TL-0.pdf" that contains the thesis list
#end
15 changes: 15 additions & 0 deletions test/cucumber/steps/BookSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,21 @@ Then(~'^the book "([^"]*)" was stored by the system$') { String title ->
at BookPage
}

When(~'^I select to view the list of books$') {->
at BooksPage
page.selectViewBookList()
}

And(~'^I select to order the list of books by "([^"]*)"$') {String sortType->
at BookPage
page.selectOrderBy(sortType)
}

Then(~'^my article list shows the articles ordered by "([^"]*)"$') { String sortType ->
at BookPage
page.checkOrderedBy(sortType);
}

def checkIfExists(String title) {
book = Book.findByTitle(title)
assert book == null
Expand Down
16 changes: 16 additions & 0 deletions test/cucumber/steps/FunderSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@ Then(~'^I fill the funder code with "([^"]*)"$'){ String code ->

}

Given(~'^I am at the create funder page$'){ ->
to LoginPage
at LoginPage
page.fillLoginData("admin", "adminadmin")
at PublicationsPage
to FunderPage
}

When(~'I select to view the list of funders with name "([^"]*)"$ '){String name ->
assert page.clickListOfFunder(name)
}

Then(~'My article list show only the funders named'){

}

private void checkIfFunderExists(String code){
funder = Funder.findByCode(code)
assert funder != null
Expand Down
20 changes: 20 additions & 0 deletions test/cucumber/steps/MemberSteps.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pages.LoginPage
import pages.RegisterPage
import pages.member.MemberCreatePage
import pages.member.MemberPage
import pages.member.MemberViewPage
import rgms.authentication.User
import rgms.member.Member
Expand Down Expand Up @@ -193,6 +194,7 @@ When(~'^I try to create the member "([^"]*)" with email "([^"]*)"$') { String na
//assert member.name == name
}

<<<<<<< HEAD
Given(~'^The system has a member named "([^"]*)"$') { String name ->
user = User.findByName(name);
member = user?.author
Expand All @@ -212,4 +214,22 @@ When(~'^I search for "([^"]*)"$') { String name ->
Then(~'My member list contains the member named "([^"]*)"$') { String name ->
at MemberSearchPage
assert page.resultsListContains(username)
=======
Given(~'^I am at the members page$') { ->
to LoginPage
at LoginPage
page.fillLoginData("admin", "adminadmin")
at PublicationsPage
to MemberPage
}

+When(~'^I select the download button$') { ->
at MemberPage
page.selectDownloadFunder()
}

Then(~'^I can download the file named "([^"]*)"$') { String name->
at MemberPage
assert page.clickDownloadLink(name)
>>>>>>> spm2
}
17 changes: 17 additions & 0 deletions test/cucumber/steps/ThesisSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,23 @@ And(~'^the system stores properly the thesis entitled "([^"]*)"$') { title ->

}

Given(~'^I am at the thesis page$') { ->
to LoginPage
at LoginPage
page.fillLoginData("admin", "adminadmin")
at PublicationsPage
to ThesisPage
}

+When(~'^I select the download button$') { ->
at ThesisPage
page.selectDownloadThesis()
}

Then(~'^I can download the file named "([^"]*)"$') { String name->
at ThesisPage
assert page.clickDownloadLink(name)
}
//FUNÇÔES AUXILIARES
def thesisDoNotExists(title) {
tese = Tese.findByTitle(title)
Expand Down

0 comments on commit 203bb1e

Please sign in to comment.