feat: test id dos restos que faltavam

This commit is contained in:
marlon passos 2023-03-29 13:53:39 -03:00
parent 4ce143ac45
commit 84d5b7a3d3
2 changed files with 25 additions and 9 deletions

View File

@ -6,15 +6,17 @@ interface IconProps {
img: string;
text: string;
href: string;
testId?: string;
}
const Icon = (props: IconProps) => {
const { img, text, href } = props;
return (
const Icon = ({ img, text, href, testId }: IconProps) => (
<a href={href} target="_blank" className={styles["icon"]} rel="noreferrer">
<img src={img} alt={text} />
<img
src={img}
alt={text}
data-testid={testId}
/>
</a>
);
};
)
export { Icon };

View File

@ -12,31 +12,45 @@ import styles from "../../footer.module.scss";
const RedeSociais = () => {
return (
<div className={styles["page-footer__rede-sociais"]}>
<div className={styles["page-footer__rede-sociais-icons"]}>
<div
className={styles["page-footer__rede-sociais"]}
data-testid="footer__socialContainer"
>
<div
data-testid="footer__socialIcons"
className={styles["page-footer__rede-sociais-icons"]}>
<Icon
img={facebook}
href="https://pt-br.facebook.com/digitalm3/"
text="icone facebook"
testId="footer__socialIcon"
/>
<Icon
img={instagram}
href="https://www.instagram.com/m3.ecommerce/"
text="icone instagram"
testId="footer__socialIcon"
/>
<Icon img={twitter} href="https://twitter.com/" text="icone facebook" />
<Icon
img={youtube}
href="https://www.youtube.com/channel/UCW4o86gZG_ceA8CmHltXeXA"
text="icone youtube"
testId="footer__socialIcon"
/>
<Icon
img={linkedin}
href="https://www.linkedin.com/company/11412599/"
text="icone linkedin"
testId="footer__socialIcon"
/>
</div>
<Link className={styles["link"]} link="/" text="www.loremipsum.com" />
<Link
className={styles["link"]}
link="/"
text="www.loremipsum.com"
testId="footer__socialSite"
/>
</div>
);
};