Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d0af8c32
Commit
d0af8c32
authored
Apr 12, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
46864c43
44be329d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
app/assets/javascripts/breakpoints.js
app/assets/javascripts/breakpoints.js
+1
-1
spec/javascripts/breakpoints_spec.js
spec/javascripts/breakpoints_spec.js
+14
-0
No files found.
app/assets/javascripts/breakpoints.js
View file @
d0af8c32
...
...
@@ -15,7 +15,7 @@ const BreakpointInstance = {
return
breakpoint
;
},
isDesktop
()
{
return
[
'
lg
'
,
'
md
'
].
includes
(
this
.
getBreakpointSize
);
return
[
'
lg
'
,
'
md
'
].
includes
(
this
.
getBreakpointSize
()
);
},
};
...
...
spec/javascripts/breakpoints_spec.js
View file @
d0af8c32
...
...
@@ -10,4 +10,18 @@ describe('breakpoints', () => {
expect
(
bp
.
getBreakpointSize
()).
toBe
(
key
);
});
});
describe
(
'
isDesktop
'
,
()
=>
{
it
(
'
returns true when screen size is medium
'
,
()
=>
{
spyOn
(
bp
,
'
windowWidth
'
).
and
.
returnValue
(
breakpoints
.
md
+
10
);
expect
(
bp
.
isDesktop
()).
toBe
(
true
);
});
it
(
'
returns false when screen size is small
'
,
()
=>
{
spyOn
(
bp
,
'
windowWidth
'
).
and
.
returnValue
(
breakpoints
.
sm
+
10
);
expect
(
bp
.
isDesktop
()).
toBe
(
false
);
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment