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
4e5e3e23
Commit
4e5e3e23
authored
Mar 24, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update milestone page tests
parent
f7d7e7fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
features/steps/group/milestones.rb
features/steps/group/milestones.rb
+1
-1
spec/features/projects/milestones/milestone_spec.rb
spec/features/projects/milestones/milestone_spec.rb
+18
-16
No files found.
features/steps/group/milestones.rb
View file @
4e5e3e23
...
@@ -36,7 +36,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
...
@@ -36,7 +36,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
step
'I should see group milestone with all issues and MRs assigned to that milestone'
do
step
'I should see group milestone with all issues and MRs assigned to that milestone'
do
expect
(
page
).
to
have_content
(
'Milestone GL-113'
)
expect
(
page
).
to
have_content
(
'Milestone GL-113'
)
expect
(
page
).
to
have_content
(
'
3 issues: 3 open and 0 closed
'
)
expect
(
page
).
to
have_content
(
'
Issues 3 Open: 3 Closed: 0
'
)
issue
=
Milestone
.
find_by
(
name:
'GL-113'
).
issues
.
first
issue
=
Milestone
.
find_by
(
name:
'GL-113'
).
issues
.
first
expect
(
page
).
to
have_link
(
issue
.
title
,
href:
namespace_project_issue_path
(
issue
.
project
.
namespace
,
issue
.
project
,
issue
))
expect
(
page
).
to
have_link
(
issue
.
title
,
href:
namespace_project_issue_path
(
issue
.
project
.
namespace
,
issue
.
project
,
issue
))
end
end
...
...
spec/features/projects/milestones/milestone_spec.rb
View file @
4e5e3e23
...
@@ -11,7 +11,7 @@ feature 'Project milestone', :feature do
...
@@ -11,7 +11,7 @@ feature 'Project milestone', :feature do
context
'when project has enabled issues'
do
context
'when project has enabled issues'
do
before
do
before
do
visit
milestone_path
visit
namespace_project_milestone_path
(
project
.
namespace
,
project
,
milestone
)
end
end
it
'shows issues tab'
do
it
'shows issues tab'
do
...
@@ -23,12 +23,14 @@ feature 'Project milestone', :feature do
...
@@ -23,12 +23,14 @@ feature 'Project milestone', :feature do
end
end
it
'shows issues stats'
do
it
'shows issues stats'
do
expect
(
page
).
to
have_content
'issues:
'
expect
(
find
(
'.milestone-sidebar'
)).
to
have_content
'Issues 0
'
end
end
it
'shows Browse Issues button'
do
it
'shows link to browse and add issues'
do
within
(
'#content-body'
)
do
within
(
'.milestone-sidebar'
)
do
expect
(
page
).
to
have_link
'Browse Issues'
expect
(
page
).
to
have_link
'New issue'
expect
(
page
).
to
have_link
'Open: 0'
expect
(
page
).
to
have_link
'Closed: 0'
end
end
end
end
end
end
...
@@ -36,7 +38,7 @@ feature 'Project milestone', :feature do
...
@@ -36,7 +38,7 @@ feature 'Project milestone', :feature do
context
'when project has disabled issues'
do
context
'when project has disabled issues'
do
before
do
before
do
project
.
project_feature
.
update_attribute
(
:issues_access_level
,
ProjectFeature
::
DISABLED
)
project
.
project_feature
.
update_attribute
(
:issues_access_level
,
ProjectFeature
::
DISABLED
)
visit
milestone_path
visit
namespace_project_milestone_path
(
project
.
namespace
,
project
,
milestone
)
end
end
it
'hides issues tab'
do
it
'hides issues tab'
do
...
@@ -48,12 +50,12 @@ feature 'Project milestone', :feature do
...
@@ -48,12 +50,12 @@ feature 'Project milestone', :feature do
end
end
it
'hides issues stats'
do
it
'hides issues stats'
do
expect
(
page
).
to
have_no_content
'issues:
'
expect
(
find
(
'.milestone-sidebar'
)).
not_to
have_content
'Issues 0
'
end
end
it
'hides
Browse Issues
button'
do
it
'hides
new issue
button'
do
within
(
'
#content-body
'
)
do
within
(
'
.milestone-sidebar
'
)
do
expect
(
page
).
not_to
have_link
'
Browse Issues
'
expect
(
page
).
not_to
have_link
'
New issue
'
end
end
end
end
...
@@ -66,23 +68,23 @@ feature 'Project milestone', :feature do
...
@@ -66,23 +68,23 @@ feature 'Project milestone', :feature do
context
'milestone summary'
do
context
'milestone summary'
do
it
'shows the total weight when sum is greater than zero'
do
it
'shows the total weight when sum is greater than zero'
do
create
(
:issue
,
project:
project
,
milestone:
milestone
,
weight:
3
)
create
(
:issue
,
project:
project
,
milestone:
milestone
,
weight:
3
)
create
(
:issue
,
project:
project
,
milestone:
milestone
,
weight:
1
)
create
(
:issue
,
project:
project
,
milestone:
milestone
,
weight:
1
)
visit
milestone_path
visit
milestone_path
within
'.milestone-s
ummary
'
do
within
'.milestone-s
idebar
'
do
expect
(
page
).
to
have_content
'Total
weight:
4'
expect
(
page
).
to
have_content
'Total
issue weight
4'
end
end
end
end
it
'hides the total weight when sum is equal to zero'
do
it
'hides the total weight when sum is equal to zero'
do
create
(
:issue
,
project:
project
,
milestone:
milestone
,
weight:
nil
)
create
(
:issue
,
project:
project
,
milestone:
milestone
,
weight:
nil
)
create
(
:issue
,
project:
project
,
milestone:
milestone
,
weight:
nil
)
create
(
:issue
,
project:
project
,
milestone:
milestone
,
weight:
nil
)
visit
milestone_path
visit
milestone_path
within
'.milestone-s
ummary
'
do
within
'.milestone-s
idebar
'
do
expect
(
page
).
not_to
have_content
'Total weight:
'
expect
(
page
).
to
have_content
'Total issue weight None
'
end
end
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