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
Boxiang Sun
gitlab-ce
Commits
3e417f4b
Commit
3e417f4b
authored
May 20, 2019
by
Winnie Hellmann
Committed by
Phil Hughes
May 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create empty Vuex store for issue boards
parent
0c1cd36a
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
363 additions
and
0 deletions
+363
-0
app/assets/javascripts/boards/stores/actions.js
app/assets/javascripts/boards/stores/actions.js
+65
-0
app/assets/javascripts/boards/stores/index.js
app/assets/javascripts/boards/stores/index.js
+14
-0
app/assets/javascripts/boards/stores/mutation_types.js
app/assets/javascripts/boards/stores/mutation_types.js
+21
-0
app/assets/javascripts/boards/stores/mutations.js
app/assets/javascripts/boards/stores/mutations.js
+91
-0
app/assets/javascripts/boards/stores/state.js
app/assets/javascripts/boards/stores/state.js
+3
-0
spec/frontend/boards/stores/actions_spec.js
spec/frontend/boards/stores/actions_spec.js
+67
-0
spec/frontend/boards/stores/mutations_spec.js
spec/frontend/boards/stores/mutations_spec.js
+91
-0
spec/frontend/boards/stores/state_spec.js
spec/frontend/boards/stores/state_spec.js
+11
-0
No files found.
app/assets/javascripts/boards/stores/actions.js
0 → 100644
View file @
3e417f4b
const
notImplemented
=
()
=>
{
throw
new
Error
(
'
Not implemented!
'
);
};
export
default
{
setEndpoints
:
()
=>
{
notImplemented
();
},
fetchLists
:
()
=>
{
notImplemented
();
},
generateDefaultLists
:
()
=>
{
notImplemented
();
},
createList
:
()
=>
{
notImplemented
();
},
updateList
:
()
=>
{
notImplemented
();
},
deleteList
:
()
=>
{
notImplemented
();
},
fetchIssuesForList
:
()
=>
{
notImplemented
();
},
moveIssue
:
()
=>
{
notImplemented
();
},
createNewIssue
:
()
=>
{
notImplemented
();
},
fetchBacklog
:
()
=>
{
notImplemented
();
},
bulkUpdateIssues
:
()
=>
{
notImplemented
();
},
fetchIssue
:
()
=>
{
notImplemented
();
},
toggleIssueSubscription
:
()
=>
{
notImplemented
();
},
showPage
:
()
=>
{
notImplemented
();
},
toggleEmptyState
:
()
=>
{
notImplemented
();
},
};
app/assets/javascripts/boards/stores/index.js
0 → 100644
View file @
3e417f4b
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
state
from
'
ee_else_ce/boards/stores/state
'
;
import
actions
from
'
ee_else_ce/boards/stores/actions
'
;
import
mutations
from
'
ee_else_ce/boards/stores/mutations
'
;
Vue
.
use
(
Vuex
);
export
default
()
=>
new
Vuex
.
Store
({
state
,
actions
,
mutations
,
});
app/assets/javascripts/boards/stores/mutation_types.js
0 → 100644
View file @
3e417f4b
export
const
SET_ENDPOINTS
=
'
SET_ENDPOINTS
'
;
export
const
REQUEST_ADD_LIST
=
'
REQUEST_ADD_LIST
'
;
export
const
RECEIVE_ADD_LIST_SUCCESS
=
'
RECEIVE_ADD_LIST_SUCCESS
'
;
export
const
RECEIVE_ADD_LIST_ERROR
=
'
RECEIVE_ADD_LIST_ERROR
'
;
export
const
REQUEST_UPDATE_LIST
=
'
REQUEST_UPDATE_LIST
'
;
export
const
RECEIVE_UPDATE_LIST_SUCCESS
=
'
RECEIVE_UPDATE_LIST_SUCCESS
'
;
export
const
RECEIVE_UPDATE_LIST_ERROR
=
'
RECEIVE_UPDATE_LIST_ERROR
'
;
export
const
REQUEST_REMOVE_LIST
=
'
REQUEST_REMOVE_LIST
'
;
export
const
RECEIVE_REMOVE_LIST_SUCCESS
=
'
RECEIVE_REMOVE_LIST_SUCCESS
'
;
export
const
RECEIVE_REMOVE_LIST_ERROR
=
'
RECEIVE_REMOVE_LIST_ERROR
'
;
export
const
REQUEST_ADD_ISSUE
=
'
REQUEST_ADD_ISSUE
'
;
export
const
RECEIVE_ADD_ISSUE_SUCCESS
=
'
RECEIVE_ADD_ISSUE_SUCCESS
'
;
export
const
RECEIVE_ADD_ISSUE_ERROR
=
'
RECEIVE_ADD_ISSUE_ERROR
'
;
export
const
REQUEST_MOVE_ISSUE
=
'
REQUEST_MOVE_ISSUE
'
;
export
const
RECEIVE_MOVE_ISSUE_SUCCESS
=
'
RECEIVE_MOVE_ISSUE_SUCCESS
'
;
export
const
RECEIVE_MOVE_ISSUE_ERROR
=
'
RECEIVE_MOVE_ISSUE_ERROR
'
;
export
const
REQUEST_UPDATE_ISSUE
=
'
REQUEST_UPDATE_ISSUE
'
;
export
const
RECEIVE_UPDATE_ISSUE_SUCCESS
=
'
RECEIVE_UPDATE_ISSUE_SUCCESS
'
;
export
const
RECEIVE_UPDATE_ISSUE_ERROR
=
'
RECEIVE_UPDATE_ISSUE_ERROR
'
;
export
const
SET_CURRENT_PAGE
=
'
SET_CURRENT_PAGE
'
;
export
const
TOGGLE_EMPTY_STATE
=
'
TOGGLE_EMPTY_STATE
'
;
app/assets/javascripts/boards/stores/mutations.js
0 → 100644
View file @
3e417f4b
import
*
as
mutationTypes
from
'
./mutation_types
'
;
const
notImplemented
=
()
=>
{
throw
new
Error
(
'
Not implemented!
'
);
};
export
default
{
[
mutationTypes
.
SET_ENDPOINTS
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
REQUEST_ADD_LIST
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_ADD_LIST_SUCCESS
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_ADD_LIST_ERROR
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
REQUEST_UPDATE_LIST
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_UPDATE_LIST_SUCCESS
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_UPDATE_LIST_ERROR
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
REQUEST_REMOVE_LIST
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_REMOVE_LIST_SUCCESS
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_REMOVE_LIST_ERROR
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
REQUEST_ADD_ISSUE
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_ADD_ISSUE_SUCCESS
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_ADD_ISSUE_ERROR
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
REQUEST_MOVE_ISSUE
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_MOVE_ISSUE_SUCCESS
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_MOVE_ISSUE_ERROR
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
REQUEST_UPDATE_ISSUE
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_UPDATE_ISSUE_SUCCESS
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
RECEIVE_UPDATE_ISSUE_ERROR
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
SET_CURRENT_PAGE
]:
()
=>
{
notImplemented
();
},
[
mutationTypes
.
TOGGLE_EMPTY_STATE
]:
()
=>
{
notImplemented
();
},
};
app/assets/javascripts/boards/stores/state.js
0 → 100644
View file @
3e417f4b
export
default
()
=>
({
// ...
});
spec/frontend/boards/stores/actions_spec.js
0 → 100644
View file @
3e417f4b
import
actions
from
'
~/boards/stores/actions
'
;
const
expectNotImplemented
=
action
=>
{
it
(
'
is not implemented
'
,
()
=>
{
expect
(
action
).
toThrow
(
new
Error
(
'
Not implemented!
'
));
});
};
describe
(
'
setEndpoints
'
,
()
=>
{
expectNotImplemented
(
actions
.
setEndpoints
);
});
describe
(
'
fetchLists
'
,
()
=>
{
expectNotImplemented
(
actions
.
fetchLists
);
});
describe
(
'
generateDefaultLists
'
,
()
=>
{
expectNotImplemented
(
actions
.
generateDefaultLists
);
});
describe
(
'
createList
'
,
()
=>
{
expectNotImplemented
(
actions
.
createList
);
});
describe
(
'
updateList
'
,
()
=>
{
expectNotImplemented
(
actions
.
updateList
);
});
describe
(
'
deleteList
'
,
()
=>
{
expectNotImplemented
(
actions
.
deleteList
);
});
describe
(
'
fetchIssuesForList
'
,
()
=>
{
expectNotImplemented
(
actions
.
fetchIssuesForList
);
});
describe
(
'
moveIssue
'
,
()
=>
{
expectNotImplemented
(
actions
.
moveIssue
);
});
describe
(
'
createNewIssue
'
,
()
=>
{
expectNotImplemented
(
actions
.
createNewIssue
);
});
describe
(
'
fetchBacklog
'
,
()
=>
{
expectNotImplemented
(
actions
.
fetchBacklog
);
});
describe
(
'
bulkUpdateIssues
'
,
()
=>
{
expectNotImplemented
(
actions
.
bulkUpdateIssues
);
});
describe
(
'
fetchIssue
'
,
()
=>
{
expectNotImplemented
(
actions
.
fetchIssue
);
});
describe
(
'
toggleIssueSubscription
'
,
()
=>
{
expectNotImplemented
(
actions
.
toggleIssueSubscription
);
});
describe
(
'
showPage
'
,
()
=>
{
expectNotImplemented
(
actions
.
showPage
);
});
describe
(
'
toggleEmptyState
'
,
()
=>
{
expectNotImplemented
(
actions
.
toggleEmptyState
);
});
spec/frontend/boards/stores/mutations_spec.js
0 → 100644
View file @
3e417f4b
import
mutations
from
'
~/boards/stores/mutations
'
;
const
expectNotImplemented
=
action
=>
{
it
(
'
is not implemented
'
,
()
=>
{
expect
(
action
).
toThrow
(
new
Error
(
'
Not implemented!
'
));
});
};
describe
(
'
SET_ENDPOINTS
'
,
()
=>
{
expectNotImplemented
(
mutations
.
SET_ENDPOINTS
);
});
describe
(
'
REQUEST_ADD_LIST
'
,
()
=>
{
expectNotImplemented
(
mutations
.
REQUEST_ADD_LIST
);
});
describe
(
'
RECEIVE_ADD_LIST_SUCCESS
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_ADD_LIST_SUCCESS
);
});
describe
(
'
RECEIVE_ADD_LIST_ERROR
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_ADD_LIST_ERROR
);
});
describe
(
'
REQUEST_UPDATE_LIST
'
,
()
=>
{
expectNotImplemented
(
mutations
.
REQUEST_UPDATE_LIST
);
});
describe
(
'
RECEIVE_UPDATE_LIST_SUCCESS
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_UPDATE_LIST_SUCCESS
);
});
describe
(
'
RECEIVE_UPDATE_LIST_ERROR
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_UPDATE_LIST_ERROR
);
});
describe
(
'
REQUEST_REMOVE_LIST
'
,
()
=>
{
expectNotImplemented
(
mutations
.
REQUEST_REMOVE_LIST
);
});
describe
(
'
RECEIVE_REMOVE_LIST_SUCCESS
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_REMOVE_LIST_SUCCESS
);
});
describe
(
'
RECEIVE_REMOVE_LIST_ERROR
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_REMOVE_LIST_ERROR
);
});
describe
(
'
REQUEST_ADD_ISSUE
'
,
()
=>
{
expectNotImplemented
(
mutations
.
REQUEST_ADD_ISSUE
);
});
describe
(
'
RECEIVE_ADD_ISSUE_SUCCESS
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_ADD_ISSUE_SUCCESS
);
});
describe
(
'
RECEIVE_ADD_ISSUE_ERROR
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_ADD_ISSUE_ERROR
);
});
describe
(
'
REQUEST_MOVE_ISSUE
'
,
()
=>
{
expectNotImplemented
(
mutations
.
REQUEST_MOVE_ISSUE
);
});
describe
(
'
RECEIVE_MOVE_ISSUE_SUCCESS
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_MOVE_ISSUE_SUCCESS
);
});
describe
(
'
RECEIVE_MOVE_ISSUE_ERROR
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_MOVE_ISSUE_ERROR
);
});
describe
(
'
REQUEST_UPDATE_ISSUE
'
,
()
=>
{
expectNotImplemented
(
mutations
.
REQUEST_UPDATE_ISSUE
);
});
describe
(
'
RECEIVE_UPDATE_ISSUE_SUCCESS
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_UPDATE_ISSUE_SUCCESS
);
});
describe
(
'
RECEIVE_UPDATE_ISSUE_ERROR
'
,
()
=>
{
expectNotImplemented
(
mutations
.
RECEIVE_UPDATE_ISSUE_ERROR
);
});
describe
(
'
SET_CURRENT_PAGE
'
,
()
=>
{
expectNotImplemented
(
mutations
.
SET_CURRENT_PAGE
);
});
describe
(
'
TOGGLE_EMPTY_STATE
'
,
()
=>
{
expectNotImplemented
(
mutations
.
TOGGLE_EMPTY_STATE
);
});
spec/frontend/boards/stores/state_spec.js
0 → 100644
View file @
3e417f4b
import
createState
from
'
~/boards/stores/state
'
;
describe
(
'
createState
'
,
()
=>
{
it
(
'
is a function
'
,
()
=>
{
expect
(
createState
).
toEqual
(
expect
.
any
(
Function
));
});
it
(
'
returns an object
'
,
()
=>
{
expect
(
createState
()).
toEqual
(
expect
.
any
(
Object
));
});
});
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