Skip to content

Commit

Permalink
fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jackiequach committed Oct 2, 2023
1 parent 5cebc38 commit 29c44bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 37 deletions.
3 changes: 2 additions & 1 deletion src/components/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ export const Hero = chakra(

if (!heroSecondaryTypes.includes(heroType)) {
contentBoxStyling = {
...(backgroundColor && { backgroundColor }),
...(foregroundColor && { color: foregroundColor }),
...(backgroundColor && { backgroundColor }),
};
} else if (
foregroundColor ||
Expand Down Expand Up @@ -230,6 +230,7 @@ export const Hero = chakra(
>
<Box
data-testid="hero-content"
style={contentBoxStyling}
__css={{ ...styles.content, ...contentBoxStyling }}
>
{childrenToRender}
Expand Down
42 changes: 6 additions & 36 deletions src/components/Hero/__snapshots__/Hero.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ exports[`Hero Renders the UI snapshot correctly 1`] = `
<div
className="css-0"
data-testid="hero-content"
style={
{
"backgroundColor": undefined,
"color": undefined,
}
}
style={{}}
>
<h1
className="chakra-heading css-eyyo6e"
Expand Down Expand Up @@ -240,12 +235,7 @@ exports[`Hero Renders the UI snapshot correctly 7`] = `
<div
className="css-0"
data-testid="hero-content"
style={
{
"backgroundColor": undefined,
"color": undefined,
}
}
style={{}}
>
<h1
className="chakra-heading css-eyyo6e"
Expand Down Expand Up @@ -274,12 +264,7 @@ exports[`Hero Renders the UI snapshot correctly 8`] = `
<div
className="css-0"
data-testid="hero-content"
style={
{
"backgroundColor": undefined,
"color": undefined,
}
}
style={{}}
>
<div
className="css-1gt4hjv"
Expand Down Expand Up @@ -318,12 +303,7 @@ exports[`Hero Renders the UI snapshot correctly 9`] = `
<div
className="css-0"
data-testid="hero-content"
style={
{
"backgroundColor": undefined,
"color": undefined,
}
}
style={{}}
>
<div
className="css-1gt4hjv"
Expand Down Expand Up @@ -361,12 +341,7 @@ exports[`Hero Renders the UI snapshot correctly 10`] = `
<div
className="css-0"
data-testid="hero-content"
style={
{
"backgroundColor": undefined,
"color": undefined,
}
}
style={{}}
>
<h1
className="chakra-heading css-eyyo6e"
Expand Down Expand Up @@ -397,12 +372,7 @@ exports[`Hero Renders the UI snapshot correctly 11`] = `
<div
className="css-0"
data-testid="hero-content"
style={
{
"backgroundColor": undefined,
"color": undefined,
}
}
style={{}}
>
<h1
className="chakra-heading css-eyyo6e"
Expand Down

0 comments on commit 29c44bb

Please sign in to comment.