|
@@ -3,6 +3,7 @@ import { shallow } from "enzyme";
|
|
|
import Lobby, { GameInfo, PlayerList } from "../components/screens/Lobby/Lobby";
|
|
|
import {
|
|
|
COUNTRY_RACE,
|
|
|
+ DISTANCE,
|
|
|
FROZEN,
|
|
|
NORMAL,
|
|
|
RACE,
|
|
@@ -64,6 +65,10 @@ describe("Lobby", () => {
|
|
|
useGameConfig.mockReturnValue({
|
|
|
rounds: 5,
|
|
|
timer: 300,
|
|
|
+ gameMode: NORMAL,
|
|
|
+ clockMode: NORMAL,
|
|
|
+ scoreMethod: DISTANCE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|
|
@@ -73,6 +78,10 @@ describe("Lobby", () => {
|
|
|
useGameConfig.mockReturnValue({
|
|
|
rounds: 1,
|
|
|
timer: 300,
|
|
|
+ gameMode: NORMAL,
|
|
|
+ clockMode: NORMAL,
|
|
|
+ scoreMethod: DISTANCE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|
|
@@ -82,7 +91,10 @@ describe("Lobby", () => {
|
|
|
useGameConfig.mockReturnValue({
|
|
|
rounds: 5,
|
|
|
timer: 300,
|
|
|
- ruleSet: COUNTRY_RACE,
|
|
|
+ gameMode: NORMAL,
|
|
|
+ clockMode: NORMAL,
|
|
|
+ scoreMethod: COUNTRY_RACE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|
|
@@ -92,7 +104,10 @@ describe("Lobby", () => {
|
|
|
useGameConfig.mockReturnValue({
|
|
|
rounds: 5,
|
|
|
timer: 300,
|
|
|
- ruleSet: FROZEN,
|
|
|
+ gameMode: FROZEN,
|
|
|
+ clockMode: NORMAL,
|
|
|
+ scoreMethod: DISTANCE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|
|
@@ -102,7 +117,10 @@ describe("Lobby", () => {
|
|
|
useGameConfig.mockReturnValue({
|
|
|
rounds: 1,
|
|
|
timer: 300,
|
|
|
- ruleSet: COUNTRY_RACE,
|
|
|
+ gameMode: NORMAL,
|
|
|
+ clockMode: NORMAL,
|
|
|
+ scoreMethod: COUNTRY_RACE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|
|
@@ -112,7 +130,10 @@ describe("Lobby", () => {
|
|
|
useGameConfig.mockReturnValue({
|
|
|
rounds: 1,
|
|
|
timer: 300,
|
|
|
- ruleSet: FROZEN,
|
|
|
+ gameMode: FROZEN,
|
|
|
+ clockMode: NORMAL,
|
|
|
+ scoreMethod: DISTANCE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|
|
@@ -122,7 +143,10 @@ describe("Lobby", () => {
|
|
|
useGameConfig.mockReturnValue({
|
|
|
rounds: 5,
|
|
|
timer: 300,
|
|
|
- ruleSet: TIME_BANK,
|
|
|
+ gameMode: NORMAL,
|
|
|
+ clockMode: TIME_BANK,
|
|
|
+ scoreMethod: DISTANCE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|
|
@@ -132,7 +156,10 @@ describe("Lobby", () => {
|
|
|
useGameConfig.mockReturnValue({
|
|
|
rounds: 5,
|
|
|
timer: 300,
|
|
|
- ruleSet: RACE,
|
|
|
+ gameMode: NORMAL,
|
|
|
+ clockMode: RACE,
|
|
|
+ scoreMethod: DISTANCE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|
|
@@ -142,7 +169,10 @@ describe("Lobby", () => {
|
|
|
useGameConfig.mockReturnValue({
|
|
|
rounds: 5,
|
|
|
timer: 300,
|
|
|
- ruleSet: NORMAL,
|
|
|
+ gameMode: NORMAL,
|
|
|
+ clockMode: NORMAL,
|
|
|
+ scoreMethod: DISTANCE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|
|
@@ -154,6 +184,10 @@ describe("Lobby", () => {
|
|
|
rounds: 5,
|
|
|
timer: 300,
|
|
|
countryLock: "country",
|
|
|
+ gameMode: NORMAL,
|
|
|
+ clockMode: NORMAL,
|
|
|
+ scoreMethod: DISTANCE,
|
|
|
+ roundPointCap: null,
|
|
|
});
|
|
|
const rendered = shallow(<GameInfo />);
|
|
|
expect(rendered).toMatchSnapshot();
|