Skip to content

Commit

Permalink
test to check number of elements
Browse files Browse the repository at this point in the history
  • Loading branch information
uo288574 committed Apr 24, 2024
1 parent be46417 commit d1e061e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webapp/src/components/game/GameConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,6 @@ const GameConfiguration = () => {
</>
);

}
}

export default GameConfiguration;
8 changes: 6 additions & 2 deletions webapp/src/components/game/GameConfiguration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("Game Configuration", () => {
expect(linkElement).toBeInTheDocument();
});

test("check number of elements",async () => {
test("check number of elements on topics section and configure number of questions",async () => {

render(
<ContextFun>
Expand All @@ -44,7 +44,11 @@ describe("Game Configuration", () => {
);

let tematics = document.getElementsByClassName('configureTopic');
expect(tematics).toHaveLength(1);

let numPreguntas = document.getElementsByClassName('configureNumberOfQuestions');
expect(tematics).toHaveLength(2);
});

});
});

0 comments on commit d1e061e

Please sign in to comment.