summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-08-21 08:23:23 +0000
committerFilipa Lacerda <filipa@gitlab.com>2019-08-21 08:23:23 +0000
commitca622a3e13cf88d94c6b3c98554e9782d37d4ad5 (patch)
tree94106a06ace1d53d3b6e30d1eab6d28f93130027
parent006bc124366078d717ea8a331fdfd1e2ccd3476f (diff)
parent261f4fe7accfb0cad82feed4f74a26e9ccebcbe3 (diff)
downloadgitlab-ce-ca622a3e13cf88d94c6b3c98554e9782d37d4ad5.tar.gz
Merge branch '59786-show-renamed-file-in-mr' into 'master'
Fix to show renamed file in mr Closes #59786 See merge request gitlab-org/gitlab-ce!31888
-rw-r--r--app/assets/javascripts/diffs/components/diff_file_header.vue2
-rw-r--r--changelogs/unreleased/59786-show-renamed-file-in-mr.yml5
-rw-r--r--spec/javascripts/diffs/components/diff_file_header_spec.js2
3 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_file_header.vue b/app/assets/javascripts/diffs/components/diff_file_header.vue
index 32fbeaaa905..69ec6ab8600 100644
--- a/app/assets/javascripts/diffs/components/diff_file_header.vue
+++ b/app/assets/javascripts/diffs/components/diff_file_header.vue
@@ -130,7 +130,7 @@ export default {
return `\`${this.diffFile.file_path}\``;
},
isFileRenamed() {
- return this.diffFile.viewer.name === diffViewerModes.renamed;
+ return this.diffFile.renamed_file;
},
isModeChanged() {
return this.diffFile.viewer.name === diffViewerModes.mode_changed;
diff --git a/changelogs/unreleased/59786-show-renamed-file-in-mr.yml b/changelogs/unreleased/59786-show-renamed-file-in-mr.yml
new file mode 100644
index 00000000000..e8c52b592d2
--- /dev/null
+++ b/changelogs/unreleased/59786-show-renamed-file-in-mr.yml
@@ -0,0 +1,5 @@
+---
+title: Fix to show renamed file in mr
+merge_request: 31888
+author:
+type: changed
diff --git a/spec/javascripts/diffs/components/diff_file_header_spec.js b/spec/javascripts/diffs/components/diff_file_header_spec.js
index d4280d3ec2c..356e7a8f1fe 100644
--- a/spec/javascripts/diffs/components/diff_file_header_spec.js
+++ b/spec/javascripts/diffs/components/diff_file_header_spec.js
@@ -372,7 +372,7 @@ describe('diff_file_header', () => {
});
it('displays old and new path if the file was renamed', () => {
- props.diffFile.viewer.name = diffViewerModes.renamed;
+ props.diffFile.renamed_file = true;
vm = mountComponentWithStore(Component, { props, store });