From fda8735029d5aea76060f2e2b071ebcd6cd0777e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 23 Dec 2019 15:07:48 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../feature_highlight/feature_highlight_options_spec.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'spec/frontend/feature_highlight') 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); }); }); -- cgit v1.2.3