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
Show 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 {
...
@@ -69,9 +69,7 @@ export default {
path
:
this
.
file
.
path
,
path
:
this
.
file
.
path
,
baseSha
:
this
.
currentMergeRequest
?
this
.
currentMergeRequest
.
baseCommitSha
:
''
,
baseSha
:
this
.
currentMergeRequest
?
this
.
currentMergeRequest
.
baseCommitSha
:
''
,
})
})
.
then
(()
=>
{
.
then
(()
=>
this
.
updateViewer
(
this
.
file
.
pending
?
'
diff
'
:
this
.
viewer
))
return
this
.
updateViewer
(
this
.
file
.
pending
?
'
diff
'
:
'
editor
'
);
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
updateDelayViewerUpdated
(
false
);
this
.
updateDelayViewerUpdated
(
false
);
this
.
createEditorInstance
();
this
.
createEditorInstance
();
...
...
spec/javascripts/ide/stores/actions/file_spec.js
View file @
55c6b8b1
...
@@ -470,8 +470,9 @@ describe('IDE store file actions', () => {
...
@@ -470,8 +470,9 @@ describe('IDE store file actions', () => {
testAction
(
testAction
(
actions
.
stageChange
,
actions
.
stageChange
,
'
path
'
,
'
path
'
,
null
,
store
.
state
,
[{
type
:
types
.
STAGE_CHANGE
,
payload
:
'
path
'
}],
[{
type
:
types
.
STAGE_CHANGE
,
payload
:
'
path
'
}],
[],
done
,
done
,
);
);
});
});
...
@@ -482,8 +483,9 @@ describe('IDE store file actions', () => {
...
@@ -482,8 +483,9 @@ describe('IDE store file actions', () => {
testAction
(
testAction
(
actions
.
unstageChange
,
actions
.
unstageChange
,
'
path
'
,
'
path
'
,
null
,
store
.
state
,
[{
type
:
types
.
UNSTAGE_CHANGE
,
payload
:
'
path
'
}],
[{
type
:
types
.
UNSTAGE_CHANGE
,
payload
:
'
path
'
}],
[],
done
,
done
,
);
);
});
});
...
@@ -503,7 +505,7 @@ describe('IDE store file actions', () => {
...
@@ -503,7 +505,7 @@ describe('IDE store file actions', () => {
it
(
'
makes file pending in openFiles
'
,
done
=>
{
it
(
'
makes file pending in openFiles
'
,
done
=>
{
store
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(()
=>
{
.
then
(()
=>
{
expect
(
store
.
state
.
openFiles
[
0
].
pending
).
toBe
(
true
);
expect
(
store
.
state
.
openFiles
[
0
].
pending
).
toBe
(
true
);
})
})
...
@@ -513,7 +515,7 @@ describe('IDE store file actions', () => {
...
@@ -513,7 +515,7 @@ describe('IDE store file actions', () => {
it
(
'
returns true when opened
'
,
done
=>
{
it
(
'
returns true when opened
'
,
done
=>
{
store
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(
added
=>
{
.
then
(
added
=>
{
expect
(
added
).
toBe
(
true
);
expect
(
added
).
toBe
(
true
);
})
})
...
@@ -525,7 +527,7 @@ describe('IDE store file actions', () => {
...
@@ -525,7 +527,7 @@ describe('IDE store file actions', () => {
store
.
state
.
currentBranchId
=
'
master
'
;
store
.
state
.
currentBranchId
=
'
master
'
;
store
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(()
=>
{
.
then
(()
=>
{
expect
(
router
.
push
).
toHaveBeenCalledWith
(
'
/project/123/tree/master/
'
);
expect
(
router
.
push
).
toHaveBeenCalledWith
(
'
/project/123/tree/master/
'
);
})
})
...
@@ -539,7 +541,7 @@ describe('IDE store file actions', () => {
...
@@ -539,7 +541,7 @@ describe('IDE store file actions', () => {
store
.
_actions
.
scrollToTab
=
[
scrollToTabSpy
];
// eslint-disable-line
store
.
_actions
.
scrollToTab
=
[
scrollToTabSpy
];
// eslint-disable-line
store
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(()
=>
{
.
then
(()
=>
{
expect
(
scrollToTabSpy
).
toHaveBeenCalled
();
expect
(
scrollToTabSpy
).
toHaveBeenCalled
();
store
.
_actions
.
scrollToTab
=
oldScrollToTab
;
// eslint-disable-line
store
.
_actions
.
scrollToTab
=
oldScrollToTab
;
// eslint-disable-line
...
@@ -554,7 +556,7 @@ describe('IDE store file actions', () => {
...
@@ -554,7 +556,7 @@ describe('IDE store file actions', () => {
store
.
state
.
viewer
=
'
diff
'
;
store
.
state
.
viewer
=
'
diff
'
;
store
store
.
dispatch
(
'
openPendingTab
'
,
f
)
.
dispatch
(
'
openPendingTab
'
,
{
file
:
f
,
keyPrefix
:
'
pending
'
}
)
.
then
(
added
=>
{
.
then
(
added
=>
{
expect
(
added
).
toBe
(
false
);
expect
(
added
).
toBe
(
false
);
})
})
...
...
spec/javascripts/ide/stores/actions_spec.js
View file @
55c6b8b1
...
@@ -305,6 +305,7 @@ describe('Multi-file store actions', () => {
...
@@ -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
[
0
].
path
},
{
type
:
types
.
STAGE_CHANGE
,
payload
:
store
.
state
.
changedFiles
[
1
].
path
},
{
type
:
types
.
STAGE_CHANGE
,
payload
:
store
.
state
.
changedFiles
[
1
].
path
},
],
],
[],
done
,
done
,
);
);
});
});
...
@@ -322,6 +323,7 @@ describe('Multi-file store actions', () => {
...
@@ -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
[
0
].
path
},
{
type
:
types
.
UNSTAGE_CHANGE
,
payload
:
store
.
state
.
stagedFiles
[
1
].
path
},
{
type
:
types
.
UNSTAGE_CHANGE
,
payload
:
store
.
state
.
stagedFiles
[
1
].
path
},
],
],
[],
done
,
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