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
Show 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';
import
{
modalTypes
}
from
'
../constants
'
;
import
eventHub
from
'
../eventhub
'
;
import
IdeSidebar
from
'
./ide_side_bar.vue
'
;
import
ErrorMessage
from
'
./error_message.vue
'
;
import
CommitEditorHeader
from
'
./commit_sidebar/editor_header.vue
'
;
import
RepoTabs
from
'
./repo_tabs.vue
'
;
import
IdeStatusBar
from
'
./ide_status_bar.vue
'
;
import
RepoEditor
from
'
./repo_editor.vue
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
measurePerformance
}
from
'
../utils
'
;
...
...
@@ -32,13 +29,14 @@ eventHub.$on(WEBIDE_MEASURE_FILE_AFTER_INTERACTION, () =>
export
default
{
components
:
{
IdeSidebar
,
ErrorMessage
,
RepoEditor
,
GlButton
,
GlLoadingIcon
,
CommitEditorHeader
,
RepoTabs
,
IdeStatusBar
,
RepoEditor
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./repo_editor.vue
'
),
ErrorMessage
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./error_message.vue
'
),
CommitEditorHeader
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./commit_sidebar/editor_header.vue
'
),
RepoTabs
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./repo_tabs.vue
'
),
IdeStatusBar
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./ide_status_bar.vue
'
),
FindFile
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
~/vue_shared/components/file_finder/index.vue
'
),
RightPane
:
()
=>
import
(
/* webpackChunkName: 'ide_runtime' */
'
./panes/right.vue
'
),
...
...
spec/frontend/ide/components/ide_spec.js
View file @
14d8c620
import
Vuex
from
'
vuex
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
{
createStore
}
from
'
~/ide/stores
'
;
import
ErrorMessage
from
'
~/ide/components/error_message.vue
'
;
import
ide
from
'
~/ide/components/ide.vue
'
;
...
...
@@ -55,27 +56,24 @@ describe('WebIDE', () => {
describe
(
'
ide component, non-empty repo
'
,
()
=>
{
describe
(
'
error message
'
,
()
=>
{
it
(
'
does not show error message when it is not set
'
,
()
=>
{
it
.
each
`
errorMessage | exists
${
null
}
|
${
false
}
${{
text
:
'
error
'
}
} |
${
true
}
`
(
'
should error message exists=$exists when errorMessage=$errorMessage
'
,
async
({
errorMessage
,
exists
})
=>
{
wrapper
=
createComponent
({
state
:
{
errorMessage
:
null
,
errorMessage
,
},
});
expect
(
wrapper
.
find
(
ErrorMessage
).
exists
()).
toBe
(
false
);
});
await
waitForPromises
();
it
(
'
shows error message when set
'
,
()
=>
{
wrapper
=
createComponent
({
state
:
{
errorMessage
:
{
text
:
'
error
'
,
},
expect
(
wrapper
.
find
(
ErrorMessage
).
exists
()).
toBe
(
exists
);
},
});
expect
(
wrapper
.
find
(
ErrorMessage
).
exists
()).
toBe
(
true
);
});
);
});
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