-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changelog : - ✨ linux magic key shortcut (NGC-1082) #651 - Personas et paramètre PR (NGC-848) #650 - Petites pétouilles #649 - fix: currentSimulationId now correctly initialized #646 - Corrige Select restant bloqué sur la valeur par défaut qui lui est passée [NGC-1058] #645 - fix: test e2e with quiz #644 - Update wording repas (NGC-962) #643 - Retire lien mort #642 - Corrige la sélection de langue via l'URL #641 - Active la modification de l'email administrateur orga [NGC-1058, NGC-912] #639 - Retire le bouton Partagez le test au niveau du parcours orga #638 - Ajoute une couleur de thème VSCode #637 - Version mobile : Pavé numérique iOS [NGC-997] #636 - Réactiver Sentry une fois fonctionnel [NGC-1004] #635
- Loading branch information
1 parent
ab718bd
commit 3771d6e
Showing
53 changed files
with
741 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,9 @@ describe('The Group creation page /amis/creer', () => { | |
// Check that we can create our first group | ||
cy.get('[data-cypress-id="button-create-first-group"]').click() | ||
cy.get('input[data-cypress-id="group-input-owner-name"]').type('Jean-Marc') | ||
cy.get('input[data-cypress-id="group-input-owner-name"]').type( | ||
'[email protected]' | ||
) | ||
|
||
cy.wait(2000) | ||
|
||
|
@@ -35,6 +38,22 @@ describe('The Group creation page /amis/creer', () => { | |
|
||
recursivelyFillSimulation(null, 'group') | ||
|
||
cy.wait(2000) | ||
|
||
cy.get('h1').then(($el) => { | ||
if ( | ||
$el | ||
.text() | ||
.includes( | ||
Cypress.env('testLangURL') === 'en' | ||
? "Let's finish with a riddle!" | ||
: 'Une devinette pour finir !' | ||
) | ||
) { | ||
cy.get('[data-cypress-id="button-skip-quiz"]').click() | ||
} | ||
}) | ||
|
||
cy.wait(4000) | ||
|
||
cy.get('[data-cypress-id="group-name"]') | ||
|
@@ -94,7 +113,23 @@ describe('The Group creation page /amis/creer', () => { | |
clickSkipTutorialButton() | ||
recursivelyFillSimulation(null, 'group') | ||
|
||
cy.wait(3000) | ||
cy.wait(2000) | ||
|
||
cy.get('h1').then(($el) => { | ||
if ( | ||
$el | ||
.text() | ||
.includes( | ||
Cypress.env('testLangURL') === 'en' | ||
? "Let's finish with a riddle!" | ||
: 'Une devinette pour finir !' | ||
) | ||
) { | ||
cy.get('[data-cypress-id="button-skip-quiz"]').click() | ||
} | ||
}) | ||
|
||
cy.wait(4000) | ||
|
||
cy.get('[data-cypress-id="group-name"]') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...)/(simulation)/organisations/[orgaSlug]/parametres/_components/EmailVerificationModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
'use client' | ||
|
||
import VerificationCodeInput from '@/components/organisations/VerificationCodeInput' | ||
import Trans from '@/components/translation/Trans' | ||
import InlineLink from '@/design-system/inputs/InlineLink' | ||
import Modal from '@/design-system/modals/Modal' | ||
import { useClientTranslation } from '@/hooks/useClientTranslation' | ||
|
||
type Props = { | ||
closeModal: () => void | ||
onSubmit: (verificationCode: string) => void | ||
error: Error | null | ||
isSuccess: boolean | ||
isPending: boolean | ||
isErrorSendCode: boolean | ||
} | ||
|
||
export default function EmailVerificationModal({ | ||
closeModal, | ||
onSubmit, | ||
error, | ||
isSuccess, | ||
isPending, | ||
isErrorSendCode, | ||
}: Props) { | ||
const { t } = useClientTranslation() | ||
|
||
return ( | ||
<Modal isOpen closeModal={closeModal}> | ||
<form> | ||
<h3> | ||
<Trans>Vous devez valider votre changement d'adresse e-mail.</Trans> | ||
</h3> | ||
|
||
<p> | ||
<Trans> | ||
Vous allez recevoir sous peu un e-mail de notre part contenant un{' '} | ||
<strong className="text-secondary-700">code de vérification</strong>{' '} | ||
à entrer dans cette fenêtre. | ||
</Trans> | ||
</p> | ||
|
||
<label htmlFor="code" className="mb-4 block font-bold"> | ||
<Trans>Entrez votre code de vérification pour continuer</Trans> | ||
</label> | ||
|
||
<VerificationCodeInput | ||
inputError={error ? t("Le code n'est pas valide.") : undefined} | ||
isSuccessValidate={isSuccess} | ||
isPendingValidate={isPending} | ||
handleValidateVerificationCode={onSubmit} | ||
/> | ||
|
||
{isErrorSendCode && ( | ||
<p className="mt-8 text-red-700"> | ||
<Trans> | ||
Oups ! Une erreur s'est produite au moment d'envoyer votre code de | ||
vérification par email. Vérifiez si votre nouvel e-mail est bien | ||
valide et si le problème persiste, n'hésitez pas à{' '} | ||
<InlineLink href="/contact">nous contacter</InlineLink> | ||
</Trans> | ||
</p> | ||
)} | ||
</form> | ||
</Modal> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/app/(layout-with-navigation)/(simulation)/organisations/[orgaSlug]/parametres/layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { getServerTranslation } from '@/helpers/getServerTranslation' | ||
import { getMetadataObject } from '@/helpers/metadata/getMetadataObject' | ||
import { PropsWithChildren } from 'react' | ||
import { ToastContainer } from 'react-toastify' | ||
|
||
export async function generateMetadata() { | ||
const { t } = await getServerTranslation() | ||
|
||
return getMetadataObject({ | ||
title: t('Organisations, mon espace - Nos Gestes Climat'), | ||
description: t( | ||
'Accédez à des services sur mesure pour sensibiliser vos partenaires au sein de votre organisation.' | ||
), | ||
alternates: { | ||
canonical: '/', | ||
}, | ||
}) | ||
} | ||
|
||
export default function Layout({ children }: PropsWithChildren) { | ||
return ( | ||
<> | ||
{children} | ||
<ToastContainer /> | ||
</> | ||
) | ||
} |
Oops, something went wrong.