Commit c4009e64 authored by Phil Hughes's avatar Phil Hughes

Merge branch '7573-show-click-to-expand-on-not-rendered-diffs' into 'master'

Display click to expand on collapsed diffs

Closes #51466

See merge request gitlab-org/gitlab-ce!21716
parents 3784a370 06025e4a
......@@ -44,7 +44,7 @@ export default {
},
showExpandMessage() {
return (
!this.isCollapsed &&
this.isCollapsed ||
!this.file.highlightedDiffLines &&
!this.isLoadingCollapsedDiff &&
!this.file.tooLarge &&
......
---
title: Fix absent Click to Expand link on diffs not rendered on first load of Merge
Requests Changes tab
merge_request: 21716
author:
type: fixed
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment