From 8195ff00b232823b936f95427f3ee9933f678d82 Mon Sep 17 00:00:00 2001 From: UO287747 Date: Thu, 29 Feb 2024 00:04:25 +0100 Subject: [PATCH] Test fix --- webapp/src/test/Participation.test.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/webapp/src/test/Participation.test.js b/webapp/src/test/Participation.test.js index 97cb6954..2cc1d5fc 100644 --- a/webapp/src/test/Participation.test.js +++ b/webapp/src/test/Participation.test.js @@ -10,9 +10,6 @@ describe('Participation component', () => { const titleText = screen.getByText(/Participation/i); expect(titleText).toBeInTheDocument(); - // Verificar que el botón "Menu" se muestra correctamente - const menuButton = screen.getByRole('button', { name: /Menu/i }); - expect(menuButton).toBeInTheDocument(); }); test('clicking "Menu" button calls goTo function with correct argument', () => { @@ -20,9 +17,9 @@ describe('Participation component', () => { render(); // Simular clic en el botón "Menu" - fireEvent.click(screen.getByText('Menu')); + fireEvent.click(screen.getByText('Volver al Menú')); - // Verificar que la función goTo se llamó con el argumento correcto (en este caso, 0) - expect(goToMock).toHaveBeenCalledWith(0); + // Verificar que la función goTo se llamó con el argumento correcto (en este caso, 1) + expect(goToMock).toHaveBeenCalledWith(1); }); });