diff options
Diffstat (limited to 'spec/frontend/diffs/components/diff_row_spec.js')
-rw-r--r-- | spec/frontend/diffs/components/diff_row_spec.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/frontend/diffs/components/diff_row_spec.js b/spec/frontend/diffs/components/diff_row_spec.js index 30510958704..e9fbde11211 100644 --- a/spec/frontend/diffs/components/diff_row_spec.js +++ b/spec/frontend/diffs/components/diff_row_spec.js @@ -112,6 +112,8 @@ describe('DiffRow', () => { }); const getCommentButton = (side) => wrapper.find(`[data-testid="${side}-comment-button"]`); + const findRightCommentButton = () => wrapper.find('[data-testid="right-comment-button"]'); + const findLeftCommentButton = () => wrapper.find('[data-testid="left-comment-button"]'); describe.each` side @@ -135,6 +137,10 @@ describe('DiffRow', () => { it('renders', () => { wrapper = createWrapper({ props: { line, inline: false } }); + expect(findRightCommentButton().attributes('draggable')).toBe('true'); + expect(findLeftCommentButton().attributes('draggable')).toBe( + side === 'left' ? 'true' : 'false', + ); expect(getCommentButton(side).exists()).toBe(true); }); |