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 {
...
@@ -82,7 +82,7 @@ export default {
this
.
showIssueForm
=
!
this
.
showIssueForm
;
this
.
showIssueForm
=
!
this
.
showIssueForm
;
},
},
onScroll
()
{
onScroll
()
{
if
(
(
this
.
scrollTop
()
>
this
.
scrollHeight
()
-
this
.
scrollOffset
)
&&
!
this
.
list
.
loadingMore
)
{
if
(
!
this
.
list
.
loadingMore
&&
(
this
.
scrollTop
()
>
this
.
scrollHeight
()
-
this
.
scrollOffset
)
)
{
this
.
loadNextPage
();
this
.
loadNextPage
();
}
}
},
},
...
@@ -163,7 +163,7 @@ export default {
...
@@ -163,7 +163,7 @@ export default {
this
.
$refs
.
list
.
removeEventListener
(
'
scroll
'
,
this
.
onScroll
);
this
.
$refs
.
list
.
removeEventListener
(
'
scroll
'
,
this
.
onScroll
);
},
},
template
:
`
template
:
`
<
transition-group tag="div"
class="board-list-component">
<
div
class="board-list-component">
<div
<div
key="loading"
key="loading"
class="board-list-loading text-center"
class="board-list-loading text-center"
...
@@ -212,6 +212,6 @@ export default {
...
@@ -212,6 +212,6 @@ export default {
</span>
</span>
</li>
</li>
</ul>
</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({
...
@@ -33,7 +33,9 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
const
issue
=
this
.
issue
;
const
issue
=
this
.
issue
;
const
lists
=
issue
.
getLists
();
const
lists
=
issue
.
getLists
();
const
listLabelIds
=
lists
.
map
(
list
=>
list
.
label
.
id
);
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
=
{
const
data
=
{
issue
:
{
issue
:
{
label_ids
:
labelIds
,
label_ids
:
labelIds
,
...
...
app/assets/javascripts/boards/models/issue.js
View file @
fb77b058
...
@@ -94,7 +94,8 @@ class ListIssue {
...
@@ -94,7 +94,8 @@ class ListIssue {
data
.
issue
.
label_ids
=
[
''
];
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 {
...
@@ -111,6 +111,7 @@ class List {
.
then
(
resp
=>
resp
.
json
())
.
then
(
resp
=>
resp
.
json
())
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
issue
.
id
=
data
.
id
;
issue
.
id
=
data
.
id
;
issue
.
iid
=
data
.
iid
;
issue
.
milestone
=
data
.
milestone
;
issue
.
milestone
=
data
.
milestone
;
if
(
this
.
issuesSize
>
1
)
{
if
(
this
.
issuesSize
>
1
)
{
...
...
spec/javascripts/boards/boards_store_spec.js
View file @
fb77b058
...
@@ -17,7 +17,7 @@ import '~/boards/services/board_service';
...
@@ -17,7 +17,7 @@ import '~/boards/services/board_service';
import
'
~/boards/stores/boards_store
'
;
import
'
~/boards/stores/boards_store
'
;
import
{
mockBoardService
}
from
'
./mock_data
'
;
import
{
mockBoardService
}
from
'
./mock_data
'
;
f
describe
(
'
Store
'
,
()
=>
{
describe
(
'
Store
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
Vue
.
http
.
interceptors
.
push
(
boardsMockInterceptor
);
Vue
.
http
.
interceptors
.
push
(
boardsMockInterceptor
);
gl
.
boardService
=
mockBoardService
();
gl
.
boardService
=
mockBoardService
();
...
@@ -210,6 +210,7 @@ fdescribe('Store', () => {
...
@@ -210,6 +210,7 @@ fdescribe('Store', () => {
it
(
'
moves issue in list
'
,
(
done
)
=>
{
it
(
'
moves issue in list
'
,
(
done
)
=>
{
const
issue
=
new
ListIssue
({
const
issue
=
new
ListIssue
({
title
:
'
Testing
'
,
title
:
'
Testing
'
,
id
:
2
,
iid
:
2
,
iid
:
2
,
confidential
:
false
,
confidential
:
false
,
labels
:
[],
labels
:
[],
...
...
spec/javascripts/boards/issue_card_spec.js
View file @
fb77b058
...
@@ -37,6 +37,7 @@ describe('Issue card component', () => {
...
@@ -37,6 +37,7 @@ describe('Issue card component', () => {
list
=
listObj
;
list
=
listObj
;
issue
=
new
ListIssue
({
issue
=
new
ListIssue
({
title
:
'
Testing
'
,
title
:
'
Testing
'
,
id
:
1
,
iid
:
1
,
iid
:
1
,
confidential
:
false
,
confidential
:
false
,
labels
:
[
list
.
label
],
labels
:
[
list
.
label
],
...
...
spec/javascripts/boards/issue_spec.js
View file @
fb77b058
...
@@ -21,6 +21,7 @@ describe('Issue model', () => {
...
@@ -21,6 +21,7 @@ describe('Issue model', () => {
issue
=
new
ListIssue
({
issue
=
new
ListIssue
({
title
:
'
Testing
'
,
title
:
'
Testing
'
,
id
:
1
,
iid
:
1
,
iid
:
1
,
confidential
:
false
,
confidential
:
false
,
labels
:
[{
labels
:
[{
...
...
spec/javascripts/boards/list_spec.js
View file @
fb77b058
...
@@ -23,10 +23,7 @@ describe('List model', () => {
...
@@ -23,10 +23,7 @@ describe('List model', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
Vue
.
http
.
interceptors
.
push
(
boardsMockInterceptor
);
Vue
.
http
.
interceptors
.
push
(
boardsMockInterceptor
);
gl
.
boardService
=
mockBoardService
({
gl
.
boardService
=
mockBoardService
({
boardsEndpoint
:
'
/test/issue-boards/board
'
,
listsEndpoint
:
'
/boards/1
'
,
bulkUpdatePath
:
'
/test/issue-boards/board/1/lists
'
,
bulkUpdatePath
:
'
/test/issue-boards/board/1/lists
'
,
boardId
:
'
1
'
,
});
});
gl
.
issueBoards
.
BoardsStore
.
create
();
gl
.
issueBoards
.
BoardsStore
.
create
();
...
...
spec/javascripts/boards/mock_data.js
View file @
fb77b058
...
@@ -44,24 +44,13 @@ const BoardsMockData = {
...
@@ -44,24 +44,13 @@ const BoardsMockData = {
assignees
:
[],
assignees
:
[],
}],
}],
},
},
'
/boards/1{/id}/issues
'
:
{
issues
:
[{
title
:
'
Testing
'
,
id
:
1
,
iid
:
1
,
confidential
:
false
,
labels
:
[],
assignees
:
[],
}],
size
:
1
},
'
/test/issue-boards/milestones.json
'
:
[{
'
/test/issue-boards/milestones.json
'
:
[{
id
:
1
,
id
:
1
,
title
:
'
test
'
,
title
:
'
test
'
,
}],
}],
},
},
'
POST
'
:
{
'
POST
'
:
{
'
/boards/1{/id}
'
:
listObj
'
/
test/
boards/1{/id}
'
:
listObj
},
},
'
PUT
'
:
{
'
PUT
'
:
{
'
/test/issue-boards/board/1/lists{/id}
'
:
{}
'
/test/issue-boards/board/1/lists{/id}
'
:
{}
...
...
spec/javascripts/boards/modal_store_spec.js
View file @
fb77b058
...
@@ -18,6 +18,7 @@ describe('Modal store', () => {
...
@@ -18,6 +18,7 @@ describe('Modal store', () => {
issue
=
new
ListIssue
({
issue
=
new
ListIssue
({
title
:
'
Testing
'
,
title
:
'
Testing
'
,
id
:
1
,
iid
:
1
,
iid
:
1
,
confidential
:
false
,
confidential
:
false
,
labels
:
[],
labels
:
[],
...
@@ -25,6 +26,7 @@ describe('Modal store', () => {
...
@@ -25,6 +26,7 @@ describe('Modal store', () => {
});
});
issue2
=
new
ListIssue
({
issue2
=
new
ListIssue
({
title
:
'
Testing
'
,
title
:
'
Testing
'
,
id
:
2
,
iid
:
2
,
iid
:
2
,
confidential
:
false
,
confidential
:
false
,
labels
:
[],
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