Skip to content

Commit

Permalink
Remove Network tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianGlawogger committed Feb 7, 2024
1 parent 647d3ff commit 1483f9b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 39 deletions.
38 changes: 29 additions & 9 deletions unity/Assets/Maroon/scenes/laboratory/Laboratory.pc.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 382309152}
m_IndirectSpecularColor: {r: 0.4234474, g: 0.3429849, b: 0.23095757, a: 1}
m_IndirectSpecularColor: {r: 0.4234487, g: 0.34298646, b: 0.2309569, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -130,7 +130,7 @@ LightingSettings:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Settings.lighting
serializedVersion: 3
serializedVersion: 4
m_GIWorkflowMode: 1
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
Expand All @@ -143,7 +143,7 @@ LightingSettings:
m_LightmapMaxSize: 1024
m_BakeResolution: 40
m_Padding: 2
m_TextureCompression: 1
m_LightmapCompression: 2
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
Expand Down Expand Up @@ -184,6 +184,7 @@ LightingSettings:
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_PVRTiledBaking: 0
--- !u!1 &261083889
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -210,6 +211,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 9
Expand Down Expand Up @@ -251,6 +253,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 0.77570814, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1117766056}
m_RootOrder: 0
Expand All @@ -262,7 +265,7 @@ RectTransform:
m_Pivot: {x: 0.5, y: 0.5}
--- !u!95 &406402570
Animator:
serializedVersion: 3
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 95087769124319940, guid: c702bd809945e8641ba7a9c46d2e539c,
type: 3}
Expand All @@ -276,10 +279,12 @@ Animator:
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!114 &406402571
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -349,6 +354,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1117766056}
m_Father: {fileID: 851681030}
Expand Down Expand Up @@ -405,6 +411,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.2, y: 0.13605443, z: 0.7105437}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 851253297}
- {fileID: 1077125156}
Expand All @@ -419,7 +426,7 @@ RectTransform:
m_Pivot: {x: 0.5, y: 0.5}
--- !u!95 &472427244
Animator:
serializedVersion: 3
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 95274848114540456, guid: c702bd809945e8641ba7a9c46d2e539c,
type: 3}
Expand All @@ -433,10 +440,12 @@ Animator:
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1 &564750688
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -463,6 +472,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
Expand All @@ -482,12 +492,12 @@ PrefabInstance:
- target: {fileID: 9079110210785623905, guid: fe0a30be743451540982d538c670799e,
type: 3}
propertyPath: _currentLanguage
value: 15
value: 10
objectReference: {fileID: 0}
- target: {fileID: 9079110210785623905, guid: fe0a30be743451540982d538c670799e,
type: 3}
propertyPath: _mlgFiles.Array.size
value: 3
value: 2
objectReference: {fileID: 0}
- target: {fileID: 9079110210785623905, guid: fe0a30be743451540982d538c670799e,
type: 3}
Expand Down Expand Up @@ -597,6 +607,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 472427243}
m_RootOrder: 0
Expand Down Expand Up @@ -741,6 +752,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 456740069}
m_Father: {fileID: 0}
Expand Down Expand Up @@ -779,6 +791,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1465274901}
m_RootOrder: 2
Expand Down Expand Up @@ -913,6 +926,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0000031, y: 1.0000031, z: 1.0000031}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 472427243}
m_RootOrder: 1
Expand Down Expand Up @@ -1123,6 +1137,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1.47, z: 1.407373}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 406402569}
- {fileID: 1163306042}
Expand Down Expand Up @@ -1224,6 +1239,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 0.77570814, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1117766056}
m_RootOrder: 1
Expand Down Expand Up @@ -1326,6 +1342,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 12
Expand Down Expand Up @@ -1356,6 +1373,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
Expand Down Expand Up @@ -3641,6 +3659,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
Expand Down Expand Up @@ -3675,6 +3694,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0000031, y: 1.0000031, z: 1.0000031}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 472427243}
m_RootOrder: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public IEnumerator WhenSelectGermanLanguageThenLanguageManagerIsGerman()
private static TestCaseData[] _pauseMenuButtonKeysSource = new [] {
new TestCaseData("Menu Audio").Returns(null),
new TestCaseData("Menu Language").Returns(null),
new TestCaseData("Menu Network").Returns(null),
new TestCaseData("Menu Main Menu").Returns(null),
new TestCaseData("Menu Resume").Returns(null)
};
Expand Down Expand Up @@ -76,7 +75,6 @@ public IEnumerator WhenSelectGermanLanguageThenPauseMenuTitleIsGerman()
private static TestCaseData[] _checkSubMenuTitlesSource = new [] {
new TestCaseData("Menu Audio", "preMenuColumnAudio").Returns(null),
new TestCaseData("Menu Language", "preMenuColumnLanguage").Returns(null),
new TestCaseData("Menu Network", "preMenuColumnNetwork").Returns(null)
};

[UnityTest, Order(4), TestCaseSource(nameof(_checkSubMenuTitlesSource)),
Expand Down Expand Up @@ -148,33 +146,5 @@ public IEnumerator WhenSelectGermanLanguageThenLanguageSubMenuIsGerman()
Assert.AreEqual(expectedEnglishButtonLabel, actualEnglishButtonLabel,
$"English Language Button label is wrong after changing language to {ExpectedLanguage}");
}

[UnityTest, Order(7), Description("On selecting a new language in the Pause Menu, the Network sub menu's labels match")]
public IEnumerator WhenSelectGermanLanguageThenNetworkSubMenuIsGerman()
{
yield return OpenLanguageSubMenu();
yield return ClickGermanLanguageButton();

// Find and click Pause Menu Network button
string networkButtonLabel = LanguageManager.Instance.GetString("Menu Network", ExpectedLanguage);
GetButtonViaTextLabel(networkButtonLabel).onClick.Invoke();
yield return null;

var expectedJoinButtonLabel = LanguageManager.Instance.GetString("Menu Join Server", ExpectedLanguage);
var expectedHostButtonLabel = LanguageManager.Instance.GetString("Menu Host Server", ExpectedLanguage);

// Find Network Menu's Join and Host Server buttons
Button joinButton = GetButtonViaTextLabel(expectedJoinButtonLabel);
Button hostButton = GetButtonViaTextLabel(expectedHostButtonLabel);

// Get translated text labels from Buttons
var actualJoinButtonLabel = joinButton.GetComponentInChildren<TextMeshProUGUI>().text;
var actualHostButtonLabel = hostButton.GetComponentInChildren<TextMeshProUGUI>().text;

Assert.AreEqual(expectedJoinButtonLabel, actualJoinButtonLabel,
$"Join Server Button label is wrong after changing language to {ExpectedLanguage}");
Assert.AreEqual(expectedHostButtonLabel, actualHostButtonLabel,
$"Host Server Button label is wrong after changing language to {ExpectedLanguage}");
}
}
}

0 comments on commit 1483f9b

Please sign in to comment.