diff options
author | André Luís <aluis@gitlab.com> | 2018-09-13 11:59:50 +0100 |
---|---|---|
committer | André Luís <aluis@gitlab.com> | 2018-09-13 12:34:18 +0100 |
commit | 06025e4a26be528c3def72fb0ae9d68140b20860 (patch) | |
tree | 2fbd5bd5126119904cadcd500f5098f0698e65b6 /spec/javascripts | |
parent | 71f3d48544cc0857c8d470b182f7e809de6a4642 (diff) | |
download | gitlab-ce-06025e4a26be528c3def72fb0ae9d68140b20860.tar.gz |
Display click to expand on collapsed diffs
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/diffs/components/diff_file_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/javascripts/diffs/components/diff_file_spec.js b/spec/javascripts/diffs/components/diff_file_spec.js index 845fef23db6..2a52cd2b179 100644 --- a/spec/javascripts/diffs/components/diff_file_spec.js +++ b/spec/javascripts/diffs/components/diff_file_spec.js @@ -63,6 +63,18 @@ describe('DiffFile', () => { }); }); + it('should have collapsed text and link even before rendered', done => { + vm.file.renderIt = false; + vm.file.collapsed = true; + + vm.$nextTick(() => { + expect(vm.$el.innerText).toContain('This diff is collapsed'); + expect(vm.$el.querySelectorAll('.js-click-to-expand').length).toEqual(1); + + done(); + }); + }); + it('should have loading icon while loading a collapsed diffs', done => { vm.file.collapsed = true; vm.isLoadingCollapsedDiff = true; |