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
913c6070
Unverified
Commit
913c6070
authored
Apr 19, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added spec to ide_side_bar
parent
949160e3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
11 deletions
+24
-11
ide_side_bar.vue
app/assets/javascripts/ide/components/ide_side_bar.vue
+6
-8
ide_tree.vue
app/assets/javascripts/ide/components/ide_tree.vue
+1
-2
ide_side_bar_spec.js
spec/javascripts/ide/components/ide_side_bar_spec.js
+17
-1
No files found.
app/assets/javascripts/ide/components/ide_side_bar.vue
View file @
913c6070
<
script
>
import
{
mapState
,
mapGetters
}
from
'vuex'
;
import
ProjectAvatarImage
from
'~/vue_shared/components/project_avatar/image.vue'
;
import
i
con
from
'~/vue_shared/components/icon.vue'
;
import
p
anelResizer
from
'~/vue_shared/components/panel_resizer.vue'
;
import
s
keletonLoadingContainer
from
'~/vue_shared/components/skeleton_loading_container.vue'
;
import
I
con
from
'~/vue_shared/components/icon.vue'
;
import
P
anelResizer
from
'~/vue_shared/components/panel_resizer.vue'
;
import
S
keletonLoadingContainer
from
'~/vue_shared/components/skeleton_loading_container.vue'
;
import
Identicon
from
'../../vue_shared/components/identicon.vue'
;
import
IdeTree
from
'./ide_tree.vue'
;
import
ResizablePanel
from
'./resizable_panel.vue'
;
...
...
@@ -12,9 +12,9 @@ import CommitSection from './repo_commit_section.vue';
export
default
{
components
:
{
i
con
,
p
anelResizer
,
s
keletonLoadingContainer
,
I
con
,
P
anelResizer
,
S
keletonLoadingContainer
,
ResizablePanel
,
ActivityBar
,
ProjectAvatarImage
,
...
...
@@ -87,11 +87,9 @@ export default {
</a>
</div>
<div
class=
"multi-file-commit-panel-inner-scroll"
>
<keep-alive>
<component
:is=
"activityBarComponent"
/>
</keep-alive>
</div>
</
template
>
</div>
...
...
app/assets/javascripts/ide/components/ide_tree.vue
View file @
913c6070
...
...
@@ -21,10 +21,9 @@ export default {
<
template
>
<div
v-if=
"currentTree"
class=
"ide-file-list"
>
<template
v-if=
"currentTree.loading"
>
<template
v-if=
"
!currentTree ||
currentTree.loading"
>
<div
class=
"multi-file-loading-container"
v-for=
"n in 3"
...
...
spec/javascripts/ide/components/ide_side_bar_spec.js
View file @
913c6070
import
Vue
from
'vue'
;
import
store
from
'~/ide/stores'
;
import
ideSidebar
from
'~/ide/components/ide_side_bar.vue'
;
import
{
ActivityBarViews
}
from
'~/ide/stores/state'
;
import
{
createComponentWithStore
}
from
'spec/helpers/vue_mount_component_helper'
;
import
{
resetStore
}
from
'../helpers'
;
import
{
projectData
}
from
'../mock_data'
;
...
...
@@ -13,7 +14,6 @@ describe('IdeSidebar', () => {
store
.
state
.
currentProjectId
=
'abcproject'
;
store
.
state
.
projects
.
abcproject
=
projectData
;
store
.
state
.
currentActivityView
=
null
;
vm
=
createComponentWithStore
(
Component
,
store
).
$mount
();
});
...
...
@@ -38,4 +38,20 @@ describe('IdeSidebar', () => {
done
();
});
});
describe
(
'activityBarComponent'
,
()
=>
{
it
(
'renders tree component'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.ide-file-list'
)).
not
.
toBeNull
();
});
it
(
'renders commit component'
,
done
=>
{
vm
.
$store
.
state
.
currentActivityView
=
ActivityBarViews
.
commit
;
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.multi-file-commit-panel-section'
)).
not
.
toBeNull
();
done
();
});
});
});
});
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