summaryrefslogtreecommitdiff
path: root/spec/frontend
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-23 18:27:09 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-23 18:27:09 +0000
commitbcc70301531b6c3118120173389f2aaa7452bf11 (patch)
tree161f1ee56e15ec9e59f48c5e1a9cb86b62469a49 /spec/frontend
parentd47fc5085a706ab37d038636c9d5934da69853f0 (diff)
downloadgitlab-ce-bcc70301531b6c3118120173389f2aaa7452bf11.tar.gz
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/frontend')
-rw-r--r--spec/frontend/design_management_new/pages/__snapshots__/index_spec.js.snap4
-rw-r--r--spec/frontend/diffs/store/actions_spec.js12
2 files changed, 14 insertions, 2 deletions
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`] = `
<div
- class="gl-mt-5"
+ class="gl-mt-5 designs-root"
data-testid="designs-root"
>
<!---->
@@ -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`] = `
<div
- class="gl-mt-5"
+ class="gl-mt-5 designs-root"
data-testid="designs-root"
>
<header
diff --git a/spec/frontend/diffs/store/actions_spec.js b/spec/frontend/diffs/store/actions_spec.js
index ec6ad031813..fc5e39357ca 100644
--- a/spec/frontend/diffs/store/actions_spec.js
+++ b/spec/frontend/diffs/store/actions_spec.js
@@ -1603,6 +1603,18 @@ describe('DiffsStoreActions', () => {
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', () => {