Skip to content

Commit

Permalink
Another test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
UO287747 committed Feb 19, 2024
1 parent 44e89a9 commit fe1585b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions webapp/src/test/Game.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import { Game } from './Game'; // Asegúrate de importar el componente correcto
import { Game } from '../components/Game';

describe('Game component', () => {
test('renders question correctly', () => {
render(<Game />); // Renderizar el componente Game
render(<Game goTo={(parameter) => {}} />); // Renderizar el componente Game

// Verificar que las opciones de respuesta se muestran correctamente
const options = screen.getAllByRole('button');
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/test/Start.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import { Start } from './Start'; // Asegúrate de importar el componente correcto
import { Start } from '../components/Start';

describe('Start component', () => {
test('renders correctly', () => {
render(<Start />); // Renderizar el componente Start
render(<Start goTo={(parameter) => {}} />); // Renderizar el componente Start

// Verificar que el texto "Quiz ASW" se muestra correctamente
const titleText = screen.getByText(/Quiz ASW/i);
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/test/User.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import User from './User'; // Asegúrate de importar el componente correcto
import User from '../components/User';

describe('User component', () => {
test('renders login form by default', () => {
render(<User />);
render(<User goTo={(parameter) => {}} />);

// Verificar que el texto de bienvenida se muestra correctamente
const welcomeText = screen.getByText(/Welcome to the 2024 edition of the Software Architecture course/i);
Expand All @@ -20,7 +20,7 @@ describe('User component', () => {
});

test('toggling between login and registration form works correctly', () => {
render(<User />);
render(<User goTo={(parameter) => {}} />);

// Verificar que el enlace para registrar está presente
const registerLink = screen.getByRole('button', { name: /register here/i });
Expand Down

0 comments on commit fe1585b

Please sign in to comment.