-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(acceptance): idiot acceptance tests (#502)
- Loading branch information
1 parent
2ebbf94
commit 1f13ed2
Showing
15 changed files
with
174 additions
and
43 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
tests/acceptance/features/game/data/ancient-one-life-against-werewolves-option.json
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,7 @@ | ||
{ | ||
"roles": { | ||
"ancient": { | ||
"livesCountAgainstWerewolves": 1 | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/acceptance/features/game/data/idiot-doesnt-die-on-ancient-death-option.json
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,7 @@ | ||
{ | ||
"roles": { | ||
"idiot": { | ||
"doesDieOnAncientDeath": false | ||
} | ||
} | ||
} |
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
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
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
117 changes: 117 additions & 0 deletions
117
tests/acceptance/features/game/features/role/idiot.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,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 |
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
Oops, something went wrong.