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
fb77b058
Commit
fb77b058
authored
Aug 24, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix remaining karma tests
parent
6c402008
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
16 additions
and
21 deletions
+16
-21
app/assets/javascripts/boards/components/board_list.js
app/assets/javascripts/boards/components/board_list.js
+3
-3
app/assets/javascripts/boards/components/sidebar/remove_issue.js
...ets/javascripts/boards/components/sidebar/remove_issue.js
+3
-1
app/assets/javascripts/boards/models/issue.js
app/assets/javascripts/boards/models/issue.js
+2
-1
app/assets/javascripts/boards/models/list.js
app/assets/javascripts/boards/models/list.js
+1
-0
spec/javascripts/boards/boards_store_spec.js
spec/javascripts/boards/boards_store_spec.js
+2
-1
spec/javascripts/boards/issue_card_spec.js
spec/javascripts/boards/issue_card_spec.js
+1
-0
spec/javascripts/boards/issue_spec.js
spec/javascripts/boards/issue_spec.js
+1
-0
spec/javascripts/boards/list_spec.js
spec/javascripts/boards/list_spec.js
+0
-3
spec/javascripts/boards/mock_data.js
spec/javascripts/boards/mock_data.js
+1
-12
spec/javascripts/boards/modal_store_spec.js
spec/javascripts/boards/modal_store_spec.js
+2
-0
No files found.
app/assets/javascripts/boards/components/board_list.js
View file @
fb77b058
...
...
@@ -82,7 +82,7 @@ export default {
this
.
showIssueForm
=
!
this
.
showIssueForm
;
},
onScroll
()
{
if
(
(
this
.
scrollTop
()
>
this
.
scrollHeight
()
-
this
.
scrollOffset
)
&&
!
this
.
list
.
loadingMore
)
{
if
(
!
this
.
list
.
loadingMore
&&
(
this
.
scrollTop
()
>
this
.
scrollHeight
()
-
this
.
scrollOffset
)
)
{
this
.
loadNextPage
();
}
},
...
...
@@ -163,7 +163,7 @@ export default {
this
.
$refs
.
list
.
removeEventListener
(
'
scroll
'
,
this
.
onScroll
);
},
template
:
`
<
transition-group tag="div"
class="board-list-component">
<
div
class="board-list-component">
<div
key="loading"
class="board-list-loading text-center"
...
...
@@ -212,6 +212,6 @@ export default {
</span>
</li>
</ul>
</
transition-group
>
</
div
>
`
,
};
app/assets/javascripts/boards/components/sidebar/remove_issue.js
View file @
fb77b058
...
...
@@ -33,7 +33,9 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
const
issue
=
this
.
issue
;
const
lists
=
issue
.
getLists
();
const
listLabelIds
=
lists
.
map
(
list
=>
list
.
label
.
id
);
const
labelIds
=
this
.
issue
.
labels
.
map
(
label
=>
label
.
id
).
filter
(
id
=>
!
listLabelIds
.
includes
(
id
));
const
labelIds
=
this
.
issue
.
labels
.
map
(
label
=>
label
.
id
)
.
filter
(
id
=>
!
listLabelIds
.
includes
(
id
));
const
data
=
{
issue
:
{
label_ids
:
labelIds
,
...
...
app/assets/javascripts/boards/models/issue.js
View file @
fb77b058
...
...
@@ -94,7 +94,8 @@ class ListIssue {
data
.
issue
.
label_ids
=
[
''
];
}
return
Vue
.
http
.
patch
(
url
.
replace
(
'
:project_path
'
,
this
.
project
.
path
),
data
);
const
projectPath
=
this
.
project
?
this
.
project
.
path
:
''
;
return
Vue
.
http
.
patch
(
url
.
replace
(
'
:project_path
'
,
projectPath
),
data
);
}
}
...
...
app/assets/javascripts/boards/models/list.js
View file @
fb77b058
...
...
@@ -111,6 +111,7 @@ class List {
.
then
(
resp
=>
resp
.
json
())
.
then
((
data
)
=>
{
issue
.
id
=
data
.
id
;
issue
.
iid
=
data
.
iid
;
issue
.
milestone
=
data
.
milestone
;
if
(
this
.
issuesSize
>
1
)
{
...
...
spec/javascripts/boards/boards_store_spec.js
View file @
fb77b058
...
...
@@ -17,7 +17,7 @@ import '~/boards/services/board_service';
import
'
~/boards/stores/boards_store
'
;
import
{
mockBoardService
}
from
'
./mock_data
'
;
f
describe
(
'
Store
'
,
()
=>
{
describe
(
'
Store
'
,
()
=>
{
beforeEach
(()
=>
{
Vue
.
http
.
interceptors
.
push
(
boardsMockInterceptor
);
gl
.
boardService
=
mockBoardService
();
...
...
@@ -210,6 +210,7 @@ fdescribe('Store', () => {
it
(
'
moves issue in list
'
,
(
done
)
=>
{
const
issue
=
new
ListIssue
({
title
:
'
Testing
'
,
id
:
2
,
iid
:
2
,
confidential
:
false
,
labels
:
[],
...
...
spec/javascripts/boards/issue_card_spec.js
View file @
fb77b058
...
...
@@ -37,6 +37,7 @@ describe('Issue card component', () => {
list
=
listObj
;
issue
=
new
ListIssue
({
title
:
'
Testing
'
,
id
:
1
,
iid
:
1
,
confidential
:
false
,
labels
:
[
list
.
label
],
...
...
spec/javascripts/boards/issue_spec.js
View file @
fb77b058
...
...
@@ -21,6 +21,7 @@ describe('Issue model', () => {
issue
=
new
ListIssue
({
title
:
'
Testing
'
,
id
:
1
,
iid
:
1
,
confidential
:
false
,
labels
:
[{
...
...
spec/javascripts/boards/list_spec.js
View file @
fb77b058
...
...
@@ -23,10 +23,7 @@ describe('List model', () => {
beforeEach
(()
=>
{
Vue
.
http
.
interceptors
.
push
(
boardsMockInterceptor
);
gl
.
boardService
=
mockBoardService
({
boardsEndpoint
:
'
/test/issue-boards/board
'
,
listsEndpoint
:
'
/boards/1
'
,
bulkUpdatePath
:
'
/test/issue-boards/board/1/lists
'
,
boardId
:
'
1
'
,
});
gl
.
issueBoards
.
BoardsStore
.
create
();
...
...
spec/javascripts/boards/mock_data.js
View file @
fb77b058
...
...
@@ -44,24 +44,13 @@ const BoardsMockData = {
assignees
:
[],
}],
},
'
/boards/1{/id}/issues
'
:
{
issues
:
[{
title
:
'
Testing
'
,
id
:
1
,
iid
:
1
,
confidential
:
false
,
labels
:
[],
assignees
:
[],
}],
size
:
1
},
'
/test/issue-boards/milestones.json
'
:
[{
id
:
1
,
title
:
'
test
'
,
}],
},
'
POST
'
:
{
'
/boards/1{/id}
'
:
listObj
'
/
test/
boards/1{/id}
'
:
listObj
},
'
PUT
'
:
{
'
/test/issue-boards/board/1/lists{/id}
'
:
{}
...
...
spec/javascripts/boards/modal_store_spec.js
View file @
fb77b058
...
...
@@ -18,6 +18,7 @@ describe('Modal store', () => {
issue
=
new
ListIssue
({
title
:
'
Testing
'
,
id
:
1
,
iid
:
1
,
confidential
:
false
,
labels
:
[],
...
...
@@ -25,6 +26,7 @@ describe('Modal store', () => {
});
issue2
=
new
ListIssue
({
title
:
'
Testing
'
,
id
:
2
,
iid
:
2
,
confidential
:
false
,
labels
:
[],
...
...
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