Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
3e417f4b
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3e417f4b
编写于
5月 20, 2019
作者:
W
Winnie Hellmann
提交者:
Phil Hughes
5月 20, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Create empty Vuex store for issue boards
上级
0c1cd36a
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
363 addition
and
0 deletion
+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
未找到文件。
app/assets/javascripts/boards/stores/actions.js
0 → 100644
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
3e417f4b
export
default
()
=>
({
// ...
});
spec/frontend/boards/stores/actions_spec.js
0 → 100644
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
));
});
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录