summaryrefslogtreecommitdiff
path: root/spec/frontend/diffs
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-24 01:43:31 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-24 01:43:31 +0000
commite20a1cde5d740fbc9f4d033786a8cd5ad7eb8b4d (patch)
treecf76b0527f1909eaf1ecac057a4ccc7591cce4f6 /spec/frontend/diffs
parent5fc725def41e6973e92bc32095774edd60fd154f (diff)
downloadgitlab-ce-e20a1cde5d740fbc9f4d033786a8cd5ad7eb8b4d.tar.gz
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/frontend/diffs')
-rw-r--r--spec/frontend/diffs/store/getters_versions_dropdowns_spec.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/frontend/diffs/store/getters_versions_dropdowns_spec.js b/spec/frontend/diffs/store/getters_versions_dropdowns_spec.js
index 0343ef75732..eb0f2364a50 100644
--- a/spec/frontend/diffs/store/getters_versions_dropdowns_spec.js
+++ b/spec/frontend/diffs/store/getters_versions_dropdowns_spec.js
@@ -18,6 +18,7 @@ describe('Compare diff version dropdowns', () => {
};
localState.targetBranchName = 'baseVersion';
localState.mergeRequestDiffs = diffsMockData;
+ gon.features = { diffCompareWithHead: true };
});
describe('selectedTargetIndex', () => {
@@ -128,6 +129,14 @@ describe('Compare diff version dropdowns', () => {
});
assertVersions(targetVersions);
});
+
+ it('does not list head version if feature flag is not enabled', () => {
+ gon.features = { diffCompareWithHead: false };
+ setupTest();
+ const targetVersions = getters.diffCompareDropdownTargetVersions(localState, getters);
+
+ expect(targetVersions.find(version => version.isHead)).toBeUndefined();
+ });
});
it('diffCompareDropdownSourceVersions', () => {