From f1ef7cd3f2892253f5a984aebd12009da87e7e1c Mon Sep 17 00:00:00 2001 From: Owen Rees Date: Tue, 20 Jun 2023 08:42:03 +0200 Subject: [PATCH] cypress best practices updated --- TODO | 11 +----- app/contactez-nous/page.tsx | 5 ++- app/page.tsx | 4 +- app/qui-sommes-nous/page.tsx | 5 ++- components/Footer.tsx | 5 ++- components/Hamburger.tsx | 1 + components/Navbar.tsx | 12 ++++-- components/ThemeSwitcher.tsx | 12 +++++- cypress/component/mounting.cy.tsx | 16 +++++--- cypress/component/themeToggle.cy.tsx | 10 ++--- cypress/e2e/links.cy.ts | 2 +- cypress/e2e/navbar.cy.tsx | 12 +++--- hooks/useTournamentFilter.tsx | 56 ---------------------------- 13 files changed, 60 insertions(+), 91 deletions(-) delete mode 100644 hooks/useTournamentFilter.tsx diff --git a/TODO b/TODO index 6743d95..4186a4e 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,8 @@ -// TODO change tests to follow best practices https://docs.cypress.io/guides/references/best-practices // TODO tests for tournament page: - map and table mounts in tournament page <- get data to send to map/table ---------------------------------------------------------------- -//TODO hover on table needs fixing - this only seemed to happen once I moved the logic into its own hook <- error is occurring on all hovers at the moment. -//TODO fix table hover colours ------------------------------------------------------------------ +//TODO SRP for web and API data fetching +//TODO API should not display __v and _id should just be id //TODO about page //TODO contact page needs working mailer //TODO font size on mobile screen @@ -13,13 +11,8 @@ ---------------------------------------------------------------- //TODO logo for navbar and favicon //TODO mobile map needs improving - //TODO multi-language i18n support - https://nextjs.org/docs/app/building-your-application/routing/internationalization - //TODO error handling - //TODO consider offering GraphQL support - //TODO move smaller ui components into a new folder, and make them reusable - such as using generic prop names - //TODO readme diff --git a/app/contactez-nous/page.tsx b/app/contactez-nous/page.tsx index 6902a99..3006137 100644 --- a/app/contactez-nous/page.tsx +++ b/app/contactez-nous/page.tsx @@ -6,7 +6,10 @@ export default function Contact() {
-

+

Contactez-Nous

diff --git a/app/page.tsx b/app/page.tsx index 047203e..7fb3e4b 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -16,7 +16,9 @@ export default function Home() { />

-

Echecs France

+

+ Echecs France +

Trouvez Vos Tournois d'Echecs en France Sur Une Carte

diff --git a/app/qui-sommes-nous/page.tsx b/app/qui-sommes-nous/page.tsx index df40855..8c5c878 100644 --- a/app/qui-sommes-nous/page.tsx +++ b/app/qui-sommes-nous/page.tsx @@ -6,7 +6,10 @@ export default function About() {
-

+

Qui Sommes-Nous?

diff --git a/components/Footer.tsx b/components/Footer.tsx index e2cb709..20b7e05 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -3,7 +3,10 @@ import { FaGithub, FaRegEnvelope } from "react-icons/fa"; export default function Footer() { return ( -