Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
a186bc01
Unverified
Commit
a186bc01
authored
Sep 06, 2018
by
Alexander Zobnin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests for withScrollBar() wrapper
parent
cf832e7d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
0 deletions
+109
-0
public/app/core/components/ScrollBar/__snapshots__/withScrollBar.test.tsx.snap
+86
-0
public/app/core/components/ScrollBar/withScrollBar.test.tsx
+23
-0
No files found.
public/app/core/components/ScrollBar/__snapshots__/withScrollBar.test.tsx.snap
0 → 100644
View file @
a186bc01
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`withScrollBar renders correctly 1`] = `
<div
className="custom-scrollbars"
style={
Object {
"height": "auto",
"maxHeight": "100%",
"minHeight": "100%",
"overflow": "hidden",
"position": "relative",
"width": "100%",
}
}
>
<div
className="view"
style={
Object {
"WebkitOverflowScrolling": "touch",
"bottom": undefined,
"left": undefined,
"marginBottom": 0,
"marginRight": 0,
"maxHeight": "calc(100% + 0px)",
"minHeight": "calc(100% + 0px)",
"overflow": "scroll",
"position": "relative",
"right": undefined,
"top": undefined,
}
}
>
<div
className="my-component"
/>
</div>
<div
className="track-horizontal"
style={
Object {
"display": "none",
"height": 6,
"opacity": 0,
"position": "absolute",
"transition": "opacity 200ms",
}
}
>
<div
className="thumb-horizontal"
style={
Object {
"display": "block",
"height": "100%",
"position": "relative",
}
}
/>
</div>
<div
className="track-vertical"
style={
Object {
"display": "none",
"opacity": 0,
"position": "absolute",
"transition": "opacity 200ms",
"width": 6,
}
}
>
<div
className="thumb-vertical"
style={
Object {
"display": "block",
"position": "relative",
"width": "100%",
}
}
/>
</div>
</div>
`;
public/app/core/components/ScrollBar/withScrollBar.test.tsx
0 → 100644
View file @
a186bc01
import
React
from
'react'
;
import
renderer
from
'react-test-renderer'
;
import
withScrollBar
from
'./withScrollBar'
;
class
TestComponent
extends
React
.
Component
{
render
()
{
return
<
div
className=
"my-component"
/>;
}
}
describe
(
'withScrollBar'
,
()
=>
{
it
(
'renders correctly'
,
()
=>
{
const
TestComponentWithScroll
=
withScrollBar
(
TestComponent
);
const
tree
=
renderer
.
create
(
<
TestComponentWithScroll
>
<
p
>
Scrollable content
</
p
>
</
TestComponentWithScroll
>
)
.
toJSON
();
expect
(
tree
).
toMatchSnapshot
();
});
});
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