From bcc70301531b6c3118120173389f2aaa7452bf11 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 23 Jul 2020 18:27:09 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-2-stable-ee --- .../pages/__snapshots__/index_spec.js.snap | 4 ++-- spec/frontend/diffs/store/actions_spec.js | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'spec/frontend') diff --git a/spec/frontend/design_management_new/pages/__snapshots__/index_spec.js.snap b/spec/frontend/design_management_new/pages/__snapshots__/index_spec.js.snap index 3d1fe143ac3..902803b0ad1 100644 --- a/spec/frontend/design_management_new/pages/__snapshots__/index_spec.js.snap +++ b/spec/frontend/design_management_new/pages/__snapshots__/index_spec.js.snap @@ -2,7 +2,7 @@ exports[`Design management index page designs does not render toolbar when there is no permission 1`] = `
@@ -87,7 +87,7 @@ exports[`Design management index page designs does not render toolbar when there exports[`Design management index page designs renders designs list and header with upload button 1`] = `
{ expect(commit).toHaveBeenCalledWith(types.UPDATE_CURRENT_DIFF_FILE_ID, '123'); }); + + it('does not commit UPDATE_CURRENT_DIFF_FILE_ID when discussion has no diff_file', () => { + const commit = jest.fn(); + const rootGetters = { + getDiscussion: () => ({ id: '1' }), + notesById: { '1': { discussion_id: '2' } }, + }; + + setCurrentDiffFileIdFromNote({ commit, rootGetters }, '1'); + + expect(commit).not.toHaveBeenCalled(); + }); }); describe('navigateToDiffFileIndex', () => { -- cgit v1.2.1