From: huiyu.eun Date: Fri, 8 May 2020 09:04:38 +0000 (+0900) Subject: [NUI.Components.Manual][Non-ACR] Fix wearable UI issue X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3801642464eeab6c45a91fdb6b5a63780884a29d;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI.Components.Manual][Non-ACR] Fix wearable UI issue Change-Id: I93848a007737399feadfde05a0e8185c647928d7 Signed-off-by: huiyu.eun --- diff --git a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/WearableManualTestPage.cs b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/WearableManualTestPage.cs index 32cf906aa..7918dc212 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/WearableManualTestPage.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/WearableManualTestPage.cs @@ -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) { label.TextColor = Color.White; @@ -115,7 +115,7 @@ namespace Tizen.NUI.Components.Tests label.PointSize = 3.0f; label.MultiLine = true; label.Text = _mDatas[position]; - } + } } 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 _listNotPass; - private float _pointSize = 5.0f; //Save the information of every single test case private List _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 { 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); + _doneButton = new Button(new ButtonStyle()); + _doneButton.Position = new Position(0, 0); _doneButton.Size = new Size(120, 60); SetCommonButtonStyle(_doneButton, "Done"); _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); + _run = new Button(new ButtonStyle()); + _run.Position2D = new Position2D(150, 0); _run.Size = new Size(120, 60); 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); @@ -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(); - SetCommonButtonStyle(_homeButton, "<<"); + _preButton = new Button(new ButtonStyle()); + 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); diff --git a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSButton.cs b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSButton.cs index d130d4d4b..5c285917a 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSButton.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSButton.cs @@ -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(_button, "Should be equal!"); _button.Text = buttonText; diff --git a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSPopup.cs b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSPopup.cs index 59c86863c..6d99c6913 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSPopup.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSPopup.cs @@ -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 _popup.AddButton("Yes"); _popup.AddButton("Exit"); + _popup.ButtonTextPointSize = _pointSize; + _popup.ButtonOverLayBackgroundColorSelector = new Selector { Normal = new Color(1.0f, 1.0f, 1.0f, 1.0f), Pressed = new Color(0.0f, 0.0f, 0.0f, 0.1f), Selected = new Color(1.0f, 1.0f, 1.0f, 1.0f), }; - _popup.ButtonHeight = (int)(Window.Instance.Size.Height * 0.07); - + _popup.ButtonHeight = (int)(Window.Instance.Size.Height * 0.07); TextLabel contentText = new TextLabel(); contentText = new TextLabel(); contentText.Size = new Size(Window.Instance.Size.Width * 0.2f, Window.Instance.Size.Height * 0.1f); @@ -97,7 +98,9 @@ namespace Tizen.NUI.Components.Tests _popup.AddContentText(contentText); if (ManualTest.IsWearable()) - { + { + _popup.Size = new Size(130, 80); + _popup.Position = new Position(130,50); _wearTestPage.ExecuteTC(_popup); } else diff --git a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSSwitch.cs b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSSwitch.cs index e79ae8db8..24bf78f3a 100755 --- a/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSSwitch.cs +++ b/tct-suite-vs/Tizen.NUI.Components.Manual.Tests/testcase/TSSwitch.cs @@ -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(_switch, "Should be equal!"); _switch.Size = new Size(Window.Instance.Size.Width * 0.05f, Window.Instance.Size.Height * 0.0555f);