-
-
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): pied piper acceptance tests (#401)
- Loading branch information
1 parent
8c4b89e
commit ac1702b
Showing
10 changed files
with
221 additions
and
17 deletions.
There are no files selected for viewing
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
tests/acceptance/features/game/data/pied-piper-charms-three-people-per-night-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": { | ||
"piedPiper": { | ||
"charmedPeopleCountPerNight": 3 | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/acceptance/features/game/data/pied-piper-not-powerless-if-infected-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": { | ||
"piedPiper": { | ||
"isPowerlessIfInfected": 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
171 changes: 171 additions & 0 deletions
171
tests/acceptance/features/game/features/role/pied-piper.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,171 @@ | ||
Feature: 🪈 Pied Piper role | ||
|
||
Scenario: 🪈 Pied Piper charms but not call anymore nor doesn't win because he's infected | ||
Given a created game with options described in file no-sheriff-option.json and with the following players | ||
| name | role | | ||
| Antoine | pied-piper | | ||
| Olivia | vile-father-of-wolves | | ||
| JB | villager | | ||
| Thomas | villager | | ||
| Dad | villager | | ||
| Mom | villager | | ||
|
||
When the werewolves eat the player named Thomas | ||
Then the player named Thomas should have the eaten from werewolves attribute | ||
And the game's current play should be pied-piper to charm | ||
|
||
When the pied piper charms the following players | ||
| name | | ||
| Thomas | | ||
| Olivia | | ||
Then 2 of the following players should have the charmed from pied-piper attribute | ||
| name | | ||
| Olivia | | ||
| Thomas | | ||
And the game's current play should be charmed to meet-each-other | ||
And the game's current play should be played by the following players | ||
| name | | ||
| Olivia | | ||
| Thomas | | ||
|
||
When the player or group skips his turn | ||
Then the game's current play should be all to vote | ||
|
||
When the player or group skips his turn | ||
Then the game's current play should be werewolves to eat | ||
|
||
When the werewolves eat the player named Dad | ||
Then the player named Dad should have the eaten from werewolves attribute | ||
And the game's current play should be pied-piper to charm | ||
|
||
When the pied piper charms the following players | ||
| name | | ||
| Dad | | ||
| Mom | | ||
Then 3 of the following players should have the charmed from pied-piper attribute | ||
| name | | ||
| Olivia | | ||
| Dad | | ||
| Mom | | ||
And the game's current play should be charmed to meet-each-other | ||
And the game's current play should be played by the following players | ||
| name | | ||
| Olivia | | ||
| Dad | | ||
| Mom | | ||
|
||
When the player or group skips his turn | ||
Then the game's current play should be all to vote | ||
|
||
When the player or group skips his turn | ||
Then the game's current play should be werewolves to eat | ||
|
||
When the vile father of wolves infects the player named Antoine | ||
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 all to vote | ||
|
||
When all vote with the following votes | ||
| source | target | | ||
| Antoine | Olivia | | ||
| JB | Olivia | | ||
Then 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 game's status should be playing | ||
|
||
Scenario: 🪈 Pied Piper charms 3 people by night and can win even if he's infected | ||
Given a created game with options described in file no-sheriff-option.json, pied-piper-charms-three-people-per-night-option.json, pied-piper-not-powerless-if-infected-option.json and with the following players | ||
| name | role | | ||
| Antoine | pied-piper | | ||
| Olivia | vile-father-of-wolves | | ||
| JB | villager | | ||
| Thomas | villager | | ||
| Dad | villager | | ||
|
||
When the vile father of wolves infects the player named Antoine | ||
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 pied-piper to charm | ||
|
||
When the pied piper charms the following players | ||
| name | | ||
| Thomas | | ||
| Olivia | | ||
| JB | | ||
Then 3 of the following players should have the charmed from pied-piper attribute | ||
| name | | ||
| Olivia | | ||
| JB | | ||
| Thomas | | ||
And the game's current play should be charmed to meet-each-other | ||
And the game's current play should be played by the following players | ||
| name | | ||
| Olivia | | ||
| JB | | ||
| Thomas | | ||
|
||
When the player or group skips his turn | ||
Then the game's current play should be all to vote | ||
|
||
When the player or group skips his turn | ||
Then the game's current play should be werewolves to eat | ||
|
||
When the werewolves eat the player named Thomas | ||
Then the player named Thomas should have the eaten from werewolves attribute | ||
And the game's current play should be pied-piper to charm | ||
|
||
When the pied piper charms the following players | ||
| name | | ||
| Dad | | ||
Then 3 of the following players should have the charmed from pied-piper attribute | ||
| name | | ||
| Olivia | | ||
| JB | | ||
| Dad | | ||
And the game's status should be over | ||
And the game's winners should be pied-piper with the following players | ||
| name | | ||
| Antoine | | ||
|
||
Scenario: 🪈 Pied Piper charms everybody but is dead so he doesn't win | ||
|
||
Given a created game with options described in file no-sheriff-option.json, pied-piper-charms-three-people-per-night-option.json and with the following players | ||
| name | role | | ||
| Antoine | pied-piper | | ||
| Olivia | werewolf | | ||
| JB | villager | | ||
| Thomas | villager | | ||
| Dad | villager | | ||
|
||
When the werewolves eat the player named Antoine | ||
Then the player named Antoine should have the eaten from werewolves attribute | ||
And the game's current play should be pied-piper to charm | ||
|
||
When the pied piper charms the following players | ||
| name | | ||
| Thomas | | ||
| Olivia | | ||
| JB | | ||
Then 3 of the following players should have the charmed from pied-piper attribute | ||
| name | | ||
| Olivia | | ||
| JB | | ||
| Thomas | | ||
And the game's current play should be charmed to meet-each-other | ||
And the game's current play should be played by the following players | ||
| name | | ||
| Olivia | | ||
| JB | | ||
| Thomas | | ||
|
||
When the player or group skips his turn | ||
Then the game's current play should be all to vote | ||
|
||
When all vote with the following votes | ||
| source | target | | ||
| Olivia | Dad | | ||
| JB | Olivia | | ||
| Thomas | Dad | | ||
Then the player named Dad should be murdered by all from vote | ||
And the game's current play should be werewolves to eat | ||
And the game's status should be playing |
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