diff options
Diffstat (limited to 'spec/frontend/diffs/components/diff_file_spec.js')
-rw-r--r-- | spec/frontend/diffs/components/diff_file_spec.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/frontend/diffs/components/diff_file_spec.js b/spec/frontend/diffs/components/diff_file_spec.js index 53f135471b7..13efd3584b4 100644 --- a/spec/frontend/diffs/components/diff_file_spec.js +++ b/spec/frontend/diffs/components/diff_file_spec.js @@ -324,6 +324,22 @@ describe('DiffFile', () => { }); describe('collapsing', () => { + describe('forced open', () => { + it('should have content even when it is automatically collapsed', () => { + makeFileAutomaticallyCollapsed(store); + + expect(findDiffContentArea(wrapper).element.children.length).toBe(1); + expect(wrapper.classes('has-body')).toBe(true); + }); + + it('should have content even when it is manually collapsed', () => { + makeFileManuallyCollapsed(store); + + expect(findDiffContentArea(wrapper).element.children.length).toBe(1); + expect(wrapper.classes('has-body')).toBe(true); + }); + }); + describe(`\`${EVT_EXPAND_ALL_FILES}\` event`, () => { beforeEach(() => { jest.spyOn(wrapper.vm, 'handleToggle').mockImplementation(() => {}); |