< Summary

Class:UIInputTextVisualTests
Assembly:UIInputTextTests
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/UI/UIInputText/Tests/UIInputTextVisualTests.cs
Covered lines:6
Uncovered lines:1
Coverable lines:7
Total lines:52
Line coverage:85.7% (6 of 7)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
UIInputTextVisualTests_Generate()0%12300%
UIInputTextTest1()0%660100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/UI/UIInputText/Tests/UIInputTextVisualTests.cs

#LineLine coverage
 1using DCL.Components;
 2using DCL.Helpers;
 3using DCL.Models;
 4using NUnit.Framework;
 5using System.Collections;
 6using UnityEngine;
 7using UnityEngine.TestTools;
 8
 9public class UIInputTextVisualTests : UIVisualTestsBase
 10{
 11    [UnityTest]
 12    [Explicit]
 13    [VisualTest]
 14    [Category("Explicit")]
 015    public IEnumerator UIInputTextVisualTests_Generate() { yield return VisualTestHelpers.GenerateBaselineForTest(UIInpu
 16
 17    [UnityTest]
 18    [VisualTest]
 19    [Category("Visual Tests")]
 20    public IEnumerator UIInputTextTest1()
 21    {
 122        yield return InitUIVisualTestScene("UIInputTextTest");
 23
 124        string mainContainerId = "herodes";
 125        yield return CreateUIComponent<UIContainerRect, UIContainerRect.Model>(CLASS_ID.UI_CONTAINER_RECT, new UIContain
 26        {
 27            parentComponent = screenSpaceId,
 28            color = Color.green,
 29            width = new UIValue(50f, UIValue.Unit.PERCENT),
 30            height = new UIValue(50f, UIValue.Unit.PERCENT)
 31        }, mainContainerId);
 32
 133        yield return CreateUIComponent<UIInputText, UIInputText.Model>(CLASS_ID.UI_INPUT_TEXT_SHAPE, new UIInputText.Mod
 34        {
 35            parentComponent = mainContainerId,
 36            width = new UIValue(80f, UIValue.Unit.PERCENT),
 37            height = new UIValue(25f),
 38            vAlign = "bottom",
 39            hAlign = "left",
 40            placeholder = "Write message here",
 41            placeholderColor = Color.gray,
 42            positionX = new UIValue(10f, UIValue.Unit.PERCENT),
 43            positionY = new UIValue(10f),
 44            textModel = new TextShape.Model
 45            {
 46                fontSize = 10f
 47            }
 48        }, "textInput");
 49
 150        yield return VisualTestHelpers.TakeSnapshot(new Vector3(0f, 2f, 0f));
 151    }
 52}