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
7e6026ca
Commit
7e6026ca
authored
Mar 10, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated specs
parent
c24d849f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
app/assets/javascripts/boards/components/board_new_form.js
app/assets/javascripts/boards/components/board_new_form.js
+9
-2
spec/features/boards/board_with_milestone_spec.rb
spec/features/boards/board_with_milestone_spec.rb
+5
-4
No files found.
app/assets/javascripts/boards/components/board_new_form.js
View file @
7e6026ca
...
...
@@ -59,6 +59,9 @@ const extraMilestones = require('../mixins/extra_milestones');
},
},
methods
:
{
refreshPage
()
{
location
.
href
=
location
.
pathname
;
},
loadMilestones
(
e
)
{
this
.
milestoneDropdownOpen
=
!
this
.
milestoneDropdownOpen
;
BoardService
.
loadMilestones
.
call
(
this
);
...
...
@@ -78,8 +81,12 @@ const extraMilestones = require('../mixins/extra_milestones');
gl
.
boardService
.
createBoard
(
this
.
board
)
.
then
(()
=>
{
if
(
this
.
currentBoard
&&
this
.
currentPage
!==
'
new
'
)
{
// We reload the page to make sure the store & state of the app are correct
location
.
reload
();
this
.
currentBoard
.
name
=
this
.
board
.
name
;
if
(
this
.
currentPage
===
'
milestone
'
)
{
// We reload the page to make sure the store & state of the app are correct
this
.
refreshPage
();
}
}
// Enable the button thanks to our jQuery disabling it
...
...
spec/features/boards/board_with_milestone_spec.rb
View file @
7e6026ca
...
...
@@ -26,7 +26,7 @@ describe 'Board with milestone', :feature, :js do
click_link
'test'
expect
(
find
(
'.
js-milestone-select
'
)).
to
have_content
(
milestone
.
title
)
expect
(
find
(
'.
tokens-container
'
)).
to
have_content
(
milestone
.
title
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
1
)
end
end
...
...
@@ -48,21 +48,22 @@ describe 'Board with milestone', :feature, :js do
click_link
board
.
name
end
expect
(
find
(
'.
js-milestone-select
'
)).
to
have_content
(
milestone
.
title
)
expect
(
find
(
'.
tokens-container
'
)).
to
have_content
(
milestone
.
title
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
1
)
end
it
'sets board to any milestone'
do
update_board_milestone
(
'Any Milestone'
)
expect
(
find
(
'.js-milestone-select'
)).
not_to
have_content
(
milestone
.
title
)
expect
(
page
).
not_to
have_css
(
'.js-visual-token'
)
expect
(
find
(
'.tokens-container'
)).
not_to
have_content
(
milestone
.
title
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
2
)
end
it
'sets board to upcoming milestone'
do
update_board_milestone
(
'Upcoming'
)
expect
(
find
(
'.
js-milestone-select
'
)).
not_to
have_content
(
milestone
.
title
)
expect
(
find
(
'.
tokens-container
'
)).
not_to
have_content
(
milestone
.
title
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
0
)
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