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
8b76e306
Commit
8b76e306
authored
Oct 03, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spianch test for group dashboard
parent
224fb577
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
13 deletions
+68
-13
app/models/group.rb
app/models/group.rb
+4
-0
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+5
-3
app/views/snippets/show.html.haml
app/views/snippets/show.html.haml
+13
-10
features/dashboard/dashboard.feature
features/dashboard/dashboard.feature
+5
-0
features/group/group.feature
features/group/group.feature
+9
-0
features/steps/group/group.rb
features/steps/group/group.rb
+32
-0
No files found.
app/models/group.rb
View file @
8b76e306
...
@@ -22,6 +22,10 @@ class Group < ActiveRecord::Base
...
@@ -22,6 +22,10 @@ class Group < ActiveRecord::Base
delegate
:name
,
to: :owner
,
allow_nil:
true
,
prefix:
true
delegate
:name
,
to: :owner
,
allow_nil:
true
,
prefix:
true
def
self
.
search
query
where
(
"name like :query or code like :query"
,
query:
"%
#{
query
}
%"
)
end
def
to_param
def
to_param
code
code
end
end
...
...
app/views/groups/show.html.haml
View file @
8b76e306
.projects
.projects
.activities.span8
.activities.span8
.back_link
=
link_to
dashboard_path
,
class:
'btn very_small'
do
=
link_to
dashboard_path
do
←
To dashboard
←
To dashboard
%span
.cgray
Events and projects are filtered in scope of group
%hr
=
render
'shared/no_ssh'
=
render
'shared/no_ssh'
-
if
@events
.
any?
-
if
@events
.
any?
.content_list
=
render
@events
.content_list
=
render
@events
...
...
app/views/snippets/show.html.haml
View file @
8b76e306
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
=
link_to
"Edit"
,
edit_project_snippet_path
(
@project
,
@snippet
),
class:
"btn small right"
=
link_to
"Edit"
,
edit_project_snippet_path
(
@project
,
@snippet
),
class:
"btn small right"
%br
%br
.file_holder
%div
.file_holder
.file_title
.file_title
%i
.icon-file
%i
.icon-file
%strong
=
@snippet
.
file_name
%strong
=
@snippet
.
file_name
...
@@ -17,4 +18,6 @@
...
@@ -17,4 +18,6 @@
%div
{
class:
current_user
.
dark_scheme
?
"black"
:
""
}
%div
{
class:
current_user
.
dark_scheme
?
"black"
:
""
}
=
raw
@snippet
.
colorize
(
options:
{
linenos:
'True'
})
=
raw
@snippet
.
colorize
(
options:
{
linenos:
'True'
})
=
render
"notes/notes_with_form"
,
tid:
@snippet
.
id
,
tt:
"snippet"
%div
=
render
"notes/notes_with_form"
,
tid:
@snippet
.
id
,
tt:
"snippet"
features/dashboard/dashboard.feature
View file @
8b76e306
...
@@ -10,6 +10,11 @@ Feature: Dashboard
...
@@ -10,6 +10,11 @@ Feature: Dashboard
Then
I should see
"Shop"
project link
Then
I should see
"Shop"
project link
Then
I should see project
"Shop"
activity feed
Then
I should see project
"Shop"
activity feed
Scenario
:
I
should see groups list
Given
I have group with projects
And
I visit dashboard page
Then
I should see groups list
Scenario
:
I
should see last push widget
Scenario
:
I
should see last push widget
Then
I should see last push widget
Then
I should see last push widget
And
I click
"Create Merge Request"
link
And
I click
"Create Merge Request"
link
...
...
features/group/group.feature
0 → 100644
View file @
8b76e306
Feature
:
Groups
Background
:
Given
I sign in as a user
And
I have group with projects
Scenario
:
I
should see group dashboard list
When
I visit group page
Then
I should see projects list
And
I should see projects activity feed
features/steps/group/group.rb
0 → 100644
View file @
8b76e306
class
Groups
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
When
'I visit group page'
do
visit
group_path
(
current_group
)
end
Then
'I should see projects list'
do
current_user
.
projects
.
each
do
|
project
|
page
.
should
have_link
project
.
name
end
end
And
'I have group with projects'
do
@group
=
Factory
:group
@project
=
Factory
:project
,
group:
@group
@event
=
Factory
:closed_issue_event
,
project:
@project
@project
.
add_access
current_user
,
:admin
end
And
'I should see projects activity feed'
do
page
.
should
have_content
'closed issue'
end
protected
def
current_group
@group
||=
Group
.
first
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