-
-
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(hunter): e2e tests for hunter role (#456)
- Loading branch information
1 parent
a9753a6
commit 4b7c065
Showing
4 changed files
with
51 additions
and
1 deletion.
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="Hunter 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 @hunter-role" /> | ||
<option name="workingDirectory" value="$PROJECT_DIR$" /> | ||
<envs> | ||
<env name="NODE_OPTIONS" value="--import tsx/esm" /> | ||
</envs> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
38 changes: 38 additions & 0 deletions
38
tests/acceptance/features/game/features/role/hunter.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,38 @@ | ||
@hunter-role | ||
|
||
Feature: 🔫 Hunter role | ||
|
||
Scenario: 🔫 Hunter shoots and kill someone when he dies | ||
|
||
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 | Hunter | | ||
| Bob | Werewolf | | ||
| Charlie | Idiot | | ||
| David | Villager | | ||
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 "Antoine" | ||
Then the game's event should display the text "The day rises in the village of the Millers Hollow !" | ||
|
||
When the user skips the game event | ||
Then the game's event should display the text "Antoine is dead ! What a tragedy…" | ||
|
||
When the user skips the game event | ||
Then the game's event should display the text "In his last breath, the Hunter will shoot at a player and kill him right away." | ||
|
||
When the user skips the game event | ||
Then the game's current play title should be "Hunter shoots" | ||
And the game's current play question should be "Which player does the Hunter want to shoot ?" | ||
And the game's current play should have the following targets | ||
| name | | ||
| Bob | | ||
| Charlie | | ||
| David | | ||
And the page should match the snapshot with name "Hunter shoots Playground" | ||
|
||
When the hunter shoots the player with name "David" | ||
Then the game's event should display the text "David is dead ! What a tragedy…" |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.