-
-
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(scapegoat): acceptance tests (#884)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new project run configuration for Cucumber.js testing, enhancing acceptance test execution. - Added narrative elements to the Scapegoat role, enriching player engagement and game dynamics. - Implemented functionality for the Scapegoat to ban players from voting, affecting game strategy. - **Bug Fixes** - Removed outdated step definitions to streamline game-play testing. - **Documentation** - Updated localization strings for consistency and improved storytelling in both English and French. - **Tests** - Expanded acceptance tests to cover new functionalities related to the Scapegoat role. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
1 parent
aacb761
commit add895e
Showing
10 changed files
with
75 additions
and
15 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="Scapegoat 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 @scapegoat-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
46 changes: 46 additions & 0 deletions
46
tests/acceptance/features/game/features/role/scapegoat.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,46 @@ | ||
@scapegoat-role | ||
@shard-4 | ||
Feature: 🐐 Scapegoat role | ||
|
||
Scenario: 🐐 Scapegoat bans some players from votes if he is killed by a tie in votes | ||
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 | Scapegoat | | ||
| Bob | Werewolf | | ||
| Charlie | Idiot | | ||
| David | Angel | | ||
|
||
When the user closes the toast | ||
And the user skips all game events | ||
Then the game's current play title should be "Survivors vote" | ||
|
||
When the survivors vote with the votes | ||
| name | vote | | ||
| Antoine | Charlie | | ||
| Bob | Charlie | | ||
| Charlie | Bob | | ||
| David | Bob | | ||
Then the player with name "Antoine" should be dead in the game | ||
|
||
When the user skips the game event | ||
Then the game's event should display the text "In his last breath, the Scapegoat takes his revenge and can ban one or more players from voting in the votes of the next day." | ||
And the game's event player card should have the name "Antoine" | ||
|
||
When the user goes to the next game event text | ||
Then the game's current play title should be "Scapegoat bans voting" | ||
And the game's current play question should be "Does the Scapegoat want to ban one or more players from voting?" | ||
And the game's phase name should be "Twilight" | ||
And the game's current play should have the following targets | ||
| name | | ||
| Bob | | ||
| Charlie | | ||
| David | | ||
And the page should match or creates the missing snapshot with name "Scapegoat bans voting Playground" | ||
|
||
When the scapegoat bans from voting the players | ||
| name | | ||
| Bob | | ||
Then the following players should have the attribute cant-vote by scapegoat in the game | ||
| name | | ||
| Bob | |
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
Binary file added
BIN
+124 KB
tests/acceptance/screenshots/darwin/Scapegoat bans voting Playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-36 Bytes
(100%)
tests/acceptance/screenshots/linux/Survivors elect Sheriff Playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.