Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
22d6dc2b
Commit
22d6dc2b
authored
Jun 18, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cucumber features: Team, SSH keys
parent
eb00cb69
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
162 additions
and
8 deletions
+162
-8
app/views/team_members/_show.html.haml
app/views/team_members/_show.html.haml
+1
-1
features/profile/ssh_keys.feature
features/profile/ssh_keys.feature
+22
-0
features/projects/team_management.feature
features/projects/team_management.feature
+35
-0
features/step_definitions/dashboard_steps.rb
features/step_definitions/dashboard_steps.rb
+1
-1
features/step_definitions/profile_keys_steps.rb
features/step_definitions/profile_keys_steps.rb
+34
-0
features/step_definitions/project_commits_steps.rb
features/step_definitions/project_commits_steps.rb
+0
-0
features/step_definitions/project_team_steps.rb
features/step_definitions/project_team_steps.rb
+63
-0
features/step_definitions/project_wiki_steps.rb
features/step_definitions/project_wiki_steps.rb
+0
-0
features/step_definitions/projects_steps.rb
features/step_definitions/projects_steps.rb
+6
-6
No files found.
app/views/team_members/_show.html.haml
View file @
22d6dc2b
-
user
=
member
.
user
-
user
=
member
.
user
-
allow_admin
=
can?
current_user
,
:admin_project
,
@project
-
allow_admin
=
can?
current_user
,
:admin_project
,
@project
%tr
{
:id
=>
dom_id
(
member
),
:class
=>
"team_member_row"
}
%tr
{
:id
=>
dom_id
(
member
),
:class
=>
"team_member_row
user_#{user.id}
"
}
%td
%td
.right
.right
-
if
@project
.
owner
==
user
-
if
@project
.
owner
==
user
...
...
features/profile/ssh_keys.feature
View file @
22d6dc2b
Feature
:
SSH Keys
Background
:
Given
I signin as a user
And I have ssh keys
:
|
title
|
|
Work
|
|
Home
|
And
I visit profile keys page
Scenario
:
I
should see SSH keys
Then
I should see my ssh keys
Scenario
:
Add new ssh key
Given
I click link
"Add new"
And
I submit new ssh key
"Laptop"
Then
I should see new ssh key
"Laptop"
Scenario
:
Remove ssh key
Given
I click link
"Work"
And
I click link
"Remove"
Then
I visit profile keys page
And
I should not see
"Work"
ssh key
features/projects/team_management.feature
View file @
22d6dc2b
Feature
:
Project Team management
Background
:
Given
I signin as a user
And
I own project
"Shop"
And
gitlab user
"Mike"
And
gitlab user
"Sam"
And
"Sam"
is
"Shop"
developer
And
I visit project
"Shop"
team page
Scenario
:
See all team members
Then
I should be able to see myself in team
And
I should see
"Sam"
in team list
Scenario
:
Add user to project
Given
I click link
"New Team Member"
And
I select
"Mike"
as
"Reporter"
Then
I should see
"Mike"
in team list as
"Reporter"
@javascript
Scenario
:
Update user access
Given
I should see
"Sam"
in team list as
"Developer"
And
I change
"Sam"
role to
"Reporter"
Then
I visit project
"Shop"
team page
And
I should see
"Sam"
in team list as
"Reporter"
Scenario
:
View team member profile
Given
I click link
"Sam"
Then
I should see
"Sam"
team profile
Scenario
:
Cancel team member
Given
I click link
"Sam"
And
I click link
"Remove from team"
Then
I visit project
"Shop"
team page
And
I should not see
"Sam"
in team list
features/step_definitions/dashboard_steps.rb
View file @
22d6dc2b
...
@@ -47,7 +47,7 @@ Then /^I should see last push widget$/ do
...
@@ -47,7 +47,7 @@ Then /^I should see last push widget$/ do
end
end
Then
/^I click "(.*?)" link$/
do
|
arg1
|
Then
/^I click "(.*?)" link$/
do
|
arg1
|
click_link
"
Create Merge Request"
click_link
arg1
#
Create Merge Request"
end
end
Then
/^I see prefilled new Merge Request page$/
do
Then
/^I see prefilled new Merge Request page$/
do
...
...
features/step_definitions/profile_keys_steps.rb
0 → 100644
View file @
22d6dc2b
Given
/^I visit profile keys page$/
do
visit
keys_path
end
Then
/^I should see my ssh keys$/
do
@user
.
keys
.
each
do
|
key
|
page
.
should
have_content
(
key
.
title
)
end
end
Given
/^I have ssh keys:$/
do
|
table
|
table
.
hashes
.
each
do
|
row
|
Factory
:key
,
:user
=>
@user
,
:title
=>
row
[
:title
],
:key
=>
"jfKLJDFKSFJSHFJ
#{
row
[
:title
]
}
"
end
end
Given
/^I submit new ssh key "(.*?)"$/
do
|
arg1
|
fill_in
"key_title"
,
:with
=>
arg1
fill_in
"key_key"
,
:with
=>
"publickey234="
click_button
"Save"
end
Then
/^I should see new ssh key "(.*?)"$/
do
|
arg1
|
key
=
Key
.
find_by_title
(
arg1
)
page
.
should
have_content
(
key
.
title
)
page
.
should
have_content
(
key
.
key
)
current_path
.
should
==
key_path
(
key
)
end
Then
/^I should not see "(.*?)" ssh key$/
do
|
arg1
|
within
"#keys-table"
do
page
.
should_not
have_content
(
arg1
)
end
end
features/step_definitions/commits_steps.rb
→
features/step_definitions/
project_
commits_steps.rb
View file @
22d6dc2b
File moved
features/step_definitions/project_team_steps.rb
0 → 100644
View file @
22d6dc2b
Given
/^gitlab user "(.*?)"$/
do
|
arg1
|
Factory
:user
,
:name
=>
arg1
end
Given
/^"(.*?)" is "(.*?)" developer$/
do
|
arg1
,
arg2
|
user
=
User
.
find_by_name
(
arg1
)
project
=
Project
.
find_by_name
(
arg2
)
project
.
add_access
(
user
,
:write
)
end
Given
/^I visit project "(.*?)" team page$/
do
|
arg1
|
visit
team_project_path
(
Project
.
find_by_name
(
arg1
))
end
Then
/^I should be able to see myself in team$/
do
page
.
should
have_content
(
@user
.
name
)
page
.
should
have_content
(
@user
.
email
)
end
Then
/^I should see "(.*?)" in team list$/
do
|
arg1
|
user
=
User
.
find_by_name
(
arg1
)
page
.
should
have_content
(
user
.
name
)
page
.
should
have_content
(
user
.
email
)
end
Given
/^I click link "(.*?)"$/
do
|
arg1
|
click_link
arg1
end
Given
/^I select "(.*?)" as "(.*?)"$/
do
|
arg1
,
arg2
|
user
=
User
.
find_by_name
(
arg1
)
within
"#new_team_member"
do
select
user
.
name
,
:from
=>
"team_member_user_id"
select
arg2
,
:from
=>
"team_member_project_access"
end
click_button
"Save"
end
Then
/^I should see "(.*?)" in team list as "(.*?)"$/
do
|
arg1
,
arg2
|
user
=
User
.
find_by_name
(
arg1
)
role_id
=
find
(
".user_
#{
user
.
id
}
#team_member_project_access"
).
value
role_id
.
should
==
UsersProject
.
access_roles
[
arg2
].
to_s
end
Given
/^I change "(.*?)" role to "(.*?)"$/
do
|
arg1
,
arg2
|
user
=
User
.
find_by_name
(
arg1
)
within
".user_
#{
user
.
id
}
"
do
select
arg2
,
:from
=>
"team_member_project_access"
end
end
Then
/^I should see "(.*?)" team profile$/
do
|
arg1
|
user
=
User
.
find_by_name
(
arg1
)
page
.
should
have_content
(
user
.
name
)
page
.
should
have_content
(
user
.
email
)
page
.
should
have_content
(
"To team list"
)
end
Then
/^I should not see "(.*?)" in team list$/
do
|
arg1
|
user
=
User
.
find_by_name
(
arg1
)
page
.
should_not
have_content
(
user
.
name
)
page
.
should_not
have_content
(
user
.
email
)
end
features/step_definitions/wiki_steps.rb
→
features/step_definitions/
project_
wiki_steps.rb
View file @
22d6dc2b
File moved
features/step_definitions/projects_steps.rb
View file @
22d6dc2b
...
@@ -28,7 +28,7 @@ end
...
@@ -28,7 +28,7 @@ end
Given
/^I own project "(.*?)"$/
do
|
arg1
|
Given
/^I own project "(.*?)"$/
do
|
arg1
|
@project
=
Factory
:project
,
:name
=>
arg1
@project
=
Factory
:project
,
:name
=>
arg1
@project
.
add_access
(
@user
,
:
read
,
:write
)
@project
.
add_access
(
@user
,
:
admin
)
end
end
Given
/^I visit project "(.*?)" wall page$/
do
|
arg1
|
Given
/^I visit project "(.*?)" wall page$/
do
|
arg1
|
...
@@ -60,9 +60,9 @@ Given /^show me page$/ do
...
@@ -60,9 +60,9 @@ Given /^show me page$/ do
end
end
Given
/^page should have network graph$/
do
Given
/^page should have network graph$/
do
#
page.should have_content "Project Network Graph"
page
.
should
have_content
"Project Network Graph"
#
within ".graph" do
within
".graph"
do
#
page.should have_content "stable"
page
.
should
have_content
"stable"
#
page.should have_content "notes_refacto..."
page
.
should
have_content
"notes_refacto..."
#
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment