diff --git a/webapp/src/components/Primera.test.js b/webapp/src/components/Primera.test.js index b5fc683d..03239645 100644 --- a/webapp/src/components/Primera.test.js +++ b/webapp/src/components/Primera.test.js @@ -1,8 +1,18 @@ import { render, screen } from '@testing-library/react'; +import { BrowserRouter as Router } from 'react-router-dom'; import Primera from './Primera'; -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/Saber y Ganar: El Juego/i); - expect(linkElement).toBeInTheDocument(); +describe('Primera component', () => { + it('should render the title', () => { + render(); + const title = screen.getByText(/Saber y Ganar: El Juego/i); + expect(title).toBeInTheDocument(); + }); + + it('should render the login link', () => { + render(); + const loginLink = screen.getByText(/INICIAR SESIÓN/i); + expect(loginLink).toBeInTheDocument(); + expect(loginLink).toHaveAttribute('href', process.env.RUTA_LOGIN || '/login'); + }); }); \ No newline at end of file