| | 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 UIInputTextVisualTests : UIVisualTestsBase |
| | 10 | | { |
| | 11 | | [UnityTest] |
| | 12 | | [Explicit] |
| | 13 | | [VisualTest] |
| | 14 | | [Category("Explicit")] |
| 0 | 15 | | public IEnumerator UIInputTextVisualTests_Generate() { yield return VisualTestHelpers.GenerateBaselineForTest(UIInpu |
| | 16 | |
|
| | 17 | | [UnityTest] |
| | 18 | | [VisualTest] |
| | 19 | | [Category("Visual Tests")] |
| | 20 | | public IEnumerator UIInputTextTest1() |
| | 21 | | { |
| 1 | 22 | | yield return InitUIVisualTestScene("UIInputTextTest"); |
| | 23 | |
|
| 1 | 24 | | string mainContainerId = "herodes"; |
| 1 | 25 | | 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 | |
|
| 1 | 33 | | 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 | |
|
| 1 | 50 | | yield return VisualTestHelpers.TakeSnapshot(new Vector3(0f, 2f, 0f)); |
| 1 | 51 | | } |
| | 52 | | } |