From ef08aa3a616a1a3cfa8a0e239c8d5134c5612949 Mon Sep 17 00:00:00 2001 From: Owen Rees Date: Thu, 22 Jun 2023 13:39:50 +0200 Subject: [PATCH] updated tests --- app/contactez-nous/page.tsx | 2 +- app/page.tsx | 2 +- app/qui-sommes-nous/page.tsx | 2 +- components/ContactForm.tsx | 10 +++++----- components/Footer.tsx | 2 +- components/Hamburger.tsx | 2 +- components/Navbar.tsx | 6 +++--- components/ScrollToTopButton.tsx | 2 +- components/ThemeSwitcher.tsx | 4 ++-- components/TournamentTable.tsx | 4 ++-- cypress/component/mounting.cy.tsx | 10 +++++----- cypress/component/scroll.cy.tsx | 4 ++-- cypress/component/themeToggle.cy.tsx | 10 +++++----- cypress/e2e/data.cy.ts | 2 +- cypress/e2e/links.cy.ts | 2 +- cypress/e2e/navbar.cy.ts | 12 ++++++------ cypress/e2e/scroll.cy.ts | 6 +++--- ...to correct pathname as a slug (failed).png | Bin 283046 -> 0 bytes cypress/support/commands.ts | 2 +- cypress/support/component-index.html | 2 +- cypress/videos/contactForm.cy.ts.mp4 | Bin 0 -> 285238 bytes cypress/videos/data.cy.ts.mp4 | Bin 0 -> 76357 bytes cypress/videos/data.cy.tsx.mp4 | Bin 120382 -> 0 bytes cypress/videos/links.cy.ts.mp4 | Bin 671181 -> 347419 bytes cypress/videos/navbar.cy.ts.mp4 | Bin 0 -> 152571 bytes cypress/videos/navbar.cy.tsx.mp4 | Bin 127530 -> 0 bytes cypress/videos/scroll.cy.ts.mp4 | Bin 0 -> 216242 bytes cypress/videos/scroll.cy.tsx.mp4 | Bin 175958 -> 0 bytes 28 files changed, 43 insertions(+), 43 deletions(-) delete mode 100644 cypress/screenshots/links.cy.ts/Test all links -- Check navbar links point to correct pathname as a slug (failed).png create mode 100644 cypress/videos/contactForm.cy.ts.mp4 create mode 100644 cypress/videos/data.cy.ts.mp4 delete mode 100644 cypress/videos/data.cy.tsx.mp4 create mode 100644 cypress/videos/navbar.cy.ts.mp4 delete mode 100644 cypress/videos/navbar.cy.tsx.mp4 create mode 100644 cypress/videos/scroll.cy.ts.mp4 delete mode 100644 cypress/videos/scroll.cy.tsx.mp4 diff --git a/app/contactez-nous/page.tsx b/app/contactez-nous/page.tsx index b2e8bde..8a8a2b3 100644 --- a/app/contactez-nous/page.tsx +++ b/app/contactez-nous/page.tsx @@ -9,7 +9,7 @@ export default function Contact() {

Contactez-Nous

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

+

Echecs France

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

Qui Sommes-Nous?

diff --git a/components/ContactForm.tsx b/components/ContactForm.tsx index 5902691..6a2a3c0 100644 --- a/components/ContactForm.tsx +++ b/components/ContactForm.tsx @@ -17,7 +17,7 @@ const ContactForm = () => { className={`${ responseMessage.isSuccessful ? "text-green-600" : "text-red-600" } italic`} - data-cy="info-message" + data-test="info-message" > {responseMessage.message}

@@ -52,7 +52,7 @@ const ContactForm = () => { className="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 dark:shadow-sm-light" placeholder="nom@exemple.com" required - data-cy="email-input" + data-test="email-input" />
@@ -70,7 +70,7 @@ const ContactForm = () => { className="block p-3 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 dark:shadow-sm-light" placeholder="Le motif de ma demande" required - data-cy="subject-input" + data-test="subject-input" />
@@ -87,7 +87,7 @@ const ContactForm = () => { rows={6} className="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg shadow-sm border border-gray-300 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" placeholder="Détaillez ici votre demande..." - data-cy="message-input" + data-test="message-input" required >
@@ -95,7 +95,7 @@ const ContactForm = () => { disabled={isSending} type="submit" className="py-3 px-5 text-sm font-medium text-center text-white rounded-lg bg-teal-600 sm:w-fit hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 dark:hover:bg-primary-700 dark:focus:ring-primary-800 dark:text-white disabled:opacity-25" - data-cy="submit-button" + data-test="submit-button" > {isSending ? "Sending..." : "Send Message"} diff --git a/components/Footer.tsx b/components/Footer.tsx index 540e283..3df5be8 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -5,7 +5,7 @@ export default function Footer() { return (