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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
b255c3c4
Commit
b255c3c4
authored
Dec 02, 2012
by
Alex Denisov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests on events filtering added
parent
2b932015
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
5 deletions
+46
-5
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+1
-1
features/dashboard/event_filters.feature
features/dashboard/event_filters.feature
+18
-1
features/steps/dashboard/dashboard_event_filters.rb
features/steps/dashboard/dashboard_event_filters.rb
+27
-3
No files found.
app/helpers/events_helper.rb
View file @
b255c3c4
...
@@ -32,7 +32,7 @@ module EventsHelper
...
@@ -32,7 +32,7 @@ module EventsHelper
end
end
content_tag
:div
,
class:
"filter_icon
#{
inactive
}
"
do
content_tag
:div
,
class:
"filter_icon
#{
inactive
}
"
do
link_to
dashboard_path
(
event_filter:
filter
),
class:
'has_tooltip'
,
'data-original-title'
=>
tooltip
do
link_to
dashboard_path
(
event_filter:
filter
),
class:
'has_tooltip'
,
id:
"
#{
key
}
_event_filter"
,
'data-original-title'
=>
tooltip
do
image_tag
"event_filter_
#{
key
}
.png"
image_tag
"event_filter_
#{
key
}
.png"
end
end
end
end
...
...
features/dashboard/event_filters.feature
View file @
b255c3c4
...
@@ -9,6 +9,23 @@ Feature: Event filters
...
@@ -9,6 +9,23 @@ Feature: Event filters
Scenario
:
I
should see all events
Scenario
:
I
should see all events
Then
I should see push event
Then
I should see push event
And
I should see new member event
And
I should see merge request event
Scenario
:
I
should see only pushed events
When
I click
"push"
event filter
Then
I should see push event
And
I should not see new member event
And
I should not see merge request event
Scenario
:
I
should see only joined events
When
I click
"team"
event filter
Then
I should see new member event
Then
I should see new member event
Then
I should see merge request event
And
I should not see push event
And
I should not see merge request event
Scenario
:
I
should see only merged events
When
I click
"merge"
event filter
Then
I should see merge request event
And
I should not see push event
And
I should not see new member event
features/steps/dashboard/dashboard_event_filters.rb
View file @
b255c3c4
...
@@ -4,15 +4,27 @@ class EventFilters < Spinach::FeatureSteps
...
@@ -4,15 +4,27 @@ class EventFilters < Spinach::FeatureSteps
include
SharedProject
include
SharedProject
Then
'I should see push event'
do
Then
'I should see push event'
do
page
.
find
(
'span.pushed'
).
should
have_content
(
'pushed'
)
page
.
has_selector?
(
'span.pushed'
).
should
be_true
end
Then
'I should not see push event'
do
page
.
has_selector?
(
'span.pushed'
).
should
be_false
end
end
Then
'I should see new member event'
do
Then
'I should see new member event'
do
page
.
find
(
'span.joined'
).
should
have_content
(
'joined'
)
page
.
has_selector?
(
'span.joined'
).
should
be_true
end
And
'I should not see new member event'
do
page
.
has_selector?
(
'span.joined'
).
should
be_false
end
end
Then
'I should see merge request event'
do
Then
'I should see merge request event'
do
page
.
find
(
'span.merged'
).
should
have_content
(
'merged'
)
page
.
has_selector?
(
'span.merged'
).
should
be_true
end
And
'I should not see merge request event'
do
page
.
has_selector?
(
'span.merged'
).
should
be_false
end
end
And
'this project has push event'
do
And
'this project has push event'
do
...
@@ -59,5 +71,17 @@ class EventFilters < Spinach::FeatureSteps
...
@@ -59,5 +71,17 @@ class EventFilters < Spinach::FeatureSteps
)
)
end
end
When
'I click "push" event filter'
do
click_link
(
"push_event_filter"
)
end
When
'I click "team" event filter'
do
click_link
(
"team_event_filter"
)
end
When
'I click "merge" event filter'
do
click_link
(
"merged_event_filter"
)
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