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
433ae04f
Commit
433ae04f
authored
Mar 12, 2021
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mutator action that ingests endpoints
parent
84c9a3d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
app/assets/javascripts/mr_notes/stores/actions/mutators.js
app/assets/javascripts/mr_notes/stores/actions/mutators.js
+4
-0
spec/frontend/mr_notes/stores/actions/mutators_spec.js
spec/frontend/mr_notes/stores/actions/mutators_spec.js
+25
-0
No files found.
app/assets/javascripts/mr_notes/stores/actions/mutators.js
View file @
433ae04f
...
...
@@ -5,3 +5,7 @@ import types from '../mutation_types';
export
function
setActiveTab
({
commit
},
tab
)
{
commit
(
types
.
SET_ACTIVE_TAB
,
tab
);
}
export
function
setEndpoints
({
commit
},
endpoints
)
{
commit
(
types
.
SET_ENDPOINTS
,
endpoints
);
}
spec/frontend/mr_notes/stores/actions/mutators_spec.js
0 → 100644
View file @
433ae04f
import
testAction
from
'
helpers/vuex_action_helper
'
;
import
{
setEndpoints
}
from
'
~/mr_notes/stores/actions/mutators
'
;
import
mutationTypes
from
'
~/mr_notes/stores/mutation_types
'
;
describe
(
'
MR Notes Mutator Actions
'
,
()
=>
{
describe
(
'
setEndpoints
'
,
()
=>
{
it
(
'
should trigger the SET_ENDPOINTS state mutation
'
,
(
done
)
=>
{
const
endpoints
=
{
endpointA
:
'
a
'
};
testAction
(
setEndpoints
,
endpoints
,
{},
[
{
type
:
mutationTypes
.
SET_ENDPOINTS
,
payload
:
endpoints
,
},
],
[],
done
,
);
});
});
});
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