Skip to content

Commit

Permalink
adicionando os cenários e atualizando outros no modulo member e adici…
Browse files Browse the repository at this point in the history
…onando a resolução da issue spgroup#269
  • Loading branch information
asilvino committed Apr 30, 2014
1 parent 5f1c93f commit 45ec73f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 6 deletions.
11 changes: 10 additions & 1 deletion grails-app/controllers/rgms/member/MemberController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@ class MemberController {
def list = {
params.max = Math.min(params.max ? params.int('max') : 10, 100)
def userMemberList = []
def members = Member.list(params)
def members = [];
if (params.get("sort").equals("username")||params.get("sort").equals("enabled")){
params.put("sort","name");
members = Member.list(params);
}else{

members = Member.list(params)
}
for (i in members) {
def user = User.findByAuthor(i)
if (user)
userMemberList.add([user: user, member: i])
else
userMemberList.add([member: i])

// userMemberList.sort()
}

[userMemberInstanceList: userMemberList, memberInstanceTotal: Member.count()]
Expand Down
39 changes: 34 additions & 5 deletions test/cucumber/Member.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ Feature: member
As an administrator of the RGMS system
I want to add, remove and modify users in the system.

Scenario: new member with valid mail server
Given the system has no member with username "usernametest"
When I create a member with username "usernametest"
Then the member with username "usernametest" is properly stored by the system


Scenario: list existing member
Given the system has member with username "usernametest"
Expand Down Expand Up @@ -75,4 +72,36 @@ Feature: member
Scenario: user registration with default data
Given I am at the register page
Then I see default data filled on register form
#end
#end

#if ($memberListAndPageImprovement)
Scenario: user can order the member by id, name, username, enabled, email, roles, permissions
Given I am at the member List page
Then I can click to any attribute of member
And the system will display the list of member ordered them with the attribute

Scenario: new member with valid mail server
Given the system has no member with username "usernametest"
When I create a member with username "usernametest"
Then the member with username "usernametest" is properly stored by the system
And the new member with username "usernametest" will be logged in
Then the system will send a welcoming email to the new member

Scenario: administrator needs to know the newest members and approve them
Given I am at the member List page
Then I see the newest members and the not approved ones

Scenario: member can see his name and a link to logout
Given I am at any page
Then I see my name and a link to logout

Scenario: administrator click on roll of member and access the member profile
Given I am at the member List page
Then I move the mouse hover on the rows to select the member
And click to access the profile

Scenario: member can access the facebook profile for those connect the facebook app
Given I am at the member profile
Then I can click to the link to member's facebook profile

#end

0 comments on commit 45ec73f

Please sign in to comment.