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
@@ -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 />)