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
14d8c620
Commit
14d8c620
authored
Nov 23, 2020
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Async import more IDE things
Also update spec to await for errorMessage component to be loaded.
parent
6c13a4fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
28 deletions
+24
-28
app/assets/javascripts/ide/components/ide.vue
app/assets/javascripts/ide/components/ide.vue
+7
-9
spec/frontend/ide/components/ide_spec.js
spec/frontend/ide/components/ide_spec.js
+17
-19
No files found.
app/assets/javascripts/ide/components/ide.vue
View file @
14d8c620
...
@@ -13,10 +13,7 @@ import { performanceMarkAndMeasure } from '~/performance/utils';
...
@@ -13,10 +13,7 @@ import { performanceMarkAndMeasure } from '~/performance/utils';
import
{
modalTypes
}
from
'
../constants
'
;
import
{
modalTypes
}
from
'
../constants
'
;
import
eventHub
from
'
../eventhub
'
;
import
eventHub
from
'
../eventhub
'
;
import
IdeSidebar
from
'
./ide_side_bar.vue
'
;
import
IdeSidebar
from
'
./ide_side_bar.vue
'
;
import
ErrorMessage
from
'
./error_message.vue
'
;
import
RepoEditor
from
'
./repo_editor.vue
'
;
import
CommitEditorHeader
from
'
./commit_sidebar/editor_header.vue
'
;
import
RepoTabs
from
'
./repo_tabs.vue
'
;
import
IdeStatusBar
from
'
./ide_status_bar.vue
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
measurePerformance
}
from
'
../utils
'
;
import
{
measurePerformance
}
from
'
../utils
'
;
...
@@ -32,13 +29,14 @@ eventHub.$on(WEBIDE_MEASURE_FILE_AFTER_INTERACTION, () =>
...
@@ -32,13 +29,14 @@ eventHub.$on(WEBIDE_MEASURE_FILE_AFTER_INTERACTION, () =>
export
default
{
export
default
{
components
:
{
components
:
{
IdeSidebar
,
IdeSidebar
,
ErrorMessage
,
RepoEditor
,
GlButton
,
GlButton
,
GlLoadingIcon
,
GlLoadingIcon
,
CommitEditorHeader
,
ErrorMessage
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./error_message.vue
'
),
RepoTabs
,
CommitEditorHeader
:
()
=>
IdeStatusBar
,
import
(
/* webpackChunkName: 'ide_runtime' */
'
./commit_sidebar/editor_header.vue
'
),
RepoEditor
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./repo_editor.vue
'
),
RepoTabs
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./repo_tabs.vue
'
),
IdeStatusBar
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./ide_status_bar.vue
'
),
FindFile
:
()
=>
FindFile
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
~/vue_shared/components/file_finder/index.vue
'
),
import
(
/* webpackChunkName: 'ide_runtime' */
'
~/vue_shared/components/file_finder/index.vue
'
),
RightPane
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./panes/right.vue
'
),
RightPane
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./panes/right.vue
'
),
...
...
spec/frontend/ide/components/ide_spec.js
View file @
14d8c620
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
{
createStore
}
from
'
~/ide/stores
'
;
import
{
createStore
}
from
'
~/ide/stores
'
;
import
ErrorMessage
from
'
~/ide/components/error_message.vue
'
;
import
ErrorMessage
from
'
~/ide/components/error_message.vue
'
;
import
ide
from
'
~/ide/components/ide.vue
'
;
import
ide
from
'
~/ide/components/ide.vue
'
;
...
@@ -55,27 +56,24 @@ describe('WebIDE', () => {
...
@@ -55,27 +56,24 @@ describe('WebIDE', () => {
describe
(
'
ide component, non-empty repo
'
,
()
=>
{
describe
(
'
ide component, non-empty repo
'
,
()
=>
{
describe
(
'
error message
'
,
()
=>
{
describe
(
'
error message
'
,
()
=>
{
it
(
'
does not show error message when it is not set
'
,
()
=>
{
it
.
each
`
wrapper
=
createComponent
({
errorMessage | exists
state
:
{
${
null
}
|
${
false
}
errorMessage
:
null
,
${{
text
:
'
error
'
}
} |
${
true
}
},
`
(
});
'
should error message exists=$exists when errorMessage=$errorMessage
'
,
async
({
errorMessage
,
exists
})
=>
{
expect
(
wrapper
.
find
(
ErrorMessage
).
exists
()).
toBe
(
false
);
wrapper
=
createComponent
({
});
state
:
{
errorMessage
,
it
(
'
shows error message when set
'
,
()
=>
{
wrapper
=
createComponent
({
state
:
{
errorMessage
:
{
text
:
'
error
'
,
},
},
},
});
});
expect
(
wrapper
.
find
(
ErrorMessage
).
exists
()).
toBe
(
true
);
await
waitForPromises
();
});
expect
(
wrapper
.
find
(
ErrorMessage
).
exists
()).
toBe
(
exists
);
},
);
});
});
describe
(
'
onBeforeUnload
'
,
()
=>
{
describe
(
'
onBeforeUnload
'
,
()
=>
{
...
...
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