[NUI.Components.Manual][Non-ACR] Fix wearable UI issue 14/232914/4
authorhuiyu.eun <huiyu.eun@samsung.com>
Fri, 8 May 2020 09:04:38 +0000 (18:04 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Fri, 8 May 2020 09:29:02 +0000 (18:29 +0900)
Change-Id: I93848a007737399feadfde05a0e8185c647928d7
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
tct-suite-vs/Tizen.NUI.Components.Manual.Tests/WearableManualTestPage.cs
tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSButton.cs
tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSPopup.cs
tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSSwitch.cs

index 32cf906..7918dc2 100755 (executable)
@@ -47,7 +47,7 @@ namespace Tizen.NUI.Components.Tests
 
             public override FlexibleView.ViewHolder OnCreateViewHolder(int viewType)
             {
-                FlexibleView.ViewHolder viewHolder = new FlexibleView.ViewHolder(new Button());
+                FlexibleView.ViewHolder viewHolder = new FlexibleView.ViewHolder(new Button(new ButtonStyle()));
                 return viewHolder;
             }
 
@@ -96,13 +96,13 @@ namespace Tizen.NUI.Components.Tests
 
             public override FlexibleView.ViewHolder OnCreateViewHolder(int viewType)
             {
-                FlexibleView.ViewHolder viewHolder = new FlexibleView.ViewHolder(new Button());
+                FlexibleView.ViewHolder viewHolder = new FlexibleView.ViewHolder(new TextLabel());
                 return viewHolder;
             }
 
             public override void OnBindViewHolder(FlexibleView.ViewHolder holder, int position)
             {
-                TextLabel label = holder.ItemView as TextLabel;
+                TextLabel label =  holder.ItemView as TextLabel;
                 if (label)\r
                 {\r
                     label.TextColor = Color.White;\r
@@ -115,7 +115,7 @@ namespace Tizen.NUI.Components.Tests
                     label.PointSize = 3.0f;
                     label.MultiLine = true;
                     label.Text = _mDatas[position];
-                }
+                }\r
             }
 
             public override void OnDestroyViewHolder(FlexibleView.ViewHolder holder)
@@ -142,7 +142,6 @@ namespace Tizen.NUI.Components.Tests
         private const string PRECONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PreconditionAttribute";
         private const string POSTCONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PostconditionAttribute";
         private List<string> _listNotPass;
-        private float _pointSize = 5.0f;
 
         //Save the information of every single test case
         private List<TestcaseInfo> _tcInfoList;
@@ -187,7 +186,6 @@ namespace Tizen.NUI.Components.Tests
         {
             Window.Instance.BackgroundColor = new Color(0.1f, 0.1f, 0.1f, 1.0f);
             Tizen.Log.Fatal("NUI.Components", "Initialize=========================================");
-            _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 0.28f;
             RunType.Value = RunType.MANUAL;
             _tRunner = new TRunner();
             _tRunner.LoadTestsuite();
@@ -243,6 +241,7 @@ namespace Tizen.NUI.Components.Tests
             Window.Instance.GetDefaultLayer().Add(_summaryLabel2);
 
             _initView = new View();
+
             _initView.Size2D = new Size2D((int)Window.Instance.Size.Width, 200);
             _initView.ParentOrigin = ParentOrigin.TopLeft;
             _initView.PivotPoint = PivotPoint.TopLeft;
@@ -266,7 +265,7 @@ namespace Tizen.NUI.Components.Tests
         {
             if (!btn) return;
             btn.Text = text;
-            btn.PointSize = _pointSize;
+            btn.PointSize = 4.0f;
             btn.Style.Text.TextColor = new Selector<Color>
             {
                 Normal = new Color(0, 0, 0, 1),
@@ -282,8 +281,8 @@ namespace Tizen.NUI.Components.Tests
         void InitializeFirstPage()
         {
             //Create Run Button, when you Click it, then the first test case will be executed.
-            _doneButton = new Button();
-            _doneButton.Position = new Position(-150, -200);\r
+            _doneButton = new Button(new ButtonStyle());
+            _doneButton.Position = new Position(0, 0);\r
             _doneButton.Size = new Size(120, 60);
             SetCommonButtonStyle(_doneButton, "Done");\r
             _doneButton.ClickEvent += (obj, ee) =>
@@ -291,8 +290,8 @@ namespace Tizen.NUI.Components.Tests
                 TSettings.GetInstance().SubmitManualResult();
             };
 
-            _run = new Button();
-            _run.Position2D = new Position2D(20, -200);\r
+            _run = new Button(new ButtonStyle());
+            _run.Position2D = new Position2D(150, 0);\r
             _run.Size = new Size(120, 60);\r
             SetCommonButtonStyle(_run, "Runner");
             _run.ClickEvent += (obj, ee) =>
@@ -376,13 +375,12 @@ namespace Tizen.NUI.Components.Tests
             _notRun.TextColor = Color.White;
             _notRun.Size = new Size(40, 30);
             _notRun.PointSize = 2.5f;
-            _notRun.Position = new Position(260, 118);
+            _notRun.Position = new Position(100, 32);
             _notRun.HorizontalAlignment = HorizontalAlignment.Center;
             _notRun.VerticalAlignment = VerticalAlignment.Center;
             _notRun.MultiLine = true;
             _notRun.Text = "Not Run";
-
-            _passButton = new Button();
+            _passButton = new Button(new ButtonStyle());
             SetCommonButtonStyle(_passButton, "P");
             _passButton.Size = new Size(70, 30);
             _passButton.Position = new Position(0, 0);\r
@@ -397,7 +395,7 @@ namespace Tizen.NUI.Components.Tests
                 Tizen.Log.Fatal("TBT", "Pass Button clicked!");
             };
 
-            _failButton = new Button();
+            _failButton = new Button(new ButtonStyle());
             SetCommonButtonStyle(_failButton, "F");
             _failButton.Size = new Size(70, 30);
             _failButton.Position = new Position(72, 0);
@@ -412,7 +410,7 @@ namespace Tizen.NUI.Components.Tests
                 Tizen.Log.Fatal("TBT", "Fail Button clicked!");
             };
 
-            _blockButton = new Button();
+            _blockButton = new Button(new ButtonStyle());
             SetCommonButtonStyle(_blockButton, "B");
             _blockButton.Size = new Size(70, 30);
             _blockButton.Position = new Position(144, 0);
@@ -426,7 +424,7 @@ namespace Tizen.NUI.Components.Tests
                 }
             };
 
-            _runButton = new Button();
+            _runButton = new Button(new ButtonStyle());
             SetCommonButtonStyle(_runButton, "R");
             _runButton.Size = new Size(70, 30);
             _runButton.Position = new Position(216, 0);
@@ -438,10 +436,10 @@ namespace Tizen.NUI.Components.Tests
                 _tRunner.Execute();
             };
 
-            _homeButton = new Button();
+            _homeButton = new Button(new ButtonStyle());
             SetCommonButtonStyle(_homeButton, "H");
-            _homeButton.Size = new Size(60, 30);
-            _homeButton.Position = new Position(15, 32);
+            _homeButton.Size = new Size(70, 30);
+            _homeButton.Position = new Position(0, 32);
             _homeButton.ClickEvent += (obj, ee) =>
             {
                 Clear();
@@ -457,10 +455,10 @@ namespace Tizen.NUI.Components.Tests
                 }
             };
 
-            _preButton = new Button();\r
-            SetCommonButtonStyle(_homeButton, "<<");
+            _preButton = new Button(new ButtonStyle());\r
+            SetCommonButtonStyle(_preButton, "<<");
             _preButton.Size = new Size(60, 30);
-            _preButton.Position = new Position(128, 32);
+            _preButton.Position = new Position(160, 32);
             _preButton.ClickEvent += (obj, ee) =>
             {
                 Clear();
@@ -481,10 +479,10 @@ namespace Tizen.NUI.Components.Tests
                 }
             };
 
-            _nextButton = new Button();
-            SetCommonButtonStyle(_homeButton, ">>");
+            _nextButton = new Button(new ButtonStyle());
+            SetCommonButtonStyle(_nextButton, ">>");
             _nextButton.Size = new Size(60, 30);
-            _nextButton.Position = new Position(193, 32);
+            _nextButton.Position = new Position(222, 32);
             _nextButton.ClickEvent += (obj, ee) =>
             {
                 Clear();
@@ -506,7 +504,7 @@ namespace Tizen.NUI.Components.Tests
             buttonView.ParentOrigin = ParentOrigin.TopLeft;
             buttonView.PivotPoint = PivotPoint.TopLeft;
             buttonView.Size2D = new Size2D(Window.Instance.Size.Width, 80);
-            buttonView.Position2D = new Position2D(-140, 120);
+            buttonView.Position2D = new Position2D(30, 170);
 
             buttonView.Add(_passButton);
             buttonView.Add(_failButton);
index d130d4d..5c28591 100755 (executable)
@@ -40,7 +40,7 @@ namespace Tizen.NUI.Components.Tests
             LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST");
             if(ManualTest.IsWearable())
             {
-                _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 0.28f;
+                _pointSize = 2.0f;
                 _wearTestPage = WearableManualTestNUI.GetInstance();
             }
             else
@@ -57,7 +57,7 @@ namespace Tizen.NUI.Components.Tests
 
         private void CreateMyButton(string buttonText)
         {
-            _button = new Button();
+            _button = new Button(new ButtonStyle());
             Assert.IsNotNull(_button, "Should be not null");
             Assert.IsInstanceOf<Components.Button>(_button, "Should be equal!");
             _button.Text = buttonText;
index 59c8686..6d99c69 100755 (executable)
@@ -42,7 +42,7 @@ namespace Tizen.NUI.Components.Tests
             LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST");
             if (ManualTest.IsWearable())
             {
-                _pointSize = (Window.Instance.Size.Width / Window.Instance.Dpi.Length()) * 0.28f;
+                _pointSize = 2.0f;
                 _wearTestPage = WearableManualTestNUI.GetInstance();
             }
             else
@@ -79,14 +79,15 @@ namespace Tizen.NUI.Components.Tests
             // Buttons\r
             _popup.AddButton("Yes");\r
             _popup.AddButton("Exit");\r
+            _popup.ButtonTextPointSize = _pointSize;\r
+\r
             _popup.ButtonOverLayBackgroundColorSelector = new Selector<Color>\r
             {\r
                 Normal = new Color(1.0f, 1.0f, 1.0f, 1.0f),\r
                 Pressed = new Color(0.0f, 0.0f, 0.0f, 0.1f),\r
                 Selected = new Color(1.0f, 1.0f, 1.0f, 1.0f),\r
             };\r
-            _popup.ButtonHeight = (int)(Window.Instance.Size.Height * 0.07);\r
-\r
+            _popup.ButtonHeight = (int)(Window.Instance.Size.Height * 0.07);
             TextLabel contentText = new TextLabel();\r
             contentText = new TextLabel();\r
             contentText.Size = new Size(Window.Instance.Size.Width * 0.2f, Window.Instance.Size.Height * 0.1f);\r
@@ -97,7 +98,9 @@ namespace Tizen.NUI.Components.Tests
             _popup.AddContentText(contentText);
 
             if (ManualTest.IsWearable())
-            {
+            {\r
+                _popup.Size = new Size(130, 80);\r
+                _popup.Position = new Position(130,50);
                 _wearTestPage.ExecuteTC(_popup);
             }
             else
index e79ae8d..24bf78f 100755 (executable)
@@ -56,7 +56,7 @@ namespace Tizen.NUI.Components.Tests
 
         private void CreateSwitch()
         {
-            _switch = new Switch();
+            _switch = new Switch(new SwitchStyle());
             Assert.IsNotNull(_switch, "Should be not null");
             Assert.IsInstanceOf<Components.Switch>(_switch, "Should be equal!");
             _switch.Size = new Size(Window.Instance.Size.Width * 0.05f, Window.Instance.Size.Height * 0.0555f);