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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
55c6b8b1
Commit
55c6b8b1
authored
Apr 05, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed karma & eslint
parent
d0378125
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
app/assets/javascripts/ide/components/repo_editor.vue
app/assets/javascripts/ide/components/repo_editor.vue
+1
-3
spec/javascripts/ide/stores/actions/file_spec.js
spec/javascripts/ide/stores/actions/file_spec.js
+9
-7
spec/javascripts/ide/stores/actions_spec.js
spec/javascripts/ide/stores/actions_spec.js
+2
-0
No files found.
app/assets/javascripts/ide/components/repo_editor.vue
View file @
55c6b8b1
...
...
@@ -69,9 +69,7 @@ export default {
path
:
this
.
file
.
path
,
baseSha
:
this
.
currentMergeRequest
?
this
.
currentMergeRequest
.
baseCommitSha
:
''
,
})
.
then
(()
=>
{
return
this
.
updateViewer
(
this
.
file
.
pending
?
'
diff
'
:
'
editor
'
);
})
.
then
(()
=>
this
.
updateViewer
(
this
.
file
.
pending
?
'
diff
'
:
this
.
viewer
))
.
then
(()
=>
{
this
.
updateDelayViewerUpdated
(
false
);
this
.
createEditorInstance
();
...
...
spec/javascripts/ide/stores/actions/file_spec.js
View file @
55c6b8b1
...
...
@@ -470,8 +470,9 @@ describe('IDE store file actions', () => {
testAction
(
actions
.
stageChange
,
'
path
'
,
null
,
store
.
state
,
[{
type
:
types
.
STAGE_CHANGE
,
payload
:
'
path
'
}],
[],
done
,
);
});
...
...
@@ -482,8 +483,9 @@ describe('IDE store file actions', () => {
testAction
(
actions
.
unstageChange
,
'
path
'
,
null
,
store
.
state
,
[{
type
:
types
.
UNSTAGE_CHANGE
,
payload
:
'
path
'
}],
[],
done
,
);
});
...
...
@@ -503,7 +505,7 @@ describe('IDE store file actions', () => {
it
(
'
makes file pending in openFiles
'
,
done
=>
{
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(()
=>
{
expect
(
store
.
state
.
openFiles
[
0
].
pending
).
toBe
(
true
);
})
...
...
@@ -513,7 +515,7 @@ describe('IDE store file actions', () => {
it
(
'
returns true when opened
'
,
done
=>
{
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(
added
=>
{
expect
(
added
).
toBe
(
true
);
})
...
...
@@ -525,7 +527,7 @@ describe('IDE store file actions', () => {
store
.
state
.
currentBranchId
=
'
master
'
;
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(()
=>
{
expect
(
router
.
push
).
toHaveBeenCalledWith
(
'
/project/123/tree/master/
'
);
})
...
...
@@ -539,7 +541,7 @@ describe('IDE store file actions', () => {
store
.
_actions
.
scrollToTab
=
[
scrollToTabSpy
];
// eslint-disable-line
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(()
=>
{
expect
(
scrollToTabSpy
).
toHaveBeenCalled
();
store
.
_actions
.
scrollToTab
=
oldScrollToTab
;
// eslint-disable-line
...
...
@@ -554,7 +556,7 @@ describe('IDE store file actions', () => {
store
.
state
.
viewer
=
'
diff
'
;
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(
added
=>
{
expect
(
added
).
toBe
(
false
);
})
...
...
spec/javascripts/ide/stores/actions_spec.js
View file @
55c6b8b1
...
...
@@ -305,6 +305,7 @@ describe('Multi-file store actions', () => {
{
type
:
types
.
STAGE_CHANGE
,
payload
:
store
.
state
.
changedFiles
[
0
].
path
},
{
type
:
types
.
STAGE_CHANGE
,
payload
:
store
.
state
.
changedFiles
[
1
].
path
},
],
[],
done
,
);
});
...
...
@@ -322,6 +323,7 @@ describe('Multi-file store actions', () => {
{
type
:
types
.
UNSTAGE_CHANGE
,
payload
:
store
.
state
.
stagedFiles
[
0
].
path
},
{
type
:
types
.
UNSTAGE_CHANGE
,
payload
:
store
.
state
.
stagedFiles
[
1
].
path
},
],
[],
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