diff --git a/tests/acceptance/features/game/features/role/dog-wolf.feature b/tests/acceptance/features/game/features/role/dog-wolf.feature new file mode 100644 index 000000000..b6a787efa --- /dev/null +++ b/tests/acceptance/features/game/features/role/dog-wolf.feature @@ -0,0 +1,29 @@ +Feature: 🐶 Dog Wolf role + + Scenario: 🐶 Dog Wolf chooses the villagers side + + When a created game with options described in file no-sheriff-option.json and with the following players + | name | role | + | Antoine | dog-wolf | + | Benoit | villager | + | Cecile | villager | + | David | werewolf | + Then the game's current play should be dog-wolf to choose-side + And the player named Antoine should be on villagers current side and originally be on villagers side + + When the dog wolf chooses the villagers side + Then the player named Antoine should be on villagers current side and originally be on villagers side + + Scenario: 🐶 Dog Wolf chooses the werewolves side + + When a created game with options described in file no-sheriff-option.json and with the following players + | name | role | + | Antoine | dog-wolf | + | Benoit | villager | + | Cecile | villager | + | David | werewolf | + Then the game's current play should be dog-wolf to choose-side + And the player named Antoine should be on villagers current side and originally be on villagers side + + When the dog wolf chooses the werewolves side + Then the player named Antoine should be on werewolves current side and originally be on villagers side \ No newline at end of file diff --git a/tests/acceptance/features/game/features/role/wild-child.feature b/tests/acceptance/features/game/features/role/wild-child.feature index 71905db1c..45e093eaa 100644 --- a/tests/acceptance/features/game/features/role/wild-child.feature +++ b/tests/acceptance/features/game/features/role/wild-child.feature @@ -20,8 +20,8 @@ Feature: 🐒 Wild Child role And the game's current play should be all to vote When all vote with the following votes - | voter | target | - | Maxime | Olivia | + | voter | target | + | Maxime | Olivia | Then the player named Olivia should be murdered by all from vote And the player named Antoine should be on werewolves current side and originally be on villagers side And the game's current play should be werewolves to eat \ No newline at end of file diff --git a/tests/acceptance/features/game/step-definitions/game.when-steps.ts b/tests/acceptance/features/game/step-definitions/game.when-steps.ts index 15c5807c4..ba60ee29e 100644 --- a/tests/acceptance/features/game/step-definitions/game.when-steps.ts +++ b/tests/acceptance/features/game/step-definitions/game.when-steps.ts @@ -4,6 +4,7 @@ import type { MakeGamePlayDto } from "../../../../../src/modules/game/dto/make-g import type { WITCH_POTIONS } from "../../../../../src/modules/game/enums/game-play.enum"; import { getPlayerWithNameOrThrow } from "../../../../../src/modules/game/helpers/game.helper"; import type { Game } from "../../../../../src/modules/game/schemas/game.schema"; +import type { ROLE_SIDES } from "../../../../../src/modules/role/enums/role.enum"; import type { CustomWorld } from "../../../shared/types/world.types"; import { convertDatatableToMakeGameplayVotes, convertDatatableToPlayers } from "../helpers/game-datatable.helper"; import { makeGamePlayRequest } from "../helpers/game-request.helper"; @@ -148,6 +149,13 @@ When(/^the wild child chooses the player named (?.+) as a model$/u, async this.game = this.response.json(); }); +When(/^the dog wolf chooses the (?villagers|werewolves) side$/u, async function(this: CustomWorld, chosenSide: ROLE_SIDES): Promise { + const makeGamePlayDto: MakeGamePlayDto = { chosenSide }; + + this.response = await makeGamePlayRequest(makeGamePlayDto, this.game, this.app); + this.game = this.response.json(); +}); + When(/^the player or group skips his turn$/u, async function(this: CustomWorld): Promise { this.response = await makeGamePlayRequest({}, this.game, this.app); this.game = this.response.json();