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
b46cb345
Commit
b46cb345
authored
Apr 29, 2020
by
derek-knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests, submit content branch portion
parent
dd2d9a7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
spec/frontend/static_site_editor/mock_data.js
spec/frontend/static_site_editor/mock_data.js
+3
-0
spec/frontend/static_site_editor/services/submit_content_changes_spec.js
...tatic_site_editor/services/submit_content_changes_spec.js
+2
-1
No files found.
spec/frontend/static_site_editor/mock_data.js
View file @
b46cb345
...
@@ -34,6 +34,9 @@ export const savedContentMeta = {
...
@@ -34,6 +34,9 @@ export const savedContentMeta = {
};
};
export
const
submitChangesError
=
'
Could not save changes
'
;
export
const
submitChangesError
=
'
Could not save changes
'
;
export
const
commitBranchResponse
=
{
web_url
:
'
/tree/root-master-patch-88195
'
,
};
export
const
commitMultipleResponse
=
{
export
const
commitMultipleResponse
=
{
short_id
:
'
ed899a2f4b5
'
,
short_id
:
'
ed899a2f4b5
'
,
web_url
:
'
/commit/ed899a2f4b5
'
,
web_url
:
'
/commit/ed899a2f4b5
'
,
...
...
spec/frontend/static_site_editor/services/submit_content_changes_spec.js
View file @
b46cb345
...
@@ -13,6 +13,7 @@ import submitContentChanges from '~/static_site_editor/services/submit_content_c
...
@@ -13,6 +13,7 @@ import submitContentChanges from '~/static_site_editor/services/submit_content_c
import
{
import
{
username
,
username
,
projectId
,
projectId
,
commitBranchResponse
,
commitMultipleResponse
,
commitMultipleResponse
,
createMergeRequestResponse
,
createMergeRequestResponse
,
sourcePath
,
sourcePath
,
...
@@ -26,7 +27,7 @@ describe('submitContentChanges', () => {
...
@@ -26,7 +27,7 @@ describe('submitContentChanges', () => {
const
branch
=
'
branch-name
'
;
const
branch
=
'
branch-name
'
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
jest
.
spyOn
(
Api
,
'
createBranch
'
).
mockResolvedValue
();
jest
.
spyOn
(
Api
,
'
createBranch
'
).
mockResolvedValue
(
{
data
:
commitBranchResponse
}
);
jest
.
spyOn
(
Api
,
'
commitMultiple
'
).
mockResolvedValue
({
data
:
commitMultipleResponse
});
jest
.
spyOn
(
Api
,
'
commitMultiple
'
).
mockResolvedValue
({
data
:
commitMultipleResponse
});
jest
jest
.
spyOn
(
Api
,
'
createProjectMergeRequest
'
)
.
spyOn
(
Api
,
'
createProjectMergeRequest
'
)
...
...
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