< Summary

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
UIScrollRectVisualTests_Generate()0%12300%
UIScrollRectTest1()0%770100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/UI/UIScrollRect/Tests/UIScrollRectVisualTests.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 UIScrollRectVisualTests : UIVisualTestsBase
 10{
 11    [UnityTest]
 12    [VisualTest]
 13    [Explicit]
 14    [Category("Explicit")]
 015    public IEnumerator UIScrollRectVisualTests_Generate() { yield return VisualTestHelpers.GenerateBaselineForTest(UIScr
 16
 17    [UnityTest]
 18    [VisualTest]
 19    [Category("Visual Tests")]
 20    public IEnumerator UIScrollRectTest1()
 21    {
 122        yield return InitUIVisualTestScene("UIScrollRectTest");
 23
 124        yield return CreateUIComponent<UIScrollRect, UIScrollRect.Model>(CLASS_ID.UI_SLIDER_SHAPE, new UIScrollRect.Mode
 25        {
 26            parentComponent = screenSpaceId,
 27            backgroundColor = Color.gray,
 28            width = new UIValue(50f, UIValue.Unit.PERCENT),
 29            height = new UIValue(50f, UIValue.Unit.PERCENT),
 30            isVertical = true
 31        }, "herodes");
 32
 133        yield return CreateUIComponent<UIContainerRect, UIContainerRect.Model>(CLASS_ID.UI_CONTAINER_RECT, new UIContain
 34        {
 35            parentComponent = screenSpaceId,
 36            color = Color.clear,
 37            width = new UIValue(50f, UIValue.Unit.PERCENT),
 38            height = new UIValue(50f, UIValue.Unit.PERCENT),
 39            isPointerBlocker = false
 40        }, "testContainer");
 41
 142        yield return CreateUIComponent<UIInputText, UIInputText.Model>(CLASS_ID.UI_INPUT_TEXT_SHAPE, new UIInputText.Mod
 43        {
 44            parentComponent = screenSpaceId,
 45            width = new UIValue(80f, UIValue.Unit.PERCENT),
 46            height = new UIValue(25f),
 47            vAlign = "bottom",
 48            hAlign = "left",
 49            placeholder = "Write message here",
 50            placeholderColor = Color.gray,
 51            positionX = new UIValue(10f, UIValue.Unit.PERCENT),
 52            positionY = new UIValue(10f),
 53            textModel = new TextShape.Model
 54            {
 55                fontSize = 10f
 56            }
 57        }, "textInput");
 58
 159        yield return VisualTestHelpers.TakeSnapshot(new Vector3(0f, 2f, 0f));
 160    }
 61}