Skip to content

Commit

Permalink
Corregidos detalles menores Login.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
uo287627 committed Apr 28, 2024
1 parent b6b0183 commit 121c673
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions webapp/src/components/Login.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('Login Component', () => {
await waitFor(() => {
expect(setLogged).toHaveBeenCalledTimes(1);

expect(screen.getByText(/Jugar/i)).toBeInTheDocument();
expect(screen.getAllByText(/Jugar/i)).toHaveLength(2);
expect(screen.getByText(/Historial de jugadas/i)).toBeInTheDocument();
expect(screen.getByText(/Ranking/i)).toBeInTheDocument();
expect(screen.getByText(/Ajustes de partida/i)).toBeInTheDocument();
Expand Down Expand Up @@ -112,7 +112,7 @@ describe('Login Component', () => {
await waitFor(() => {
expect(setLogged).toHaveBeenCalledTimes(1);

expect(screen.getByText(/Jugar/i)).toBeInTheDocument();
expect(screen.getAllByText(/Jugar/i)).toHaveLength(2);
// only for admin
expect(screen.getByText(/Historial de Usuarios/i)).toBeInTheDocument();
expect(screen.getByText(/Historial de Preguntas Generadas/i)).toBeInTheDocument();
Expand Down Expand Up @@ -149,7 +149,7 @@ describe('Login Component', () => {
});

await waitFor(() => {
expect(setLogged).toHaveBeenCalled(0);
expect(setLogged).not.toHaveBeenCalled();
expect(screen.getByText(/Internal Server Error/i)).toBeInTheDocument();
expect(screen.queryByText(/Comenzar a jugar/i)).not.toBeInTheDocument();
});
Expand Down Expand Up @@ -183,7 +183,7 @@ describe('Login Component', () => {
});

await waitFor(() => {
expect(setLogged).toHaveBeenCalled(0);
expect(setLogged).not.toHaveBeenCalled();
expect(screen.getByText(/Error interno del servidor/i)).toBeInTheDocument();
expect(screen.queryByText(/Comenzar a jugar/i)).not.toBeInTheDocument();
});
Expand Down Expand Up @@ -223,7 +223,7 @@ describe('Login Component', () => {
});

await waitFor(() => {
expect(setLogged).toHaveBeenCalled(0);
expect(setLogged).not.toHaveBeenCalled();
expect(screen.getByText(/Error interno del servidor/i)).toBeInTheDocument();
expect(screen.queryByText(/Comenzar a jugar/i)).not.toBeInTheDocument();
});
Expand Down

0 comments on commit 121c673

Please sign in to comment.