| | 1 | | using System.Collections; |
| | 2 | | using AvatarShape_Tests; |
| | 3 | | using DCL; |
| | 4 | | using DCL.Helpers; |
| | 5 | | using NUnit.Framework; |
| | 6 | | using UnityEngine; |
| | 7 | | using UnityEngine.TestTools; |
| | 8 | | using WaitUntil = DCL.WaitUntil; |
| | 9 | |
|
| | 10 | | namespace Tests |
| | 11 | | { |
| | 12 | | public class FacialFeatureController_VisualTests : VisualTestsBase |
| | 13 | | { |
| | 14 | | [UnityTest] |
| | 15 | | [VisualTest] |
| | 16 | | [Explicit] |
| | 17 | | [Category("Explicit")] |
| 0 | 18 | | public IEnumerator MouthWithMask_Generate() { yield return VisualTestHelpers.GenerateBaselineForTest(MouthWithMa |
| | 19 | |
|
| | 20 | | [UnityTest] |
| | 21 | | [VisualTest] |
| | 22 | | [Category("Explicit")] |
| | 23 | | [Explicit("Something is wrong with the avatar renderer material")] |
| | 24 | | public IEnumerator MouthWithMask() |
| | 25 | | { |
| 0 | 26 | | yield return InitVisualTestsScene("AvatarShapeVisualTests_MouthWithMask"); |
| | 27 | |
|
| 0 | 28 | | AvatarAssetsTestHelpers.CreateTestCatalogLocal(); |
| 0 | 29 | | var model = AvatarShapeTestHelpers.GetTestAvatarModel("Avatar #1", "TestAvatar_MaskMouth.json"); |
| 0 | 30 | | AvatarShape avatar = AvatarShapeTestHelpers.CreateAvatarShape(scene, model); |
| | 31 | |
|
| 0 | 32 | | Vector3 camPos = new Vector3(-0.75f, 2.0f, 2.25f); |
| 0 | 33 | | Vector3 camTarget = avatar.transform.position + Vector3.up * 2.0f; |
| | 34 | |
|
| 0 | 35 | | VisualTestHelpers.RepositionVisualTestsCamera(VisualTestController.i.camera, camPos, camTarget); |
| | 36 | |
|
| 0 | 37 | | yield return new WaitUntil(() => avatar.everythingIsLoaded, 20); |
| | 38 | |
|
| 0 | 39 | | yield return VisualTestHelpers.TakeSnapshot(); |
| 0 | 40 | | } |
| | 41 | | } |
| | 42 | | } |