diff --git a/spec/frontend/diffs/components/diff_row_spec.js b/spec/frontend/diffs/components/diff_row_spec.js index 30510958704c7a40116f9428f613702f37fbea1a..e9fbde1121162f546e71a88abe568decbc95964d 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); });