diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-24 15:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-24 15:09:24 +0300 |
commit | d081e00aa79079792b040af3323883f1f43830c5 (patch) | |
tree | 54b5d43035030bf1eb44eee8a010ef3a21ebf97c /spec/frontend/diffs | |
parent | d6348d22dd0c78e11d56855cb5f1fb71be437901 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/diffs')
-rw-r--r-- | spec/frontend/diffs/components/diff_table_cell_spec.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/spec/frontend/diffs/components/diff_table_cell_spec.js b/spec/frontend/diffs/components/diff_table_cell_spec.js index e871d86d901..9693fe68b57 100644 --- a/spec/frontend/diffs/components/diff_table_cell_spec.js +++ b/spec/frontend/diffs/components/diff_table_cell_spec.js @@ -100,7 +100,11 @@ describe('DiffTableCell', () => { setWindowLocation({ href: `${TEST_HOST}?${query}` }); createComponent({ showCommentButton }); - expect(findNoteButton().exists()).toBe(expectation); + wrapper.setData({ isCommentButtonRendered: showCommentButton }); + + return wrapper.vm.$nextTick().then(() => { + expect(findNoteButton().exists()).toBe(expectation); + }); }, ); @@ -108,7 +112,6 @@ describe('DiffTableCell', () => { isHover | otherProps | discussions | expectation ${true} | ${{}} | ${[]} | ${true} ${false} | ${{}} | ${[]} | ${false} - ${true} | ${{ line: { ...line, type: 'match' } }} | ${[]} | ${false} ${true} | ${{ line: { ...line, type: 'context' } }} | ${[]} | ${false} ${true} | ${{ line: { ...line, type: 'old-nonewline' } }} | ${[]} | ${false} ${true} | ${{}} | ${[{}]} | ${false} @@ -122,7 +125,13 @@ describe('DiffTableCell', () => { ...otherProps, }); - expect(findNoteButton().isVisible()).toBe(expectation); + wrapper.setData({ + isCommentButtonRendered: true, + }); + + return wrapper.vm.$nextTick().then(() => { + expect(findNoteButton().isVisible()).toBe(expectation); + }); }, ); }); |