-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(acceptance): white werewolf acceptance tests (#551)
- Loading branch information
1 parent
5a87e23
commit 700f730
Showing
7 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="White Werewolf Role" type="cucumber.js" factoryName="Cucumber.js" folderName="Tags"> | ||
<option name="myFilePath" value="$PROJECT_DIR$/tests/acceptance" /> | ||
<option name="myNameFilter" value="" /> | ||
<option name="cucumberJsArguments" value="--config config/cucumber/cucumber.json --parallel 1 --tags @white-werewolf-role" /> | ||
<option name="workingDirectory" value="$PROJECT_DIR$" /> | ||
<envs> | ||
<env name="NODE_OPTIONS" value="--import tsx/esm" /> | ||
</envs> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
tests/acceptance/features/game/features/role/white-werewolf.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
@white-werewolf-role | ||
|
||
Feature: 🦴🐺 White Werewolf role | ||
|
||
Scenario: 🦴🐺 White Werewolf eats another wolf or can skip its turn every other night | ||
|
||
Given the user disables the sheriff in game options | ||
And the user creates a game with the players with name and role | ||
| name | role | | ||
| Antoine | Witch | | ||
| Bob | White Werewolf | | ||
| Charlie | Werewolf | | ||
| David | Villager | | ||
| Nelson | Scapegoat | | ||
| Lucy | Little Girl | | ||
When the user closes the toast | ||
And the user skips all game events | ||
|
||
Then the game's current play title should be "Werewolves eat" | ||
|
||
When the werewolves eat the player with name "David" | ||
Then the game's event should display the text "The White Werewolf wakes up and can eat another Werewolf if he wants to." | ||
And the game's event player card should have the name "Bob" | ||
|
||
When the user goes to the next game event text | ||
Then the game's current play title should be "White Werewolf eats" | ||
And the game's current play question should be "Does the White Werewolf want to eat another Werewolf ?" | ||
And the game's phase name should be "Night 1" | ||
And the game's current play should have the following targets | ||
| name | | ||
| Charlie | | ||
And the page should match or creates the missing snapshot with name "White Werewolf eats Playground" | ||
|
||
When the player or group skips his turn | ||
And the user skips all game events | ||
Then the game's current play title should be "Witch uses potions" | ||
|
||
When the player or group skips his turn | ||
And the user skips all game events | ||
Then the game's current play title should be "Survivors vote" | ||
|
||
When the player or group skips his turn | ||
And the user skips all game events | ||
Then the game's current play title should be "Werewolves eat" | ||
|
||
When the werewolves eat the player with name "Lucy" | ||
And the user skips all game events | ||
Then the game's current play title should be "Witch uses potions" | ||
|
||
When the player or group skips his turn | ||
And the user skips all game events | ||
Then the game's current play title should be "Survivors vote" | ||
|
||
When the player or group skips his turn | ||
And the user skips all game events | ||
Then the game's current play title should be "Werewolves eat" | ||
|
||
When the werewolves eat the player with name "Antoine" | ||
Then the game's event should display the text "The White Werewolf wakes up and can eat another Werewolf if he wants to." | ||
And the game's event player card should have the name "Bob" | ||
|
||
When the user goes to the next game event text | ||
Then the game's current play title should be "White Werewolf eats" | ||
|
||
When the white werewolf eats the player with name "Charlie" | ||
Then the player with name "Charlie" should have the attribute eaten by white werewolf in the game | ||
|
||
When the user skips all game events | ||
Then the game's current play title should be "Witch uses potions" | ||
|
||
When the player or group skips his turn | ||
And the user skips all game events | ||
Then the player with name "Charlie" should be dead in the game | ||
|
||
Scenario: 🦴🐺 White Werewolf should not have any targets if there is no other werewolf to eat | ||
|
||
Given the user disables the sheriff in game options | ||
And the user creates a game with the players with name and role | ||
| name | role | | ||
| Antoine | Witch | | ||
| Bob | White Werewolf | | ||
| David | Villager | | ||
| Nelson | Scapegoat | | ||
And the user closes the toast | ||
And the user skips all game events | ||
|
||
Then the game's current play title should be "Werewolves eat" | ||
|
||
When the werewolves eat the player with name "David" | ||
Then the game's event should display the text "The White Werewolf wakes up and can eat another Werewolf if he wants to." | ||
And the game's event player card should have the name "Bob" | ||
|
||
When the user goes to the next game event text | ||
Then the game's current play title should be "White Werewolf eats" | ||
And the game's current play should not have targets | ||
|
||
Scenario: 🦴🐺 White Werewolf wakes every night when game master sets its waking up interval to 1 | ||
|
||
Given the user disables the sheriff in game options | ||
And the user sets the white werewolf waking up interval to 1 in game options | ||
And the user creates a game with the players with name and role | ||
| name | role | | ||
| Antoine | Witch | | ||
| Bob | White Werewolf | | ||
| Charlie | Werewolf | | ||
| David | Villager | | ||
| Nelson | Scapegoat | | ||
And the user closes the toast | ||
And the user skips all game events | ||
|
||
Then the game's current play title should be "Werewolves eat" | ||
|
||
When the werewolves eat the player with name "David" | ||
Then the game's event should display the text "The White Werewolf wakes up and can eat another Werewolf if he wants to." | ||
And the game's event player card should have the name "Bob" | ||
|
||
When the user goes to the next game event text | ||
Then the game's current play title should be "White Werewolf eats" | ||
|
||
When the player or group skips his turn | ||
And the user skips all game events | ||
Then the game's current play title should be "Witch uses potions" | ||
|
||
When the player or group skips his turn | ||
And the user skips all game events | ||
Then the game's current play title should be "Survivors vote" | ||
|
||
When the player or group skips his turn | ||
And the user skips all game events | ||
Then the game's current play title should be "Werewolves eat" | ||
|
||
When the werewolves eat the player with name "Nelson" | ||
And the user skips all game events | ||
Then the game's current play title should be "White Werewolf eats" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+122 KB
tests/acceptance/screenshots/darwin/White Werewolf eats Playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.