Localisation (#39)

* Localisation

* Update tests

* Fix map markers in English view

* Fix typo
This commit is contained in:
Timothy Armes
2023-07-03 20:14:19 +02:00
committed by GitHub
parent 279439f34d
commit c5a1503684
41 changed files with 881 additions and 426 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import Home from "@/app/page";
import About from "@/app/qui-sommes-nous/page";
import Contact from "@/app/contactez-nous/page";
import Home from "@/app/[lang]/page";
import About from "@/app/[lang]/qui-sommes-nous/page";
import Contact from "@/app/[lang]/contactez-nous/page";
const navbarFooterCheck = () => {
it("includes navbar", () => {
@@ -19,7 +19,7 @@ describe("Verify component mount", () => {
});
it("correct h1 tags with website name included", () => {
cy.getByData("header1").contains("echecs france", {
cy.getByData("header1").contains("échecs france", {
matchCase: false,
});
});
@@ -13,14 +13,15 @@
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import { mount } from "cypress/react18";
import { NextIntlClientProvider } from "next-intl";
import messages from "@/messages/fr.json";
import "./commands";
// Alternatively you can use CommonJS syntax:
// require('./commands')
import { mount } from "cypress/react18";
// Augment the Cypress namespace to include type definitions for
// your custom command.
// Alternatively, can be defined in cypress/support/component.d.ts
@@ -34,7 +35,15 @@ declare global {
}
}
Cypress.Commands.add("mount", mount);
Cypress.Commands.add("mount", (component, options) => {
const wrapped = (
<NextIntlClientProvider locale="fr" messages={messages}>
{component}
</NextIntlClientProvider>
);
return mount(wrapped, options);
});
// Example use:
// cy.mount(<MyComponent />)
Binary file not shown.
Binary file not shown.
Binary file not shown.
-11
View File
@@ -1,11 +0,0 @@
;FFMETADATA1
[CHAPTER]
TIMEBASE=1/1000
START=-5248
END=1236
title=Data fetching for map map markers is equal to table rows
[CHAPTER]
TIMEBASE=1/1000
START=6621
END=7725
title=Data fetching from API endpoints api call should equal website data count
Binary file not shown.
Binary file not shown.
Binary file not shown.