Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-23 18:07:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-23 18:07:48 +0300
commitfda8735029d5aea76060f2e2b071ebcd6cd0777e (patch)
tree785f01501ab938aeed86fea53063e4598dd28d81 /spec/frontend/feature_highlight
parent4aeb8a02c506eaa8f0710ee17edd9e35dd68d280 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/feature_highlight')
-rw-r--r--spec/frontend/feature_highlight/feature_highlight_options_spec.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/frontend/feature_highlight/feature_highlight_options_spec.js b/spec/frontend/feature_highlight/feature_highlight_options_spec.js
index cd41d1ed091..8b75c46fd4c 100644
--- a/spec/frontend/feature_highlight/feature_highlight_options_spec.js
+++ b/spec/frontend/feature_highlight/feature_highlight_options_spec.js
@@ -1,5 +1,5 @@
+import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
import domContentLoaded from '~/feature_highlight/feature_highlight_options';
-import bp from '~/breakpoints';
describe('feature highlight options', () => {
describe('domContentLoaded', () => {
@@ -21,9 +21,15 @@ describe('feature highlight options', () => {
expect(domContentLoaded()).toBe(false);
});
- it('should call highlightFeatures when breakpoint is lg', () => {
+ it('should not call highlightFeatures when breakpoint is not xl', () => {
jest.spyOn(bp, 'getBreakpointSize').mockReturnValue('lg');
+ expect(domContentLoaded()).toBe(false);
+ });
+
+ it('should call highlightFeatures when breakpoint is xl', () => {
+ jest.spyOn(bp, 'getBreakpointSize').mockReturnValue('xl');
+
expect(domContentLoaded()).toBe(true);
});
});