From bb09045019389e1dbab6d5a585874c5193051df4 Mon Sep 17 00:00:00 2001 From: marlon passos Date: Wed, 29 Mar 2023 10:16:01 -0300 Subject: [PATCH] feat: adiciona test id dos textos --- src/components/Main/Subject/SubjectText.tsx | 54 ++++++++++++++++----- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/src/components/Main/Subject/SubjectText.tsx b/src/components/Main/Subject/SubjectText.tsx index 4215614..4764a55 100644 --- a/src/components/Main/Subject/SubjectText.tsx +++ b/src/components/Main/Subject/SubjectText.tsx @@ -4,21 +4,22 @@ import styles from "./subject.module.scss"; interface SubjectTextProps { title: string; } -const SubjectText = (props: SubjectTextProps) => { - const { title } = props; +const SubjectText = ({title}: SubjectTextProps) => { + return (
-

{title}

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + + <Text + text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt - mollit anim id est laborum. - </p> - <p className={styles["page-subject__paragraph"]}> + mollit anim id est laborum." + /> + <Text + text=" Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt @@ -27,17 +28,44 @@ const SubjectText = (props: SubjectTextProps) => { voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat - voluptatem. - </p> - <p className={styles["page-subject__paragraph"]}> + voluptatem." /> + <Text + text=" Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo - voluptas nulla pariatur? - </p> + voluptas nulla pariatur?" /> </article> ); }; +export type TitleProps = { + title: string; +} + +export const Title = ({title}: TitleProps) => { + return ( + <h2 className={styles["texts__title"]}> + {title} + </h2> + ) +} + +export type TextProps = { + text: string; +} + +export const Text = ({ text }: TextProps) => { + return ( + <p + className={styles["page-subject__paragraph"]} + data-testid="texts__text" + > + {text} + </p> + ) + + } + export { SubjectText };