< Summary

Class:Tests.AvatarShapeVisualTests
Assembly:AvatarShapeVisualTests
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Avatar/Tests/VisualTests/AvatarShapeVisualTests.cs
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:70
Line coverage:0% (0 of 21)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
AvatarShapeVisualTest_Generate()0%12300%
AvatarShapeVisualTest1()0%42600%
AvatarShapeVisualTest2_Generate()0%12300%
AvatarShapeVisualTest2()0%30500%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Avatar/Tests/VisualTests/AvatarShapeVisualTests.cs

#LineLine coverage
 1using AvatarShape_Tests;
 2using DCL;
 3using DCL.Helpers;
 4using NUnit.Framework;
 5using System.Collections;
 6using UnityEngine;
 7using UnityEngine.TestTools;
 8
 9namespace Tests
 10{
 11    // Visual tests are disabled until we fix the resolution issue
 12    public class AvatarShapeVisualTests : VisualTestsBase
 13    {
 14        [UnityTest]
 15        [VisualTest]
 16        [NUnit.Framework.Explicit]
 17        [Category("Explicit")]
 018        public IEnumerator AvatarShapeVisualTest_Generate() { yield return VisualTestHelpers.GenerateBaselineForTest(Ava
 19
 20        [UnityTest]
 21        [VisualTest]
 22        [Category("Explicit")]
 23        [NUnit.Framework.Explicit]
 24        public IEnumerator AvatarShapeVisualTest1()
 25        {
 026            yield return InitVisualTestsScene("AvatarShape_A");
 27
 028            AvatarAssetsTestHelpers.CreateTestCatalogLocal();
 029            AvatarShape avatar = AvatarShapeTestHelpers.CreateAvatarShape(scene, "Avatar #1", "TestAvatar.json");
 30
 031            Vector3 camPos = new Vector3(-0.75f, 2.0f, 2.25f);
 032            Vector3 camTarget = avatar.transform.position + Vector3.up * 2.0f;
 33
 034            VisualTestHelpers.RepositionVisualTestsCamera(VisualTestController.i.camera, camPos, camTarget);
 35
 036            yield return new DCL.WaitUntil(() => avatar.everythingIsLoaded, 20);
 37
 038            yield return new WaitForSeconds(5.0f);
 39
 040            yield return VisualTestHelpers.TakeSnapshot();
 041        }
 42
 43        [UnityTest]
 44        [VisualTest]
 45        [NUnit.Framework.Explicit]
 46        [Category("Explicit")]
 047        public IEnumerator AvatarShapeVisualTest2_Generate() { yield return VisualTestHelpers.GenerateBaselineForTest(Av
 48
 49        [UnityTest]
 50        [VisualTest]
 51        [Category("Explicit")]
 52        [NUnit.Framework.Explicit]
 53        public IEnumerator AvatarShapeVisualTest2()
 54        {
 055            yield return InitVisualTestsScene("AvatarShape_B");
 56
 057            AvatarAssetsTestHelpers.CreateTestCatalogLocal();
 058            AvatarShape avatar = AvatarShapeTestHelpers.CreateAvatarShape(scene, "Avatar #2", "TestAvatar2.json");
 59
 060            Vector3 camPos = new Vector3(-0.75f, 2.0f, 2.25f);
 061            Vector3 camTarget = avatar.transform.position + Vector3.up * 2.0f;
 62
 063            VisualTestHelpers.RepositionVisualTestsCamera(VisualTestController.i.camera, camPos, camTarget);
 64
 065            yield return new DCL.WaitUntil(() => avatar.everythingIsLoaded, 20);
 66
 067            yield return VisualTestHelpers.TakeSnapshot();
 068        }
 69    }
 70}