Skip to content

Commit

Permalink
Merge pull request #134 from Arquisoft/dev
Browse files Browse the repository at this point in the history
added something to test
  • Loading branch information
carolbgmm committed Apr 29, 2024
2 parents 47ed220 + 82c228a commit ed95bc5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions webapp/src/components/game/PlayingGame.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ describe('PlayingGame component', () => {
await waitFor(() => {
expect(getByTestId('question-title')).toBeInTheDocument();
expect(getByTestId('question')).toBeInTheDocument();
expect(getByTestId('seconds')).toBeInTheDocument();
expect(getByTestId('seconds')).toHaveTextContent('10');

});

// Simulate answering question 2
fireEvent.click(getByTestId('answer-2'));
jest.advanceTimersByTime(10000);
await waitFor(() => {
expect(getByTestId('question')).toBeInTheDocument();
expect(getByTestId('seconds')).toBeInTheDocument();
expect(getByTestId('seconds')).toHaveTextContent('10');
});

// Simulate answering question 3
Expand All @@ -64,7 +65,7 @@ describe('PlayingGame component', () => {
await waitFor(() => {
expect(queryByTestId('question-container')).toBeNull();
expect(getByTestId('result')).toBeInTheDocument();
expect(getByTestId('points')).toBeInTheDocument();
expect(getByTestId('points')).toHaveTextContent('playing_single_player_you_earned50playing_single_player_points');
});
});

Expand Down

0 comments on commit ed95bc5

Please sign in to comment.