mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
test: Update snapshots and mocks
This commit is contained in:
parent
3ca7523a02
commit
234713466e
@ -7,7 +7,7 @@ exports[`CustomScrollbar renders correctly 1`] = `
|
|||||||
Object {
|
Object {
|
||||||
"height": "auto",
|
"height": "auto",
|
||||||
"maxHeight": "100%",
|
"maxHeight": "100%",
|
||||||
"minHeight": "0",
|
"minHeight": 0,
|
||||||
"overflow": "hidden",
|
"overflow": "hidden",
|
||||||
"position": "relative",
|
"position": "relative",
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
@ -24,7 +24,7 @@ exports[`CustomScrollbar renders correctly 1`] = `
|
|||||||
"marginBottom": 0,
|
"marginBottom": 0,
|
||||||
"marginRight": 0,
|
"marginRight": 0,
|
||||||
"maxHeight": "calc(100% + 0px)",
|
"maxHeight": "calc(100% + 0px)",
|
||||||
"minHeight": "calc(0 + 0px)",
|
"minHeight": 0,
|
||||||
"overflow": "scroll",
|
"overflow": "scroll",
|
||||||
"position": "relative",
|
"position": "relative",
|
||||||
"right": undefined,
|
"right": undefined,
|
||||||
|
@ -6,7 +6,14 @@ import { getMultipleMockKeys, getMockKey } from './__mocks__/apiKeysMock';
|
|||||||
|
|
||||||
const setup = (propOverrides?: object) => {
|
const setup = (propOverrides?: object) => {
|
||||||
const props: Props = {
|
const props: Props = {
|
||||||
navModel: {} as NavModel,
|
navModel: {
|
||||||
|
main: {
|
||||||
|
text: 'Configuration'
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
text: 'Api Keys'
|
||||||
|
}
|
||||||
|
} as NavModel,
|
||||||
apiKeys: [] as ApiKey[],
|
apiKeys: [] as ApiKey[],
|
||||||
searchQuery: '',
|
searchQuery: '',
|
||||||
hasFetched: false,
|
hasFetched: false,
|
||||||
|
@ -1,21 +1,46 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`Render should render API keys table if there are any keys 1`] = `
|
exports[`Render should render API keys table if there are any keys 1`] = `
|
||||||
<div>
|
<Page
|
||||||
|
title="Configuration: Api Keys"
|
||||||
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Api Keys",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<PageLoader
|
<PageContents
|
||||||
pageName="Api keys"
|
isLoading={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</Page>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`Render should render CTA if there are no API keys 1`] = `
|
exports[`Render should render CTA if there are no API keys 1`] = `
|
||||||
<div>
|
<Page
|
||||||
|
title="Configuration: Api Keys"
|
||||||
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Api Keys",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
<PageContents
|
||||||
|
isLoading={false}
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className="page-container page-body"
|
className="page-container page-body"
|
||||||
>
|
>
|
||||||
@ -128,5 +153,6 @@ exports[`Render should render CTA if there are no API keys 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</Component>
|
</Component>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</PageContents>
|
||||||
|
</Page>
|
||||||
`;
|
`;
|
||||||
|
@ -10,7 +10,14 @@ const setup = (propOverrides?: object) => {
|
|||||||
dataSources: [] as DataSource[],
|
dataSources: [] as DataSource[],
|
||||||
layoutMode: LayoutModes.Grid,
|
layoutMode: LayoutModes.Grid,
|
||||||
loadDataSources: jest.fn(),
|
loadDataSources: jest.fn(),
|
||||||
navModel: {} as NavModel,
|
navModel: {
|
||||||
|
main: {
|
||||||
|
text: 'Configuration'
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
text: 'Data Sources'
|
||||||
|
}
|
||||||
|
} as NavModel,
|
||||||
dataSourcesCount: 0,
|
dataSourcesCount: 0,
|
||||||
searchQuery: '',
|
searchQuery: '',
|
||||||
setDataSourcesSearchQuery: jest.fn(),
|
setDataSourcesSearchQuery: jest.fn(),
|
||||||
|
@ -5,7 +5,16 @@ exports[`Render should render action bar and datasources 1`] = `
|
|||||||
title="Configuration: Data Sources"
|
title="Configuration: Data Sources"
|
||||||
>
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Data Sources",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<PageContents
|
<PageContents
|
||||||
isLoading={false}
|
isLoading={false}
|
||||||
@ -154,7 +163,16 @@ exports[`Render should render component 1`] = `
|
|||||||
title="Configuration: Data Sources"
|
title="Configuration: Data Sources"
|
||||||
>
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Data Sources",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<PageContents
|
<PageContents
|
||||||
isLoading={true}
|
isLoading={true}
|
||||||
|
@ -6,7 +6,14 @@ import { NavModel, Organization } from '../../types';
|
|||||||
const setup = (propOverrides?: object) => {
|
const setup = (propOverrides?: object) => {
|
||||||
const props: Props = {
|
const props: Props = {
|
||||||
organization: {} as Organization,
|
organization: {} as Organization,
|
||||||
navModel: {} as NavModel,
|
navModel: {
|
||||||
|
main: {
|
||||||
|
text: 'Configuration'
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
text: 'Org details'
|
||||||
|
}
|
||||||
|
} as NavModel,
|
||||||
loadOrganization: jest.fn(),
|
loadOrganization: jest.fn(),
|
||||||
setOrganizationName: jest.fn(),
|
setOrganizationName: jest.fn(),
|
||||||
updateOrganization: jest.fn(),
|
updateOrganization: jest.fn(),
|
||||||
|
@ -1,25 +1,50 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`Render should render component 1`] = `
|
exports[`Render should render component 1`] = `
|
||||||
<div>
|
<Page
|
||||||
|
title="Configuration: Org details"
|
||||||
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Org details",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
<PageContents
|
||||||
|
isLoading={true}
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className="page-container page-body"
|
className="page-container page-body"
|
||||||
>
|
|
||||||
<PageLoader
|
|
||||||
pageName="Organization"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</PageContents>
|
||||||
</div>
|
</Page>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`Render should render organization and preferences 1`] = `
|
exports[`Render should render organization and preferences 1`] = `
|
||||||
<div>
|
<Page
|
||||||
|
title="Configuration: Org details"
|
||||||
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Org details",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
<PageContents
|
||||||
|
isLoading={false}
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className="page-container page-body"
|
className="page-container page-body"
|
||||||
>
|
>
|
||||||
@ -34,5 +59,6 @@ exports[`Render should render organization and preferences 1`] = `
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</PageContents>
|
||||||
|
</Page>
|
||||||
`;
|
`;
|
||||||
|
@ -6,7 +6,14 @@ import { LayoutModes } from '../../core/components/LayoutSelector/LayoutSelector
|
|||||||
|
|
||||||
const setup = (propOverrides?: object) => {
|
const setup = (propOverrides?: object) => {
|
||||||
const props: Props = {
|
const props: Props = {
|
||||||
navModel: {} as NavModel,
|
navModel: {
|
||||||
|
main: {
|
||||||
|
text: 'Configuration'
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
text: 'Plugins'
|
||||||
|
}
|
||||||
|
} as NavModel,
|
||||||
plugins: [] as Plugin[],
|
plugins: [] as Plugin[],
|
||||||
searchQuery: '',
|
searchQuery: '',
|
||||||
setPluginsSearchQuery: jest.fn(),
|
setPluginsSearchQuery: jest.fn(),
|
||||||
|
@ -5,7 +5,16 @@ exports[`Render should render component 1`] = `
|
|||||||
title="Configuration: Plugins"
|
title="Configuration: Plugins"
|
||||||
>
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Plugins",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<PageContents
|
<PageContents
|
||||||
isLoading={true}
|
isLoading={true}
|
||||||
@ -31,7 +40,16 @@ exports[`Render should render list 1`] = `
|
|||||||
title="Configuration: Plugins"
|
title="Configuration: Plugins"
|
||||||
>
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Plugins",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<PageContents
|
<PageContents
|
||||||
isLoading={false}
|
isLoading={false}
|
||||||
|
@ -6,7 +6,14 @@ import { getMockTeam, getMultipleMockTeams } from './__mocks__/teamMocks';
|
|||||||
|
|
||||||
const setup = (propOverrides?: object) => {
|
const setup = (propOverrides?: object) => {
|
||||||
const props: Props = {
|
const props: Props = {
|
||||||
navModel: {} as NavModel,
|
navModel: {
|
||||||
|
main: {
|
||||||
|
text: 'Configuration'
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
text: 'Team List'
|
||||||
|
}
|
||||||
|
} as NavModel,
|
||||||
teams: [] as Team[],
|
teams: [] as Team[],
|
||||||
loadTeams: jest.fn(),
|
loadTeams: jest.fn(),
|
||||||
deleteTeam: jest.fn(),
|
deleteTeam: jest.fn(),
|
||||||
|
@ -2,10 +2,19 @@
|
|||||||
|
|
||||||
exports[`Render should render component 1`] = `
|
exports[`Render should render component 1`] = `
|
||||||
<Page
|
<Page
|
||||||
title="Configuration: Teams"
|
title="Configuration: Team List"
|
||||||
>
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Team List",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<PageContents
|
<PageContents
|
||||||
isLoading={true}
|
isLoading={true}
|
||||||
@ -15,10 +24,19 @@ exports[`Render should render component 1`] = `
|
|||||||
|
|
||||||
exports[`Render should render teams table 1`] = `
|
exports[`Render should render teams table 1`] = `
|
||||||
<Page
|
<Page
|
||||||
title="Configuration: Teams"
|
title="Configuration: Team List"
|
||||||
>
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Team List",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<PageContents
|
<PageContents
|
||||||
isLoading={false}
|
isLoading={false}
|
||||||
|
@ -11,7 +11,14 @@ jest.mock('../../core/app_events', () => ({
|
|||||||
|
|
||||||
const setup = (propOverrides?: object) => {
|
const setup = (propOverrides?: object) => {
|
||||||
const props: Props = {
|
const props: Props = {
|
||||||
navModel: {} as NavModel,
|
navModel: {
|
||||||
|
main: {
|
||||||
|
text: 'Configuration'
|
||||||
|
},
|
||||||
|
node: {
|
||||||
|
text: 'Users'
|
||||||
|
}
|
||||||
|
} as NavModel,
|
||||||
users: [] as OrgUser[],
|
users: [] as OrgUser[],
|
||||||
invitees: [] as Invitee[],
|
invitees: [] as Invitee[],
|
||||||
searchQuery: '',
|
searchQuery: '',
|
||||||
|
@ -5,7 +5,16 @@ exports[`Render should render List page 1`] = `
|
|||||||
title="Configuration: Users"
|
title="Configuration: Users"
|
||||||
>
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Users",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<PageContents
|
<PageContents
|
||||||
isLoading={false}
|
isLoading={false}
|
||||||
@ -28,7 +37,16 @@ exports[`Render should render component 1`] = `
|
|||||||
title="Configuration: Users"
|
title="Configuration: Users"
|
||||||
>
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
model={Object {}}
|
model={
|
||||||
|
Object {
|
||||||
|
"main": Object {
|
||||||
|
"text": "Configuration",
|
||||||
|
},
|
||||||
|
"node": Object {
|
||||||
|
"text": "Users",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<PageContents
|
<PageContents
|
||||||
isLoading={true}
|
isLoading={true}
|
||||||
|
Loading…
Reference in New Issue
Block a user