BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1623259c
Commit
1623259c
authored
Nov 11, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove spec since it already exists in MR page
parent
08728cb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
91 deletions
+0
-91
filter_by_milestone_spec.rb
spec/features/issues/filter_by_milestone_spec.rb
+0
-91
No files found.
spec/features/issues/filter_by_milestone_spec.rb
deleted
100644 → 0
View file @
08728cb3
require
'rails_helper'
feature
'Issue filtering by Milestone'
,
feature:
true
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
scenario
'filters by no Milestone'
,
js:
true
do
create
(
:issue
,
project:
project
)
create
(
:issue
,
project:
project
,
milestone:
milestone
)
visit_issues
(
project
)
filter_by_milestone
(
Milestone
::
None
.
title
)
expect
(
page
).
to
have_css
(
'.milestone-filter .dropdown-toggle-text'
,
text:
'No Milestone'
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
1
)
end
context
'filters by upcoming milestone'
,
js:
true
do
it
'does 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
(
'.milestone-filter .dropdown-toggle-text'
,
text:
'Upcoming'
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
0
)
end
it
'shows 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
(
'.milestone-filter .dropdown-toggle-text'
,
text:
'Upcoming'
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
1
)
end
it
'does 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
(
'.milestone-filter .dropdown-toggle-text'
,
text:
'Upcoming'
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
0
)
end
end
scenario
'filters by a specific Milestone'
,
js:
true
do
create
(
:issue
,
project:
project
,
milestone:
milestone
)
create
(
:issue
,
project:
project
)
visit_issues
(
project
)
filter_by_milestone
(
milestone
.
title
)
expect
(
page
).
to
have_css
(
'.milestone-filter .dropdown-toggle-text'
,
text:
milestone
.
title
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
1
)
end
context
'when milestone has single quotes in title'
do
background
do
milestone
.
update
(
name:
"rock 'n' roll"
)
end
scenario
'filters by a specific Milestone'
,
js:
true
do
create
(
:issue
,
project:
project
,
milestone:
milestone
)
create
(
:issue
,
project:
project
)
visit_issues
(
project
)
filter_by_milestone
(
milestone
.
title
)
expect
(
page
).
to
have_css
(
'.milestone-filter .dropdown-toggle-text'
,
text:
milestone
.
title
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
1
)
end
end
def
visit_issues
(
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
end
def
filter_by_milestone
(
title
)
find
(
".js-milestone-select"
).
click
find
(
".milestone-filter .dropdown-content a"
,
text:
title
).
click
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