Fix layout issues & co-locate components (#46)

* Fix layout issues & co-locate components

* Fix front page

* Fix centering
This commit is contained in:
Timothy Armes
2023-07-04 13:26:25 +02:00
committed by GitHub
parent a9822b65fe
commit 75a6c74306
26 changed files with 306 additions and 305 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import ScrollToTopButton from "@/components/ScrollToTopButton";
import ScrollToTopButton from "@/app/[lang]/tournois/ScrollToTopButton";
describe("Scroll to top button", () => {
it("desktop scroll button clickable", () => {
+3 -2
View File
@@ -1,5 +1,5 @@
import React from "react";
import ThemeSwitcher from "../../components/ThemeSwitcher";
import ThemeSwitcher from "@/app/[lang]/components/ThemeSwitcher";
import "@/css/theme-toggle.css";
describe("ThemeSwitcher component", () => {
@@ -14,8 +14,9 @@ describe("ThemeSwitcher component", () => {
"linear-gradient(rgb(0, 255, 255), rgb(135, 206, 235)"
);
});
// checking that the toggle is clickable and dark mode is active
cy.getByData("toggle").click();
cy.getByData("toggle").last().click();
cy.getByData("toggle-dark").should("exist");
cy.getByData("toggle-dark").should(($toggle) => {
const backgroundImage = $toggle.css("background-image");
+3 -3
View File
@@ -14,8 +14,8 @@
// ***********************************************************
import { mount } from "cypress/react18";
import { NextIntlClientProvider } from "next-intl";
import TestableLayout from "@/app/[lang]/components/TestableLayout";
import messages from "@/messages/fr.json";
import "./commands";
@@ -37,9 +37,9 @@ declare global {
Cypress.Commands.add("mount", (component, options) => {
const wrapped = (
<NextIntlClientProvider locale="fr" messages={messages}>
<TestableLayout locale="fr" messages={messages}>
{component}
</NextIntlClientProvider>
</TestableLayout>
);
return mount(wrapped, options);