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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c9dea776
Commit
c9dea776
authored
Mar 23, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for upcoming milestone filter
parent
7ff6af19
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
spec/features/issues/filter_by_milestone_spec.rb
spec/features/issues/filter_by_milestone_spec.rb
+34
-0
spec/features/merge_requests/filter_by_milestone_spec.rb
spec/features/merge_requests/filter_by_milestone_spec.rb
+34
-0
No files found.
spec/features/issues/filter_by_milestone_spec.rb
View file @
c9dea776
...
@@ -14,6 +14,40 @@ feature 'Issue filtering by Milestone', feature: true do
...
@@ -14,6 +14,40 @@ feature 'Issue filtering by Milestone', feature: true do
expect
(
page
).
to
have_css
(
'.issue .title'
,
count:
1
)
expect
(
page
).
to
have_css
(
'.issue .title'
,
count:
1
)
end
end
context
'filters by upcoming milestone'
,
js:
true
do
it
'should not show issues with no expiry'
do
create
(
:issue
,
project:
project
)
create
(
:issue
,
project:
project
,
milestone:
milestone
)
visit_issues
(
project
)
filter_by_milestone
(
Milestone
::
Upcoming
.
title
)
expect
(
page
).
to
have_css
(
'.issue .title'
,
count:
0
)
end
it
'should show issues in future'
do
milestone
=
create
(
:milestone
,
project:
project
,
due_date:
Date
.
tomorrow
)
create
(
:issue
,
project:
project
)
create
(
:issue
,
project:
project
,
milestone:
milestone
)
visit_issues
(
project
)
filter_by_milestone
(
Milestone
::
Upcoming
.
title
)
expect
(
page
).
to
have_css
(
'.issue .title'
,
count:
1
)
end
it
'should not show issues in past'
do
milestone
=
create
(
:milestone
,
project:
project
,
due_date:
Date
.
yesterday
)
create
(
:issue
,
project:
project
)
create
(
:issue
,
project:
project
,
milestone:
milestone
)
visit_issues
(
project
)
filter_by_milestone
(
Milestone
::
Upcoming
.
title
)
expect
(
page
).
to
have_css
(
'.issue .title'
,
count:
0
)
end
end
scenario
'filters by a specific Milestone'
,
js:
true
do
scenario
'filters by a specific Milestone'
,
js:
true
do
create
(
:issue
,
project:
project
,
milestone:
milestone
)
create
(
:issue
,
project:
project
,
milestone:
milestone
)
create
(
:issue
,
project:
project
)
create
(
:issue
,
project:
project
)
...
...
spec/features/merge_requests/filter_by_milestone_spec.rb
View file @
c9dea776
...
@@ -14,6 +14,40 @@ feature 'Merge Request filtering by Milestone', feature: true do
...
@@ -14,6 +14,40 @@ feature 'Merge Request filtering by Milestone', feature: true do
expect
(
page
).
to
have_css
(
'.merge-request-title'
,
count:
1
)
expect
(
page
).
to
have_css
(
'.merge-request-title'
,
count:
1
)
end
end
context
'filters by upcoming milestone'
,
js:
true
do
it
'should not show issues with no expiry'
do
create
(
:merge_request
,
:with_diffs
,
source_project:
project
)
create
(
:merge_request
,
:simple
,
source_project:
project
,
milestone:
milestone
)
visit_merge_requests
(
project
)
filter_by_milestone
(
Milestone
::
Upcoming
.
title
)
expect
(
page
).
to
have_css
(
'.merge-request-title'
,
count:
0
)
end
it
'should show issues in future'
do
milestone
=
create
(
:milestone
,
project:
project
,
due_date:
Date
.
tomorrow
)
create
(
:merge_request
,
:with_diffs
,
source_project:
project
)
create
(
:merge_request
,
:simple
,
source_project:
project
,
milestone:
milestone
)
visit_merge_requests
(
project
)
filter_by_milestone
(
Milestone
::
Upcoming
.
title
)
expect
(
page
).
to
have_css
(
'.merge-request-title'
,
count:
1
)
end
it
'should not show issues in past'
do
milestone
=
create
(
:milestone
,
project:
project
,
due_date:
Date
.
yesterday
)
create
(
:merge_request
,
:with_diffs
,
source_project:
project
)
create
(
:merge_request
,
:simple
,
source_project:
project
,
milestone:
milestone
)
visit_merge_requests
(
project
)
filter_by_milestone
(
Milestone
::
Upcoming
.
title
)
expect
(
page
).
to
have_css
(
'.merge-request-title'
,
count:
0
)
end
end
scenario
'filters by a specific Milestone'
,
js:
true
do
scenario
'filters by a specific Milestone'
,
js:
true
do
create
(
:merge_request
,
:with_diffs
,
source_project:
project
,
milestone:
milestone
)
create
(
:merge_request
,
:with_diffs
,
source_project:
project
,
milestone:
milestone
)
create
(
:merge_request
,
:simple
,
source_project:
project
)
create
(
:merge_request
,
:simple
,
source_project:
project
)
...
...
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