BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0fdcb703
Unverified
Commit
0fdcb703
authored
Jul 26, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix repo_editor_spec because of async loader changes
parent
a6a7a0e1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
index.js
app/assets/javascripts/repo/index.js
+2
-2
repo_editor.js
app/assets/javascripts/repo/repo_editor.js
+5
-2
repo_editor_spec.js
spec/javascripts/repo/repo_editor_spec.js
+10
-0
No files found.
app/assets/javascripts/repo/index.js
View file @
0fdcb703
...
@@ -9,7 +9,7 @@ import RepoCommitSection from './repo_commit_section.vue';
...
@@ -9,7 +9,7 @@ import RepoCommitSection from './repo_commit_section.vue';
import
RepoTabs
from
'./repo_tabs.vue'
;
import
RepoTabs
from
'./repo_tabs.vue'
;
import
RepoFileButtons
from
'./repo_file_buttons.vue'
;
import
RepoFileButtons
from
'./repo_file_buttons.vue'
;
import
RepoBinaryViewer
from
'./repo_binary_viewer.vue'
;
import
RepoBinaryViewer
from
'./repo_binary_viewer.vue'
;
import
RepoEditor
from
'./repo_editor'
;
import
{
repoEditorLoader
}
from
'./repo_editor'
;
import
RepoMiniMixin
from
'./repo_mini_mixin'
;
import
RepoMiniMixin
from
'./repo_mini_mixin'
;
function
initRepo
()
{
function
initRepo
()
{
...
@@ -44,7 +44,7 @@ function initRepo() {
...
@@ -44,7 +44,7 @@ function initRepo() {
'repo-tabs'
:
RepoTabs
,
'repo-tabs'
:
RepoTabs
,
'repo-file-buttons'
:
RepoFileButtons
,
'repo-file-buttons'
:
RepoFileButtons
,
'repo-binary-viewer'
:
RepoBinaryViewer
,
'repo-binary-viewer'
:
RepoBinaryViewer
,
'repo-editor'
:
RepoEdito
r
,
'repo-editor'
:
repoEditorLoade
r
,
'repo-commit-section'
:
RepoCommitSection
,
'repo-commit-section'
:
RepoCommitSection
,
},
},
});
});
...
...
app/assets/javascripts/repo/repo_editor.js
View file @
0fdcb703
...
@@ -106,7 +106,7 @@ const RepoEditor = {
...
@@ -106,7 +106,7 @@ const RepoEditor = {
},
},
};
};
function
asyncLoadRepoEdito
r
()
{
function
repoEditorLoade
r
()
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
monacoLoader
([
'vs/editor/editor.main'
],
()
=>
{
monacoLoader
([
'vs/editor/editor.main'
],
()
=>
{
Store
.
monaco
=
monaco
;
Store
.
monaco
=
monaco
;
...
@@ -116,4 +116,7 @@ function asyncLoadRepoEditor() {
...
@@ -116,4 +116,7 @@ function asyncLoadRepoEditor() {
});
});
}
}
export
default
asyncLoadRepoEditor
;
export
{
RepoEditor
as
default
,
repoEditorLoader
,
};
spec/javascripts/repo/repo_editor_spec.js
View file @
0fdcb703
import
Vue
from
'vue'
;
import
Vue
from
'vue'
;
import
repoEditor
from
'~/repo/repo_editor'
;
import
repoEditor
from
'~/repo/repo_editor'
;
import
RepoStore
from
'~/repo/repo_store'
;
describe
(
'RepoEditor'
,
()
=>
{
describe
(
'RepoEditor'
,
()
=>
{
function
createComponent
()
{
function
createComponent
()
{
...
@@ -9,6 +10,15 @@ describe('RepoEditor', () => {
...
@@ -9,6 +10,15 @@ describe('RepoEditor', () => {
}
}
it
(
'renders an ide container'
,
()
=>
{
it
(
'renders an ide container'
,
()
=>
{
const
monacoInstance
=
jasmine
.
createSpyObj
(
'monacoInstance'
,
[
'onMouseUp'
,
'onKeyUp'
,
'setModel'
]);
const
monaco
=
{
editor
:
jasmine
.
createSpyObj
(
'editor'
,
[
'create'
]),
};
RepoStore
.
monaco
=
monaco
;
monaco
.
editor
.
create
.
and
.
returnValue
(
monacoInstance
);
spyOn
(
repoEditor
.
watch
,
'blobRaw'
);
const
vm
=
createComponent
();
const
vm
=
createComponent
();
expect
(
vm
.
$el
.
id
).
toEqual
(
'ide'
);
expect
(
vm
.
$el
.
id
).
toEqual
(
'ide'
);
...
...
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