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
f252fbf4
Commit
f252fbf4
authored
Oct 28, 2020
by
Denys Mishunov
Committed by
Brandon Labuschagne
Oct 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Editor Lite: Set the default for blobGlobalId
parent
a43eaf5c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/assets/javascripts/editor/editor_lite.js
app/assets/javascripts/editor/editor_lite.js
+2
-1
spec/frontend/editor/editor_lite_spec.js
spec/frontend/editor/editor_lite_spec.js
+1
-1
No files found.
app/assets/javascripts/editor/editor_lite.js
View file @
f252fbf4
...
...
@@ -6,6 +6,7 @@ import { registerLanguages } from '~/ide/utils';
import
{
joinPaths
}
from
'
~/lib/utils/url_utility
'
;
import
{
clearDomElement
}
from
'
./utils
'
;
import
{
EDITOR_LITE_INSTANCE_ERROR_NO_EL
,
URI_PREFIX
}
from
'
./constants
'
;
import
{
uuids
}
from
'
~/diffs/utils/uuids
'
;
export
default
class
Editor
{
constructor
(
options
=
{})
{
...
...
@@ -72,7 +73,7 @@ export default class Editor {
el
=
undefined
,
blobPath
=
''
,
blobContent
=
''
,
blobGlobalId
=
''
,
blobGlobalId
=
uuids
()[
0
]
,
extensions
=
[],
...
instanceOptions
}
=
{})
{
...
...
spec/frontend/editor/editor_lite_spec.js
View file @
f252fbf4
...
...
@@ -64,7 +64,7 @@ describe('Base editor', () => {
});
it
(
'
creates model to be supplied to Monaco editor
'
,
()
=>
{
editor
.
createInstance
({
el
:
editorEl
,
blobPath
,
blobContent
});
editor
.
createInstance
({
el
:
editorEl
,
blobPath
,
blobContent
,
blobGlobalId
:
''
});
expect
(
modelSpy
).
toHaveBeenCalledWith
(
blobContent
,
undefined
,
createUri
(
blobPath
));
expect
(
setModel
).
toHaveBeenCalledWith
(
fakeModel
);
...
...
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