From eebf24ead51a28863126f0b144e4fcdc5a6b2916 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 2 Apr 2019 13:24:36 +0100 Subject: Fixes duplicate diff too large error messages Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59802 --- app/assets/javascripts/diffs/components/diff_file.vue | 4 ---- changelogs/unreleased/fixed-duplicated-large-text-on-diffs.yml | 5 +++++ locale/gitlab.pot | 3 --- spec/javascripts/diffs/components/diff_file_spec.js | 8 +++----- 4 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 changelogs/unreleased/fixed-duplicated-large-text-on-diffs.yml diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue index 58a9605c181..f5876a73eff 100644 --- a/app/assets/javascripts/diffs/components/diff_file.vue +++ b/app/assets/javascripts/diffs/components/diff_file.vue @@ -188,10 +188,6 @@ export default { /> -
- {{ __('This source diff could not be displayed because it is too large.') }} - -
diff --git a/changelogs/unreleased/fixed-duplicated-large-text-on-diffs.yml b/changelogs/unreleased/fixed-duplicated-large-text-on-diffs.yml new file mode 100644 index 00000000000..770186a64b0 --- /dev/null +++ b/changelogs/unreleased/fixed-duplicated-large-text-on-diffs.yml @@ -0,0 +1,5 @@ +--- +title: Fixed duplicated diff too large error message +merge_request: +author: +type: fixed diff --git a/locale/gitlab.pot b/locale/gitlab.pot index fcbd34a05d5..bb145a0984f 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -8278,9 +8278,6 @@ msgstr "" msgid "This setting will update the hostname that is used to generate private commit emails. %{learn_more}" msgstr "" -msgid "This source diff could not be displayed because it is too large." -msgstr "" - msgid "This timeout will take precedence when lower than project-defined timeout and accepts a human readable time input language like \"1 hour\". Values without specification represent seconds." msgstr "" diff --git a/spec/javascripts/diffs/components/diff_file_spec.js b/spec/javascripts/diffs/components/diff_file_spec.js index d9b298e84da..ef4589ada48 100644 --- a/spec/javascripts/diffs/components/diff_file_spec.js +++ b/spec/javascripts/diffs/components/diff_file_spec.js @@ -141,18 +141,16 @@ describe('DiffFile', () => { it('should have too large warning and blob link', done => { const BLOB_LINK = '/file/view/path'; vm.file.viewer.error = diffViewerErrors.too_large; + vm.file.viewer.error_message = + 'This source diff could not be displayed because it is too large'; vm.file.view_path = BLOB_LINK; + vm.file.renderIt = true; vm.$nextTick(() => { expect(vm.$el.innerText).toContain( 'This source diff could not be displayed because it is too large', ); - expect(vm.$el.querySelector('.js-too-large-diff')).toBeDefined(); - expect( - vm.$el.querySelector('.js-too-large-diff a').href.indexOf(BLOB_LINK), - ).toBeGreaterThan(-1); - done(); }); }); -- cgit v1.2.1