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
82ea4355
Commit
82ea4355
authored
Apr 22, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests
parent
5f66bfe7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
1 deletion
+59
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+59
-1
No files found.
spec/features/issues_spec.rb
View file @
82ea4355
...
...
@@ -64,6 +64,64 @@ describe 'Issues', feature: true do
end
end
describe
'due date'
,
js:
true
do
context
'on new form'
do
before
do
visit
new_namespace_project_issue_path
(
project
.
namespace
,
project
)
end
it
'should save with due date'
do
date
=
Date
.
today
.
at_beginning_of_month
fill_in
'issue_title'
,
with:
'bug 345'
fill_in
'issue_description'
,
with:
'bug description'
page
.
within
'.datepicker'
do
click_link
date
.
day
end
expect
(
find
(
'#issuable-due-date'
,
:visible
=>
false
).
value
).
to
eq
date
.
to_s
click_button
'Submit issue'
page
.
within
'.issuable-sidebar'
do
expect
(
page
).
to
have_content
date
.
to_s
(
:medium
)
end
end
end
context
'on edit form'
do
let
(
:issue
)
{
create
(
:issue
,
author:
@user
,
project:
project
,
due_date:
Date
.
today
.
at_beginning_of_month
.
to_s
)
}
before
do
visit
edit_namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
end
it
'should save with due date'
do
date
=
Date
.
today
.
at_beginning_of_month
expect
(
find
(
'#issuable-due-date'
,
:visible
=>
false
).
value
).
to
eq
date
.
to_s
date
=
date
.
tomorrow
fill_in
'issue_title'
,
with:
'bug 345'
fill_in
'issue_description'
,
with:
'bug description'
page
.
within
'.datepicker'
do
click_link
date
.
day
end
expect
(
find
(
'#issuable-due-date'
,
:visible
=>
false
).
value
).
to
eq
date
.
to_s
click_button
'Save changes'
page
.
within
'.issuable-sidebar'
do
expect
(
page
).
to
have_content
date
.
to_s
(
:medium
)
end
end
end
end
describe
'Issue info'
do
it
'excludes award_emoji from comment count'
do
issue
=
create
(
:issue
,
author:
@user
,
assignee:
@user
,
project:
project
,
title:
'foobar'
)
...
...
@@ -331,7 +389,7 @@ describe 'Issues', feature: true do
page
.
within
'.assignee'
do
click_link
'Edit'
end
page
.
within
'.dropdown-menu-user'
do
click_link
@user
.
name
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