Skip to content

Commit

Permalink
test(acceptance): idiot acceptance tests (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinezanardi committed Sep 19, 2023
1 parent 2ebbf94 commit 1f13ed2
Show file tree
Hide file tree
Showing 15 changed files with 174 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"roles": {
"ancient": {
"livesCountAgainstWerewolves": 1
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"roles": {
"idiot": {
"doesDieOnAncientDeath": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: 🏆 Game Victory
| Olivia | hunter |
| Thomas | seer |

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| source | target |
| Antoine | Olivia |
| Thomas | Olivia |
Expand Down Expand Up @@ -37,7 +37,7 @@ Feature: 🏆 Game Victory
And the player named Thomas should be alive
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Antoine | Olivia |
| Thomas | Olivia |
Expand All @@ -63,7 +63,7 @@ Feature: 🏆 Game Victory
| Olivia | hunter |
| Thomas | seer |

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| source | target |
| Antoine | Olivia |
| Thomas | Olivia |
Expand All @@ -72,7 +72,7 @@ Feature: 🏆 Game Victory
Then the game's current play should be survivors to elect-sheriff because previous-votes-were-in-ties
But nobody should have the active sheriff from survivors attribute

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| source | target |
| Antoine | Olivia |
| Thomas | Olivia |
Expand Down Expand Up @@ -118,7 +118,7 @@ Feature: 🏆 Game Victory
| Olivia | hunter |
| Thomas | seer |

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| source | target |
| Antoine | JB |
| Thomas | JB |
Expand All @@ -127,7 +127,7 @@ Feature: 🏆 Game Victory
Then the game's current play should be survivors to elect-sheriff because previous-votes-were-in-ties
But nobody should have the active sheriff from survivors attribute

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| source | target |
| Antoine | JB |
| Thomas | Antoine |
Expand Down Expand Up @@ -164,7 +164,7 @@ Feature: 🏆 Game Victory
| Olivia |
| Thomas |

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Antoine | Olivia |
| Thomas | Olivia |
Expand Down Expand Up @@ -241,7 +241,7 @@ Feature: 🏆 Game Victory
| Thomas | angel |
Then the game's current play should be survivors to vote because angel-presence

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Antoine | Thomas |
| Olivia | Thomas |
Expand All @@ -261,7 +261,7 @@ Feature: 🏆 Game Victory
| Thomas | angel |
Then the game's current play should be survivors to vote because angel-presence

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Antoine | Olivia |
| Thomas | Olivia |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: 🎖️ Sheriff player attribute
| Babou | villager |
Then the game's current play should be survivors to elect-sheriff

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| voter | target |
| Antoine | Olivia |
| JB | Olivia |
Expand All @@ -24,7 +24,7 @@ Feature: 🎖️ Sheriff player attribute
Then the player named Babou should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| voter | target |
| JB | Thomas |
| Thomas | JB |
Expand All @@ -46,7 +46,7 @@ Feature: 🎖️ Sheriff player attribute
| Babou | villager |
Then the game's current play should be survivors to elect-sheriff

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| voter | target |
| Antoine | Olivia |
| JB | Olivia |
Expand All @@ -58,7 +58,7 @@ Feature: 🎖️ Sheriff player attribute
Then the player named Babou should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| voter | target |
| JB | Olivia |
| Olivia | JB |
Expand All @@ -74,7 +74,7 @@ Feature: 🎖️ Sheriff player attribute
| Babou | villager |
Then the game's current play should be survivors to elect-sheriff

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| voter | target |
| Antoine | Olivia |
| JB | Olivia |
Expand All @@ -86,7 +86,7 @@ Feature: 🎖️ Sheriff player attribute
Then the player named Babou should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| voter | target |
| JB | Olivia |
| Olivia | JB |
Expand Down Expand Up @@ -154,7 +154,7 @@ Feature: 🎖️ Sheriff player attribute
| Babou | villager |
Then the game's current play should be survivors to elect-sheriff

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| voter | target |
| Antoine | Thomas |
| JB | Thomas |
Expand All @@ -179,7 +179,7 @@ Feature: 🎖️ Sheriff player attribute
| Babou | villager |
Then the game's current play should be survivors to elect-sheriff

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| voter | target |
| Antoine | Thomas |
| JB | Thomas |
Expand All @@ -200,7 +200,7 @@ Feature: 🎖️ Sheriff player attribute
| Olivia | hunter |
| Thomas | seer |

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| source | target |
| Antoine | JB |
| Thomas | JB |
Expand All @@ -209,7 +209,7 @@ Feature: 🎖️ Sheriff player attribute
Then the game's current play should be survivors to elect-sheriff because previous-votes-were-in-ties
But nobody should have the active sheriff from survivors attribute

When all elect sheriff with the following votes
When the survivors elect sheriff with the following votes
| source | target |
| Antoine | JB |
| Thomas | Antoine |
Expand Down
6 changes: 3 additions & 3 deletions tests/acceptance/features/game/features/role/angel.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: 👼 Angel role
| Thomas | werewolf |
Then the game's current play should be survivors to vote because angel-presence

When all vote with the following votes
When the survivors vote with the following votes
| source | vote |
| Antoine | Olivia |
| JB | Olivia |
Expand All @@ -36,7 +36,7 @@ Feature: 👼 Angel role
| Thomas | werewolf |
Then the game's current play should be survivors to vote because angel-presence

When all vote with the following votes
When the survivors vote with the following votes
| source | vote |
| Antoine | Olivia |
| JB | Olivia |
Expand All @@ -47,7 +47,7 @@ Feature: 👼 Angel role
Then the player named JB should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| source | vote |
| Thomas | Antoine |
Then the player named Antoine should be murdered by survivors from vote
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Feature: 🐺👹 Big Bad Wolf role
But the player named Thomas should be alive
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Olivia | JB |
| Thomas | JB |
Expand Down Expand Up @@ -87,7 +87,7 @@ Feature: 🐺👹 Big Bad Wolf role
But the player named Thomas should be alive
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Olivia | JB |
| Thomas | JB |
Expand Down Expand Up @@ -142,7 +142,7 @@ Feature: 🐺👹 Big Bad Wolf role
But the player named Antoine should be alive
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Olivia | Thomas |
| JB | Thomas |
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/game/features/role/cupid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Feature: 💘 Cupid role
Then the player named Antoine should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Olivia | JB |
| Thomas | JB |
Expand Down
117 changes: 117 additions & 0 deletions tests/acceptance/features/game/features/role/idiot.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
@idiot-role

Feature: 🤪 Idiot role

Scenario: 🤪 Idiot doesn't die if his death is from votes but his role is revealed
Given a created game with options described in file no-sheriff-option.json and with the following players
| name | role |
| Antoine | idiot |
| Olivia | villager |
| JB | villager |
| Thomas | werewolf |

When the werewolves eat the player named JB
Then the player named JB should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When the survivors vote with the following votes
| voter | target |
| Olivia | Antoine |
| Thomas | Antoine |
Then the player named Antoine should be alive
And the player named Antoine should have his role revealed

Scenario: 🤪 Idiot doesn't die if his death is from settle votes but his role is revealed
Given a created game with the following players
| name | role |
| Antoine | idiot |
| Olivia | villager |
| JB | villager |
| Thomas | werewolf |

When the survivors elect sheriff with the following votes
| voter | target |
| Antoine | Thomas |
| Olivia | Thomas |
Then the player named Thomas should have the active sheriff from survivors attribute

When the werewolves eat the player named JB
Then the player named JB should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When the survivors vote with the following votes
| voter | target |
| Olivia | Antoine |
| Antoine | Olivia |
Then the game's current play should be sheriff to settle-votes

When the sheriff breaks the tie in votes by choosing the player named Antoine
Then the player named Antoine should be alive
And the player named Antoine should have his role revealed

Scenario: 🤪 Idiot doesn't die if his role is not revealed and ancient dies
Given a created game with options described in file no-sheriff-option.json, ancient-one-life-against-werewolves-option.json and with the following players
| name | role |
| Antoine | idiot |
| Olivia | villager |
| JB | ancient |
| Thomas | werewolf |

When the werewolves eat the player named JB
Then the player named JB should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When the survivors vote with the following votes
| voter | target |
| Olivia | Antoine |
| Thomas | Antoine |
Then the player named Antoine should be alive
And the player named Antoine should have his role revealed

Scenario: 🤪 Idiot dies if his role is revealed and ancient dies
Given a created game with options described in file no-sheriff-option.json, ancient-one-life-against-werewolves-option.json and with the following players
| name | role |
| Antoine | idiot |
| Olivia | villager |
| JB | ancient |
| Thomas | werewolf |

When the werewolves eat the player named Olivia
Then the player named Olivia should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When the survivors vote with the following votes
| voter | target |
| JB | Antoine |
| Thomas | Antoine |
Then the player named Antoine should be alive
And the player named Antoine should have his role revealed
And the game's current play should be werewolves to eat

When the werewolves eat the player named JB
Then the player named JB should be murdered by werewolves from eaten
And the player named Antoine should be murdered by survivors from reconsider-pardon

Scenario: 🤪 Idiot doesn't die if his role is revealed and ancient dies with the right option
Given a created game with options described in file no-sheriff-option.json, ancient-one-life-against-werewolves-option.json, idiot-doesnt-die-on-ancient-death-option.json and with the following players
| name | role |
| Antoine | idiot |
| Olivia | villager |
| JB | ancient |
| Thomas | werewolf |

When the werewolves eat the player named Olivia
Then the player named Olivia should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When the survivors vote with the following votes
| voter | target |
| JB | Antoine |
| Thomas | Antoine |
Then the player named Antoine should be alive
And the player named Antoine should have his role revealed
And the game's current play should be werewolves to eat

When the werewolves eat the player named JB
Then the player named JB should be murdered by werewolves from eaten
And the player named Antoine should be alive
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Feature: 🪈 Pied Piper role
Then the player named Antoine should be on werewolves current side and originally be on villagers side
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Antoine | Olivia |
| JB | Olivia |
Expand Down Expand Up @@ -162,7 +162,7 @@ Feature: 🪈 Pied Piper role
When the player or group skips his turn
Then the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| source | target |
| Olivia | Dad |
| JB | Olivia |
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/game/features/role/raven.feature
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Feature: 🐦‍⬛ Raven role
Then the player named Thomas should be murdered by werewolves from eaten
And the game's current play should be survivors to vote

When all vote with the following votes
When the survivors vote with the following votes
| voter | target |
| Olivia | Camille |
| JB | Camille |
Expand Down

0 comments on commit 1f13ed2

Please sign in to comment.