Resolve WES-187-unit-tests-hangman-and-minigame

This commit is contained in:
Jerome Coudron
2023-05-06 11:36:51 +00:00
committed by Jelle De Geest
parent b10358930b
commit c24fe037f6
16 changed files with 511 additions and 47 deletions

View File

@@ -16,6 +16,13 @@ public class SpellingBeeGameEndedPanelTests
File.WriteAllText(path, oneUser);
PersistentDataController.GetInstance().Load();
AssetDatabase.LoadAssetAtPath<UserAvatarList>("Assets/Accounts/ScriptableObjects/UserAvatarList.asset").Awake();
// Go to the minigame-selection scene to make sure that the minigameIndex is set correctly
SystemController.GetInstance().LoadNextScene("Common/Scenes/ListMinigamesScreen");
yield return new WaitForSeconds(0.2f);
ListMinigamesScreen minigameScreen = (ListMinigamesScreen)GameObject.FindObjectOfType(typeof(ListMinigamesScreen));
minigameScreen.minigameList.SetCurrentMinigame(MinigameIndex.SPELLING_BEE);
SystemController.GetInstance().LoadNextScene("SpellingBee/Scenes/SpellingBeeGame");
yield return new WaitForSeconds(0.2f);
}

View File

@@ -16,6 +16,13 @@ public class SpellingBeeControllerTests
File.WriteAllText(path, oneUser);
PersistentDataController.GetInstance().Load();
AssetDatabase.LoadAssetAtPath<UserAvatarList>("Assets/Accounts/ScriptableObjects/UserAvatarList.asset").Awake();
// Go to the minigame-selection scene to make sure that the minigameIndex is set correctly
SystemController.GetInstance().LoadNextScene("Common/Scenes/ListMinigamesScreen");
yield return new WaitForSeconds(0.2f);
ListMinigamesScreen minigameScreen = (ListMinigamesScreen)GameObject.FindObjectOfType(typeof(ListMinigamesScreen));
minigameScreen.minigameList.SetCurrentMinigame(MinigameIndex.SPELLING_BEE);
SystemController.GetInstance().LoadNextScene("SpellingBee/Scenes/SpellingBeeGame");
yield return new WaitForSeconds(0.2f);
}

View File

@@ -10,6 +10,7 @@
"AccountsScripts",
"SignPredictor",
"MinigameScripts",
"CommonScripts",
"ArchitectureScripts"
],
"includePlatforms": [],