changement

This commit is contained in:
Emma781227
2026-07-23 13:45:11 +02:00
parent b6506435d5
commit 7f816c165b
13 changed files with 208 additions and 96 deletions

View File

@@ -12,10 +12,10 @@ vi.mock('../../services/auth', () => ({
// Remplit et soumet le formulaire d'inscription (étape 1).
async function remplirEtSoumettre() {
await userEvent.type(screen.getByPlaceholderText(/votre email/i), 'jean@example.com')
await userEvent.type(screen.getByPlaceholderText(/votre nom/i), 'Dupont')
await userEvent.type(screen.getByPlaceholderText(/votre prénom/i), 'Jean')
await userEvent.type(screen.getByPlaceholderText(/votre mot de passe/i), 'MotDePasse123!')
await userEvent.type(screen.getByLabelText(/adresse email/i), 'jean@example.com')
await userEvent.type(screen.getByLabelText(/^nom/i), 'Dupont')
await userEvent.type(screen.getByLabelText(/prénom/i), 'Jean')
await userEvent.type(screen.getByLabelText(/^mot de passe/i), 'MotDePasse123!')
await userEvent.click(screen.getByRole('checkbox'))
await userEvent.click(screen.getByRole('button', { name: /s'inscrire/i }))
}
@@ -37,10 +37,10 @@ describe('Inscription', () => {
renderWithProviders(<Inscription />, { route: '/inscription' })
expect(screen.getByRole('heading', { name: /s'inscrire/i })).toBeInTheDocument()
expect(screen.getByPlaceholderText(/votre email/i)).toBeInTheDocument()
expect(screen.getByPlaceholderText(/votre nom/i)).toBeInTheDocument()
expect(screen.getByPlaceholderText(/votre prénom/i)).toBeInTheDocument()
expect(screen.getByPlaceholderText(/votre mot de passe/i)).toBeInTheDocument()
expect(screen.getByLabelText(/adresse email/i)).toBeInTheDocument()
expect(screen.getByLabelText(/^nom/i)).toBeInTheDocument()
expect(screen.getByLabelText(/prénom/i)).toBeInTheDocument()
expect(screen.getByLabelText(/^mot de passe/i)).toBeInTheDocument()
})
it("désactive le bouton tant que les conditions ne sont pas acceptées", async () => {