Updating tests - state seems broken, needs attention

This commit is contained in:
James Barnsley
2020-10-28 21:24:38 +13:00
parent c511b763fb
commit 6da4181fa7
7 changed files with 256 additions and 257 deletions

View File

@ -55,7 +55,8 @@ class GridItem extends React.Component {
renderSecondary = ({
uri,
tracks_total,
tracks_total = 0,
tracks,
followers,
albums_uris,
artists,
@ -64,7 +65,7 @@ class GridItem extends React.Component {
case 'playlist':
return (
<span className="grid__item__secondary__content">
<I18n path="specs.tracks" count={tracks_total || 0} />
<I18n path="specs.tracks" count={tracks.length || tracks_total} />
</span>
);
@ -95,7 +96,9 @@ class GridItem extends React.Component {
render = () => {
const {
item: { album },
item: {
album,
} = {},
link: customLink,
type,
show_source_icon,
@ -149,4 +152,8 @@ const mapStateToProps = (state) => {
};
};
export {
GridItem,
};
export default connect(mapStateToProps)(GridItem);