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
3460dd0a
Commit
3460dd0a
authored
Oct 12, 2016
by
Phil Hughes
Committed by
Douglas Barbosa Alexandre
Oct 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some tests
Updated generate URL
parent
098d461c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
11 deletions
+13
-11
app/assets/javascripts/boards/components/boards_selector.js.es6
...sets/javascripts/boards/components/boards_selector.js.es6
+1
-1
app/assets/javascripts/boards/services/board_service.js.es6
app/assets/javascripts/boards/services/board_service.js.es6
+5
-2
app/views/projects/boards/_title.html.haml
app/views/projects/boards/_title.html.haml
+0
-1
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+7
-7
No files found.
app/assets/javascripts/boards/components/boards_selector.js.es6
View file @
3460dd0a
...
...
@@ -61,7 +61,7 @@
}
if (this.open && !this.boards.length) {
this.$http.get(this.endpoint
).then((resp) => {
gl.boardService.allBoards(
).then((resp) => {
this.loading = false;
this.boards = resp.json();
});
...
...
app/assets/javascripts/boards/services/board_service.js.es6
View file @
3460dd0a
...
...
@@ -2,8 +2,7 @@ class BoardService {
constructor (root, boardId) {
Vue.http.options.root = root;
this.boards = Vue.resource(`${root}{/id}`);
this.boards = Vue.resource(`${root}{/id}.json`);
this.lists = Vue.resource(`${root}/${boardId}/lists{/id}`, {}, {
generate: {
method: 'POST',
...
...
@@ -19,6 +18,10 @@ class BoardService {
});
}
allBoards () {
return this.boards.get();
}
createBoard (board) {
if (board.id) {
return this.boards.update({ id: board.id }, board);
...
...
app/views/projects/boards/_title.html.haml
View file @
3460dd0a
%boards-selector
{
"inline-template"
=>
true
,
endpoint:
namespace_project_boards_path
(
@project
.
namespace
,
@project
,
:json
),
":current-board"
=>
"#{board.to_json}"
}
.boards-title-holder.dropdown
%button
.boards-switcher
{
"@click"
=>
"loadBoards"
,
...
...
spec/features/boards/boards_spec.rb
View file @
3460dd0a
...
...
@@ -5,7 +5,7 @@ describe 'Issue Boards', feature: true, js: true do
include
WaitForVueResource
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
let!
(
:user2
)
{
create
(
:user
)
}
...
...
@@ -18,7 +18,7 @@ describe 'Issue Boards', feature: true, js: true do
context
'no lists'
do
before
do
visit
namespace_project_board
_path
(
project
.
namespace
,
project
,
board
)
visit
namespace_project_board
s_path
(
project
.
namespace
,
project
)
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.board'
,
count:
3
)
end
...
...
@@ -76,7 +76,7 @@ describe 'Issue Boards', feature: true, js: true do
let!
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
testing
,
bug
,
accepting
])
}
before
do
visit
namespace_project_board
_path
(
project
.
namespace
,
project
,
board
)
visit
namespace_project_board
s_path
(
project
.
namespace
,
project
)
wait_for_vue_resource
...
...
@@ -170,7 +170,7 @@ describe 'Issue Boards', feature: true, js: true do
create
(
:issue
,
project:
project
)
end
visit
namespace_project_board
_path
(
project
.
namespace
,
project
,
board
)
visit
namespace_project_board
s_path
(
project
.
namespace
,
project
)
wait_for_vue_resource
page
.
within
(
find
(
'.board'
,
match: :first
))
do
...
...
@@ -604,7 +604,7 @@ describe 'Issue Boards', feature: true, js: true do
context
'keyboard shortcuts'
do
before
do
visit
namespace_project_board
_path
(
project
.
namespace
,
project
,
board
)
visit
namespace_project_board
s_path
(
project
.
namespace
,
project
)
wait_for_vue_resource
end
...
...
@@ -617,7 +617,7 @@ describe 'Issue Boards', feature: true, js: true do
context
'signed out user'
do
before
do
logout
visit
namespace_project_board
_path
(
project
.
namespace
,
project
,
board
)
visit
namespace_project_board
s_path
(
project
.
namespace
,
project
)
wait_for_vue_resource
end
...
...
@@ -633,7 +633,7 @@ describe 'Issue Boards', feature: true, js: true do
project
.
team
<<
[
user_guest
,
:guest
]
logout
login_as
(
user_guest
)
visit
namespace_project_board
_path
(
project
.
namespace
,
project
,
board
)
visit
namespace_project_board
s_path
(
project
.
namespace
,
project
)
wait_for_vue_resource
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