Skip to content
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

Teste #327

Open
wants to merge 98 commits into
base: master
Choose a base branch
from
Open

Teste #327

Changes from 1 commit
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
6b8099d
Teste
LucasdeSouzaAlbuquerque Oct 22, 2014
5f89faa
Revert "Teste"
LucasdeSouzaAlbuquerque Oct 22, 2014
7f6ae20
Teste
LucasdeSouzaAlbuquerque Oct 22, 2014
74ace12
Revert "Teste"
LucasdeSouzaAlbuquerque Oct 22, 2014
ecc251a
Teste
LucasdeSouzaAlbuquerque Oct 22, 2014
ab840cd
Revert "Teste"
LucasdeSouzaAlbuquerque Oct 22, 2014
4888c94
new ferramenta with website
LucasdeSouzaAlbuquerque Oct 29, 2014
da0b476
new member without valid mail server
LucasdeSouzaAlbuquerque Oct 29, 2014
945168f
new member with valid mail server
LucasdeSouzaAlbuquerque Oct 29, 2014
3d3fdf8
login with correct password
LucasdeSouzaAlbuquerque Oct 29, 2014
d746968
valid user registration
LucasdeSouzaAlbuquerque Oct 29, 2014
69a396e
create ferramente without any information
LucasdeSouzaAlbuquerque Oct 29, 2014
9b29757
Revert "create ferramente without any information"
LucasdeSouzaAlbuquerque Oct 29, 2014
3068c67
create ferramenta without any information
LucasdeSouzaAlbuquerque Oct 29, 2014
e64c1f5
new invalid news (Invalid research group)
LucasdeSouzaAlbuquerque Oct 29, 2014
1bd0fea
duplicate orientation
LucasdeSouzaAlbuquerque Oct 29, 2014
440b50e
new dissertation without school
LucasdeSouzaAlbuquerque Oct 29, 2014
f5574ec
minor changes
LucasdeSouzaAlbuquerque Oct 29, 2014
bdd6c4b
visit changes, add ifs
LucasdeSouzaAlbuquerque Oct 29, 2014
3acc3f0
New and modified scenarios
Eblait Oct 29, 2014
ed40a39
addresses controller scenarios issue #301
LucasdeSouzaAlbuquerque Oct 29, 2014
aa6ffcb
Changes to Member and Record
vsychen Oct 29, 2014
a821244
Merge branch 'topic' of https://github.com/LucasdeSouzaAlbuquerque/rg…
vsychen Oct 29, 2014
3684ed8
Upload Dissertation With a File
vsychen Oct 29, 2014
a45fc3d
Upload Ferramenta Without a File
vsychen Oct 29, 2014
61d59ff
Edit Dissertation Title
vsychen Oct 29, 2014
4d1fb28
First Dissertation Stored
vsychen Oct 29, 2014
e378de5
added new scenario 'remove record web
Oct 29, 2014
47a9852
Revert "added new scenario 'remove record web"
Oct 29, 2014
392cc59
added new scenario 'remove record web
Oct 29, 2014
08cee2f
added new scenario 'remove funder web'
Oct 29, 2014
d166939
edited scenario 'new news web'
Oct 29, 2014
da3be7e
edited scenario 'edit research group'
Oct 29, 2014
39f6452
Merge branch 'acff' into topic
Oct 29, 2014
dd42e4f
Conflicts resolved
Eblait Oct 29, 2014
ef69be6
Resolving more conflicts
Eblait Oct 29, 2014
a98c8ec
Resolving conflicts on News and Visit
Eblait Oct 29, 2014
87cdc5b
Merge branch 'topic' of https://github.com/LucasdeSouzaAlbuquerque/rg…
Eblait Oct 29, 2014
c5f713e
New and modified scenarios in Funder and Member features
Eblait Oct 29, 2014
80b0b81
edit existing thesis
rff255 Oct 29, 2014
07d4ecd
filter thesis list
rff255 Oct 29, 2014
1ecb9d5
sort thesis list in alphabetical order
rff255 Oct 29, 2014
9ee1c8d
Minor Adjustements
LucasdeSouzaAlbuquerque Nov 10, 2014
83fe607
Merge branch 'topic' of https://github.com/LucasdeSouzaAlbuquerque/rg…
LucasdeSouzaAlbuquerque Nov 10, 2014
813744f
Alterations in Record.feature
vsychen Nov 21, 2014
fab5adb
Alterations in Record.feature
vsychen Nov 21, 2014
1884180
Minor alterations in Record.feature
vsychen Nov 21, 2014
1900e11
Alterations in Member.feature
vsychen Nov 21, 2014
2841e38
Alterations in Ferramenta.feature
vsychen Nov 21, 2014
3adae76
Alterations in Dissertacao.feature
vsychen Nov 21, 2014
a0197d8
Book Chapter Steps
LucasdeSouzaAlbuquerque Nov 22, 2014
a559c57
'remove existing thesis web' modified
rff255 Nov 22, 2014
8d58fde
Dissertation Steps
LucasdeSouzaAlbuquerque Nov 22, 2014
2288dcb
Ferramenta Steps
LucasdeSouzaAlbuquerque Nov 22, 2014
ff12d31
Adicionado steps do 'remove funder web'
Nov 22, 2014
40d6706
Merge branch 'topic' of https://github.com/LucasdeSouzaAlbuquerque/rg…
rff255 Nov 22, 2014
f91db98
Implementation vsyc1
vsychen Nov 22, 2014
4c43de5
Ajustes em cenarios para o uso de testes ja existentes
rff255 Nov 22, 2014
f86c83f
Criacao do teste de edicao de tese
rff255 Nov 22, 2014
ad0d7a7
Implementation vsyc2
vsychen Nov 22, 2014
086a304
Added 'remove book web feature' on Book.feature; Implemented the step…
Nov 22, 2014
612de38
Fixed duplicate steps on DissertacaoSteps.feature, FerramentaSteps.fe…
Nov 22, 2014
2b1a3d0
Removing changes in Ferramenta.feature/.groovy
vsychen Jan 19, 2015
6189cd3
Implementation Record.feature/RecordSteps.groovy
vsychen Jan 19, 2015
fc04b8b
Implementation Record.feature/RecordSteps.groovy
vsychen Jan 19, 2015
545e4ec
Alterations in Dissertacao
vsychen Jan 19, 2015
1433c32
Revert "Alterations in Dissertacao"
Eblait Jan 20, 2015
2183c43
Revert "Implementation Record.feature/RecordSteps.groovy"
Eblait Jan 20, 2015
71aa64a
Revert "Implementation Record.feature/RecordSteps.groovy"
Eblait Jan 20, 2015
c78cc10
Revert "Removing changes in Ferramenta.feature/.groovy"
Eblait Jan 20, 2015
2867f7f
Alteration/Implementation in Member
vsychen Jan 20, 2015
5c87dec
Alteracoes em Book.feature
Eblait Jan 20, 2015
736fa41
Nearby-deadline Updates
vsychen Jan 20, 2015
8df17f5
Changes in the three scenarios implemented
Eblait Jan 20, 2015
23cd0b4
remaking a remove funder web feature
Jan 21, 2015
9ad2027
update remove funder web featureand steps test
Jan 21, 2015
b0f0ca4
add new scenario > Book.feature
Jan 21, 2015
dc128ce
updade scenario and steps > Book.feature
Jan 21, 2015
a40ec79
Steps Fixing
LucasdeSouzaAlbuquerque Jan 21, 2015
fcbe57b
Merge branch 'lsa2' into topic
LucasdeSouzaAlbuquerque Jan 21, 2015
b6eb4b3
Merge branch 'topic' of https://github.com/LucasdeSouzaAlbuquerque/rg…
LucasdeSouzaAlbuquerque Jan 21, 2015
2339486
Merge branch 'topic' of https://github.com/LucasdeSouzaAlbuquerque/rg…
Jan 21, 2015
f878bc0
Ignore
LucasdeSouzaAlbuquerque Jan 21, 2015
42b1d63
Created scenario 'edit book web' and defined its step implementation
Eblait Jan 21, 2015
33ce3a8
Resolved conflits in 'Book.feature', 'Record.feature', 'BookSteps.gro…
Eblait Jan 22, 2015
b36feb7
Updated "download book file" scenario
Eblait Jan 22, 2015
01c8992
Atividade de implementacao
rff255 Feb 6, 2015
01110b3
creating a new method 'uploadFileStream'
Feb 7, 2015
bb65fc9
Removed duplicate code from Book and CommonSteps classes
Feb 7, 2015
9271591
added new function 'showOrEdit' in FunderController
Feb 7, 2015
65e0093
added new function 'showOrEdit' in MembershipController
Feb 7, 2015
e7df30a
Merge branch 'topic' of https://github.com/LucasdeSouzaAlbuquerque/rg…
LucasdeSouzaAlbuquerque Feb 7, 2015
fa71f61
remaking scenario in 'ArticlesSteps'
Feb 7, 2015
d7cb9e7
Merge branch 'topic' of https://github.com/LucasdeSouzaAlbuquerque/rg…
Feb 7, 2015
25109f5
This is a commit
LucasdeSouzaAlbuquerque Feb 7, 2015
21bae7b
Merge branch 'topic' of https://github.com/LucasdeSouzaAlbuquerque/rg…
Feb 7, 2015
3f333d4
Refatoração em ThesisSteps.groovy
rff255 Feb 7, 2015
45f53ed
Merge remote-tracking branch 'origin/rff2'
LucasdeSouzaAlbuquerque Feb 7, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changes in the three scenarios implemented
  • Loading branch information
Eblait committed Jan 20, 2015
commit 8df17f5ae3a1b87b36ff9105154c4d51dd8e1df4
11 changes: 5 additions & 6 deletions grails-app/controllers/rgms/publication/BookController.groovy
Original file line number Diff line number Diff line change
@@ -23,10 +23,9 @@ class BookController {
}

def save() {
PublicationController pb = new PublicationController()
def bookInstance = new Book(params)

bookInstance = pb.extractAuthors(bookInstance)
bookInstance = PublicationController.extractAuthors(bookInstance)


if (!bookInstance.save(flush: true)) {
@@ -38,18 +37,18 @@ class BookController {
redirect(action: "show", id: bookInstance.id)
}

def show(Long id) {
def bookInstance = Book.get(id)
def show() {
def bookInstance = Book.get(params.id)
if (!bookInstance) {
flash.message = message(code: 'default.not.found.message', args: [message(code: 'book.label', default: 'Book'), id])
flash.message = message(code: 'default.not.found.message', args: [message(code: 'book.label', default: 'Book'), params.id])
redirect(action: "list")
return
}

[bookInstance: bookInstance]
}

def edit(Long id) {
def edit() {
def bookInstance = Book.get(id)
if (!bookInstance) {
flash.message = message(code: 'default.not.found.message', args: [message(code: 'book.label', default: 'Book'), id])
7 changes: 3 additions & 4 deletions test/cucumber/Book.feature
Original file line number Diff line number Diff line change
@@ -46,10 +46,9 @@ Feature: Book
Then the book "Next Generation Software Product Line Engineering" is properly removed by the system

Scenario: Add a new book and tweet it
Given I am logged in as admin
And I am at the Book Page
When I try to create a book named "Next Generation Software Product Line Engineering" with filename "Ngs.pdf"
Given I am at the Book Page
When I try to create a book named "Next Generation Software Product Line Engineering" with filename "NGS.pdf"
And I click on Share to share the book on Twitter with "rgms_ufpe" and "rgmsadmin2013"
Then a tweet is added to my twitter account regarding the new book "Next Generation Software Product Line Engineering"
Then a pop-up window with a tweet regarding the new book "Next Generation Software Product Line Engineering" is shown

# END #
1 change: 1 addition & 0 deletions test/cucumber/steps/ArticleSteps.groovy
Original file line number Diff line number Diff line change
@@ -45,6 +45,7 @@ When(~'^I select the new article option at the article page$') {->
Then(~'^I can fill the article details$') {->
at ArticleCreatePage
page.fillArticleDetails()
page.selectCreateArticle()
}


32 changes: 8 additions & 24 deletions test/cucumber/steps/BookSteps.groovy
Original file line number Diff line number Diff line change
@@ -53,20 +53,16 @@ def selectNewBookInBookPage(){
at BookPage
page.selectNewBook()
at BookCreatePage

}

Then(~'^I can fill the book details$') {->
at BookCreatePage
page.fillBookDetails()
page.clickSaveBook()

to BookPage
at BookPage
page.selectCreateBook()
}

When(~'I go to the page of the "([^"]*)" book$') { String title ->
to BookPage
at BookPage
page.selectBook(title)
}

@@ -75,20 +71,14 @@ And(~'I follow the delete button confirming with OK$') { ->
page.select('input', 'delete')
}

//Given(~'^I am logged as "([^"]*)" with password "([^"]*)"$') { String userName, String password ->
// to LoginPage
// at LoginPage
// page.fillLoginData(userName, password)
//}

When(~'^I click on Share to share the book on Twitter with "([^"]*)" and "([^"]*)"$') { String twitterLogin, String twitterPw ->
And(~'^I click on Share to share the book on Twitter with "([^"]*)" and "([^"]*)"$') { String twitterLogin, String twitterPw ->
at BookShowPage
page.clickOnTwitteIt(twitterLogin, twitterPw)
at BookShowPage
}

Then(~'^a tweet is added to my twitter account regarding the new book "([^"]*)"$') { String articleTitle ->
assert TwitterTool.consult(articleTitle)
Then(~'^a pop-up window with a tweet regarding the new book "([^"]*)" is shown$') { String bookTitle ->
TwitterTool.addTwitterHistory(bookTitle, "added")
assert TwitterTool.consult(bookTitle)
}

/* END */
@@ -146,7 +136,8 @@ When(~'^I go to new book page$') { ->

And(~'^I try to create a book named "([^"]*)" with filename "([^"]*)"$') { String title, String filename ->
selectNewBookInBookPage()
createAndCheckBookOnBrowser(title, filename)
page.fillBookDetails(BookTestDataAndOperations.path() + filename, title)
page.selectCreateBook()
}

Then(~'^the book "([^"]*)" was stored by the system$') { String title ->
@@ -159,11 +150,4 @@ Then(~'^the book "([^"]*)" was stored by the system$') { String title ->
def checkIfExists(String title) {
book = Book.findByTitle(title)
assert book == null
}

def createAndCheckBookOnBrowser(String title, String filename) {
page.fillBookDetails(filename, title)
page.clickSaveBook()
book = Book.findByTitle(title)
assert book != null
}
Binary file added test/files/NGS.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions test/functional/pages/BookCreatePage.groovy
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ class BookCreatePage extends FormPage {
}

def fillBookDetails() {
def path = new File(".").getCanonicalPath() + File.separator + "test" + File.separator + "files" + File.separator + "TCS.pdf"
def path = new File(".").getCanonicalPath() + File.separator + "test" + File.separator + "files" + File.separator + "NGS.pdf"
fillBookDetails(path, "Next Generation Software Product Line Engineering")
}

@@ -40,8 +40,8 @@ class BookCreatePage extends FormPage {
$("form").pages = "20"
}

def clickSaveBook() {
$("form").create().click()
def selectCreateBook() {
$("input", name: "create").click()
}

}
2 changes: 1 addition & 1 deletion test/functional/pages/BookShowPage.groovy
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import geb.Page
* Created by droa on 22/11/2014.
*/
class BookShowPage extends Page {
static url = "book/show"
static url = "book/show/1"

static at = {

5 changes: 5 additions & 0 deletions test/functional/steps/BookTestDataAndOperations.groovy
Original file line number Diff line number Diff line change
@@ -76,4 +76,9 @@ class BookTestDataAndOperations {
}
return compatible
}

static public def path(){
return new File(".").getCanonicalPath() + File.separator + "test" + File.separator + "files" + File.separator
}

}