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

Topic - (Branch Topic Updates, Revisions and New Scenarios) #331

Open
wants to merge 98 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
d2fafcf
Merge remote-tracking branch 'origin/rff2' into topic
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
3 changes: 3 additions & 0 deletions COMANDO GEBS
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
-Dgeb.env=chrome -Dwebdriver.chrome.driver=/Users/Rodrigo/Documents/workspaces/TAES/gitsource/rgms/chromedrivers/chromedrivermac test-app functional:cucumber

LSA2
-Dserver.port=8090 -Dgeb.env=chrome -Dwebdriver.chrome.driver="Users\\Targelia Albuquerque\\Documents\\GitHub\\rgms\\chromedrivers\\chromedriverwindows" test-app functional:cucumber
Binary file added chromedrivers/chromedriver.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ grails.project.dependency.resolution = {
compile(group: 'org.apache.poi', name: 'poi-ooxml', version: '3.7') {
excludes 'xmlbeans'
}
compile('commons-codec:commons-codec:1.6')
// runtime 'mysql:mysql-connector-java:5.1.16'
}

Expand All @@ -61,7 +62,6 @@ grails.project.dependency.resolution = {
compile ":remote-control:1.4"
compile ":codenarc:0.20"
compile ":gmetrics:0.3.1"

runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.7.1"
runtime ":resources:1.1.6"
Expand Down
2 changes: 1 addition & 1 deletion grails-app/controllers/rgms/member/MemberController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class MemberController {
userInstance.errors.each {
println it
}
memberInstance.delete(flush: true)
memberInstance.delete()
render(view: "create", model: [userMemberInstanceList: [memberInstance: memberInstance, userInstance: userInstance]])
return
}
Expand Down
28 changes: 12 additions & 16 deletions grails-app/controllers/rgms/member/MembershipController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,11 @@ class MembershipController {
}

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

[membershipInstance: membershipInstance]
showOrEdit();
}

def edit = {
def membershipInstance = Membership.get(params.id)
if (!membershipInstance) {
flash.message = message(code: 'default.not.found.message', args: [message(code: 'membership.label', default: 'Membership'), params.id])
redirect(action: "list")
return
}

[membershipInstance: membershipInstance]
showOrEdit();
}

def update = {
Expand Down Expand Up @@ -118,4 +104,14 @@ class MembershipController {
}
}
//#end
def showOrEdit(){
def membershipInstance = Membership.get(params.id)
if (!membershipInstance) {
flash.message = message(code: 'default.not.found.message', args: [message(code: 'membership.label', default: 'Membership'), params.id])
redirect(action: "list")
return
}

[membershipInstance: membershipInstance]
}
}
17 changes: 8 additions & 9 deletions grails-app/controllers/rgms/publication/BookController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package rgms.publication

class BookController {

static allowedMethods = [save: "POST", update: "POST", delete: "POST"]
static allowedMethods = [save: "POST", update: "POST", delete: "POST", share: "POST"]
AuxiliarController aux = new AuxiliarController()

def index() {
Expand All @@ -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)) {
Expand All @@ -38,21 +37,21 @@ 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 bookInstance = Book.get(id)
def edit() {
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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,7 @@ class PublicationController {
return false
}

InputStream inputStream = request.getInputStream()
OutputStream outputStream = new FileOutputStream(f)
byte[] buffer = new byte[1024 * 10] //buffer de 10MB
int length

while ((length = inputStream.read(buffer)) > 0) {
outputStream.write(buffer, 0, length)
}
outputStream.close()
inputStream.close()

return true
uploadFileStream();
}

def static newUpload(Publication publicationInstance, flash, request) {
Expand All @@ -100,18 +89,7 @@ class PublicationController {
flash.message = 'File already exists. Please try to use a different file name.'
return false
}
InputStream inputStream = request.getInputStream()
OutputStream outputStream = new FileOutputStream(f)
byte[] buffer = new byte[1024 * 10] //buffer de 10MB
int length

while ((length = inputStream.read(buffer)) > 0) {
outputStream.write(buffer, 0, length)
}
outputStream.close()
inputStream.close()

return true
uploadFileStream();
}

def static extractAuthors(instance) {
Expand Down Expand Up @@ -161,4 +139,18 @@ class PublicationController {
// return statusLine.getStatusCode();
}
//#end
def static uploadFileStream() {
InputStream inputStream = request.getInputStream()
OutputStream outputStream = new FileOutputStream(f)
byte[] buffer = new byte[1024 * 10] //buffer de 10MB
int length

while ((length = inputStream.read(buffer)) > 0) {
outputStream.write(buffer, 0, length)
}
outputStream.close()
inputStream.close()

return true
}
}
28 changes: 12 additions & 16 deletions grails-app/controllers/rgms/researchProject/FunderController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,11 @@ class FunderController {
}

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

[funderInstance: funderInstance]
showOrEdit(id);
}

def edit(Long id) {
def funderInstance = Funder.get(id)
if (!funderInstance) {
flash.message = message(code: 'default.not.found.message', args: [message(code: 'funder.label', default: 'Funder'), id])
redirect(action: "list")
return
}

[funderInstance: funderInstance]
showOrEdit(id);
}

def update(Long id, Long version) {
Expand Down Expand Up @@ -100,5 +86,15 @@ class FunderController {
redirect(action: "show", id: id)
}
}
def showOrEdit(Long id){
def funderInstance = Funder.get(id)
if (!funderInstance) {
flash.message = message(code: 'default.not.found.message', args: [message(code: 'funder.label', default: 'Funder'), id])
redirect(action: "list")
return
}

[funderInstance: funderInstance]
}
}
//#end
19 changes: 19 additions & 0 deletions grails-app/views/book/show.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,25 @@
</g:if>

</ol>

<!--#if( $Twitter ) -->
<!-- Twitter start -->
<a href="javascript:window.open('https://twitter.com/intent/tweet?button_hashtag=RGMS&text=Book:%20${bookInstance?.title}', 'Tweet it', 'width=450,height=250');"
class="twitter-hashtag-button"
data-related="rgms_ufpe"
id="button_twitter"
target="_blank">
<img id="share_twitter2"
src="http://www.tabpress.com/fbui_share/share_button.png">
</a>
<script>
$('#button_twitter').live('click', function (e) {
jQuery.get("http://localhost:8080/rgms/notifyTwitter/book/${bookInstance?.id}/${bookInstance?.title}");
});
</script>
<!-- Twitter end -->
<!--#end -->

<g:form>
<fieldset class="buttons">
<g:hiddenField name="id" value="${bookInstance?.id}"/>
Expand Down
2 changes: 1 addition & 1 deletion test/cucumber/Article.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Feature: journal article

Scenario: edit existing article web
Given I am at the articles page and the article "A theory of software product line refinement" is stored in the system with file name "TCS-99.pdf"
When I select to view "A theory of software product line refinement" in resulting list
When I select to view "A theory of software product line refinement" in resulting list
And I change the article title to "REVIEWED"
And I select the "Alterar" option in Article Show Page
Then I am at Article show page
Expand Down
44 changes: 39 additions & 5 deletions test/cucumber/Book.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,43 @@ Feature: Book
When I upload the books of "curriculo.xml"
Then the system has all the books of the xml file

# @author droa
# BEGIN

#MODIFIED
Scenario: new book web
Given I am at the book page
And the system has no book entitled "Next Generation Software Product Line Engineering"
When I go to new book page
And I use the webpage to create the book "Next Generation Software Product Line Engineering" with file name "Ngs.pdf"
Then the book "Next Generation Software Product Line Engineering" was stored by the system
Given I am at the publications menu
When I select the "Book" option at the publications menu
And I select the new book option at the book page
Then I can fill the book details

Scenario: remove book web
Given I am logged in as admin
And I am at the Book Page
When I go to the page of the "Next Generation Software Product Line Engineering" book
And I follow the delete button confirming with OK
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"
And I click on Share to share the book on Twitter with "rgms_ufpe" and "rgmsadmin2013"
Then a pop-up window with a tweet regarding the new book "Next Generation Software Product Line Engineering" is shown

Scenario: edit book web
Given I am logged in as admin
And I am at the Book Page
And the book "Next Generation Software Product Line Engineering" is in the book list with file name "NGS.pdf"
When I select to edit the book "Next Generation Software Product Line Engineering" in resulting list
Then I can change the book details

# END #

Scenario: download book file
Given I am logged in as admin
And I am at the Book Page
And the book "Next Generation Software Product Line Engineering" is in the book list with file name "NGS.pdf"
When I select the download button
Then the download the file named "Ngs.pdf" is properly filed

70 changes: 70 additions & 0 deletions test/cucumber/Book.feature.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
@i9n
Feature: Book
As a member of a research group
I want to add, remove and modify books I have published
so that I can generate web pages and reports containing these books

Scenario: new book
Given the system has no book entitled "SPL Development"
When I create the book "SPL Development" with file name "HSPLE.pdf"
Then the book "SPL Development" is properly stored by the system

Scenario: remove book
Given the book "SPL Development" is stored in the system with file name "NGSPL-2.pdf"
When I remove the book "SPL Development"
Then the book "SPL Development" is properly removed by the system

Scenario: duplicate book
Given the book "SPL Development" is stored in the system with file name "NGSPL-0.pdf"
When I create the book "SPL Development" with file name "NGSPL-0.pdf"
Then the book "SPL Development" is not stored twice

Scenario: edit existing book
Given the book "SPL Development" is stored in the system with file name "HSPLE.pdf"
When I edit the book title from "SPL Development" to "New Title"
Then the book "New Title" is properly updated by the system

Scenario: upload book with a file
Given the system has no books stored
When I upload the books of "curriculo.xml"
Then the system has all the books of the xml file

# @author droa
# BEGIN

#MODIFIED
Scenario: new book web
Given I am at the publications menu
When I select the "Book" option at the publications menu
And I select the new book option at the book page
Then I can fill the book details

Scenario: remove book web
Given I am at the Book Page
When I go to the page of the "Next Generation Software Product Line Engineering" book
And I follow the delete button confirming with OK
Then the book "Next Generation Software Product Line Engineering" is properly removed by the system

<<<<<<< HEAD
# END #

Scenario: downloadd book file
Given I am at the book page
And the book entitled "Next Generation Software Product Line Engineering" is stored in the system with file name "Ngs.pdf"
When I select the download button
Then the download the file named "Ngs.pdf" is properly filed
=======
Scenario: Add a new book and tweet it
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 pop-up window with a tweet regarding the new book "Next Generation Software Product Line Engineering" is shown

Scenario: edit book web
Given I am at the Book Page
And the book "Next Generation Software Product Line Engineering" is in the book list with file name "NGS.pdf"
When I select to edit the book "Next Generation Software Product Line Engineering" in resulting list
Then I can change the book details

# END #
>>>>>>> droa
Loading