Skip to content

Commit

Permalink
Remove ‘undefined’ from stylemock in test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarhane committed Jan 13, 2020
1 parent 89e8287 commit 0bc8d61
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
25 changes: 10 additions & 15 deletions src/browser/modules/DBMSInfo/MetaItems.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ import {
import Render from 'browser-components/Render'
import numberToUSLocale from 'shared/utils/number-to-US-locale'

const wrapperStyleObj =
styles && styles.wrapper
? {
[styles.wrapper]: true
}
: {}

const ShowMore = ({ total, shown, moreStep, onMore }) => {
const numMore = total - shown > moreStep ? moreStep : total - shown
return (
Expand Down Expand Up @@ -110,11 +117,7 @@ const LabelItems = ({
return (
<DrawerSection>
<DrawerSubHeader>Node Labels</DrawerSubHeader>
<DrawerSectionBody
className={classNames({
[styles.wrapper]: true
})}
>
<DrawerSectionBody className={classNames(wrapperStyleObj)}>
{labelItems}
</DrawerSectionBody>
<ShowMore
Expand Down Expand Up @@ -156,11 +159,7 @@ const RelationshipItems = ({
return (
<DrawerSection>
<DrawerSubHeader>Relationship Types</DrawerSubHeader>
<DrawerSectionBody
className={classNames({
[styles.wrapper]: true
})}
>
<DrawerSectionBody className={classNames(wrapperStyleObj)}>
{relationshipItems}
</DrawerSectionBody>
<ShowMore
Expand Down Expand Up @@ -205,11 +204,7 @@ const PropertyItems = ({
return (
<DrawerSection>
<DrawerSubHeader>Property Keys</DrawerSubHeader>
<DrawerSectionBody
className={classNames({
[styles.wrapper]: true
})}
>
<DrawerSectionBody className={classNames(wrapperStyleObj)}>
{propertyItems}
</DrawerSectionBody>
<ShowMore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`LabelItems renders empty 1`] = `
Node Labels
</h5>
<div
class="undefined Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
class="Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
>
<p>
There are no labels in database
Expand All @@ -32,7 +32,7 @@ exports[`LabelItems renders labels 1`] = `
Node Labels
</h5>
<div
class="undefined Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
class="Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
>
<div
class="styled__chip-t72hk3-0 styled__StyledLabel-t72hk3-1 hThrTr"
Expand Down Expand Up @@ -68,7 +68,7 @@ exports[`PropertyItems renders empty 1`] = `
Property Keys
</h5>
<div
class="undefined Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
class="Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
>
<p>
There are no properties in database
Expand All @@ -89,7 +89,7 @@ exports[`PropertyItems renders properties 1`] = `
Property Keys
</h5>
<div
class="undefined Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
class="Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
>
<div
class="styled__chip-t72hk3-0 styled__StyledProperty-t72hk3-3 EbItw"
Expand Down Expand Up @@ -119,7 +119,7 @@ exports[`RelationshipItems renders empty 1`] = `
Relationship Types
</h5>
<div
class="undefined Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
class="Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
>
<p>
No relationships in database
Expand All @@ -140,7 +140,7 @@ exports[`RelationshipItems renders relationshipTypes 1`] = `
Relationship Types
</h5>
<div
class="undefined Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
class="Drawer__DrawerSectionBody-sc-5bct1g-5 RMcRs"
>
<div
class="styled__chip-t72hk3-0 styled__StyledRelationship-t72hk3-2 jIILpR"
Expand Down

0 comments on commit 0bc8d61

Please sign in to comment.