| | 1 | | using DCL.Components; |
| | 2 | | using DCL.Helpers; |
| | 3 | | using DCL.Models; |
| | 4 | | using NUnit.Framework; |
| | 5 | | using System.Collections; |
| | 6 | | using UnityEngine; |
| | 7 | | using UnityEngine.TestTools; |
| | 8 | |
|
| | 9 | | public class UIScrollRectVisualTests : UIVisualTestsBase |
| | 10 | | { |
| | 11 | | [UnityTest] |
| | 12 | | [VisualTest] |
| | 13 | | [Explicit] |
| | 14 | | [Category("Explicit")] |
| 0 | 15 | | public IEnumerator UIScrollRectVisualTests_Generate() { yield return VisualTestHelpers.GenerateBaselineForTest(UIScr |
| | 16 | |
|
| | 17 | | [UnityTest] |
| | 18 | | [VisualTest] |
| | 19 | | [Category("Visual Tests")] |
| | 20 | | public IEnumerator UIScrollRectTest1() |
| | 21 | | { |
| 1 | 22 | | yield return InitUIVisualTestScene("UIScrollRectTest"); |
| | 23 | |
|
| 1 | 24 | | 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 | |
|
| 1 | 33 | | 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 | |
|
| 1 | 42 | | 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 | |
|
| 1 | 59 | | yield return VisualTestHelpers.TakeSnapshot(new Vector3(0f, 2f, 0f)); |
| 1 | 60 | | } |
| | 61 | | } |