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
64eace96
Commit
64eace96
authored
Sep 25, 2018
by
Peter Holmberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first test
parent
0b7576a1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
1 deletions
+53
-1
public/app/features/plugins/PluginListPage.test.tsx
+31
-0
public/app/features/plugins/PluginListPage.tsx
+1
-1
public/app/features/plugins/__snapshots__/PluginListPage.test.tsx.snap
+21
-0
No files found.
public/app/features/plugins/PluginListPage.test.tsx
0 → 100644
View file @
64eace96
import
React
from
'react'
;
import
{
shallow
}
from
'enzyme'
;
import
{
PluginListPage
,
Props
}
from
'./PluginListPage'
;
import
{
NavModel
,
Plugin
}
from
'../../types'
;
const
setup
=
(
propOverrides
?:
object
)
=>
{
const
props
:
Props
=
{
navModel
:
{}
as
NavModel
,
plugins
:
[]
as
Plugin
[],
layoutMode
:
'grid'
,
loadPlugins
:
jest
.
fn
(),
};
Object
.
assign
(
props
,
propOverrides
);
const
wrapper
=
shallow
(<
PluginListPage
{
...
props
}
/>);
const
instance
=
wrapper
.
instance
()
as
PluginListPage
;
return
{
wrapper
,
instance
,
};
};
describe
(
'Render'
,
()
=>
{
it
(
'should render component'
,
()
=>
{
const
{
wrapper
}
=
setup
();
expect
(
wrapper
).
toMatchSnapshot
();
});
});
public/app/features/plugins/PluginListPage.tsx
View file @
64eace96
...
@@ -9,7 +9,7 @@ import { loadPlugins } from './state/actions';
...
@@ -9,7 +9,7 @@ import { loadPlugins } from './state/actions';
import
{
getNavModel
}
from
'../../core/selectors/navModel'
;
import
{
getNavModel
}
from
'../../core/selectors/navModel'
;
import
{
getLayoutMode
,
getPlugins
}
from
'./state/selectors'
;
import
{
getLayoutMode
,
getPlugins
}
from
'./state/selectors'
;
interface
Props
{
export
interface
Props
{
navModel
:
NavModel
;
navModel
:
NavModel
;
plugins
:
Plugin
[];
plugins
:
Plugin
[];
layoutMode
:
string
;
layoutMode
:
string
;
...
...
public/app/features/plugins/__snapshots__/PluginListPage.test.tsx.snap
0 → 100644
View file @
64eace96
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Render should render component 1`] = `
<div>
<PageHeader
model={Object {}}
/>
<div
className="page-container page-body"
>
<Connect(PluginActionBar)
onQueryChange={[Function]}
searchQuery=""
/>
<PluginList
layout="grid"
plugins={Array []}
/>
</div>
</div>
`;
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