From 31a0644f925e3f17e750fafee1befc1587fb371b Mon Sep 17 00:00:00 2001 From: blackstars Date: Wed, 5 Feb 2025 11:43:36 +0100 Subject: [PATCH 1/4] Add Correction PR --- .../atoms/BasicButton/BasicButton.scss | 55 ++++++-- .../atoms/BasicButton/BasicButton.type.ts | 2 + .../components/atoms/BasicButton/index.tsx | 14 +- .../atoms/WhiteButton/WhiteButton.scss | 30 ---- .../atoms/WhiteButton/WhiteButton.type.ts | 6 - .../components/atoms/WhiteButton/index.tsx | 22 --- frontend/src/main.tsx | 14 +- .../components/ExitSignUpStep/index.tsx | 33 ----- .../SignUp/components/SignUpStep1/index.tsx | 64 --------- .../SignUp/components/SignUpStep2/index.tsx | 131 ------------------ .../SignUp/components/SignUpStep3/index.tsx | 84 ----------- .../SignUp/components/SignUpStep4/index.tsx | 86 ------------ frontend/src/pages/SignUp/index.tsx | 23 --- .../ExitSignUpStep/ExitSignUpStep.scss | 0 .../ExitSignUpStep/ExitSignUpStep.type.ts | 4 +- .../components/ExitSignUpStep/index.tsx | 35 +++++ .../FitnessGoalsView/FitnessGoalsView.scss} | 2 +- .../components/FitnessGoalsView/index.tsx | 84 +++++++++++ .../FitnessLevelSelectView.scss} | 2 +- .../FitnessLevelSelectView/index.tsx | 89 ++++++++++++ .../GenderSelectView/GenderSelectView.scss} | 6 +- .../components/GenderSelectView/index.tsx | 131 ++++++++++++++++++ .../UserInfoAddView/UserInfoAddView.scss} | 2 +- .../components/UserInfoAddView/index.tsx | 64 +++++++++ frontend/src/pages/SignUpPage/index.tsx | 23 +++ frontend/src/routes.tsx | 48 ++++--- 26 files changed, 524 insertions(+), 530 deletions(-) delete mode 100644 frontend/src/components/atoms/WhiteButton/WhiteButton.scss delete mode 100644 frontend/src/components/atoms/WhiteButton/WhiteButton.type.ts delete mode 100644 frontend/src/components/atoms/WhiteButton/index.tsx delete mode 100644 frontend/src/pages/SignUp/components/ExitSignUpStep/index.tsx delete mode 100644 frontend/src/pages/SignUp/components/SignUpStep1/index.tsx delete mode 100644 frontend/src/pages/SignUp/components/SignUpStep2/index.tsx delete mode 100644 frontend/src/pages/SignUp/components/SignUpStep3/index.tsx delete mode 100644 frontend/src/pages/SignUp/components/SignUpStep4/index.tsx delete mode 100644 frontend/src/pages/SignUp/index.tsx rename frontend/src/pages/{SignUp => SignUpPage}/components/ExitSignUpStep/ExitSignUpStep.scss (100%) rename frontend/src/pages/{SignUp => SignUpPage}/components/ExitSignUpStep/ExitSignUpStep.type.ts (60%) create mode 100644 frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx rename frontend/src/pages/{SignUp/components/SignUpStep4/SignUpStep4.scss => SignUpPage/components/FitnessGoalsView/FitnessGoalsView.scss} (96%) create mode 100644 frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx rename frontend/src/pages/{SignUp/components/SignUpStep3/SignUpStep3.scss => SignUpPage/components/FitnessLevelSelectView/FitnessLevelSelectView.scss} (96%) create mode 100644 frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx rename frontend/src/pages/{SignUp/components/SignUpStep2/SignUpStep2.scss => SignUpPage/components/GenderSelectView/GenderSelectView.scss} (85%) create mode 100644 frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx rename frontend/src/pages/{SignUp/components/SignUpStep1/SignUpStep1.scss => SignUpPage/components/UserInfoAddView/UserInfoAddView.scss} (96%) create mode 100644 frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx create mode 100644 frontend/src/pages/SignUpPage/index.tsx diff --git a/frontend/src/components/atoms/BasicButton/BasicButton.scss b/frontend/src/components/atoms/BasicButton/BasicButton.scss index 894aa737..1e935198 100644 --- a/frontend/src/components/atoms/BasicButton/BasicButton.scss +++ b/frontend/src/components/atoms/BasicButton/BasicButton.scss @@ -1,18 +1,49 @@ @import "@assets/variables.scss"; .basic-button { - @include h2-phone; - cursor: pointer; - background: $secondary; - color: $white; - border-radius: 10px; - padding: 14px 24px; - border: none; - width: 300; - height: 50; + &--basic { + @include h2-phone; + cursor: pointer; + background: $secondary; + color: $white; + border-radius: 10px; + padding: 14px 24px; + border: none; + width: 300; + height: 50; - &:disabled { - opacity: 0.5; - border: 1px solid $white; + &:disabled { + opacity: 0.5; + border: 1px solid $white; + } + } + + &--white { + @include h2-phone; + cursor: pointer; + background: $white; + color: $primary; + border-radius: 10px; + padding: 14px 24px; + border: none; + width: 300; + height: 50; + + &--focus { + &:focus { + background-color: $tertiary; + color: $white; + } + } + + &:hover { + background-color: $tertiary; + color: $white; + } + + &[aria-pressed="true"] { + background-color: $tertiary; + color: $white; + } } } diff --git a/frontend/src/components/atoms/BasicButton/BasicButton.type.ts b/frontend/src/components/atoms/BasicButton/BasicButton.type.ts index cbb04fbe..5ae665af 100644 --- a/frontend/src/components/atoms/BasicButton/BasicButton.type.ts +++ b/frontend/src/components/atoms/BasicButton/BasicButton.type.ts @@ -2,4 +2,6 @@ export interface BasicButtonProps extends React.ButtonHTMLAttributes { children: React.ReactNode; classnames?: string; + typeButton?: "basic" | "white"; + hasFocus?: boolean; } diff --git a/frontend/src/components/atoms/BasicButton/index.tsx b/frontend/src/components/atoms/BasicButton/index.tsx index 94ca665f..2b71555b 100644 --- a/frontend/src/components/atoms/BasicButton/index.tsx +++ b/frontend/src/components/atoms/BasicButton/index.tsx @@ -2,8 +2,18 @@ import type { BasicButtonProps } from "./BasicButton.type"; import "./BasicButton.scss"; import classNames from "classnames"; -function BasicButton({ children, className, ...props }: BasicButtonProps) { - const buttonClass = classNames("basic-button", className); +function BasicButton({ + children, + className, + typeButton = "basic", + hasFocus, + ...props +}: BasicButtonProps) { + const buttonClass = classNames("basic-button", className, { + "basic-button--basic": typeButton === "basic", + "basic-button--white": typeButton === "white", + "basic-button--white--focus": hasFocus, + }); return ( - ); -} - -export default WhiteButton; diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 2e13fc8d..a319e8a3 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -8,15 +8,15 @@ import router from "./routes"; import "./index.css"; const client = new ApolloClient({ - uri: "http://localhost:4000", - cache: new InMemoryCache(), + uri: "http://localhost:4000", + cache: new InMemoryCache(), }); // biome-ignore lint/style/noNonNullAssertion: createRoot(document.getElementById("root")!).render( - - - - - , + + + + + ); diff --git a/frontend/src/pages/SignUp/components/ExitSignUpStep/index.tsx b/frontend/src/pages/SignUp/components/ExitSignUpStep/index.tsx deleted file mode 100644 index d359df1d..00000000 --- a/frontend/src/pages/SignUp/components/ExitSignUpStep/index.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import blobMenGirl from "@assets/images/blob-men-girl.svg"; -import BasicButton from "@components/atoms/BasicButton"; -import { useTranslation } from "react-i18next"; -import "./ExitSignUpStep.scss"; -import type { ExitSignUpStepProps } from "./ExitSignUpStep.type"; - -function ExitSignUpStep({ isCompleted = false }: ExitSignUpStepProps) { - const { t } = useTranslation(); - - return ( -
- blob men girl -

{t("WELCOME")}

-

- {t("START_YOUR_FIRST_PROGRAM")} -

- {!isCompleted && ( -

- {t("COMPLITED_NEXT_TIME_PROFILE")} -

- )} - - {t("DISCOVERY_PROGRAMS")} - -
- ); -} - -export default ExitSignUpStep; diff --git a/frontend/src/pages/SignUp/components/SignUpStep1/index.tsx b/frontend/src/pages/SignUp/components/SignUpStep1/index.tsx deleted file mode 100644 index d9f39b65..00000000 --- a/frontend/src/pages/SignUp/components/SignUpStep1/index.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { useState } from "react"; - -import BasicButton from "@components/atoms/BasicButton"; -import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; -import ExitSignUpStep from "../ExitSignUpStep"; - -import "./SignUpStep1.scss"; -import { useTranslation } from "react-i18next"; -import SignUpStep2 from "../SignUpStep2"; - -function SignUpStep1() { - const [isExit, setIsExit] = useState(false); - const [isNextStep, setIsNextStep] = useState(false); - - const { t } = useTranslation(); - - function handleExit() { - setIsExit(true); - } - - function handleNextStep() { - setIsNextStep(true); - } - - return ( - <> - {!isExit && !isNextStep && ( -
- -
- -
- -

- KG -

-
-
- -

- CM -

-
- - {t("NEXT")} - -
-
-
- )} - {isExit && !isNextStep && } - {!isExit && isNextStep && } - - ); -} - -export default SignUpStep1; diff --git a/frontend/src/pages/SignUp/components/SignUpStep2/index.tsx b/frontend/src/pages/SignUp/components/SignUpStep2/index.tsx deleted file mode 100644 index 0ec147e5..00000000 --- a/frontend/src/pages/SignUp/components/SignUpStep2/index.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import { useEffect, useState } from "react"; -import { EffectCoverflow } from "swiper/modules"; -import { Swiper, SwiperSlide } from "swiper/react"; - -import BasicButton from "@components/atoms/BasicButton"; -import ExitSignUpStep from "../ExitSignUpStep"; - -import { useTranslation } from "react-i18next"; -import "./SignUpStep2.scss"; -import "swiper/css"; -import "swiper/css/effect-coverflow"; -import blueCross from "@assets/icons/blue-cross.svg"; -import girl2 from "@assets/images/girl2.svg"; -import men from "@assets/images/men.svg"; -import noAnswerSex from "@assets/images/no-answer-sex.svg"; -import otherSex from "@assets/images/other-sex.svg"; -import SignUpStep3 from "../SignUpStep3"; - -function SignUpStep2() { - const [isExit, setIsExit] = useState(false); - const [spaceBetween, setSpaceBetween] = useState(130); - const [currentSlideId, setCurrentSlideId] = useState(null); - const [isNextStep, setIsNextStep] = useState(false); - - const { t } = useTranslation(); - - function handleExit() { - setIsExit(true); - } - - function handleNextStep() { - setIsNextStep(true); - } - - const slides = [ - { id: 1, content: "GIRL", src: girl2 }, - { id: 2, content: "MEN", src: men }, - { id: 3, content: "AUTRE", src: otherSex }, - { id: 4, content: "NE SOUHAITE PAS REPONDRE", src: noAnswerSex }, - ]; - - type Swiper = { - activeIndex: number; - }; - - const handleSlideChange = (swiper: Swiper): void => { - const activeIndex = swiper.activeIndex; // Index de la diapositive visible au centre - const activeSlideId = slides[activeIndex]?.id || null; // Récupère l'ID correspondant - setCurrentSlideId(activeSlideId); - }; - - useEffect(() => { - function handleResize() { - const screenWidth = window.innerWidth; - - if (screenWidth > 950) { - setSpaceBetween(-200); - } else if (screenWidth > 700) { - setSpaceBetween(60); - } else { - setSpaceBetween(130); - } - } - - handleResize(); - window.addEventListener("resize", handleResize); - - return () => window.removeEventListener("resize", handleResize); - }, []); - - return ( - <> - {!isExit && !isNextStep && ( -
- -

Tu es ...

- - {slides.map((slide) => ( - - {slide.content} -

- {slide.content} -

-
- ))} -
- - {t("NEXT")} - -

Diapositive active : {currentSlideId || 1}

-
- )} - {isExit && } - {!isExit && isNextStep && } - - ); -} - -export default SignUpStep2; diff --git a/frontend/src/pages/SignUp/components/SignUpStep3/index.tsx b/frontend/src/pages/SignUp/components/SignUpStep3/index.tsx deleted file mode 100644 index b2b2eed9..00000000 --- a/frontend/src/pages/SignUp/components/SignUpStep3/index.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { useState } from "react"; - -import BasicButton from "@components/atoms/BasicButton"; -import WhiteButton from "@components/atoms/WhiteButton"; -import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; -import ExitSignUpStep from "../ExitSignUpStep"; -import SignUpStep4 from "../SignUpStep4"; - -import { useTranslation } from "react-i18next"; -import "./SignUpStep3.scss"; - -function SignUpStep3() { - const [isExit, setIsExit] = useState(false); - const [isNextStep, setIsNextStep] = useState(false); - const [lvl, setLvl] = useState(0); - - const { t } = useTranslation(); - - const handleExit = () => { - setIsExit(true); - }; - - const handleNextStep = () => { - setIsNextStep(true); - }; - - const handleLvl = (lvl: number) => { - setLvl(lvl); - }; - - console.log(lvl); - - return ( - <> - {!isExit && !isNextStep && ( -
- -
- handleLvl(1)} - hasFocus - > - {t("BEGINNER")} - - handleLvl(2)} - hasFocus - > - {t("INTERMEDIATE")} - - handleLvl(3)} - hasFocus - > - {t("ADVANCED")} - - - {t("NEXT")} - -
-
-
- )} - {isExit && !isNextStep && } - {!isExit && isNextStep && } - - ); -} - -export default SignUpStep3; diff --git a/frontend/src/pages/SignUp/components/SignUpStep4/index.tsx b/frontend/src/pages/SignUp/components/SignUpStep4/index.tsx deleted file mode 100644 index a7f67794..00000000 --- a/frontend/src/pages/SignUp/components/SignUpStep4/index.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { useState } from "react"; - -import BasicButton from "@components/atoms/BasicButton"; -import WhiteButton from "@components/atoms/WhiteButton"; -import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; - -import { useTranslation } from "react-i18next"; -import ExitSignUpStep from "../ExitSignUpStep"; -import "./SignUpStep4.scss"; - -function SignUpStep4() { - type ExerciceType = - | "weight_Loss" - | "flexibility" - | "strengthening_Muscles" - | "relaxation"; - - const [isExit, setIsExit] = useState(false); - const [isNextStep, setIsNextStep] = useState(false); - - const [typeExercice, setTypeExercice] = useState< - Record - >({ - weight_Loss: false, - flexibility: false, - strengthening_Muscles: false, - relaxation: false, - }); - - const { t } = useTranslation(); - - const handleExit = () => { - setIsExit(true); - }; - - const handleNextStep = () => { - setIsNextStep(true); - }; - - const handleSelectExercice = (type: ExerciceType) => { - setTypeExercice((prevState) => ({ - ...prevState, - [type]: !prevState[type], - })); - }; - - console.log(typeExercice); - - return ( - <> - {!isExit && !isNextStep && ( -
- -
- {Object.keys(typeExercice).map((type) => ( - handleSelectExercice(type as ExerciceType)} - aria-pressed={typeExercice[type as ExerciceType]} - > - {t(type.toUpperCase())} - - ))} - !value)} - > - {t("NEXT")} - -
-
-
- )} - {isExit && !isNextStep && } - {!isExit && isNextStep && } - - ); -} - -export default SignUpStep4; diff --git a/frontend/src/pages/SignUp/index.tsx b/frontend/src/pages/SignUp/index.tsx deleted file mode 100644 index b77e2142..00000000 --- a/frontend/src/pages/SignUp/index.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { useState } from "react"; -import SignUpStep1 from "./components/SignUpStep1"; - -function SignUp() { - const [isStepSignUp, setIsStepSignUp] = useState(false); - - function onSignUp() { - setIsStepSignUp(true); - } - - return ( - <> - {!isStepSignUp && ( - - )} - {isStepSignUp && } - - ); -} - -export default SignUp; diff --git a/frontend/src/pages/SignUp/components/ExitSignUpStep/ExitSignUpStep.scss b/frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.scss similarity index 100% rename from frontend/src/pages/SignUp/components/ExitSignUpStep/ExitSignUpStep.scss rename to frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.scss diff --git a/frontend/src/pages/SignUp/components/ExitSignUpStep/ExitSignUpStep.type.ts b/frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.type.ts similarity index 60% rename from frontend/src/pages/SignUp/components/ExitSignUpStep/ExitSignUpStep.type.ts rename to frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.type.ts index cf390a30..d80f418b 100644 --- a/frontend/src/pages/SignUp/components/ExitSignUpStep/ExitSignUpStep.type.ts +++ b/frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.type.ts @@ -1,3 +1,3 @@ export interface ExitSignUpStepProps { - isCompleted?: boolean; -} \ No newline at end of file + isCompleted?: boolean; +} diff --git a/frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx b/frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx new file mode 100644 index 00000000..a6039956 --- /dev/null +++ b/frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx @@ -0,0 +1,35 @@ +import { useTranslation } from "react-i18next"; + +import BasicButton from "@components/atoms/BasicButton"; + +import blobMenGirl from "@assets/images/blob-men-girl.svg"; +import "./ExitSignUpStep.scss"; +import type { ExitSignUpStepProps } from "./ExitSignUpStep.type"; + +function ExitSignUpStep({ isCompleted = false }: ExitSignUpStepProps) { + const { t } = useTranslation(); + + return ( +
+ blob men girl +

{t("WELCOME")}

+

+ {t("START_YOUR_FIRST_PROGRAM")} +

+ {!isCompleted && ( +

+ {t("COMPLITED_NEXT_TIME_PROFILE")} +

+ )} + + {t("DISCOVERY_PROGRAMS")} + +
+ ); +} + +export default ExitSignUpStep; diff --git a/frontend/src/pages/SignUp/components/SignUpStep4/SignUpStep4.scss b/frontend/src/pages/SignUpPage/components/FitnessGoalsView/FitnessGoalsView.scss similarity index 96% rename from frontend/src/pages/SignUp/components/SignUpStep4/SignUpStep4.scss rename to frontend/src/pages/SignUpPage/components/FitnessGoalsView/FitnessGoalsView.scss index f6410d0c..0598e57f 100644 --- a/frontend/src/pages/SignUp/components/SignUpStep4/SignUpStep4.scss +++ b/frontend/src/pages/SignUpPage/components/FitnessGoalsView/FitnessGoalsView.scss @@ -1,6 +1,6 @@ @import "@assets/variables.scss"; -.sign-up-step-4 { +.fitness-goals-view { height: 100vh; &__container { diff --git a/frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx b/frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx new file mode 100644 index 00000000..1bdcaaee --- /dev/null +++ b/frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx @@ -0,0 +1,84 @@ +import { useState } from "react"; + +import BasicButton from "@components/atoms/BasicButton"; +import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; + +import { useTranslation } from "react-i18next"; +import ExitSignUpStep from "../ExitSignUpStep"; +import "./FitnessGoalsView.scss"; + +function FitnessGoalsView() { + type ExerciceType = + | "weight_Loss" + | "flexibility" + | "strengthening_Muscles" + | "relaxation"; + + const [isExit, setIsExit] = useState(false); + const [isNextStep, setIsNextStep] = useState(false); + + const [typeExercice, setTypeExercice] = useState< + Record + >({ + weight_Loss: false, + flexibility: false, + strengthening_Muscles: false, + relaxation: false, + }); + + const { t } = useTranslation(); + + const handleExit = () => { + setIsExit(true); + }; + + const handleNextStep = () => { + setIsNextStep(true); + }; + + const handleSelectExercice = (type: ExerciceType) => { + setTypeExercice((prevState) => ({ + ...prevState, + [type]: !prevState[type], + })); + }; + + return ( + <> + {!isExit && !isNextStep && ( +
+ +
+ {Object.keys(typeExercice).map((type) => ( + handleSelectExercice(type as ExerciceType)} + aria-pressed={typeExercice[type as ExerciceType]} + > + {t(type.toUpperCase())} + + ))} + !value)} + > + {t("NEXT")} + +
+
+
+ )} + {isExit && !isNextStep && } + {!isExit && isNextStep && } + + ); +} + +export default FitnessGoalsView; diff --git a/frontend/src/pages/SignUp/components/SignUpStep3/SignUpStep3.scss b/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/FitnessLevelSelectView.scss similarity index 96% rename from frontend/src/pages/SignUp/components/SignUpStep3/SignUpStep3.scss rename to frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/FitnessLevelSelectView.scss index df0247f9..4315f124 100644 --- a/frontend/src/pages/SignUp/components/SignUpStep3/SignUpStep3.scss +++ b/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/FitnessLevelSelectView.scss @@ -1,6 +1,6 @@ @import "@assets/variables.scss"; -.sign-up-step-3 { +.fitness-level-select-view { height: 100vh; &__container { diff --git a/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx b/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx new file mode 100644 index 00000000..eb739893 --- /dev/null +++ b/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx @@ -0,0 +1,89 @@ +import { useState } from "react"; +import { useTranslation } from "react-i18next"; + +import BasicButton from "@components/atoms/BasicButton"; +import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; +import ExitSignUpStep from "../ExitSignUpStep"; +import FitnessGoalsView from "../FitnessGoalsView"; + +import "./FitnessLevelSelectView.scss"; + +function FitnessLevelSelectView() { + const [isExit, setIsExit] = useState(false); + const [isNextStep, setIsNextStep] = useState(false); + const [lvl, setLvl] = useState(0); + + const { t } = useTranslation(); + + const handleExit = () => { + setIsExit(true); + }; + + const handleNextStep = () => { + setIsNextStep(true); + }; + + const handleLvl = (lvl: number) => { + setLvl(lvl); + }; + + console.log(lvl); + + return ( + <> + {!isExit && !isNextStep && ( +
+ +
+ handleLvl(1)} + hasFocus + > + {t("BEGINNER")} + + handleLvl(2)} + hasFocus + > + {t("INTERMEDIATE")} + + handleLvl(3)} + hasFocus + > + {t("ADVANCED")} + + + {t("NEXT")} + +
+
+
+ )} + {isExit && !isNextStep && } + {!isExit && isNextStep && } + + ); +} + +export default FitnessLevelSelectView; diff --git a/frontend/src/pages/SignUp/components/SignUpStep2/SignUpStep2.scss b/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss similarity index 85% rename from frontend/src/pages/SignUp/components/SignUpStep2/SignUpStep2.scss rename to frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss index f94b8108..8c287742 100644 --- a/frontend/src/pages/SignUp/components/SignUpStep2/SignUpStep2.scss +++ b/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss @@ -1,6 +1,6 @@ @import "@assets/variables.scss"; -.sign-up-step-2 { +.gender-select-view { display: flex; flex-direction: column; align-items: center; @@ -36,14 +36,14 @@ } } -.sign-up-step-2__swiper-container .swiper-slide { +.gender-select-view__swiper-container .swiper-slide { display: flex; flex-direction: column; justify-content: center; align-items: center; } -.sign-up-step-2__swiper-container .swiper-slide img { +.gender-select-view__swiper-container .swiper-slide img { width: 60vw; @media screen and (min-width: 500px) { diff --git a/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx b/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx new file mode 100644 index 00000000..dcb2fab9 --- /dev/null +++ b/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx @@ -0,0 +1,131 @@ +import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { EffectCoverflow } from "swiper/modules"; +import { Swiper, SwiperSlide } from "swiper/react"; + +import BasicButton from "@components/atoms/BasicButton"; +import ExitSignUpStep from "../ExitSignUpStep"; +import FitnessLevelSelectView from "../FitnessLevelSelectView"; + +import "./GenderSelectView.scss"; +import "swiper/css"; +import "swiper/css/effect-coverflow"; +import blueCross from "@assets/icons/blue-cross.svg"; +import girl2 from "@assets/images/girl2.svg"; +import men from "@assets/images/men.svg"; +import noAnswerSex from "@assets/images/no-answer-sex.svg"; +import otherSex from "@assets/images/other-sex.svg"; + +function GenderSelectView() { + const [isExit, setIsExit] = useState(false); + const [spaceBetween, setSpaceBetween] = useState(130); + const [currentSlideId, setCurrentSlideId] = useState(null); + const [isNextStep, setIsNextStep] = useState(false); + + const { t } = useTranslation(); + + function handleExit() { + setIsExit(true); + } + + function handleNextStep() { + setIsNextStep(true); + } + + const slides = [ + { id: 1, content: "GIRL", src: girl2 }, + { id: 2, content: "MEN", src: men }, + { id: 3, content: "AUTRE", src: otherSex }, + { id: 4, content: "NE SOUHAITE PAS REPONDRE", src: noAnswerSex }, + ]; + + type Swiper = { + activeIndex: number; + }; + + const handleSlideChange = (swiper: Swiper): void => { + const activeIndex = swiper.activeIndex; // Index de la diapositive visible au centre + const activeSlideId = slides[activeIndex]?.id || null; // Récupère l'ID correspondant + setCurrentSlideId(activeSlideId); + }; + + useEffect(() => { + function handleResize() { + const screenWidth = window.innerWidth; + + if (screenWidth > 950) { + setSpaceBetween(-200); + } else if (screenWidth > 700) { + setSpaceBetween(60); + } else { + setSpaceBetween(130); + } + } + + handleResize(); + window.addEventListener("resize", handleResize); + + return () => window.removeEventListener("resize", handleResize); + }, []); + + return ( + <> + {!isExit && !isNextStep && ( +
+ +

Tu es ...

+ + {slides.map((slide) => ( + + {slide.content} +

+ {slide.content} +

+
+ ))} +
+ + {t("NEXT")} + +

Diapositive active : {currentSlideId || 1}

+
+ )} + {isExit && } + {!isExit && isNextStep && } + + ); +} + +export default GenderSelectView; diff --git a/frontend/src/pages/SignUp/components/SignUpStep1/SignUpStep1.scss b/frontend/src/pages/SignUpPage/components/UserInfoAddView/UserInfoAddView.scss similarity index 96% rename from frontend/src/pages/SignUp/components/SignUpStep1/SignUpStep1.scss rename to frontend/src/pages/SignUpPage/components/UserInfoAddView/UserInfoAddView.scss index 9ea0a361..493c0cea 100644 --- a/frontend/src/pages/SignUp/components/SignUpStep1/SignUpStep1.scss +++ b/frontend/src/pages/SignUpPage/components/UserInfoAddView/UserInfoAddView.scss @@ -1,6 +1,6 @@ @import "@assets/variables.scss"; -.sign-up-step-1 { +.user-info-add-view { height: 100vh; &__container { diff --git a/frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx b/frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx new file mode 100644 index 00000000..082de525 --- /dev/null +++ b/frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx @@ -0,0 +1,64 @@ +import { useState } from "react"; +import { useTranslation } from "react-i18next"; + +import BasicButton from "@components/atoms/BasicButton"; +import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; +import ExitSignUpStep from "../ExitSignUpStep"; +import GenderSelectView from "../GenderSelectView"; + +import "./UserInfoAddView.scss"; + +function UserInfoAddView() { + const [isExit, setIsExit] = useState(false); + const [isNextStep, setIsNextStep] = useState(false); + + const { t } = useTranslation(); + + function handleExit() { + setIsExit(true); + } + + function handleNextStep() { + setIsNextStep(true); + } + + return ( + <> + {!isExit && !isNextStep && ( +
+ +
+ +
+ +

+ KG +

+
+
+ +

+ CM +

+
+ + {t("NEXT")} + +
+
+
+ )} + {isExit && !isNextStep && } + {!isExit && isNextStep && } + + ); +} + +export default UserInfoAddView; diff --git a/frontend/src/pages/SignUpPage/index.tsx b/frontend/src/pages/SignUpPage/index.tsx new file mode 100644 index 00000000..c100e146 --- /dev/null +++ b/frontend/src/pages/SignUpPage/index.tsx @@ -0,0 +1,23 @@ +import { useState } from "react"; +import UserInfoAddView from "./components/UserInfoAddView"; + +function SignUpPage() { + const [isStepSignUp, setIsStepSignUp] = useState(false); + + function onSignUp() { + setIsStepSignUp(true); + } + + return ( + <> + {!isStepSignUp && ( + + )} + {isStepSignUp && } + + ); +} + +export default SignUpPage; diff --git a/frontend/src/routes.tsx b/frontend/src/routes.tsx index 3df90937..8f4e73bb 100644 --- a/frontend/src/routes.tsx +++ b/frontend/src/routes.tsx @@ -2,30 +2,34 @@ import { createBrowserRouter } from "react-router-dom"; import App from "./App"; import HomePage from "./pages/HomePage"; import ProgramPage from "./pages/ProgramPage"; -import SignUp from "./pages/SignUp"; +import SignUpPage from "./pages/SignUpPage"; const router = createBrowserRouter([ - { - path: "/", - element: , - }, - { - path: "/sign-up", - element: , - }, - { - path: "/program/:id", - element: , - }, - { - path: "/home", - element: , - }, - // Page 404 à faire - { - path: "*", - element:
404 - Page Not Found
, - }, + { + path: "/", + element: , + }, + { + path: "/", + element: , + }, + { + path: "/sign-up", + element: , + }, + { + path: "/program/:id", + element: , + }, + { + path: "/home", + element: , + }, + // Page 404 à faire + { + path: "*", + element:
404 - Page Not Found
, + }, ]); export default router; From 965207bb5a968b8babece4834b43aa29be6f9777 Mon Sep 17 00:00:00 2001 From: blackstars Date: Wed, 5 Feb 2025 14:47:38 +0100 Subject: [PATCH 2/4] [feat] add new trad, fix docker file for translation and change version desktop for GenderSelectView --- frontend/src/App.tsx | 2 +- .../atoms/BasicButton/BasicButton.type.ts | 10 +- .../components/atoms/BasicButton/index.tsx | 30 +- .../atoms/LittleLogo/LittleLogo.type.ts | 4 +- .../src/components/atoms/LittleLogo/index.tsx | 40 +-- .../BodyStepQuestions.type.ts | 10 +- frontend/src/pages/LandingPage/index.tsx | 12 +- .../ExitSignUpStep/ExitSignUpStep.type.ts | 2 +- .../components/ExitSignUpStep/index.tsx | 44 +-- .../components/FitnessGoalsView/index.tsx | 128 ++++----- .../FitnessLevelSelectView/index.tsx | 138 +++++----- .../GenderSelectView/GenderSelectView.scss | 16 ++ .../components/GenderSelectView/index.tsx | 258 +++++++++++------- .../components/UserInfoAddView/index.tsx | 92 +++---- frontend/src/pages/SignUpPage/index.tsx | 28 +- translation-server/Dockerfile | 7 +- .../locales/en/translation.json | 53 ++-- .../locales/fr/translation.json | 53 ++-- 18 files changed, 505 insertions(+), 422 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 9ee1a72c..ff20f02b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -2,7 +2,7 @@ import "./App.css"; import Landing from "./pages/LandingPage"; function App() { - return ; + return ; } export default App; diff --git a/frontend/src/components/atoms/BasicButton/BasicButton.type.ts b/frontend/src/components/atoms/BasicButton/BasicButton.type.ts index 5ae665af..3470220a 100644 --- a/frontend/src/components/atoms/BasicButton/BasicButton.type.ts +++ b/frontend/src/components/atoms/BasicButton/BasicButton.type.ts @@ -1,7 +1,7 @@ export interface BasicButtonProps - extends React.ButtonHTMLAttributes { - children: React.ReactNode; - classnames?: string; - typeButton?: "basic" | "white"; - hasFocus?: boolean; + extends React.ButtonHTMLAttributes { + children: React.ReactNode; + classnames?: string; + typeButton?: "basic" | "white"; + hasFocus?: boolean; } diff --git a/frontend/src/components/atoms/BasicButton/index.tsx b/frontend/src/components/atoms/BasicButton/index.tsx index 2b71555b..ed9ea8f1 100644 --- a/frontend/src/components/atoms/BasicButton/index.tsx +++ b/frontend/src/components/atoms/BasicButton/index.tsx @@ -3,23 +3,23 @@ import "./BasicButton.scss"; import classNames from "classnames"; function BasicButton({ - children, - className, - typeButton = "basic", - hasFocus, - ...props + children, + className, + typeButton = "basic", + hasFocus, + ...props }: BasicButtonProps) { - const buttonClass = classNames("basic-button", className, { - "basic-button--basic": typeButton === "basic", - "basic-button--white": typeButton === "white", - "basic-button--white--focus": hasFocus, - }); + const buttonClass = classNames("basic-button", className, { + "basic-button--basic": typeButton === "basic", + "basic-button--white": typeButton === "white", + "basic-button--white--focus": hasFocus, + }); - return ( - - ); + return ( + + ); } export default BasicButton; diff --git a/frontend/src/components/atoms/LittleLogo/LittleLogo.type.ts b/frontend/src/components/atoms/LittleLogo/LittleLogo.type.ts index b8ddc577..e597b8a8 100644 --- a/frontend/src/components/atoms/LittleLogo/LittleLogo.type.ts +++ b/frontend/src/components/atoms/LittleLogo/LittleLogo.type.ts @@ -1,4 +1,4 @@ export interface LittleLogoProps { - hasLabel?: boolean; - size?: "mobile" | "giant" | "desktop"; + hasLabel?: boolean; + size?: "mobile" | "giant" | "desktop"; } diff --git a/frontend/src/components/atoms/LittleLogo/index.tsx b/frontend/src/components/atoms/LittleLogo/index.tsx index 42f415cf..2ea3863a 100644 --- a/frontend/src/components/atoms/LittleLogo/index.tsx +++ b/frontend/src/components/atoms/LittleLogo/index.tsx @@ -5,28 +5,28 @@ import logoMobile from "@assets/icons/mobile-logo.svg"; import type { LittleLogoProps } from "./LittleLogo.type"; function LittleLogo({ hasLabel = false, size = "desktop" }: LittleLogoProps) { - const littleLogoClassName = classNames("little-logo", { - "little-logo--mobile": size === "mobile", - "little-logo--giant": size === "giant", - "little-logo--desktop": size === "desktop", - }); + const littleLogoClassName = classNames("little-logo", { + "little-logo--mobile": size === "mobile", + "little-logo--giant": size === "giant", + "little-logo--desktop": size === "desktop", + }); - const littleLogoTitleClassName = classNames("little-logo__title", { - "little-logo__title--mobile": size === "mobile", - "little-logo__title--giant": size === "giant", - "little-logo__title--desktop": size === "desktop", - }); + const littleLogoTitleClassName = classNames("little-logo__title", { + "little-logo__title--mobile": size === "mobile", + "little-logo__title--giant": size === "giant", + "little-logo__title--desktop": size === "desktop", + }); - return ( -
- Logo Pulse Form - {hasLabel &&

{"Pulse Form"}

} -
- ); + return ( +
+ Logo Pulse Form + {hasLabel &&

{"Pulse Form"}

} +
+ ); } export default LittleLogo; diff --git a/frontend/src/components/molecules/BodyStepQuestions/BodyStepQuestions.type.ts b/frontend/src/components/molecules/BodyStepQuestions/BodyStepQuestions.type.ts index 9ee928de..508fe3a0 100644 --- a/frontend/src/components/molecules/BodyStepQuestions/BodyStepQuestions.type.ts +++ b/frontend/src/components/molecules/BodyStepQuestions/BodyStepQuestions.type.ts @@ -1,9 +1,9 @@ import type { MouseEventHandler } from "react"; export interface BodyStepQuestionsProps - extends React.ButtonHTMLAttributes { - children: React.ReactNode; - ctaExit: MouseEventHandler; - questionLabel: string; - isDesktopView?: boolean; + extends React.ButtonHTMLAttributes { + children: React.ReactNode; + ctaExit: MouseEventHandler; + questionLabel: string; + isDesktopView?: boolean; } diff --git a/frontend/src/pages/LandingPage/index.tsx b/frontend/src/pages/LandingPage/index.tsx index 28a1a5be..f07c4e77 100644 --- a/frontend/src/pages/LandingPage/index.tsx +++ b/frontend/src/pages/LandingPage/index.tsx @@ -3,12 +3,12 @@ import SecondView from "./components/SecondView"; import "./LandingPage.scss"; function LandingPage() { - return ( -
- - -
- ); + return ( +
+ + +
+ ); } export default LandingPage; diff --git a/frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.type.ts b/frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.type.ts index d80f418b..d2810da8 100644 --- a/frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.type.ts +++ b/frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.type.ts @@ -1,3 +1,3 @@ export interface ExitSignUpStepProps { - isCompleted?: boolean; + isCompleted?: boolean; } diff --git a/frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx b/frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx index a6039956..2278940e 100644 --- a/frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx +++ b/frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx @@ -7,29 +7,29 @@ import "./ExitSignUpStep.scss"; import type { ExitSignUpStepProps } from "./ExitSignUpStep.type"; function ExitSignUpStep({ isCompleted = false }: ExitSignUpStepProps) { - const { t } = useTranslation(); + const { t } = useTranslation(); - return ( -
- blob men girl -

{t("WELCOME")}

-

- {t("START_YOUR_FIRST_PROGRAM")} -

- {!isCompleted && ( -

- {t("COMPLITED_NEXT_TIME_PROFILE")} -

- )} - - {t("DISCOVERY_PROGRAMS")} - -
- ); + return ( +
+ blob men girl +

{t("WELCOME")}

+

+ {t("START_YOUR_FIRST_PROGRAM")} +

+ {!isCompleted && ( +

+ {t("COMPLITED_NEXT_TIME_PROFILE")} +

+ )} + + {t("DISCOVERY_PROGRAMS")} + +
+ ); } export default ExitSignUpStep; diff --git a/frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx b/frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx index 1bdcaaee..02528093 100644 --- a/frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx +++ b/frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx @@ -8,77 +8,77 @@ import ExitSignUpStep from "../ExitSignUpStep"; import "./FitnessGoalsView.scss"; function FitnessGoalsView() { - type ExerciceType = - | "weight_Loss" - | "flexibility" - | "strengthening_Muscles" - | "relaxation"; + type ExerciceType = + | "weight_Loss" + | "flexibility" + | "strengthening_Muscles" + | "relaxation"; - const [isExit, setIsExit] = useState(false); - const [isNextStep, setIsNextStep] = useState(false); + const [isExit, setIsExit] = useState(false); + const [isNextStep, setIsNextStep] = useState(false); - const [typeExercice, setTypeExercice] = useState< - Record - >({ - weight_Loss: false, - flexibility: false, - strengthening_Muscles: false, - relaxation: false, - }); + const [typeExercice, setTypeExercice] = useState< + Record + >({ + weight_Loss: false, + flexibility: false, + strengthening_Muscles: false, + relaxation: false, + }); - const { t } = useTranslation(); + const { t } = useTranslation(); - const handleExit = () => { - setIsExit(true); - }; + const handleExit = () => { + setIsExit(true); + }; - const handleNextStep = () => { - setIsNextStep(true); - }; + const handleNextStep = () => { + setIsNextStep(true); + }; - const handleSelectExercice = (type: ExerciceType) => { - setTypeExercice((prevState) => ({ - ...prevState, - [type]: !prevState[type], - })); - }; + const handleSelectExercice = (type: ExerciceType) => { + setTypeExercice((prevState) => ({ + ...prevState, + [type]: !prevState[type], + })); + }; - return ( - <> - {!isExit && !isNextStep && ( -
- -
- {Object.keys(typeExercice).map((type) => ( - handleSelectExercice(type as ExerciceType)} - aria-pressed={typeExercice[type as ExerciceType]} - > - {t(type.toUpperCase())} - - ))} - !value)} - > - {t("NEXT")} - -
-
-
- )} - {isExit && !isNextStep && } - {!isExit && isNextStep && } - - ); + return ( + <> + {!isExit && !isNextStep && ( +
+ +
+ {Object.keys(typeExercice).map((type) => ( + handleSelectExercice(type as ExerciceType)} + aria-pressed={typeExercice[type as ExerciceType]} + > + {t(type.toUpperCase())} + + ))} + !value)} + > + {t("NEXT")} + +
+
+
+ )} + {isExit && !isNextStep && } + {!isExit && isNextStep && } + + ); } export default FitnessGoalsView; diff --git a/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx b/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx index eb739893..de80bf3f 100644 --- a/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx +++ b/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx @@ -9,81 +9,79 @@ import FitnessGoalsView from "../FitnessGoalsView"; import "./FitnessLevelSelectView.scss"; function FitnessLevelSelectView() { - const [isExit, setIsExit] = useState(false); - const [isNextStep, setIsNextStep] = useState(false); - const [lvl, setLvl] = useState(0); + const [isExit, setIsExit] = useState(false); + const [isNextStep, setIsNextStep] = useState(false); + const [lvl, setLvl] = useState(0); - const { t } = useTranslation(); + const { t } = useTranslation(); - const handleExit = () => { - setIsExit(true); - }; + const handleExit = () => { + setIsExit(true); + }; - const handleNextStep = () => { - setIsNextStep(true); - }; + const handleNextStep = () => { + setIsNextStep(true); + }; - const handleLvl = (lvl: number) => { - setLvl(lvl); - }; + const handleLvl = (lvl: number) => { + setLvl(lvl); + }; - console.log(lvl); - - return ( - <> - {!isExit && !isNextStep && ( -
- -
- handleLvl(1)} - hasFocus - > - {t("BEGINNER")} - - handleLvl(2)} - hasFocus - > - {t("INTERMEDIATE")} - - handleLvl(3)} - hasFocus - > - {t("ADVANCED")} - - - {t("NEXT")} - -
-
-
- )} - {isExit && !isNextStep && } - {!isExit && isNextStep && } - - ); + return ( + <> + {!isExit && !isNextStep && ( +
+ +
+ handleLvl(1)} + hasFocus + > + {t("BEGINNER")} + + handleLvl(2)} + hasFocus + > + {t("INTERMEDIATE")} + + handleLvl(3)} + hasFocus + > + {t("ADVANCED")} + + + {t("NEXT")} + +
+
+
+ )} + {isExit && !isNextStep && } + {!isExit && isNextStep && } + + ); } export default FitnessLevelSelectView; diff --git a/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss b/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss index 8c287742..0073d6cd 100644 --- a/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss +++ b/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss @@ -6,6 +6,11 @@ align-items: center; height: 100vh; + @media screen and (min-width: 500px) { + display: none; + + } + &__exit { @include exit-cross-phone; } @@ -51,3 +56,14 @@ max-width: fit-content; } } + +.gender-select-view-d{ + display: none; + + @media screen and (min-width: 500px) { + display: flex; + flex-direction: column; + align-items: center; + height: 100vh; + } +} \ No newline at end of file diff --git a/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx b/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx index dcb2fab9..5340f217 100644 --- a/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx +++ b/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx @@ -4,6 +4,7 @@ import { EffectCoverflow } from "swiper/modules"; import { Swiper, SwiperSlide } from "swiper/react"; import BasicButton from "@components/atoms/BasicButton"; +import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; import ExitSignUpStep from "../ExitSignUpStep"; import FitnessLevelSelectView from "../FitnessLevelSelectView"; @@ -17,115 +18,176 @@ import noAnswerSex from "@assets/images/no-answer-sex.svg"; import otherSex from "@assets/images/other-sex.svg"; function GenderSelectView() { - const [isExit, setIsExit] = useState(false); - const [spaceBetween, setSpaceBetween] = useState(130); - const [currentSlideId, setCurrentSlideId] = useState(null); - const [isNextStep, setIsNextStep] = useState(false); + const [isExit, setIsExit] = useState(false); + const [spaceBetween, setSpaceBetween] = useState(130); + const [currentSlideId, setCurrentSlideId] = useState(null); + const [isNextStep, setIsNextStep] = useState(false); - const { t } = useTranslation(); + const { t } = useTranslation(); - function handleExit() { - setIsExit(true); - } + function handleExit() { + setIsExit(true); + } - function handleNextStep() { - setIsNextStep(true); - } + function handleNextStep() { + setIsNextStep(true); + } - const slides = [ - { id: 1, content: "GIRL", src: girl2 }, - { id: 2, content: "MEN", src: men }, - { id: 3, content: "AUTRE", src: otherSex }, - { id: 4, content: "NE SOUHAITE PAS REPONDRE", src: noAnswerSex }, - ]; + const slides = [ + { id: 1, content: "GIRL", src: girl2 }, + { id: 2, content: "MEN", src: men }, + { id: 3, content: "OTHER", src: otherSex }, + { id: 4, content: "NOT_WISH_TO_ANSWER", src: noAnswerSex }, + ]; - type Swiper = { - activeIndex: number; - }; + type Swiper = { + activeIndex: number; + }; - const handleSlideChange = (swiper: Swiper): void => { - const activeIndex = swiper.activeIndex; // Index de la diapositive visible au centre - const activeSlideId = slides[activeIndex]?.id || null; // Récupère l'ID correspondant - setCurrentSlideId(activeSlideId); - }; + const handleSlideChange = (swiper: Swiper): void => { + const activeIndex = swiper.activeIndex; // Index de la diapositive visible au centre + const activeSlideId = slides[activeIndex]?.id || null; // Récupère l'ID correspondant + setCurrentSlideId(activeSlideId); + }; - useEffect(() => { - function handleResize() { - const screenWidth = window.innerWidth; + useEffect(() => { + function handleResize() { + const screenWidth = window.innerWidth; - if (screenWidth > 950) { - setSpaceBetween(-200); - } else if (screenWidth > 700) { - setSpaceBetween(60); - } else { - setSpaceBetween(130); - } - } + if (screenWidth > 950) { + setSpaceBetween(-200); + } else if (screenWidth > 700) { + setSpaceBetween(60); + } else { + setSpaceBetween(130); + } + } - handleResize(); - window.addEventListener("resize", handleResize); + handleResize(); + window.addEventListener("resize", handleResize); - return () => window.removeEventListener("resize", handleResize); - }, []); + return () => window.removeEventListener("resize", handleResize); + }, []); - return ( - <> - {!isExit && !isNextStep && ( -
- -

Tu es ...

- - {slides.map((slide) => ( - - {slide.content} -

- {slide.content} -

-
- ))} -
- - {t("NEXT")} - -

Diapositive active : {currentSlideId || 1}

-
- )} - {isExit && } - {!isExit && isNextStep && } - - ); + return ( + <> + {!isExit && !isNextStep && ( + <> +
+ +

{t("YOUR_ARE")}

+ + {slides.map((slide) => ( + + {slide.content} +

+ {t(slide.content)} +

+
+ ))} +
+ + {t("NEXT")} + +

Diapositive active : {currentSlideId || 1}

+
+
+ +
+ setCurrentSlideId(1)} + hasFocus + > + {t("GIRL")} + + setCurrentSlideId(2)} + hasFocus + > + {t("MEN")} + + setCurrentSlideId(3)} + hasFocus + > + {t("OTHER")} + + setCurrentSlideId(4)} + hasFocus + > + {t("NOT_WISH_TO_ANSWER")} + + + {t("NEXT")} + +

+ Diapositive active : {currentSlideId || 1} +

+
+
+
+ + )} + {isExit && } + {!isExit && isNextStep && } + + ); } export default GenderSelectView; diff --git a/frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx b/frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx index 082de525..59233cd7 100644 --- a/frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx +++ b/frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx @@ -9,56 +9,56 @@ import GenderSelectView from "../GenderSelectView"; import "./UserInfoAddView.scss"; function UserInfoAddView() { - const [isExit, setIsExit] = useState(false); - const [isNextStep, setIsNextStep] = useState(false); + const [isExit, setIsExit] = useState(false); + const [isNextStep, setIsNextStep] = useState(false); - const { t } = useTranslation(); + const { t } = useTranslation(); - function handleExit() { - setIsExit(true); - } + function handleExit() { + setIsExit(true); + } - function handleNextStep() { - setIsNextStep(true); - } + function handleNextStep() { + setIsNextStep(true); + } - return ( - <> - {!isExit && !isNextStep && ( -
- -
- -
- -

- KG -

-
-
- -

- CM -

-
- - {t("NEXT")} - -
-
-
- )} - {isExit && !isNextStep && } - {!isExit && isNextStep && } - - ); + return ( + <> + {!isExit && !isNextStep && ( +
+ +
+ +
+ +

+ KG +

+
+
+ +

+ CM +

+
+ + {t("NEXT")} + +
+
+
+ )} + {isExit && !isNextStep && } + {!isExit && isNextStep && } + + ); } export default UserInfoAddView; diff --git a/frontend/src/pages/SignUpPage/index.tsx b/frontend/src/pages/SignUpPage/index.tsx index c100e146..df9fdf9c 100644 --- a/frontend/src/pages/SignUpPage/index.tsx +++ b/frontend/src/pages/SignUpPage/index.tsx @@ -2,22 +2,22 @@ import { useState } from "react"; import UserInfoAddView from "./components/UserInfoAddView"; function SignUpPage() { - const [isStepSignUp, setIsStepSignUp] = useState(false); + const [isStepSignUp, setIsStepSignUp] = useState(false); - function onSignUp() { - setIsStepSignUp(true); - } + function onSignUp() { + setIsStepSignUp(true); + } - return ( - <> - {!isStepSignUp && ( - - )} - {isStepSignUp && } - - ); + return ( + <> + {!isStepSignUp && ( + + )} + {isStepSignUp && } + + ); } export default SignUpPage; diff --git a/translation-server/Dockerfile b/translation-server/Dockerfile index d881bc8d..196247f1 100644 --- a/translation-server/Dockerfile +++ b/translation-server/Dockerfile @@ -3,9 +3,6 @@ FROM node:18 WORKDIR /app COPY package*.json ./ +COPY . ./ -RUN npm install - -COPY . . - -CMD run start \ No newline at end of file +CMD npm i && npm run start diff --git a/translation-server/locales/en/translation.json b/translation-server/locales/en/translation.json index 245d3d25..7c41bf8c 100644 --- a/translation-server/locales/en/translation.json +++ b/translation-server/locales/en/translation.json @@ -1,26 +1,31 @@ { - "ADVANCED": "Advanced", - "ANY_PARTICULAR_GOAL": "Any particular goal ?", - "BEGINNER": "Beginner", - "COMPLITED_NEXT_TIME_PROFILE": "You can always complete your profile in your user space :)", - "CONNECT_MY": "Login", - "CREATE_ACCOUNT": "Create Account", - "DESCRIBE_YOUR_LEVEL": "How would you describe your level of sport ?", - "DISCOVERY_PROGRAMS": "Discover programs", - "FLEXIBILITY": "Flexibility", - "FOLLOW_YOUR_PROGRESS": "Track your progress", - "INTERMEDIATE": "Intermediate", - "LANDING_DESCRIPTION_2": "Whether you're a beginner or an expert, PulseForm guides you every step of the way", - "LANDING_DESCRIPTION": "Last year you said next year", - "MORE_ABOUT_YOU": "Tell me more about you...", - "MOTIVATIONAL_LABEL": "The only limit that exists is the one you impose on yourself. Go beyond that and go further today !", - "NEXT": "Next", - "PERSONALIZED_COACHING": "Personalized coaching", - "PROGRAMS_TO_DICOVER": "Many programs to discover", - "RELAXATION": "Relaxation", - "START_YOUR_FIRST_PROGRAM": "Start your first session!", - "STRENGTHENING_MUSCLES": "Muscle strengthening", - "TEST_PROGRAM": "Try out a program", - "WEIGHT_LOSS": "Weight loss", - "WELCOME": "Welcome to PulseForm!" + "ADVANCED": "Advanced", + "ANY_PARTICULAR_GOAL": "Any particular goal ?", + "BEGINNER": "Beginner", + "COMPLITED_NEXT_TIME_PROFILE": "You can always complete your profile in your user space :)", + "CONNECT_MY": "Login", + "CREATE_ACCOUNT": "Create Account", + "DESCRIBE_YOUR_LEVEL": "How would you describe your level of sport ?", + "DISCOVERY_PROGRAMS": "Discover programs", + "FLEXIBILITY": "Flexibility", + "FOLLOW_YOUR_PROGRESS": "Track your progress", + "GIRL": "Girl", + "INTERMEDIATE": "Intermediate", + "LANDING_DESCRIPTION_2": "Whether you're a beginner or an expert, PulseForm guides you every step of the way", + "LANDING_DESCRIPTION": "Last year you said next year", + "MEN": "Men", + "MORE_ABOUT_YOU": "Tell me more about you...", + "MOTIVATIONAL_LABEL": "The only limit that exists is the one you impose on yourself. Go beyond that and go further today !", + "NEXT": "Next", + "NOT_WISH_TO_ANSWER": "I don't wish to answer", + "OTHER": "Other", + "PERSONALIZED_COACHING": "Personalized coaching", + "PROGRAMS_TO_DICOVER": "Many programs to discover", + "RELAXATION": "Relaxation", + "START_YOUR_FIRST_PROGRAM": "Start your first session!", + "STRENGTHENING_MUSCLES": "Muscle strengthening", + "TEST_PROGRAM": "Try out a program", + "WEIGHT_LOSS": "Weight loss", + "WELCOME": "Welcome to PulseForm!", + "YOUR_ARE": "You are ..." } diff --git a/translation-server/locales/fr/translation.json b/translation-server/locales/fr/translation.json index dbc865ea..377214e8 100644 --- a/translation-server/locales/fr/translation.json +++ b/translation-server/locales/fr/translation.json @@ -1,26 +1,31 @@ { - "ADVANCED": "Avancé·e", - "ANY_PARTICULAR_GOAL": "Un objectif en particulier ?", - "BEGINNER": "Débutant·e", - "COMPLITED_NEXT_TIME_PROFILE": "Tu pourras toujours compléter ton profil dans ton espace utilisateur :)", - "CONNECT_MY": "Me Connecter", - "CREATE_ACCOUNT": "Créer un compte", - "DESCRIBE_YOUR_LEVEL": "Comment qualifierais-tu ton niveau en sport ?", - "DISCOVERY_PROGRAMS": "Découvrir les programmes", - "FLEXIBILITY": "Souplesse", - "FOLLOW_YOUR_PROGRESS": "Suis tes progression", - "INTERMEDIATE": "Intermédiaire", - "LANDING_DESCRIPTION_2": "Que tu sois débutant ou expert, PulseForm te guide à chaque étape", - "LANDING_DESCRIPTION": "L'année dernière t'avais dit l'année prochaine", - "MORE_ABOUT_YOU": "Dis-moi en plus sur toi...", - "MOTIVATIONAL_LABEL": "La seule limite qui existe est celle que tu t'imposes, dépasse-la et va plus loin aujourd'hui !", - "NEXT": "Suivant", - "PERSONALIZED_COACHING": "Un coaching personnalisé", - "PROGRAMS_TO_DICOVER": "De nombreux programmes à découvrir", - "RELAXATION": "Relaxation", - "START_YOUR_FIRST_PROGRAM": "Commencer ta première séance!", - "STRENGTHENING_MUSCLES": "Renforcement musculaire", - "TEST_PROGRAM": "Tester un programme", - "WEIGHT_LOSS": "Perte de poids", - "WELCOME": "Bienvenue sur PulseForm!" + "ADVANCED": "Avancé·e", + "ANY_PARTICULAR_GOAL": "Un objectif en particulier ?", + "BEGINNER": "Débutant·e", + "COMPLITED_NEXT_TIME_PROFILE": "Tu pourras toujours compléter ton profil dans ton espace utilisateur :)", + "CONNECT_MY": "Me Connecter", + "CREATE_ACCOUNT": "Créer un compte", + "DESCRIBE_YOUR_LEVEL": "Comment qualifierais-tu ton niveau en sport ?", + "DISCOVERY_PROGRAMS": "Découvrir les programmes", + "FLEXIBILITY": "Souplesse", + "FOLLOW_YOUR_PROGRESS": "Suis tes progression", + "GIRL": "Femme", + "INTERMEDIATE": "Intermédiaire", + "LANDING_DESCRIPTION_2": "Que tu sois débutant ou expert, PulseForm te guide à chaque étape", + "LANDING_DESCRIPTION": "L'année dernière t'avais dit l'année prochaine", + "MEN": "Homme", + "MORE_ABOUT_YOU": "Dis-moi en plus sur toi...", + "MOTIVATIONAL_LABEL": "La seule limite qui existe est celle que tu t'imposes, dépasse-la et va plus loin aujourd'hui !", + "NEXT": "Suivant", + "NOT_WISH_TO_ANSWER": "Je ne souhaite pas répondre", + "OTHER": "Autre", + "PERSONALIZED_COACHING": "Un coaching personnalisé", + "PROGRAMS_TO_DICOVER": "De nombreux programmes à découvrir", + "RELAXATION": "Relaxation", + "START_YOUR_FIRST_PROGRAM": "Commencer ta première séance!", + "STRENGTHENING_MUSCLES": "Renforcement musculaire", + "TEST_PROGRAM": "Tester un programme", + "WEIGHT_LOSS": "Perte de poids", + "WELCOME": "Bienvenue sur PulseForm!", + "YOUR_ARE": "Tu es ..." } From 0a02ee6f837ed49199b3765cd012ab8789c0d8ce Mon Sep 17 00:00:00 2001 From: blackstars Date: Wed, 5 Feb 2025 16:02:06 +0100 Subject: [PATCH 3/4] add TU --- frontend/package.json | 119 ++-- frontend/src/App.tsx | 4 +- .../GenderSelectView/GenderSelectView.scss | 15 +- .../components/GenderSelectView/index.tsx | 11 +- .../src/tests/__snapshots__/App.test.tsx.snap | 16 +- .../atoms/BasicButtom/BasicButtom.test.tsx | 32 +- .../__snapshots__/BasicButtom.test.tsx.snap | 154 ++++- .../BodyStepQuestions.test.tsx | 16 + .../BodyStepQuestions.test.tsx.snap | 248 +++++++ .../pages/LandingPage/LandingPage.test.tsx | 9 + .../__snapshots__/LandingPage.test.tsx.snap | 396 +++++++++++ .../LandingPage/components/FirstView.test.tsx | 9 + .../components/SecondView.test.tsx | 9 + .../__snapshots__/FirstView.test.tsx.snap | 276 ++++++++ .../__snapshots__/SecondView.test.tsx.snap | 176 +++++ .../pages/SignUpPage/SignUpPage.test.tsx | 9 + .../__snapshots__/SignUpPage.test.tsx.snap | 74 +++ .../components/ExitSignUpStep.test.tsx | 14 + .../components/FitnessGoalsView.test.tsx | 9 + .../FitnessLevelSelectView.test.tsx | 9 + .../components/GenderSelectView.test.tsx | 9 + .../components/UserInfoAddView.test.tsx | 9 + .../ExitSignUpStep.test.tsx.snap | 237 +++++++ .../FitnessGoalsView.test.tsx.snap | 412 ++++++++++++ .../FitnessLevelSelectView.test.tsx.snap | 372 +++++++++++ .../GenderSelectView.test.tsx.snap | 624 ++++++++++++++++++ .../UserInfoAddView.test.tsx.snap | 404 ++++++++++++ frontend/tsconfig.app.json | 54 +- frontend/tsconfig.node.json | 6 +- frontend/vite.config.ts | 48 +- 30 files changed, 3634 insertions(+), 146 deletions(-) create mode 100644 frontend/src/tests/components/molecules/BodyStepQuestions/BodyStepQuestions.test.tsx create mode 100644 frontend/src/tests/components/molecules/BodyStepQuestions/__snapshots__/BodyStepQuestions.test.tsx.snap create mode 100644 frontend/src/tests/pages/LandingPage/LandingPage.test.tsx create mode 100644 frontend/src/tests/pages/LandingPage/__snapshots__/LandingPage.test.tsx.snap create mode 100644 frontend/src/tests/pages/LandingPage/components/FirstView.test.tsx create mode 100644 frontend/src/tests/pages/LandingPage/components/SecondView.test.tsx create mode 100644 frontend/src/tests/pages/LandingPage/components/__snapshots__/FirstView.test.tsx.snap create mode 100644 frontend/src/tests/pages/LandingPage/components/__snapshots__/SecondView.test.tsx.snap create mode 100644 frontend/src/tests/pages/SignUpPage/SignUpPage.test.tsx create mode 100644 frontend/src/tests/pages/SignUpPage/__snapshots__/SignUpPage.test.tsx.snap create mode 100644 frontend/src/tests/pages/SignUpPage/components/ExitSignUpStep.test.tsx create mode 100644 frontend/src/tests/pages/SignUpPage/components/FitnessGoalsView.test.tsx create mode 100644 frontend/src/tests/pages/SignUpPage/components/FitnessLevelSelectView.test.tsx create mode 100644 frontend/src/tests/pages/SignUpPage/components/GenderSelectView.test.tsx create mode 100644 frontend/src/tests/pages/SignUpPage/components/UserInfoAddView.test.tsx create mode 100644 frontend/src/tests/pages/SignUpPage/components/__snapshots__/ExitSignUpStep.test.tsx.snap create mode 100644 frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessGoalsView.test.tsx.snap create mode 100644 frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessLevelSelectView.test.tsx.snap create mode 100644 frontend/src/tests/pages/SignUpPage/components/__snapshots__/GenderSelectView.test.tsx.snap create mode 100644 frontend/src/tests/pages/SignUpPage/components/__snapshots__/UserInfoAddView.test.tsx.snap diff --git a/frontend/package.json b/frontend/package.json index bd26029d..f39463c2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,61 +1,62 @@ { - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc -b && vite build", - "preview": "vite preview", - "generate": "graphql-codegen", - "lint": "npx @biomejs/biome lint ./ ", - "format": "npx @biomejs/biome format ./ --write", - "test": "vitest --coverage", - "test:e2e": "npx playwright test" - }, - "dependencies": { - "@apollo/client": "^3.11.8", - "@parcel/watcher": "^2.4.1", - "classname": "^0.0.0", - "classnames": "^2.5.1", - "graphql": "^16.9.0", - "i18next": "^23.16.2", - "i18next-browser-languagedetector": "^8.0.0", - "i18next-xhr-backend": "^3.2.2", - "jwt-decode": "^4.0.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "react-hook-form": "^7.54.2", - "react-i18next": "^15.1.0", - "react-router-dom": "^6.27.0", - "rollup": "^3.0.0", - "swiper": "^11.1.15" - }, - "devDependencies": { - "@biomejs/biome": "1.9.4", - "@graphql-codegen/cli": "^5.0.2", - "@graphql-codegen/client-preset": "^4.3.3", - "@playwright/test": "^1.49.1", - "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.6.2", - "@testing-library/react": "^16.0.1", - "@testing-library/user-event": "^14.5.2", - "@types/classnames": "^2.3.0", - "@types/i18next": "^12.1.0", - "@types/i18next-browser-languagedetector": "^2.0.2", - "@types/i18next-xhr-backend": "^1.4.1", - "@types/jest": "^29.5.14", - "@types/react": "^18.3.12", - "@types/react-dom": "^18.3.0", - "@types/react-i18next": "^7.8.3", - "@types/react-router-dom": "^5.3.3", - "@vitejs/plugin-react": "^4.3.1", - "@vitest/coverage-v8": "^2.1.3", - "globals": "^15.9.0", - "jsdom": "^25.0.1", - "sass": "^1.78.0", - "typescript": "^5.5.3", - "vite": "^5.4.1", - "vitest": "^2.1.3" - } + "name": "frontend", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "preview": "vite preview", + "generate": "graphql-codegen", + "lint": "npx @biomejs/biome lint ./ ", + "format": "npx @biomejs/biome format ./ --write", + "test": "vitest", + "test:coverage": "vitest --coverage", + "test:e2e": "npx playwright test" + }, + "dependencies": { + "@apollo/client": "^3.11.8", + "@parcel/watcher": "^2.4.1", + "classname": "^0.0.0", + "classnames": "^2.5.1", + "graphql": "^16.9.0", + "i18next": "^23.16.2", + "i18next-browser-languagedetector": "^8.0.0", + "i18next-xhr-backend": "^3.2.2", + "jwt-decode": "^4.0.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-hook-form": "^7.54.2", + "react-i18next": "^15.1.0", + "react-router-dom": "^6.27.0", + "rollup": "^3.0.0", + "swiper": "^11.1.15" + }, + "devDependencies": { + "@biomejs/biome": "1.9.4", + "@graphql-codegen/cli": "^5.0.2", + "@graphql-codegen/client-preset": "^4.3.3", + "@playwright/test": "^1.49.1", + "@testing-library/dom": "^10.4.0", + "@testing-library/jest-dom": "^6.6.2", + "@testing-library/react": "^16.0.1", + "@testing-library/user-event": "^14.5.2", + "@types/classnames": "^2.3.0", + "@types/i18next": "^12.1.0", + "@types/i18next-browser-languagedetector": "^2.0.2", + "@types/i18next-xhr-backend": "^1.4.1", + "@types/jest": "^29.5.14", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.0", + "@types/react-i18next": "^7.8.3", + "@types/react-router-dom": "^5.3.3", + "@vitejs/plugin-react": "^4.3.1", + "@vitest/coverage-v8": "^2.1.3", + "globals": "^15.9.0", + "jsdom": "^25.0.1", + "sass": "^1.78.0", + "typescript": "^5.5.3", + "vite": "^5.4.1", + "vitest": "^2.1.3" + } } diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index ff20f02b..3b9c32ec 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,8 +1,8 @@ import "./App.css"; -import Landing from "./pages/LandingPage"; +import LandingPage from "@pages/LandingPage"; function App() { - return ; + return ; } export default App; diff --git a/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss b/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss index 0073d6cd..7cdfe5b6 100644 --- a/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss +++ b/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss @@ -8,7 +8,6 @@ @media screen and (min-width: 500px) { display: none; - } &__exit { @@ -57,7 +56,7 @@ } } -.gender-select-view-d{ +.gender-select-view-d { display: none; @media screen and (min-width: 500px) { @@ -65,5 +64,15 @@ flex-direction: column; align-items: center; height: 100vh; + + &__form { + display: flex; + flex-direction: column; + align-items: stretch; + width: 16rem; + gap: 1rem; + margin: 1.5rem 0 1rem; + } } -} \ No newline at end of file + +} diff --git a/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx b/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx index 5340f217..48a31e78 100644 --- a/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx +++ b/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx @@ -128,13 +128,9 @@ function GenderSelectView() { questionLabel={t("YOUR_ARE")} ctaExit={handleExit} > -
+ setCurrentSlideId(1)} hasFocus @@ -143,7 +139,6 @@ function GenderSelectView() { setCurrentSlideId(2)} hasFocus @@ -152,8 +147,6 @@ function GenderSelectView() { setCurrentSlideId(3)} hasFocus > @@ -161,7 +154,6 @@ function GenderSelectView() { setCurrentSlideId(4)} hasFocus @@ -169,7 +161,6 @@ function GenderSelectView() { {t("NOT_WISH_TO_ANSWER")} renders the App component 1`] = ` class="first-view__header__container__buttom" > + , + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`BasicButtom Component > renders the BasicButtom component with a white button 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`BasicButtom Component > renders the BasicButtom component with a white button and focus 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
+ + +

+ Question +

+ blob-girl +
+ test +
+
+
+ sport +
+

+ MOTIVATIONAL_LABEL +

+
+
+
+

+ Question +

+ test +
+
+ + + , + "container":
+
+
+ +
+ +
+
+ +

+ Question +

+ blob-girl +
+ test +
+
+
+ sport +
+

+ MOTIVATIONAL_LABEL +

+
+
+
+

+ Question +

+ test +
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/src/tests/pages/LandingPage/LandingPage.test.tsx b/frontend/src/tests/pages/LandingPage/LandingPage.test.tsx new file mode 100644 index 00000000..ad6cb68c --- /dev/null +++ b/frontend/src/tests/pages/LandingPage/LandingPage.test.tsx @@ -0,0 +1,9 @@ +import LandingPage from "@pages/LandingPage"; +import { render } from "@testing-library/react"; + +describe("LandingPage", () => { + it("renders the Landing Page", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/tests/pages/LandingPage/__snapshots__/LandingPage.test.tsx.snap b/frontend/src/tests/pages/LandingPage/__snapshots__/LandingPage.test.tsx.snap new file mode 100644 index 00000000..28f1b2a1 --- /dev/null +++ b/frontend/src/tests/pages/LandingPage/__snapshots__/LandingPage.test.tsx.snap @@ -0,0 +1,396 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`LandingPage > renders the Landing Page 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+
+
+
+ blob +
+
+ girl +
+
+
+ +
+
+ +
+
+
+ +
+

+ CONNECT_MY +

+
+
+

+ LANDING_DESCRIPTION +

+
+ +
+
+ +
+
+
+
+ programs +
+

+ LANDING_DESCRIPTION_2 +

+
+

+ PROGRAMS_TO_DICOVER +

+

+ FOLLOW_YOUR_PROGRESS +

+

+ PERSONALIZED_COACHING +

+
+
+ +
+
+ blob +
+
+
+
+ , + "container":
+
+
+
+ blob +
+
+ girl +
+
+
+ +
+
+ +
+
+
+ +
+

+ CONNECT_MY +

+
+
+

+ LANDING_DESCRIPTION +

+
+ +
+
+ +
+
+
+
+ programs +
+

+ LANDING_DESCRIPTION_2 +

+
+

+ PROGRAMS_TO_DICOVER +

+

+ FOLLOW_YOUR_PROGRESS +

+

+ PERSONALIZED_COACHING +

+
+
+ +
+
+ blob +
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/src/tests/pages/LandingPage/components/FirstView.test.tsx b/frontend/src/tests/pages/LandingPage/components/FirstView.test.tsx new file mode 100644 index 00000000..13a295dc --- /dev/null +++ b/frontend/src/tests/pages/LandingPage/components/FirstView.test.tsx @@ -0,0 +1,9 @@ +import FirstView from "@pages/LandingPage/components/FirstView"; +import { render } from "@testing-library/react"; + +describe("FirstView", () => { + it("renders the FirstView component", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/tests/pages/LandingPage/components/SecondView.test.tsx b/frontend/src/tests/pages/LandingPage/components/SecondView.test.tsx new file mode 100644 index 00000000..6aa6fd95 --- /dev/null +++ b/frontend/src/tests/pages/LandingPage/components/SecondView.test.tsx @@ -0,0 +1,9 @@ +import SecondView from "@pages/LandingPage/components/SecondView"; +import { render } from "@testing-library/react"; + +describe("SecondView", () => { + it("renders the SecondView component", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/tests/pages/LandingPage/components/__snapshots__/FirstView.test.tsx.snap b/frontend/src/tests/pages/LandingPage/components/__snapshots__/FirstView.test.tsx.snap new file mode 100644 index 00000000..f33109e8 --- /dev/null +++ b/frontend/src/tests/pages/LandingPage/components/__snapshots__/FirstView.test.tsx.snap @@ -0,0 +1,276 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`FirstView > renders the FirstView component 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+
+
+ blob +
+
+ girl +
+
+
+ +
+
+ +
+
+
+ +
+

+ CONNECT_MY +

+
+
+

+ LANDING_DESCRIPTION +

+
+ +
+
+ +
+
+
+ , + "container":
+
+
+ blob +
+
+ girl +
+
+
+ +
+
+ +
+
+
+ +
+

+ CONNECT_MY +

+
+
+

+ LANDING_DESCRIPTION +

+
+ +
+
+ +
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/src/tests/pages/LandingPage/components/__snapshots__/SecondView.test.tsx.snap b/frontend/src/tests/pages/LandingPage/components/__snapshots__/SecondView.test.tsx.snap new file mode 100644 index 00000000..cbc30ac9 --- /dev/null +++ b/frontend/src/tests/pages/LandingPage/components/__snapshots__/SecondView.test.tsx.snap @@ -0,0 +1,176 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`SecondView > renders the SecondView component 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+
+
+ programs +
+

+ LANDING_DESCRIPTION_2 +

+
+

+ PROGRAMS_TO_DICOVER +

+

+ FOLLOW_YOUR_PROGRESS +

+

+ PERSONALIZED_COACHING +

+
+
+ +
+
+ blob +
+
+
+ , + "container":
+
+
+ programs +
+

+ LANDING_DESCRIPTION_2 +

+
+

+ PROGRAMS_TO_DICOVER +

+

+ FOLLOW_YOUR_PROGRESS +

+

+ PERSONALIZED_COACHING +

+
+
+ +
+
+ blob +
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/src/tests/pages/SignUpPage/SignUpPage.test.tsx b/frontend/src/tests/pages/SignUpPage/SignUpPage.test.tsx new file mode 100644 index 00000000..0db7c6e7 --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/SignUpPage.test.tsx @@ -0,0 +1,9 @@ +import SignUpPage from "@pages/SignUpPage"; +import { render } from "@testing-library/react"; + +describe("SignUpPage", () => { + it("renders the SignUp Page", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/tests/pages/SignUpPage/__snapshots__/SignUpPage.test.tsx.snap b/frontend/src/tests/pages/SignUpPage/__snapshots__/SignUpPage.test.tsx.snap new file mode 100644 index 00000000..0abb3731 --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/__snapshots__/SignUpPage.test.tsx.snap @@ -0,0 +1,74 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`SignUpPage > renders the SignUp Page 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/src/tests/pages/SignUpPage/components/ExitSignUpStep.test.tsx b/frontend/src/tests/pages/SignUpPage/components/ExitSignUpStep.test.tsx new file mode 100644 index 00000000..a6b1ce12 --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/ExitSignUpStep.test.tsx @@ -0,0 +1,14 @@ +import ExitSignUpStep from "@pages/SignUpPage/components/ExitSignUpStep"; +import { render } from "@testing-library/react"; + +describe("ExitSignUpStep", () => { + it("renders the ExitSignUpStep component", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); + + it("renders the ExitSignUpStep component with is completed", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/tests/pages/SignUpPage/components/FitnessGoalsView.test.tsx b/frontend/src/tests/pages/SignUpPage/components/FitnessGoalsView.test.tsx new file mode 100644 index 00000000..599e1461 --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/FitnessGoalsView.test.tsx @@ -0,0 +1,9 @@ +import FitnessGoalsView from "@pages/SignUpPage/components/FitnessGoalsView"; +import { render } from "@testing-library/react"; + +describe("FitnessGoalsView", () => { + it("renders the FitnessGoalsView component", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/tests/pages/SignUpPage/components/FitnessLevelSelectView.test.tsx b/frontend/src/tests/pages/SignUpPage/components/FitnessLevelSelectView.test.tsx new file mode 100644 index 00000000..7f1bf55a --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/FitnessLevelSelectView.test.tsx @@ -0,0 +1,9 @@ +import FitnessLevelSelectView from "@pages/SignUpPage/components/FitnessLevelSelectView"; +import { render } from "@testing-library/react"; + +describe("FitnessLevelSelectView", () => { + it("renders the FitnessLevelSelectView component", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/tests/pages/SignUpPage/components/GenderSelectView.test.tsx b/frontend/src/tests/pages/SignUpPage/components/GenderSelectView.test.tsx new file mode 100644 index 00000000..90cc2161 --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/GenderSelectView.test.tsx @@ -0,0 +1,9 @@ +import GenderSelectView from "@pages/SignUpPage/components/GenderSelectView"; +import { render } from "@testing-library/react"; + +describe("GenderSelectView", () => { + it("renders the GenderSelectView component", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/tests/pages/SignUpPage/components/UserInfoAddView.test.tsx b/frontend/src/tests/pages/SignUpPage/components/UserInfoAddView.test.tsx new file mode 100644 index 00000000..96e4f1e4 --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/UserInfoAddView.test.tsx @@ -0,0 +1,9 @@ +import UserInfoAddView from "@pages/SignUpPage/components/UserInfoAddView"; +import { render } from "@testing-library/react"; + +describe("UserInfoAddView", () => { + it("renders the UserInfoAddView component", () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/ExitSignUpStep.test.tsx.snap b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/ExitSignUpStep.test.tsx.snap new file mode 100644 index 00000000..7e739620 --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/ExitSignUpStep.test.tsx.snap @@ -0,0 +1,237 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`ExitSignUpStep > renders the ExitSignUpStep component 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`ExitSignUpStep > renders the ExitSignUpStep component with is completed 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessGoalsView.test.tsx.snap b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessGoalsView.test.tsx.snap new file mode 100644 index 00000000..619f95cf --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessGoalsView.test.tsx.snap @@ -0,0 +1,412 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`FitnessGoalsView > renders the FitnessGoalsView component 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+
+
+
+ +
+ +
+
+ +

+ ANY_PARTICULAR_GOAL +

+ blob-girl +
+ + + + + + + +
+
+
+ sport +
+

+ MOTIVATIONAL_LABEL +

+
+
+
+

+ ANY_PARTICULAR_GOAL +

+
+ + + + + +
+
+
+
+
+
+ , + "container":
+
+
+
+ +
+ +
+
+ +

+ ANY_PARTICULAR_GOAL +

+ blob-girl +
+
+ + + + + +
+
+
+
+ sport +
+

+ MOTIVATIONAL_LABEL +

+
+
+
+

+ ANY_PARTICULAR_GOAL +

+
+ + + + + +
+
+
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessLevelSelectView.test.tsx.snap b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessLevelSelectView.test.tsx.snap new file mode 100644 index 00000000..7b91f020 --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessLevelSelectView.test.tsx.snap @@ -0,0 +1,372 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`FitnessLevelSelectView > renders the FitnessLevelSelectView component 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+
+
+
+ +
+ +
+
+ +

+ DESCRIBE_YOUR_LEVEL +

+ blob-girl +
+
+ + + + +
+
+
+
+ sport +
+

+ MOTIVATIONAL_LABEL +

+
+
+
+

+ DESCRIBE_YOUR_LEVEL +

+
+ + + + +
+
+
+
+
+
+ , + "container":
+
+
+
+ +
+ +
+
+ +

+ DESCRIBE_YOUR_LEVEL +

+ blob-girl +
+
+ + + + +
+
+
+
+ sport +
+

+ MOTIVATIONAL_LABEL +

+
+
+
+

+ DESCRIBE_YOUR_LEVEL +

+
+ + + + +
+
+
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/GenderSelectView.test.tsx.snap b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/GenderSelectView.test.tsx.snap new file mode 100644 index 00000000..bec1a47a --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/GenderSelectView.test.tsx.snap @@ -0,0 +1,624 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`GenderSelectView > renders the GenderSelectView component 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+
+ +

+ YOUR_ARE +

+
+
+
+ GIRL +

+ GIRL +

+
+
+ MEN +

+ MEN +

+
+
+ OTHER +

+ OTHER +

+
+
+ NOT_WISH_TO_ANSWER +

+ NOT_WISH_TO_ANSWER +

+
+
+
+ +

+ Diapositive active : + 1 +

+
+
+
+
+ +
+ +
+
+ +

+ YOUR_ARE +

+ blob-girl +
+
+ + + + + +

+ Diapositive active : + 1 +

+
+
+
+
+ sport +
+

+ MOTIVATIONAL_LABEL +

+
+
+
+

+ YOUR_ARE +

+
+ + + + + +

+ Diapositive active : + 1 +

+
+
+
+
+
+
+ , + "container":
+
+ +

+ YOUR_ARE +

+
+
+
+ GIRL +

+ GIRL +

+
+
+ MEN +

+ MEN +

+
+
+ OTHER +

+ OTHER +

+
+
+ NOT_WISH_TO_ANSWER +

+ NOT_WISH_TO_ANSWER +

+
+
+
+ +

+ Diapositive active : + 1 +

+
+
+
+
+ +
+ +
+
+ +

+ YOUR_ARE +

+ blob-girl +
+
+ + + + + +

+ Diapositive active : + 1 +

+
+
+
+
+ sport +
+

+ MOTIVATIONAL_LABEL +

+
+
+
+

+ YOUR_ARE +

+
+ + + + + +

+ Diapositive active : + 1 +

+
+
+
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/UserInfoAddView.test.tsx.snap b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/UserInfoAddView.test.tsx.snap new file mode 100644 index 00000000..c2a7d92f --- /dev/null +++ b/frontend/src/tests/pages/SignUpPage/components/__snapshots__/UserInfoAddView.test.tsx.snap @@ -0,0 +1,404 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`UserInfoAddView > renders the UserInfoAddView component 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json index cd905f2c..163c7389 100644 --- a/frontend/tsconfig.app.json +++ b/frontend/tsconfig.app.json @@ -1,31 +1,27 @@ { - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "isolatedModules": true, - "moduleDetection": "force", - "noEmit": true, - "jsx": "react-jsx", - - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, - "baseUrl": ".", - "types": ["vitest", "jest"], - "paths": { - "@components/*": ["src/components/*"], - "@assets/*": ["src/assets/*"], - "@scss/*": ["src/scss/*"] - } - }, - "include": ["src"] + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "baseUrl": ".", + "types": ["vitest", "jest"], + "paths": { + "@components/*": ["src/components/*"], + "@assets/*": ["src/assets/*"], + "@pages/*": ["src/pages/*"] + } + }, + "include": ["src"] } diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json index 04631103..28f7fdb6 100644 --- a/frontend/tsconfig.node.json +++ b/frontend/tsconfig.node.json @@ -4,20 +4,16 @@ "lib": ["ES2023"], "module": "ESNext", "skipLibCheck": true, - - /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, "isolatedModules": true, "moduleDetection": "force", "noEmit": true, - - /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, - "types":["vitest", "jest"] + "types": ["vitest", "jest"] }, "include": ["vite.config.ts"] } diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 880bbd75..b439a42f 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -4,28 +4,28 @@ import { defineConfig } from "vite"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], - test: { - globals: true, - // add jsdom to vite - environment: "jsdom", - setupFiles: "./src/tests/setup.ts", - coverage: { - reporter: ["text", "html"], - }, - }, - server: { - port: 3000, - host: "0.0.0.0", - proxy: { - "/locales": "http://translation:8051", - }, - }, - resolve: { - alias: { - "@scss": path.resolve(__dirname, "src/scss"), - "@components": path.resolve(__dirname, "src/components/"), - "@assets": path.resolve(__dirname, "src/assets"), - }, - }, + plugins: [react()], + test: { + globals: true, + // add jsdom to vite + environment: "jsdom", + setupFiles: "./src/tests/setup.ts", + coverage: { + reporter: ["text", "html"], + }, + }, + server: { + port: 3000, + host: "0.0.0.0", + proxy: { + "/locales": "http://translation:8051", + }, + }, + resolve: { + alias: { + "@pages": path.resolve(__dirname, "src/pages/"), + "@components": path.resolve(__dirname, "src/components/"), + "@assets": path.resolve(__dirname, "src/assets"), + }, + }, }); From f43d236d4f179345f4b6fdd8fa8863dc0ca9fed3 Mon Sep 17 00:00:00 2001 From: blackstars Date: Thu, 6 Feb 2025 12:51:18 +0100 Subject: [PATCH 4/4] [fix] moving components --- .../ExitSignUpStep/ExitSignUpStep.scss | 0 .../ExitSignUpStep/ExitSignUpStep.type.ts | 0 .../molecules}/ExitSignUpStep/index.tsx | 0 .../FitnessGoalsView/FitnessGoalsView.scss | 0 .../molecules}/FitnessGoalsView/index.tsx | 2 +- .../FitnessLevelSelectView.scss | 0 .../FitnessLevelSelectView/index.tsx | 4 +- .../GenderSelectView/GenderSelectView.scss | 0 .../molecules}/GenderSelectView/index.tsx | 4 +- .../UserInfoAddView/UserInfoAddView.scss | 0 .../molecules}/UserInfoAddView/index.tsx | 4 +- frontend/src/pages/SignUpPage/index.tsx | 3 +- .../ExitSignUpStep}/ExitSignUpStep.test.tsx | 2 +- .../ExitSignUpStep.test.tsx.snap | 0 .../FitnessGoalsView.test.tsx | 2 +- .../FitnessGoalsView.test.tsx.snap | 0 .../FitnessLevelSelectView.test.tsx | 2 +- .../FitnessLevelSelectView.test.tsx.snap | 0 .../GenderSelectView.test.tsx | 2 +- .../GenderSelectView.test.tsx.snap | 48 +++++++++---------- .../UserInfoAddView}/UserInfoAddView.test.tsx | 2 +- .../UserInfoAddView.test.tsx.snap | 0 22 files changed, 38 insertions(+), 37 deletions(-) rename frontend/src/{pages/SignUpPage/components => components/molecules}/ExitSignUpStep/ExitSignUpStep.scss (100%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/ExitSignUpStep/ExitSignUpStep.type.ts (100%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/ExitSignUpStep/index.tsx (100%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/FitnessGoalsView/FitnessGoalsView.scss (100%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/FitnessGoalsView/index.tsx (97%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/FitnessLevelSelectView/FitnessLevelSelectView.scss (100%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/FitnessLevelSelectView/index.tsx (94%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/GenderSelectView/GenderSelectView.scss (100%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/GenderSelectView/index.tsx (97%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/UserInfoAddView/UserInfoAddView.scss (100%) rename frontend/src/{pages/SignUpPage/components => components/molecules}/UserInfoAddView/index.tsx (93%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/ExitSignUpStep}/ExitSignUpStep.test.tsx (84%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/ExitSignUpStep}/__snapshots__/ExitSignUpStep.test.tsx.snap (100%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/FitnessGoalsView}/FitnessGoalsView.test.tsx (75%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/FitnessGoalsView}/__snapshots__/FitnessGoalsView.test.tsx.snap (100%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/FitnessLevelSelectView}/FitnessLevelSelectView.test.tsx (73%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/FitnessLevelSelectView}/__snapshots__/FitnessLevelSelectView.test.tsx.snap (100%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/GenderSelectView}/GenderSelectView.test.tsx (75%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/GenderSelectView}/__snapshots__/GenderSelectView.test.tsx.snap (85%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/UserInfoAddView}/UserInfoAddView.test.tsx (75%) rename frontend/src/tests/{pages/SignUpPage/components => components/molecules/UserInfoAddView}/__snapshots__/UserInfoAddView.test.tsx.snap (100%) diff --git a/frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.scss b/frontend/src/components/molecules/ExitSignUpStep/ExitSignUpStep.scss similarity index 100% rename from frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.scss rename to frontend/src/components/molecules/ExitSignUpStep/ExitSignUpStep.scss diff --git a/frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.type.ts b/frontend/src/components/molecules/ExitSignUpStep/ExitSignUpStep.type.ts similarity index 100% rename from frontend/src/pages/SignUpPage/components/ExitSignUpStep/ExitSignUpStep.type.ts rename to frontend/src/components/molecules/ExitSignUpStep/ExitSignUpStep.type.ts diff --git a/frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx b/frontend/src/components/molecules/ExitSignUpStep/index.tsx similarity index 100% rename from frontend/src/pages/SignUpPage/components/ExitSignUpStep/index.tsx rename to frontend/src/components/molecules/ExitSignUpStep/index.tsx diff --git a/frontend/src/pages/SignUpPage/components/FitnessGoalsView/FitnessGoalsView.scss b/frontend/src/components/molecules/FitnessGoalsView/FitnessGoalsView.scss similarity index 100% rename from frontend/src/pages/SignUpPage/components/FitnessGoalsView/FitnessGoalsView.scss rename to frontend/src/components/molecules/FitnessGoalsView/FitnessGoalsView.scss diff --git a/frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx b/frontend/src/components/molecules/FitnessGoalsView/index.tsx similarity index 97% rename from frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx rename to frontend/src/components/molecules/FitnessGoalsView/index.tsx index 02528093..7de3128e 100644 --- a/frontend/src/pages/SignUpPage/components/FitnessGoalsView/index.tsx +++ b/frontend/src/components/molecules/FitnessGoalsView/index.tsx @@ -2,9 +2,9 @@ import { useState } from "react"; import BasicButton from "@components/atoms/BasicButton"; import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; +import ExitSignUpStep from "@components/molecules/ExitSignUpStep"; import { useTranslation } from "react-i18next"; -import ExitSignUpStep from "../ExitSignUpStep"; import "./FitnessGoalsView.scss"; function FitnessGoalsView() { diff --git a/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/FitnessLevelSelectView.scss b/frontend/src/components/molecules/FitnessLevelSelectView/FitnessLevelSelectView.scss similarity index 100% rename from frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/FitnessLevelSelectView.scss rename to frontend/src/components/molecules/FitnessLevelSelectView/FitnessLevelSelectView.scss diff --git a/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx b/frontend/src/components/molecules/FitnessLevelSelectView/index.tsx similarity index 94% rename from frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx rename to frontend/src/components/molecules/FitnessLevelSelectView/index.tsx index de80bf3f..9439a00f 100644 --- a/frontend/src/pages/SignUpPage/components/FitnessLevelSelectView/index.tsx +++ b/frontend/src/components/molecules/FitnessLevelSelectView/index.tsx @@ -3,8 +3,8 @@ import { useTranslation } from "react-i18next"; import BasicButton from "@components/atoms/BasicButton"; import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; -import ExitSignUpStep from "../ExitSignUpStep"; -import FitnessGoalsView from "../FitnessGoalsView"; +import ExitSignUpStep from "@components/molecules/ExitSignUpStep"; +import FitnessGoalsView from "@components/molecules/FitnessGoalsView"; import "./FitnessLevelSelectView.scss"; diff --git a/frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss b/frontend/src/components/molecules/GenderSelectView/GenderSelectView.scss similarity index 100% rename from frontend/src/pages/SignUpPage/components/GenderSelectView/GenderSelectView.scss rename to frontend/src/components/molecules/GenderSelectView/GenderSelectView.scss diff --git a/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx b/frontend/src/components/molecules/GenderSelectView/index.tsx similarity index 97% rename from frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx rename to frontend/src/components/molecules/GenderSelectView/index.tsx index 48a31e78..1a073344 100644 --- a/frontend/src/pages/SignUpPage/components/GenderSelectView/index.tsx +++ b/frontend/src/components/molecules/GenderSelectView/index.tsx @@ -5,8 +5,8 @@ import { Swiper, SwiperSlide } from "swiper/react"; import BasicButton from "@components/atoms/BasicButton"; import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; -import ExitSignUpStep from "../ExitSignUpStep"; -import FitnessLevelSelectView from "../FitnessLevelSelectView"; +import ExitSignUpStep from "@components/molecules/ExitSignUpStep"; +import FitnessLevelSelectView from "@components/molecules/FitnessLevelSelectView"; import "./GenderSelectView.scss"; import "swiper/css"; diff --git a/frontend/src/pages/SignUpPage/components/UserInfoAddView/UserInfoAddView.scss b/frontend/src/components/molecules/UserInfoAddView/UserInfoAddView.scss similarity index 100% rename from frontend/src/pages/SignUpPage/components/UserInfoAddView/UserInfoAddView.scss rename to frontend/src/components/molecules/UserInfoAddView/UserInfoAddView.scss diff --git a/frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx b/frontend/src/components/molecules/UserInfoAddView/index.tsx similarity index 93% rename from frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx rename to frontend/src/components/molecules/UserInfoAddView/index.tsx index 59233cd7..df855592 100644 --- a/frontend/src/pages/SignUpPage/components/UserInfoAddView/index.tsx +++ b/frontend/src/components/molecules/UserInfoAddView/index.tsx @@ -3,8 +3,8 @@ import { useTranslation } from "react-i18next"; import BasicButton from "@components/atoms/BasicButton"; import BodyStepQuestions from "@components/molecules/BodyStepQuestions"; -import ExitSignUpStep from "../ExitSignUpStep"; -import GenderSelectView from "../GenderSelectView"; +import ExitSignUpStep from "@components/molecules/ExitSignUpStep"; +import GenderSelectView from "@components/molecules/GenderSelectView"; import "./UserInfoAddView.scss"; diff --git a/frontend/src/pages/SignUpPage/index.tsx b/frontend/src/pages/SignUpPage/index.tsx index df9fdf9c..7536ea5a 100644 --- a/frontend/src/pages/SignUpPage/index.tsx +++ b/frontend/src/pages/SignUpPage/index.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; -import UserInfoAddView from "./components/UserInfoAddView"; + +import UserInfoAddView from "@components/molecules/UserInfoAddView"; function SignUpPage() { const [isStepSignUp, setIsStepSignUp] = useState(false); diff --git a/frontend/src/tests/pages/SignUpPage/components/ExitSignUpStep.test.tsx b/frontend/src/tests/components/molecules/ExitSignUpStep/ExitSignUpStep.test.tsx similarity index 84% rename from frontend/src/tests/pages/SignUpPage/components/ExitSignUpStep.test.tsx rename to frontend/src/tests/components/molecules/ExitSignUpStep/ExitSignUpStep.test.tsx index a6b1ce12..fedc9964 100644 --- a/frontend/src/tests/pages/SignUpPage/components/ExitSignUpStep.test.tsx +++ b/frontend/src/tests/components/molecules/ExitSignUpStep/ExitSignUpStep.test.tsx @@ -1,4 +1,4 @@ -import ExitSignUpStep from "@pages/SignUpPage/components/ExitSignUpStep"; +import ExitSignUpStep from "@components/molecules/ExitSignUpStep"; import { render } from "@testing-library/react"; describe("ExitSignUpStep", () => { diff --git a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/ExitSignUpStep.test.tsx.snap b/frontend/src/tests/components/molecules/ExitSignUpStep/__snapshots__/ExitSignUpStep.test.tsx.snap similarity index 100% rename from frontend/src/tests/pages/SignUpPage/components/__snapshots__/ExitSignUpStep.test.tsx.snap rename to frontend/src/tests/components/molecules/ExitSignUpStep/__snapshots__/ExitSignUpStep.test.tsx.snap diff --git a/frontend/src/tests/pages/SignUpPage/components/FitnessGoalsView.test.tsx b/frontend/src/tests/components/molecules/FitnessGoalsView/FitnessGoalsView.test.tsx similarity index 75% rename from frontend/src/tests/pages/SignUpPage/components/FitnessGoalsView.test.tsx rename to frontend/src/tests/components/molecules/FitnessGoalsView/FitnessGoalsView.test.tsx index 599e1461..8a37cc24 100644 --- a/frontend/src/tests/pages/SignUpPage/components/FitnessGoalsView.test.tsx +++ b/frontend/src/tests/components/molecules/FitnessGoalsView/FitnessGoalsView.test.tsx @@ -1,4 +1,4 @@ -import FitnessGoalsView from "@pages/SignUpPage/components/FitnessGoalsView"; +import FitnessGoalsView from "@components/molecules/FitnessGoalsView"; import { render } from "@testing-library/react"; describe("FitnessGoalsView", () => { diff --git a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessGoalsView.test.tsx.snap b/frontend/src/tests/components/molecules/FitnessGoalsView/__snapshots__/FitnessGoalsView.test.tsx.snap similarity index 100% rename from frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessGoalsView.test.tsx.snap rename to frontend/src/tests/components/molecules/FitnessGoalsView/__snapshots__/FitnessGoalsView.test.tsx.snap diff --git a/frontend/src/tests/pages/SignUpPage/components/FitnessLevelSelectView.test.tsx b/frontend/src/tests/components/molecules/FitnessLevelSelectView/FitnessLevelSelectView.test.tsx similarity index 73% rename from frontend/src/tests/pages/SignUpPage/components/FitnessLevelSelectView.test.tsx rename to frontend/src/tests/components/molecules/FitnessLevelSelectView/FitnessLevelSelectView.test.tsx index 7f1bf55a..e15df93a 100644 --- a/frontend/src/tests/pages/SignUpPage/components/FitnessLevelSelectView.test.tsx +++ b/frontend/src/tests/components/molecules/FitnessLevelSelectView/FitnessLevelSelectView.test.tsx @@ -1,4 +1,4 @@ -import FitnessLevelSelectView from "@pages/SignUpPage/components/FitnessLevelSelectView"; +import FitnessLevelSelectView from "@components/molecules/FitnessLevelSelectView"; import { render } from "@testing-library/react"; describe("FitnessLevelSelectView", () => { diff --git a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessLevelSelectView.test.tsx.snap b/frontend/src/tests/components/molecules/FitnessLevelSelectView/__snapshots__/FitnessLevelSelectView.test.tsx.snap similarity index 100% rename from frontend/src/tests/pages/SignUpPage/components/__snapshots__/FitnessLevelSelectView.test.tsx.snap rename to frontend/src/tests/components/molecules/FitnessLevelSelectView/__snapshots__/FitnessLevelSelectView.test.tsx.snap diff --git a/frontend/src/tests/pages/SignUpPage/components/GenderSelectView.test.tsx b/frontend/src/tests/components/molecules/GenderSelectView/GenderSelectView.test.tsx similarity index 75% rename from frontend/src/tests/pages/SignUpPage/components/GenderSelectView.test.tsx rename to frontend/src/tests/components/molecules/GenderSelectView/GenderSelectView.test.tsx index 90cc2161..481f0fb5 100644 --- a/frontend/src/tests/pages/SignUpPage/components/GenderSelectView.test.tsx +++ b/frontend/src/tests/components/molecules/GenderSelectView/GenderSelectView.test.tsx @@ -1,4 +1,4 @@ -import GenderSelectView from "@pages/SignUpPage/components/GenderSelectView"; +import GenderSelectView from "@components/molecules/GenderSelectView"; import { render } from "@testing-library/react"; describe("GenderSelectView", () => { diff --git a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/GenderSelectView.test.tsx.snap b/frontend/src/tests/components/molecules/GenderSelectView/__snapshots__/GenderSelectView.test.tsx.snap similarity index 85% rename from frontend/src/tests/pages/SignUpPage/components/__snapshots__/GenderSelectView.test.tsx.snap rename to frontend/src/tests/components/molecules/GenderSelectView/__snapshots__/GenderSelectView.test.tsx.snap index bec1a47a..a0bd21b7 100644 --- a/frontend/src/tests/pages/SignUpPage/components/__snapshots__/GenderSelectView.test.tsx.snap +++ b/frontend/src/tests/components/molecules/GenderSelectView/__snapshots__/GenderSelectView.test.tsx.snap @@ -169,34 +169,34 @@ exports[`GenderSelectView > renders the GenderSelectView component 1`] = ` >