From b012e40df8e61fa441f4f4fca08d5998913e36e5 Mon Sep 17 00:00:00 2001 From: Tibe Habils Date: Sun, 26 Mar 2023 11:47:48 +0000 Subject: [PATCH] common tests fix --- .gitignore | 3 ++- .../Common/PlayModeTests/BackButtonTests.cs | 2 +- .../PlayModeTests/CourseActivityTests.cs | 2 +- .../PlayModeTests/CourseMenuScreenTests.cs | 2 +- .../PlayModeTests/ListCoursesScreenTests.cs | 2 +- .../PlayModeTests/MainMenuScreenTests.cs | 2 +- .../MinigameActivityScreenTests.cs | 2 +- Assets/Common/PlayModeTests/StartGameTests.cs | 4 ++-- .../Common/PlayModeTests/UserButtonTests.cs | 2 +- ProjectSettings/QualitySettings.asset | 19 +------------------ 10 files changed, 12 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index bb21f45..e1e8c6d 100644 --- a/.gitignore +++ b/.gitignore @@ -72,4 +72,5 @@ crashlytics-build.properties /[Aa]ssets/[Ss]treamingAssets/aa.meta /[Aa]ssets/[Ss]treamingAssets/aa/* -.DS_Store \ No newline at end of file +.DS_Store +/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json diff --git a/Assets/Common/PlayModeTests/BackButtonTests.cs b/Assets/Common/PlayModeTests/BackButtonTests.cs index 266f8dc..52fac01 100644 --- a/Assets/Common/PlayModeTests/BackButtonTests.cs +++ b/Assets/Common/PlayModeTests/BackButtonTests.cs @@ -15,7 +15,7 @@ public class BackButtonTests [UnitySetUp] public IEnumerator SetupFunction() { - string path = Path.Combine("Assets", "users.json"); + string path = $"{Application.persistentDataPath}/users.json"; var oneUser = "{\"currentUserIndex\": 0,\"storedUsers\": [{\"username\": \"TEST\",\"avatar\": {\"instanceID\": 40848},\"playtime\": 0.0,\"courses\": [],\"minigames\": []}]}"; using (StreamWriter writer = new StreamWriter(path)) diff --git a/Assets/Common/PlayModeTests/CourseActivityTests.cs b/Assets/Common/PlayModeTests/CourseActivityTests.cs index 005a7a8..1d20c5a 100644 --- a/Assets/Common/PlayModeTests/CourseActivityTests.cs +++ b/Assets/Common/PlayModeTests/CourseActivityTests.cs @@ -15,7 +15,7 @@ public class CourseActivityTests [UnitySetUp] public IEnumerator SetupFunction() { - string path = Path.Combine("Assets", "users.json"); + string path = $"{Application.persistentDataPath}/users.json"; var oneUser = "{\"currentUserIndex\": 0,\"storedUsers\": [{\"username\": \"TEST\",\"avatar\": {\"instanceID\": 40848},\"playtime\": 0.0,\"courses\": [],\"minigames\": []}]}"; using (StreamWriter writer = new StreamWriter(path)) diff --git a/Assets/Common/PlayModeTests/CourseMenuScreenTests.cs b/Assets/Common/PlayModeTests/CourseMenuScreenTests.cs index 65b501e..8f5a89d 100644 --- a/Assets/Common/PlayModeTests/CourseMenuScreenTests.cs +++ b/Assets/Common/PlayModeTests/CourseMenuScreenTests.cs @@ -15,7 +15,7 @@ public class CourseMenuScreenTest [UnitySetUp] public IEnumerator SetupFunction() { - string path = Path.Combine("Assets", "users.json"); + string path = $"{Application.persistentDataPath}/users.json"; var oneUser = "{\"currentUserIndex\": 0,\"storedUsers\": [{\"username\": \"TEST\",\"avatar\": {\"instanceID\": 40848},\"playtime\": 0.0,\"courses\": [],\"minigames\": []}]}"; using (StreamWriter writer = new StreamWriter(path)) diff --git a/Assets/Common/PlayModeTests/ListCoursesScreenTests.cs b/Assets/Common/PlayModeTests/ListCoursesScreenTests.cs index 7506066..552906a 100644 --- a/Assets/Common/PlayModeTests/ListCoursesScreenTests.cs +++ b/Assets/Common/PlayModeTests/ListCoursesScreenTests.cs @@ -15,7 +15,7 @@ public class ListCoursesScreenTest [UnitySetUp] public IEnumerator SetupFunction() { - string path = Path.Combine("Assets", "users.json"); + string path = $"{Application.persistentDataPath}/users.json"; var oneUser = "{\"currentUserIndex\": 0,\"storedUsers\": [{\"username\": \"TEST\",\"avatar\": {\"instanceID\": 40848},\"playtime\": 0.0,\"courses\": [],\"minigames\": []}]}"; using (StreamWriter writer = new StreamWriter(path)) diff --git a/Assets/Common/PlayModeTests/MainMenuScreenTests.cs b/Assets/Common/PlayModeTests/MainMenuScreenTests.cs index 0412030..5e48d47 100644 --- a/Assets/Common/PlayModeTests/MainMenuScreenTests.cs +++ b/Assets/Common/PlayModeTests/MainMenuScreenTests.cs @@ -15,7 +15,7 @@ public class MainMenuScreenTests [UnitySetUp] public IEnumerator SetupFunction() { - string path = Path.Combine("Assets", "users.json"); + string path = $"{Application.persistentDataPath}/users.json"; var oneUser = "{\"currentUserIndex\": 0,\"storedUsers\": [{\"username\": \"TEST\",\"avatar\": {\"instanceID\": 40848},\"playtime\": 0.0,\"courses\": [],\"minigames\": []}]}"; using (StreamWriter writer = new StreamWriter(path)) diff --git a/Assets/Common/PlayModeTests/MinigameActivityScreenTests.cs b/Assets/Common/PlayModeTests/MinigameActivityScreenTests.cs index 5c97c14..8896662 100644 --- a/Assets/Common/PlayModeTests/MinigameActivityScreenTests.cs +++ b/Assets/Common/PlayModeTests/MinigameActivityScreenTests.cs @@ -15,7 +15,7 @@ public class MiniGameActivityScreenTests [UnitySetUp] public IEnumerator SetupFunction() { - string path = Path.Combine("Assets", "users.json"); + string path = $"{Application.persistentDataPath}/users.json"; var oneUser = "{\"currentUserIndex\": 0,\"storedUsers\": [{\"username\": \"TEST\",\"avatar\": {\"instanceID\": 40848},\"playtime\": 0.0,\"courses\": [],\"minigames\": []}]}"; using (StreamWriter writer = new StreamWriter(path)) diff --git a/Assets/Common/PlayModeTests/StartGameTests.cs b/Assets/Common/PlayModeTests/StartGameTests.cs index fe791c2..ccc5eda 100644 --- a/Assets/Common/PlayModeTests/StartGameTests.cs +++ b/Assets/Common/PlayModeTests/StartGameTests.cs @@ -16,7 +16,7 @@ public class StartGamesTests [UnityTest] public IEnumerator BootWithUsersTest() { - string path = Path.Combine("Assets", "users.json"); + string path = $"{Application.persistentDataPath}/users.json"; var oneUser = "{\"currentUserIndex\": 0,\"storedUsers\": [{\"username\": \"TEST\",\"avatar\": {\"instanceID\": 40848},\"playtime\": 0.0,\"courses\": [],\"minigames\": []}]}"; using (StreamWriter writer = new StreamWriter(path)) @@ -62,7 +62,7 @@ public class StartGamesTests public IEnumerator BootWithoutUsersTest() { // Arrange - string path = Path.Combine("Assets", "users.json"); + string path = $"{Application.persistentDataPath}/users.json"; var oneUser = "{}"; using (StreamWriter writer = new StreamWriter(path)) diff --git a/Assets/Common/PlayModeTests/UserButtonTests.cs b/Assets/Common/PlayModeTests/UserButtonTests.cs index b16350a..40a324c 100644 --- a/Assets/Common/PlayModeTests/UserButtonTests.cs +++ b/Assets/Common/PlayModeTests/UserButtonTests.cs @@ -15,7 +15,7 @@ public class UserButtonTests [UnitySetUp] public IEnumerator SetupFunction() { - string path = Path.Combine("Assets", "users.json"); + string path = $"{Application.persistentDataPath}/users.json"; var oneUser = "{\"currentUserIndex\": 0,\"storedUsers\": [{\"username\": \"TEST\",\"avatar\": {\"instanceID\": 40848},\"playtime\": 0.0,\"courses\": [],\"minigames\": []}]}"; using (StreamWriter writer = new StreamWriter(path)) diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index b00e975..c23e52d 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -222,21 +222,4 @@ QualitySettings: resolutionScalingFixedDPIFactor: 1 customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - m_PerPlatformDefaultQuality: - Android: 2 - EmbeddedLinux: 5 - GameCoreScarlett: 5 - GameCoreXboxOne: 5 - LinuxHeadlessSimulation: 5 - Lumin: 5 - Nintendo Switch: 5 - PS4: 5 - PS5: 5 - Server: 5 - Stadia: 5 - Standalone: 5 - WebGL: 3 - Windows Store Apps: 5 - XboxOne: 5 - iPhone: 2 - tvOS: 2 + m_PerPlatformDefaultQuality: {}