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
Boxiang Sun
gitlab-ce
Commits
fd3ef2eb
Commit
fd3ef2eb
authored
Jul 30, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
karma fixes
parent
3c62b51c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
4 deletions
+15
-4
app/assets/javascripts/ide/stores/utils.js
app/assets/javascripts/ide/stores/utils.js
+1
-1
changelogs/unreleased/ide-rename-files.yml
changelogs/unreleased/ide-rename-files.yml
+1
-1
spec/javascripts/ide/components/new_dropdown/index_spec.js
spec/javascripts/ide/components/new_dropdown/index_spec.js
+1
-1
spec/javascripts/ide/components/new_dropdown/modal_spec.js
spec/javascripts/ide/components/new_dropdown/modal_spec.js
+1
-1
spec/javascripts/ide/stores/modules/commit/actions_spec.js
spec/javascripts/ide/stores/modules/commit/actions_spec.js
+2
-0
spec/javascripts/ide/stores/utils_spec.js
spec/javascripts/ide/stores/utils_spec.js
+9
-0
No files found.
app/assets/javascripts/ide/stores/utils.js
View file @
fd3ef2eb
...
...
@@ -109,7 +109,7 @@ export const setPageTitle = title => {
};
export
const
commitActionForFile
=
file
=>
{
if
(
file
.
prevPath
!==
''
)
{
if
(
file
.
prevPath
)
{
return
'
move
'
;
}
else
if
(
file
.
deleted
)
{
return
'
delete
'
;
...
...
changelogs/unreleased/ide-rename-files.yml
View file @
fd3ef2eb
---
title
:
Enable renaming files and folders in Web IDE
merge_request
:
merge_request
:
20835
author
:
type
:
added
spec/javascripts/ide/components/new_dropdown/index_spec.js
View file @
fd3ef2eb
...
...
@@ -73,7 +73,7 @@ describe('new dropdown component', () => {
it
(
'
calls delete action
'
,
()
=>
{
spyOn
(
vm
,
'
deleteEntry
'
);
vm
.
$el
.
querySelectorAll
(
'
.dropdown-menu button
'
)[
3
].
click
();
vm
.
$el
.
querySelectorAll
(
'
.dropdown-menu button
'
)[
4
].
click
();
expect
(
vm
.
deleteEntry
).
toHaveBeenCalledWith
(
''
);
});
...
...
spec/javascripts/ide/components/new_dropdown/modal_spec.js
View file @
fd3ef2eb
...
...
@@ -45,7 +45,7 @@ describe('new file modal component', () => {
it
(
'
$emits create
'
,
()
=>
{
spyOn
(
vm
,
'
createTempEntry
'
);
vm
.
createEntryInStore
();
vm
.
submitForm
();
expect
(
vm
.
createTempEntry
).
toHaveBeenCalledWith
({
name
:
'
testing
'
,
...
...
spec/javascripts/ide/stores/modules/commit/actions_spec.js
View file @
fd3ef2eb
...
...
@@ -297,6 +297,7 @@ describe('IDE commit module actions', () => {
content
:
jasmine
.
anything
(),
encoding
:
jasmine
.
anything
(),
last_commit_id
:
undefined
,
previous_path
:
undefined
,
},
],
start_branch
:
'
master
'
,
...
...
@@ -323,6 +324,7 @@ describe('IDE commit module actions', () => {
content
:
jasmine
.
anything
(),
encoding
:
jasmine
.
anything
(),
last_commit_id
:
'
123456789
'
,
previous_path
:
undefined
,
},
],
start_branch
:
undefined
,
...
...
spec/javascripts/ide/stores/utils_spec.js
View file @
fd3ef2eb
...
...
@@ -112,6 +112,7 @@ describe('Multi-file store utils', () => {
content
:
'
updated file content
'
,
encoding
:
'
text
'
,
last_commit_id
:
'
123456789
'
,
previous_path
:
undefined
,
},
{
action
:
'
create
'
,
...
...
@@ -119,6 +120,7 @@ describe('Multi-file store utils', () => {
content
:
'
new file content
'
,
encoding
:
'
base64
'
,
last_commit_id
:
'
123456789
'
,
previous_path
:
undefined
,
},
{
action
:
'
delete
'
,
...
...
@@ -126,6 +128,7 @@ describe('Multi-file store utils', () => {
content
:
''
,
encoding
:
'
text
'
,
last_commit_id
:
undefined
,
previous_path
:
undefined
,
},
],
start_branch
:
undefined
,
...
...
@@ -172,6 +175,7 @@ describe('Multi-file store utils', () => {
content
:
'
updated file content
'
,
encoding
:
'
text
'
,
last_commit_id
:
'
123456789
'
,
previous_path
:
undefined
,
},
{
action
:
'
create
'
,
...
...
@@ -179,6 +183,7 @@ describe('Multi-file store utils', () => {
content
:
'
new file content
'
,
encoding
:
'
base64
'
,
last_commit_id
:
'
123456789
'
,
previous_path
:
undefined
,
},
],
start_branch
:
undefined
,
...
...
@@ -195,6 +200,10 @@ describe('Multi-file store utils', () => {
expect
(
utils
.
commitActionForFile
({
tempFile
:
true
})).
toBe
(
'
create
'
);
});
it
(
'
returns move for moved file
'
,
()
=>
{
expect
(
utils
.
commitActionForFile
({
prevPath
:
'
test
'
})).
toBe
(
'
move
'
);
});
it
(
'
returns update by default
'
,
()
=>
{
expect
(
utils
.
commitActionForFile
({})).
toBe
(
'
update
'
);
});
...
...
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