-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1487 from headlamp-k8s/change-logo-test
Fixes for headlamp-plugin tests and story tests for change-logo and tables examples
- Loading branch information
Showing
16 changed files
with
208 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,6 @@ | |
] | ||
}, | ||
"devDependencies": { | ||
"@kinvolk/headlamp-plugin": "^0.6.1" | ||
"@kinvolk/headlamp-plugin": "^0.7.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { AppLogoProps } from '@kinvolk/headlamp-plugin/lib'; | ||
import { Meta, Story } from '@storybook/react/types-6-0'; | ||
import React from 'react'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
import { ReactiveLogo } from './index'; | ||
|
||
export default { | ||
title: 'ReactiveLogo', | ||
component: ReactiveLogo, | ||
decorators: [ | ||
Story => ( | ||
<MemoryRouter> | ||
<Story /> | ||
</MemoryRouter> | ||
), | ||
], | ||
} as Meta; | ||
|
||
const Template: Story<AppLogoProps> = args => <ReactiveLogo {...args} />; | ||
|
||
export const SmallDark = Template.bind({}); | ||
SmallDark.args = { | ||
logoType: 'small', | ||
themeName: 'dark', | ||
}; | ||
|
||
export const SmallLight = Template.bind({}); | ||
SmallLight.args = { | ||
logoType: 'small', | ||
themeName: 'light', | ||
}; | ||
|
||
export const LargeDark = Template.bind({}); | ||
LargeDark.args = { | ||
logoType: 'large', | ||
themeName: 'dark', | ||
}; | ||
|
||
export const LargeLight = Template.bind({}); | ||
LargeLight.args = { | ||
logoType: 'large', | ||
themeName: 'light', | ||
}; |
33 changes: 33 additions & 0 deletions
33
plugins/examples/change-logo/src/__snapshots__/ReactiveLogo.stories.storyshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots ReactiveLogo Large Dark 1`] = ` | ||
<div> | ||
<p> | ||
large dark theme logo | ||
</p> | ||
</div> | ||
`; | ||
|
||
exports[`Storyshots ReactiveLogo Large Light 1`] = ` | ||
<div> | ||
<p> | ||
large light theme logo | ||
</p> | ||
</div> | ||
`; | ||
|
||
exports[`Storyshots ReactiveLogo Small Dark 1`] = ` | ||
<div> | ||
<p> | ||
small dark theme logo | ||
</p> | ||
</div> | ||
`; | ||
|
||
exports[`Storyshots ReactiveLogo Small Light 1`] = ` | ||
<div> | ||
<p> | ||
small light theme logo | ||
</p> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { initTests } from '@kinvolk/headlamp-plugin/config/storyshots/storyshots-test'; | ||
|
||
initTests(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,6 @@ | |
] | ||
}, | ||
"devDependencies": { | ||
"@kinvolk/headlamp-plugin": "^0.6.1" | ||
"@kinvolk/headlamp-plugin": "^0.7.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Meta, Story } from '@storybook/react/types-6-0'; | ||
import React from 'react'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
import { ContextMenu, ContextMenuProps } from './index'; | ||
|
||
export default { | ||
title: 'ContextMenu', | ||
component: ContextMenu, | ||
decorators: [ | ||
Story => ( | ||
<MemoryRouter> | ||
<Story /> | ||
</MemoryRouter> | ||
), | ||
], | ||
} as Meta; | ||
|
||
const Template: Story<ContextMenuProps> = args => <ContextMenu {...args} />; | ||
|
||
export const OpenMenu = Template.bind({}); | ||
OpenMenu.args = { | ||
detailsLink: 'https://headlamp.dev/', | ||
}; |
22 changes: 22 additions & 0 deletions
22
plugins/examples/tables/src/__snapshots__/ContextMenu.stories.storyshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots ContextMenu Open Menu 1`] = ` | ||
<div> | ||
<button | ||
aria-label="Open pod context menu" | ||
class="MuiButtonBase-root MuiIconButton-root" | ||
tabindex="0" | ||
title="Open pod context menu" | ||
type="button" | ||
> | ||
<span | ||
class="MuiIconButton-label" | ||
> | ||
<span /> | ||
</span> | ||
<span | ||
class="MuiTouchRipple-root" | ||
/> | ||
</button> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { initTests } from '@kinvolk/headlamp-plugin/config/storyshots/storyshots-test'; | ||
|
||
initTests(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.