From b0ad14fc0cc911a5a67162f3563cfa498fc9fcda Mon Sep 17 00:00:00 2001 From: "huayong.xu" Date: Thu, 15 Jun 2023 19:09:11 +0800 Subject: [PATCH] [NUI] Add manual test for webview. --- .../Tizen.NUI.Devel.Manual.Tests/ManualTestPage.cs | 888 +++++++++++++++++++++ .../Tizen.NUI.Devel.Manual.Tests/NuiTest.snk | Bin 0 -> 596 bytes .../Tizen.NUI.Devel.Manual.Tests/Program.cs | 47 ++ .../Tizen.NUI.Devel.Manual.Tests.csproj | 48 ++ .../Tizen.NUI.Devel.Manual.Tests.sln | 64 ++ .../Tizen.NUI.Devel.Manual.Tests/Utils.cs | 277 +++++++ .../WearableManualTestPage.cs | 728 +++++++++++++++++ .../res/images/controller_btn_check_on.png | Bin 0 -> 1188 bytes .../res/images/rectangle_btn_shadow.png | Bin 0 -> 1368 bytes .../res/images/rectangle_point_btn_normal.png | Bin 0 -> 1151 bytes .../res/images/rectangle_toggle_btn_normal.png | Bin 0 -> 1245 bytes .../res/webview/contextmenu.html | 15 + .../res/webview/index.html | 11 + .../res/webview/openwindow.html | 17 + .../res/webview/tizen.png | Bin 0 -> 3994 bytes .../res/webview/webform.html | 16 + .../res/webview/webscrolledge.html | 45 ++ .../shared/res/Tizen.NUI.Devel.Manual.Tests.png | Bin 0 -> 57662 bytes .../testcase/TSWebView.cs | 409 ++++++++++ .../tizen-manifest.xml | 21 + 20 files changed, 2586 insertions(+) create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/ManualTestPage.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/NuiTest.snk create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Program.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Tizen.NUI.Devel.Manual.Tests.csproj create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Tizen.NUI.Devel.Manual.Tests.sln create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Utils.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/WearableManualTestPage.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/images/controller_btn_check_on.png create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/images/rectangle_btn_shadow.png create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/images/rectangle_point_btn_normal.png create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/images/rectangle_toggle_btn_normal.png create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/contextmenu.html create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/index.html create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/openwindow.html create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/tizen.png create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/webform.html create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/webscrolledge.html create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/shared/res/Tizen.NUI.Devel.Manual.Tests.png create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/testcase/TSWebView.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/tizen-manifest.xml diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/ManualTestPage.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/ManualTestPage.cs new file mode 100755 index 0000000..3bfec75 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/ManualTestPage.cs @@ -0,0 +1,888 @@ +/* +* Copyright (c) 2017 Samsung Electronics Co., Ltd. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System; +using System.Runtime.InteropServices; +using System.Collections.Generic; +using NUnitLite.TUnit; +using NUnit.Framework.Interfaces; +using NUnit.Framework.TUnit; +using System.Reflection; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.Components; +using Tizen.Applications; + +namespace Tizen.NUI.Tests +{ + class ManualTestNUI + { + class ListBridge : FlexibleViewAdapter + { + private List _mDatas; + private List _mlistItem; + + public ListBridge(List datas, List item) + { + _mDatas = datas; + _mlistItem = item; + } + + public void UpdateItemData(int position, List item) + { + _mlistItem = item; + } + + public override FlexibleViewViewHolder OnCreateViewHolder(int viewType) + { + FlexibleViewViewHolder viewHolder = new FlexibleViewViewHolder(new Button()); + return viewHolder; + } + + public override void OnBindViewHolder(FlexibleViewViewHolder holder, int position) + { + string testcaseName = "#." + (position + 1).ToString() + _mDatas[position]; + string resultText = "[" + _mlistItem[(int)position].Result + "]"; + string text = testcaseName + resultText; + + Button btn = holder.ItemView as Button; + if (btn) + { + btn.Focusable = true; + btn.Text = text; + btn.Feedback = false; + btn.Name = position.ToString(); + btn.PointSize = ManualTest.GetPointSize(); + btn.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.046f); + btn.TextColor = new Color(0, 0, 0, 1); + btn.ImageShadow = new ImageShadow + ( + Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_btn_shadow.png", + new Rectangle(5, 5, 5, 5) + ); + btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png"; + btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5); + btn.FocusGained += (obj, e) => + { + btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png"; + }; + btn.FocusLost += (obj, e) => + { + btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png"; + }; + btn.ParentOrigin = Position.ParentOriginTopLeft; + btn.PivotPoint = PivotPoint.TopLeft; + btn.TextAlignment = HorizontalAlignment.Begin; + btn.CellIndex = new Vector2(position, 0); + } + } + + public override void OnDestroyViewHolder(FlexibleViewViewHolder holder) + { + if (holder.ItemView != null) + { + holder.ItemView.Dispose(); + } + } + + public override int GetItemCount() + { + return _mDatas.Count; + } + } + + private List _tcIDList; + private List _listItem; + private TSettings _tsettings; + private TRunner _tRunner; + private Button _passButton, _failButton, _blockButton, _homeButton, _preButton, _nextButton, _doneButton; + private TextLabel _notRun; + private const string STEP_ATTRIBUTE_NAME = "NUnit.Framework.StepAttribute"; + private const string PRECONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PreconditionAttribute"; + private const string POSTCONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PostconditionAttribute"; + private List _listNotPass; + private ToastMessage _toastMessage; + //For TV + private float _pointSize = 20.0f; + + //Save the information of every single test case + private List _tcInfoList; + private List _currentTCInfo; + + private static ManualTestNUI _instance; + private static Object _lockObject = new object(); + + //Show the result of all the test case + private TextLabel _summaryLabel; + private View _initView; + private View _detailView; + private View _caseView; + private FlexibleView _initList; + private ListBridge _adapter; + private TableView _detailList; + private ScrollableBase _scrollableBase; + private View _buttonContainer; + private View _buttonContainer2; + private TableView _firstPageContainer; + private Button _run; + private Button _runButton; + + //Always save the current TC number; + private int _currentTCNum = 0; + + + public static ManualTestNUI GetInstance() + { + lock (_lockObject) + { + if (_instance == null) + { + _instance = new ManualTestNUI(); + } + } + return _instance; + } + + private ManualTestNUI() + { + Initialize(); + } + public void Initialize() + { + FocusManager.Instance.FocusIndicator = new View() + { + PositionUsesPivotPoint = true, + PivotPoint = new Position(0, 0, 0), + WidthResizePolicy = ResizePolicyType.FillToParent, + HeightResizePolicy = ResizePolicyType.FillToParent, + BorderlineColor = Color.Orange, + BorderlineWidth = 4.0f, + BorderlineOffset = -1f, + BackgroundColor = new Color(0.2f, 0.2f, 0.2f, 0.2f), + }; + + Tizen.Log.Fatal("NUI", "Initialize window's width is " + Window.Instance.Size.Width + " Dpi is " + Window.Instance.Dpi.Length()); + Window.Instance.BackgroundColor = Color.White; + + _toastMessage = new ToastMessage(); + _pointSize = ManualTest.GetPointSize(); + RunType.Value = RunType.MANUAL; + _tRunner = new TRunner(); + _tRunner.LoadTestsuite(); + _tRunner.SingleTestDone += OnSingleTestDone; + _tcIDList = new List(); + _listItem = new List(); + _listNotPass = TSettings.GetInstance().GetNotPassListManual(); + int count = 0; + if (_listNotPass.Count == 0) + { + foreach (KeyValuePair pair in _tRunner.GetTestList()) + { + count++; + _listItem.Add(new ItemData { No = count, TCName = pair.Key, Result = StrResult.NOTRUN }); + _tcIDList.Add(pair.Key); + } + } + else + { + foreach (var tc in _listNotPass) + { + count++; + _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); + _tcIDList.Add(tc); + } + } + Tizen.Log.Fatal("NUI", "TCT : count:" + count.ToString()); + foreach (String nameTc in _tcIDList) + { + Tizen.Log.Fatal("NUI", "TCT : TCName:" + nameTc.ToString()); + } + + _tsettings = TSettings.GetInstance(); + _tsettings.IsManual = true; + + InitData(); + _caseView = new View(); + + _summaryLabel = new TextLabel(); + _summaryLabel.PointSize = _pointSize; + _summaryLabel.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.055f); + _summaryLabel.ParentOrigin = Position.ParentOriginTopLeft; + _summaryLabel.PivotPoint = PivotPoint.TopLeft; + _summaryLabel.HorizontalAlignment = HorizontalAlignment.Center; + _summaryLabel.VerticalAlignment = VerticalAlignment.Center; + Window.Instance.GetDefaultLayer().Add(_summaryLabel); + SetSummaryResult(); + + _initView = new View(); + _initView.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.9f); + _initView.Position = new Position(0.0f, (int)(Window.Instance.Size.Height * 0.0648), 0.0f); + _initView.ParentOrigin = Position.ParentOriginTopLeft; + _initView.PivotPoint = PivotPoint.TopLeft; + InitializeFirstPage(); + _initView.Show(); + Window.Instance.GetDefaultLayer().Add(_initView); + + _detailView = new View(); + _detailView.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.9f); + _detailView.Position = new Position(0.0f, (int)(Window.Instance.Size.Height * 0.0648), 0.0f); + _detailView.ParentOrigin = Position.ParentOriginTopLeft; + _detailView.PivotPoint = PivotPoint.TopLeft; + InitializeDetailPage(); + _detailView.Hide(); + Window.Instance.GetDefaultLayer().Add(_detailView); + + FocusManager.Instance.SetCurrentFocusView(_run); + } + + public void LockUIButton() + { + _runButton.IsEnabled = false; + } + + public void UnlockUIButton() + { + _runButton.IsEnabled = true; + } + + void SetCommonButtonStyle(Button btn, string text) + { + if (!btn) return; + btn.Focusable = true; + btn.Text = text; + btn.Feedback = false; + btn.PointSize = _pointSize; + float buttonWidth = ManualTest.IsMobile() ? Window.Instance.Size.Width * 0.18f : Window.Instance.Size.Width * 0.06f; + btn.Size = new Size(buttonWidth, Window.Instance.Size.Height * 0.046f); + btn.TextColor = new Color(0, 0, 0, 1); + btn.ImageShadow = new ImageShadow + ( + Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_btn_shadow.png", + new Rectangle(5, 5, 5, 5) + ); + btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png"; + btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5); + btn.ParentOrigin = Position.ParentOriginTopLeft; + btn.PivotPoint = PivotPoint.TopLeft; + btn.FocusGained += (obj, e) => + { + btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png"; + }; + btn.FocusLost += (obj, e) => + { + btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png"; + }; + } + + void InitializeFirstPage() + { + //Create Run Button, when you Click it, then the first test case will be executed. + _doneButton = new Button(); + SetCommonButtonStyle(_doneButton, "Done"); + _doneButton.Clicked += (obj, ee) => + { + TSettings.GetInstance().SubmitManualResult(); + }; + + _run = new Button(); + SetCommonButtonStyle(_run, "Runner"); + _run.Clicked += (obj, ee) => + { + Tizen.Log.Fatal("NUI", "Check all the test case from the first one."); + _currentTCNum = 0; + _initView.Hide(); + _caseView.Hide(); + UpdateDetailPage(); + _detailView.Show(); + FocusManager.Instance.SetCurrentFocusView(_runButton); + }; + _run.RightFocusableView = _doneButton; + _doneButton.LeftFocusableView = _run; + + //To show all the test case information(Number _className._TCName [result]). + _initList = new FlexibleView(); + _initList.Position = new Position(0, Window.Instance.Size.Height * 0.0925f); + _initList.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.74f); + _adapter = new ListBridge(_tcIDList, _listItem); + _initList.SetAdapter(_adapter); + LinearLayoutManager layoutManager = new LinearLayoutManager(LinearLayoutManager.VERTICAL); + _initList.SetLayoutManager(layoutManager); + _initList.FocusedItemIndex = 0; + _initList.Focusable = true; + _initList.ItemClicked += (obj, e) => + { + Button button = e.ClickedView.ItemView as Button; + if (button) + { + Tizen.Log.Fatal("NUI", "Item clicked!!::" + button.Name); + _currentTCNum = int.Parse(button.Name); + _initView.Hide(); + UpdateDetailPage(); + _caseView.Hide(); + _detailView.Show(); + FocusManager.Instance.SetCurrentFocusView(_runButton); + } + }; + _initList.FocusGained += (obj, e) => + { + FlexibleViewViewHolder holder = _initList?.FindViewHolderForAdapterPosition(0); + if (holder != null && holder.ItemView != null) + { + FocusManager.Instance.SetCurrentFocusView(holder.ItemView); + _currentTCNum = 0; + } + }; + _initList.FocusLost += (obj, e) => + { + _currentTCNum = 0; + }; + _initList.KeyEvent += (obj, e) => + { + if (e.Key.State == Key.StateType.Down) + { + Tizen.Log.Fatal("NUI", "KeyEvent~KeyPressedName = " + e.Key.KeyPressedName + ",KeyCode = " + e.Key.KeyCode); + if (e.Key.KeyPressedName == "Up") + { + if (_currentTCNum == 0) + { + FocusManager.Instance.SetCurrentFocusView(_run); + } + else + { + FlexibleViewViewHolder holder = _initList?.FindViewHolderForAdapterPosition(_currentTCNum - 1); + if (holder != null && holder.ItemView != null) + { + FocusManager.Instance.SetCurrentFocusView(holder.ItemView); + _currentTCNum--; + } + } + } + else if (e.Key.KeyPressedName == "Down") + { + if (_currentTCNum == _initList.ChildCount - 1) + { + _currentTCNum = 0; + } + else + { + _currentTCNum++; + } + FlexibleViewViewHolder holder = _initList?.FindViewHolderForAdapterPosition(_currentTCNum); + if (holder != null && holder.ItemView != null) + { + FocusManager.Instance.SetCurrentFocusView(holder.ItemView); + } + } + else if (e.Key.KeyPressedName == "Return") + { + _initView.Hide(); + UpdateDetailPage(); + _caseView.Hide(); + _detailView.Show(); + FocusManager.Instance.SetCurrentFocusView(_runButton); + } + } + return true; + }; + + _firstPageContainer = new TableView(1, 2); + _firstPageContainer.PivotPoint = Position.PivotPointTopLeft; + _firstPageContainer.ParentOrigin = Position.ParentOriginTopLeft; + _firstPageContainer.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.1f); + _firstPageContainer.Focusable = true; + _firstPageContainer.SetCellAlignment(new TableView.CellPosition(0, 0), HorizontalAlignmentType.Right, VerticalAlignmentType.Center); + _firstPageContainer.SetCellAlignment(new TableView.CellPosition(0, 1), HorizontalAlignmentType.Center, VerticalAlignmentType.Center); + _firstPageContainer.AddChild(_doneButton, new TableView.CellPosition(0, 0)); + _firstPageContainer.AddChild(_run, new TableView.CellPosition(0, 1)); + _run.DownFocusableView = _initList; + _doneButton.DownFocusableView = _initList; + + _initView.Add(_firstPageContainer); + _initView.Add(_initList); + Tizen.Log.Fatal("NUI", "TCT : InitializeFirstPage:"); + FocusManager.Instance.SetCurrentFocusView(_run); + } + + //Update the Test Page before you want to show it(Click Run/Pre/nect Button, or Click on item in the List). + void UpdateDetailPage() + { + UpdateCurrentTCInfo(); + Tizen.Log.Fatal("NUI", "UpdateDetailPage:"); + CreateTestCase(); + } + + void InitializeDetailPage() + { + _scrollableBase = new ScrollableBase + { + Size = new Size(Window.Instance.Size.Width * 0.9739f, Window.Instance.Size.Height * 0.6629f), + ScrollingDirection = ScrollableBase.Direction.Vertical, + }; + _detailList = new TableView(23, 1); + _detailList.Focusable = true; + _detailList.Size = new Size(Window.Instance.Size.Width * 0.9739f, Window.Instance.Size.Height * 0.9f); + _detailList.ParentOrigin = Position.ParentOriginTopLeft; + _detailList.PivotPoint = PivotPoint.TopLeft; + _detailList.Position = new Position(0.0f, 0.0f, 0.0f); + CreateDetailList(); + _scrollableBase.Add(_detailList); + _detailView.Add(_scrollableBase); + + //To Place the function button, such as PASS, FAIL..... + _buttonContainer = new View(); + _buttonContainer.PivotPoint = PivotPoint.TopLeft; + _buttonContainer.ParentOrigin = Position.ParentOriginTopLeft; + _buttonContainer.Position = new Position(0, Window.Instance.Size.Height * 0.68f, 0); + _buttonContainer.Size = new Size(Window.Instance.Size.Width * 0.8f, Window.Instance.Size.Height * 0.1f); + _buttonContainer.Focusable = true; + + _buttonContainer2 = new View(); + _buttonContainer2.PivotPoint = PivotPoint.TopLeft; + _buttonContainer2.ParentOrigin = Position.ParentOriginTopLeft; + _buttonContainer2.Position = new Position(0, Window.Instance.Size.Height * 0.8f, 0); + _buttonContainer2.Size = new Size(Window.Instance.Size.Width * 0.8f, Window.Instance.Size.Height * 0.1f); + _buttonContainer2.Focusable = true; + + var flexlayout = new FlexLayout(); + flexlayout.Direction = FlexLayout.FlexDirection.Row; + flexlayout.Justification = FlexLayout.FlexJustification.SpaceBetween; + _buttonContainer.Layout = flexlayout; + var flexlayout2 = new FlexLayout(); + flexlayout2.Direction = FlexLayout.FlexDirection.Row; + flexlayout2.Justification = FlexLayout.FlexJustification.SpaceBetween; + _buttonContainer2.Layout = flexlayout2; + CreateButtons(); + _detailView.Add(_buttonContainer); + _detailView.Add(_buttonContainer2); + } + + //To show the detail information of the test case + //Preconditions + //Steps + //PostConditions + void CreateTestCase() + { + if (_detailList != null && _scrollableBase != null) + { + _detailView.Remove(_scrollableBase); + _scrollableBase.Remove(_detailList); + _detailList.Dispose(); + _detailList = null; + _scrollableBase.Dispose(); + _scrollableBase = null; + } + Tizen.Log.Fatal("NUI", "Print the CurrentTCNum here::" + _currentTCNum); + _scrollableBase = new ScrollableBase + { + Size = new Size(Window.Instance.Size.Width * 0.9739f, Window.Instance.Size.Height * 0.6629f), + ScrollingDirection = ScrollableBase.Direction.Vertical, + }; + _detailList = new TableView(10, 1); + _detailList.Focusable = true; + _detailList.Size = new Size(Window.Instance.Size.Width * 0.9739f, Window.Instance.Size.Height * 0.9f); + _detailList.ParentOrigin = Position.ParentOriginTopLeft; + _detailList.PivotPoint = PivotPoint.TopLeft; + _detailList.Position = new Position(0.0f, 0.0f, 0.0f); + CreateDetailList(); + _scrollableBase.Add(_detailList); + _detailView.Add(_scrollableBase); + if (_notRun) + { + _notRun.Text = _listItem[_currentTCNum].Result; + } + } + + //Create all the function buttons here, such as PASS, FAIL..... + void CreateButtons() + { + _notRun = new TextLabel(); + _notRun.HorizontalAlignment = HorizontalAlignment.Center; + _notRun.VerticalAlignment = VerticalAlignment.Center; + _notRun.PointSize = _pointSize; + _notRun.Text = "Not Run"; + float buttonWidth = ManualTest.IsMobile() ? Window.Instance.Size.Width * 0.18f : Window.Instance.Size.Width * 0.06f; + _notRun.Size = new Size(buttonWidth, Window.Instance.Size.Height * 0.046f); + + _passButton = new Button(); + SetCommonButtonStyle(_passButton, "Pass"); + _passButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.PASS; + ManualTest.Confirm(); + } + Tizen.Log.Fatal("TBT", "Pass Button clicked!"); + }; + + _failButton = new Button(); + SetCommonButtonStyle(_failButton, "Fail"); + _failButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.FAIL; + ManualTest.Confirm(); + } + Tizen.Log.Fatal("TBT", "Fail Button clicked!"); + }; + + _blockButton = new Button(); + SetCommonButtonStyle(_blockButton, "Block"); + _blockButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.BLOCK; + ManualTest.Confirm(); + } + }; + + _runButton = new Button(); + SetCommonButtonStyle(_runButton, "Run"); + _runButton.Clicked += (obj, ee) => + { + LockUIButton(); + Clear(); + //should update the _caseView by the test case + _tsettings.Testcase_ID = _tcIDList[_currentTCNum]; + _tsettings.TCResult = ""; + _tRunner.Execute(); + }; + + _homeButton = new Button(); + SetCommonButtonStyle(_homeButton, "Home"); + _homeButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.NOTRUN; + ManualTest.Confirm(); + } + else + { + _detailView.Hide(); + _initView.Show(); + FocusManager.Instance.SetCurrentFocusView(_run); + } + }; + + _preButton = new Button(); + SetCommonButtonStyle(_preButton, "<<"); + _preButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.NOTRUN; + ManualTest.Confirm(); + } + else + { + if (_currentTCNum != 0) + { + _currentTCNum--; + _notRun.Text = _listItem[_currentTCNum].Result; + ManualTest.Confirm(); + UpdateDetailPage(); + } + else if (_currentTCNum == 0) + { + _toastMessage.Message = "This is first testcase"; + _toastMessage.Post(); + } + } + }; + + _nextButton = new Button(); + SetCommonButtonStyle(_nextButton, ">>"); + _nextButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.NOTRUN; + ManualTest.Confirm(); + } + if (_currentTCNum + 1 != ResultNumber.Total) + { + Tizen.Log.Fatal("NUI", "Print the [not run] CurrentTCNum::" + _currentTCNum); + _currentTCNum++; + _notRun.Text = _listItem[_currentTCNum].Result; + UpdateDetailPage(); + } + else if (_currentTCNum + 1 == ResultNumber.Total) + { + _toastMessage.Message = "This is last testcase"; + _toastMessage.Post(); + } + }; + + _passButton.RightFocusableView = _failButton; + _passButton.DownFocusableView = _homeButton; + _failButton.LeftFocusableView = _passButton; + _failButton.RightFocusableView = _blockButton; + _blockButton.LeftFocusableView = _failButton; + _blockButton.RightFocusableView = _runButton; + _blockButton.DownFocusableView = _preButton; + _runButton.LeftFocusableView = _blockButton; + _runButton.DownFocusableView = _nextButton; + _homeButton.UpFocusableView = _passButton; + _homeButton.RightFocusableView = _preButton; + _preButton.UpFocusableView = _blockButton; + _preButton.LeftFocusableView = _homeButton; + _preButton.RightFocusableView = _nextButton; + _nextButton.UpFocusableView = _runButton; + _nextButton.LeftFocusableView = _preButton; + + _buttonContainer.Add(_passButton); + _buttonContainer.Add(_failButton); + _buttonContainer.Add(_blockButton); + _buttonContainer.Add(_runButton); + _buttonContainer2.Add(_homeButton); + _buttonContainer2.Add(_notRun); + _buttonContainer2.Add(_preButton); + _buttonContainer2.Add(_nextButton); + } + + public void ExecuteTC(View view) + { + Tizen.Log.Fatal("NUI", "Execute the manual test case!"); + + _caseView = view; + _caseView.ParentOrigin = Position.ParentOriginTopLeft; + _caseView.PivotPoint = PivotPoint.TopLeft; + _caseView.Position = new Position(Window.Instance.Size.Width * 0.01f, Window.Instance.Size.Height * 0.74f, 0.0f); + _detailView.Add(_caseView); + _caseView.Show(); + FocusManager.Instance.SetCurrentFocusView(_caseView); + } + + private bool OnKeyPressed(object source, View.KeyEventArgs e) + { + Tizen.Log.Fatal("NUI", "CaseView OnKeyPressed 1 Down..." + e.Key.KeyPressedName); + + if (e.Key.State == Key.StateType.Down) + { + if (e.Key.KeyPressedName == "Down") + { + FocusManager.Instance.SetCurrentFocusView(_passButton); + + } + } + return false; + } + + private bool OnRunnerKeyPressed(object source, View.KeyEventArgs e) + { + Tizen.Log.Fatal("NUI", "Runner OnKeyPressed Down..." + e.Key.KeyPressedName); + + if (e.Key.State == Key.StateType.Down) + { + if (e.Key.KeyPressedName == "Up") + { + Tizen.Log.Fatal("NUI", "Set current focus view :: doneButton"); + FocusManager.Instance.SetCurrentFocusView(_doneButton); + } + } + return false; + } + + private bool OnDownButtonKeyPressed(object source, View.KeyEventArgs e) + { + Tizen.Log.Fatal("NUI", "DownButton OnKeyPressed Down..." + e.Key.KeyPressedName); + + if (e.Key.State == Key.StateType.Down) + { + if (e.Key.KeyPressedName == "Down") + { + Tizen.Log.Fatal("NUI", "Set current focus view :: run"); + FocusManager.Instance.SetCurrentFocusView(_run); + } + } + return false; + } + + private void Clear() + { + if (_caseView.IsOnWindow == true) + { + _detailView.Remove(_caseView); + } + } + + public void ClearTestCase(View view) + { + FocusManager.Instance.SetCurrentFocusView(_runButton); + Tizen.Log.Fatal("NUI", "Clear test case!"); + _detailView.Remove(view); + } + + //Use to update the _summaryLabel. + private void SetSummaryResult() + { + ResultNumber.NotRun = ResultNumber.Total - ResultNumber.Pass - ResultNumber.Fail - ResultNumber.Block; + _summaryLabel.Text = "Total : " + ResultNumber.Total + ", Pass : " + ResultNumber.Pass + ", Fail : " + ResultNumber.Fail + ", Block : " + ResultNumber.Block + ", Not Run : " + ResultNumber.NotRun; + } + + private void CreateDetailList() + { + Tizen.Log.Fatal("NUI", "Print the CreateDetailList::"); + int senNum = _currentTCInfo.Count; + for (int index = 0; index < senNum; index++) + { + TextLabel description = new TextLabel(); + description.ParentOrigin = Position.ParentOriginTopLeft; + description.PivotPoint = PivotPoint.TopLeft; + description.Position = new Position(0.0f, 0.0f, 0.0f); + description.Size2D = new Size2D((int)(Window.Instance.Size.Width * 0.9895), (int)(Window.Instance.Size.Height * 0.0462)); + description.HorizontalAlignment = HorizontalAlignment.Begin; + description.PointSize = _pointSize; + description.Text = _currentTCInfo[(int)index]; + description.MultiLine = true; + _detailList.AddChild(description, new TableView.CellPosition((uint)index, 0)); + _detailList.SetFixedHeight((uint)index, Window.Instance.Size.Height * 0.0462f); + } + } + + //Init all the data, should be offered by Test Framework + void InitData() + { + ResultNumber.Total = _tcIDList.Count; + ResultNumber.Pass = 0; + ResultNumber.Fail = 0; + ResultNumber.Block = 0; + _tcInfoList = new List(); + foreach (var testcaseItem in _listItem) + { + foreach (KeyValuePair pair in _tRunner.GetTestList()) + { + if (testcaseItem.TCName.Equals(pair.Key)) + { + IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); + List preconditions = new List(); + preconditions.Add("Preconditions:"); + List steps = new List(); + steps.Add("Steps:"); + List postconditions = new List(); + postconditions.Add("Postconditions:\n"); + + while (customAttributes.MoveNext()) + { + if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + { + steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + { + preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + { + postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + } + + _tcInfoList.Add(new TestcaseInfo + { + TestcaseName = pair.Key, + Preconditions = preconditions, + Steps = steps, + Postconditions = postconditions, + }); + break; + } + } + } + UpdateCurrentTCInfo(); + } + + //The data in CurrentTCInfo list will be show in _detailList. + void UpdateCurrentTCInfo() + { + _currentTCInfo = new List(); + Tizen.Log.Fatal("NUI.Components", "Print the CurrentTCNum::" + _currentTCNum); + _currentTCInfo.Add("DESCRIPTION:#" + (_currentTCNum + 1)); + string[] str = _tcInfoList[_currentTCNum].TestcaseName.Split('.'); + _currentTCInfo.Add("CLASS:" + str[str.Length - 2]); + _currentTCInfo.Add("METHOD:" + str[str.Length - 1]); + for (int index = 0; index < _tcInfoList[_currentTCNum].Preconditions.Count; index++) + { + _currentTCInfo.Add(_tcInfoList[_currentTCNum].Preconditions[index]); + } + for (int index = 0; index < _tcInfoList[_currentTCNum].Steps.Count; index++) + { + _currentTCInfo.Add(_tcInfoList[_currentTCNum].Steps[index]); + } + for (int index = 0; index < _tcInfoList[_currentTCNum].Postconditions.Count; index++) + { + _currentTCInfo.Add(_tcInfoList[_currentTCNum].Postconditions[index]); + } + Tizen.Log.Fatal("NUI", "The CurrentTCNum::" + _currentTCNum); + } + + private void OnSingleTestDone(object sender, SingleTestDoneEventArgs e) + { + //Test when will this event will be triggered + Tizen.Log.Fatal("NUI", "OnSingleTestDone has been triggered!"); + // check old result + if (_listItem[_currentTCNum].Result.Contains(StrResult.FAIL)) + { + ResultNumber.Fail = ResultNumber.Fail - 1; + } + else if (_listItem[_currentTCNum].Result.Contains(StrResult.PASS)) + { + ResultNumber.Pass = ResultNumber.Pass - 1; + } + else if (_listItem[_currentTCNum].Result.Contains(StrResult.BLOCK)) + ResultNumber.Block = ResultNumber.Block - 1; + + // Update new result + _listItem[_currentTCNum].Result = e.Result; + if (e.Result.Contains(StrResult.PASS)) + { + ResultNumber.Pass += 1; + } + else if (e.Result.Contains(StrResult.FAIL)) + { + ResultNumber.Fail += 1; + } + else if (e.Result.Contains(StrResult.BLOCK)) + { + ResultNumber.Block += 1; + } + + FlexibleViewViewHolder holder = _initList?.FindViewHolderForAdapterPosition(_currentTCNum); + if (holder != null) + { + string testcaseName = "#." + (_currentTCNum + 1).ToString() + _tcIDList[_currentTCNum]; + string resultText = "[" + _listItem[(int)_currentTCNum].Result + "]"; + string text = testcaseName + resultText; + Button btn = holder.ItemView as Button; + btn.Text = text; + _adapter?.UpdateItemData(_currentTCNum, _listItem); + } + + SetSummaryResult(); + _notRun.Text = _listItem[_currentTCNum].Result; + } + } +} + diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/NuiTest.snk b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/NuiTest.snk new file mode 100755 index 0000000000000000000000000000000000000000..d21014f1c58ee6ef115f9b939a7d75f2b6447cc3 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097{y!QKGl@uSS6mG{&TMOv0ng&0QA2MJ| z5Z`V|hlm&`K)n^oJE5h(xvuVy;=V%aoC{y$E*))F0QSj4iC4U^><8<3Jz zShTpX1H%oMg9;a|kf|>;_6ia9dU$nyYalh}nZ8=KnnCU1e621kd1w3dn`l&0No(LS z(4I6y$h5*<>}>2zH@CY zyg+(q634ftCqN@CsiI}3{O(4+$U1gP+dc_fy@XG5J? z1j%7Gj`Qz7KG;^uf$b(~?5&u?kfZK_(vS1w`|`#?LxnTLDOA0_7MQ~TlG`O7zCTfD zq%FV8axHq9opXOdyJ=IiQ9)@v?7U6rtu)(d`xo6Cp9qOD$%H(sQCL#jYfbkD1(5gR z?Cfoq;({!gzI{vj>-9{YdmSC53*NV^-)I z^YVoKY$FVTQ?5xDsCA=BU=j0ng$rl8@@{L2qAn+>)Uur(+)gO-(2`txs16AUfY{e9 z^5TrfO~7X^(rWB(vSB8Y`Hus5q3jLOA=&q?ruPmj!TrrU{3mdd5d0qZ=|lz@9h#Y{ i^Ul>vU+6RiTdS^Udax97pMy5uv24tElw*w9g?lBM? + + + + Exe + tizen11.0 + Tizen + + + + + true + + + + portable + + + None + + + + + + + + + + + Runtime + + + + + + + + + + + + true + ./NuiTest.snk + true + + 1.0.0 + + diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Tizen.NUI.Devel.Manual.Tests.sln b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Tizen.NUI.Devel.Manual.Tests.sln new file mode 100755 index 0000000..495c134 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Tizen.NUI.Devel.Manual.Tests.sln @@ -0,0 +1,64 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29905.134 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.NUI.Devel.Manual.Tests", "Tizen.NUI.Devel.Manual.Tests.csproj", "{66D8A33C-59A0-4F95-86BB-D4B98DB350B8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.framework", "..\nunit.framework\nunit.framework.csproj", "{8537EA70-6272-4CCD-BCD4-EA8678519A42}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunitlite", "..\nunitlite\nunitlite.csproj", "{F125594F-E09F-4444-8DD7-ACAE72830C55}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Debug|x64.ActiveCfg = Debug|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Debug|x64.Build.0 = Debug|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Debug|x86.ActiveCfg = Debug|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Debug|x86.Build.0 = Debug|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Release|Any CPU.Build.0 = Release|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Release|x64.ActiveCfg = Release|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Release|x64.Build.0 = Release|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Release|x86.ActiveCfg = Release|Any CPU + {66D8A33C-59A0-4F95-86BB-D4B98DB350B8}.Release|x86.Build.0 = Release|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Debug|x64.ActiveCfg = Debug|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Debug|x64.Build.0 = Debug|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Debug|x86.ActiveCfg = Debug|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Debug|x86.Build.0 = Debug|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Release|Any CPU.Build.0 = Release|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Release|x64.ActiveCfg = Release|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Release|x64.Build.0 = Release|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Release|x86.ActiveCfg = Release|Any CPU + {8537EA70-6272-4CCD-BCD4-EA8678519A42}.Release|x86.Build.0 = Release|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Debug|x64.ActiveCfg = Debug|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Debug|x64.Build.0 = Debug|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Debug|x86.ActiveCfg = Debug|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Debug|x86.Build.0 = Debug|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Release|Any CPU.Build.0 = Release|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Release|x64.ActiveCfg = Release|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Release|x64.Build.0 = Release|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Release|x86.ActiveCfg = Release|Any CPU + {F125594F-E09F-4444-8DD7-ACAE72830C55}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {70518B32-7051-446F-9251-03D863BBD75E} + EndGlobalSection +EndGlobal diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Utils.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Utils.cs new file mode 100755 index 0000000..dde50a9 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/Utils.cs @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +using System; +using System.Threading.Tasks; +using System.Runtime.InteropServices; +using System.Collections.Generic; +using System.ComponentModel; +using Tizen.NUI.BaseComponents; +using Tizen.NUI; +using Tizen.NUI.Components; + +namespace Tizen.NUI.Tests +{ + + public class ResultNumber + { + public static int Total { get; set; } + public static int Pass { get; set; } + public static int Fail { get; set; } + public static int NotRun { get; set; } + public static int Block { get; set; } + } + + public class TestcaseInfo + { + private string _tescaseName; + public string TestcaseName + { + get + { + return _tescaseName; + } + set + { + _tescaseName = value; + } + } + + private List _preconditions; + public List Preconditions + { + get + { + return _preconditions; + } + set + { + _preconditions = value; + } + } + + private List _steps; + public List Steps + { + get + { + return _steps; + } + set + { + _steps = value; + } + } + + private List _postconditions; + public List Postconditions + { + get + { + return _postconditions; + } + set + { + _postconditions = value; + } + } + } + public class ItemData : INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + private void OnPropertyChanged(object sender, string propertyName) + { + if (this.PropertyChanged != null) + { + PropertyChanged(sender, new PropertyChangedEventArgs(propertyName)); + } + } + public int No { get; set; } + + public string TCName { get; set; } + + private string _result; + public string Result + { + get + { + return _result; + } + set + { + _result = value; + if (_result.Equals(StrResult.PASS)) + { + ResultColor = Color.Green; + } + else if (_result.Equals(StrResult.FAIL)) + { + ResultColor = Color.Red; + } + else if (_result.Equals(StrResult.BLOCK)) + { + ResultColor = Color.Red; + } + else + { + ResultColor = Color.Black; + } + OnPropertyChanged(this, "Result"); + } + } + + private Color _resultColor; + public Color ResultColor + { + get { return _resultColor; } + set + { + _resultColor = value; + OnPropertyChanged(this, "ResultColor"); + } + } + } + + public class StrResult + { + public static string PASS = "PASS"; + public static string FAIL = "FAIL"; + public static string NOTRUN = "NOT RUN"; + public static string BLOCK = "BLOCK"; + } + + public class RunType + { + public static string AUTO = "AUTO"; + public static string MANUAL = "MANUAL"; + + public static string Value { get; set; } + } + + public class ManualTest + { + private static bool Confirmed = true; + + public static async Task WaitForConfirm() + { + Confirmed = false; + //ManualTestNUI.GetInstance().UnlockUIButton(); + + while (true) + { + await Task.Delay(200); + if (Confirmed) + break; + } + + if (ManualTest.IsWearable()) + { + WearableManualTestNUI.GetInstance().UnlockUIButton(); + } + else + { + ManualTestNUI.GetInstance().UnlockUIButton(); + } + } + + public static bool IsConfirmed() + { + return Confirmed; + } + + public static void Confirm() + { + Confirmed = true; + } + + public static bool IsMobile() + { + string value; + var result = Tizen.System.Information.TryGetValue("tizen.org/feature/profile", out value); + if (result && value.Equals("mobile")) + { + return true; + } + + return false; + } + + public static bool IsWearable() + { + string value; + var result = Tizen.System.Information.TryGetValue("tizen.org/feature/profile", out value); + if (result && value.Equals("wearable")) + { + return true; + } + + return false; + } + + public static bool IsEmulator() + { + string value; + var result = Tizen.System.Information.TryGetValue("tizen.org/system/model_name", out value); + if (result && value.Equals("Emulator")) + { + return true; + } + + return false; + } + + public static float GetPointSize() + { + float retValue = 10.0f; //default + string value; + Tizen.System.Information.TryGetValue("tizen.org/feature/profile", out value); + switch (value) + { + case "wearable": + retValue = 4.0f; + break; + case "mobile": + retValue = 5.0f; + break; + case "tv": + retValue = 20.0f; + break; + } + return retValue; + } + + public static TextLabel CreateLabel(string information) + { + TextLabel mLabel = new TextLabel(); + mLabel.TextColor = Color.White; + mLabel.PointSize = 4.0f; + mLabel.VerticalAlignment = VerticalAlignment.Center; + mLabel.HorizontalAlignment = HorizontalAlignment.Begin; + mLabel.MultiLine = true; + mLabel.Text = information; + mLabel.Size2D = new Size2D(300, 50); + return mLabel; + } + } + + enum NavigationButton + { + Next, + Previous, + Home, + NA + } +} diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/WearableManualTestPage.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/WearableManualTestPage.cs new file mode 100755 index 0000000..e87986e --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/WearableManualTestPage.cs @@ -0,0 +1,728 @@ +/* +* Copyright (c) 2020 Samsung Electronics Co., Ltd. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System; +using System.Runtime.InteropServices; +using System.Collections.Generic; +using NUnitLite.TUnit; +using NUnit.Framework.Interfaces; +using NUnit.Framework.TUnit; +using System.Reflection; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.Components; + +namespace Tizen.NUI.Tests +{ + class WearableManualTestNUI + { + class ListBridge : FlexibleViewAdapter + { + private List _mDatas; + private List _mlistItem; + + public ListBridge(List datas, List item) + { + _mDatas = datas; + _mlistItem = item; + } + + public void UpdateItemData(int position, List item) + { + _mlistItem = item; + } + + public override FlexibleViewViewHolder OnCreateViewHolder(int viewType) + { + FlexibleViewViewHolder viewHolder = new FlexibleViewViewHolder(new Button(new ButtonStyle())); + return viewHolder; + } + + public override void OnBindViewHolder(FlexibleViewViewHolder holder, int position) + { + string testcaseName = "#." + (position + 1).ToString() + _mDatas[position]; + string resultText = "[" + _mlistItem[(int)position].Result + "]"; + string text = testcaseName + resultText; + + Button btn = holder.ItemView as Button; + if (btn) + { + btn.Size = new Size(Window.Instance.Size.Width, 120); + btn.Name = position.ToString(); + btn.Text = text; + btn.PointSize = 4.0f; + btn.TextAlignment = HorizontalAlignment.Begin; + btn.TextColor = Color.White; + btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png"; + btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5); + } + } + + public override void OnDestroyViewHolder(FlexibleViewViewHolder holder) + { + if (holder.ItemView != null) + { + holder.ItemView.Dispose(); + } + } + + public override int GetItemCount() + { + return _mDatas.Count; + } + } + + class DetailListBridge : FlexibleViewAdapter + { + private List _mDatas; + + public DetailListBridge(List datas) + { + _mDatas = datas; + } + + public override FlexibleViewViewHolder OnCreateViewHolder(int viewType) + { + FlexibleViewViewHolder viewHolder = new FlexibleViewViewHolder(new TextLabel()); + return viewHolder; + } + + public override void OnBindViewHolder(FlexibleViewViewHolder holder, int position) + { + TextLabel label = holder.ItemView as TextLabel; + if (label) + { + label.TextColor = Color.White; + label.ParentOrigin = ParentOrigin.TopLeft; + label.PivotPoint = PivotPoint.TopLeft; + label.Position = new Position(0.0f, 0.0f, 0.0f); + label.Size = new Size(Window.Instance.Size.Width - 100, _detailScrollHeight); + label.HorizontalAlignment = HorizontalAlignment.Begin; + label.VerticalAlignment = VerticalAlignment.Center; + label.PointSize = 3.0f; + label.MultiLine = true; + label.Text = _mDatas[position]; + } + } + + public override void OnDestroyViewHolder(FlexibleViewViewHolder holder) + { + if (holder.ItemView != null) + { + holder.ItemView.Dispose(); + } + } + + public override int GetItemCount() + { + return _mDatas.Count; + } + } + + private List _tcIDList; + private List _listItem; + private TSettings _tsettings; + private TRunner _tRunner; + private Button _passButton, _failButton, _blockButton, _homeButton, _preButton, _nextButton, _doneButton; + private TextLabel _notRun; + private const string STEP_ATTRIBUTE_NAME = "NUnit.Framework.StepAttribute"; + private const string PRECONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PreconditionAttribute"; + private const string POSTCONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PostconditionAttribute"; + private List _listNotPass; + + //Save the information of every single test case + private List _tcInfoList; + private List _currentTCInfo; + + private static WearableManualTestNUI _instance; + private static Object _lockObject = new object(); + + //Show the result of all the test case + private TextLabel _summaryLabel1, _summaryLabel2, _description; + private View _initView; + private View _detailView; + private FlexibleView _initList; + private ListBridge _adapter; + private FlexibleView _detailList; + private DetailListBridge _adapter_detail; + private View _caseView; + private Button _run; + private Button _runButton; + + //Always save the current TC number; + private int _currentTCNum = 0; + private static int _detailScrollHeight = 60; + + public static WearableManualTestNUI GetInstance() + { + lock (_lockObject) + { + if (_instance == null) + { + _instance = new WearableManualTestNUI(); + } + } + return _instance; + } + + private WearableManualTestNUI() + { + Initialize(); + } + public void Initialize() + { + Window.Instance.BackgroundColor = new Color(0.1f, 0.1f, 0.1f, 1.0f); + Tizen.Log.Fatal("NUI", "Initialize========================================="); + RunType.Value = RunType.MANUAL; + _tRunner = new TRunner(); + _tRunner.LoadTestsuite(); + _tRunner.SingleTestDone += OnSingleTestDone; + _listNotPass = new List(); + _tcIDList = new List(); + _listItem = new List(); + _listNotPass = TSettings.GetInstance().GetNotPassListManual(); + int count = 0; + foreach (var tc in _listNotPass) + { + _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); + _tcIDList.Add(tc); + count++; + } + Tizen.Log.Fatal("NUI", "TCT : count:" + count.ToString()); + foreach (String nameTc in _tcIDList) + { + Tizen.Log.Fatal("NUI", "TCT : TCName:" + nameTc.ToString()); + } + + + _tsettings = TSettings.GetInstance(); + _tsettings.IsManual = true; + + InitData(); + _caseView = new View(); + Window.Instance.GetDefaultLayer().Add(_caseView); + Window window = Window.Instance; + + _summaryLabel1 = new TextLabel(); + _summaryLabel1.TextColor = Color.White; + _summaryLabel1.PointSize = 5.0f; + _summaryLabel1.Size2D = new Size2D(200, 30); + _summaryLabel1.ParentOrigin = ParentOrigin.TopLeft; + _summaryLabel1.PivotPoint = PivotPoint.TopLeft; + _summaryLabel1.Position = new Position(70, 12, 0); + _summaryLabel1.HorizontalAlignment = HorizontalAlignment.Center; + _summaryLabel1.VerticalAlignment = VerticalAlignment.Center; + + _summaryLabel2 = new TextLabel(); + _summaryLabel2.TextColor = Color.White; + _summaryLabel2.PointSize = 5.0f; + _summaryLabel2.Size2D = new Size2D(300, 30); + _summaryLabel2.ParentOrigin = ParentOrigin.TopLeft; + _summaryLabel2.PivotPoint = PivotPoint.TopLeft; + _summaryLabel2.Position = new Position(20, 33, 0); + _summaryLabel2.HorizontalAlignment = HorizontalAlignment.Center; + _summaryLabel2.VerticalAlignment = VerticalAlignment.Center; + + SetSummaryResult(); + Window.Instance.GetDefaultLayer().Add(_summaryLabel1); + 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; + _initView.Position = new Position(0.0f, 60.0f, 0.0f); + InitializeFirstPage(); + _initView.Show(); + + _detailView = new View(); + _detailView.Size2D = new Size2D((int)Window.Instance.Size.Width, (int)Window.Instance.Size.Height - 65); + _detailView.ParentOrigin = ParentOrigin.TopLeft; + _detailView.PivotPoint = PivotPoint.TopLeft; + _detailView.Position = new Position(0.0f, 70.0f, 0.0f); + InitializeDetailPage(); + _detailView.Hide(); + + window.GetDefaultLayer().Add(_initView); + window.GetDefaultLayer().Add(_detailView); + } + + void SetCommonButtonStyle(Button btn, string text) + { + if (!btn) return; + btn.Text = text; + btn.PointSize = 4.0f; + btn.TextColor = new Color(0, 0, 0, 1); + btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png"; + btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5); + btn.TextColor = Color.White; + } + + void InitializeFirstPage() + { + //Create Run Button, when you Click it, then the first test case will be executed. + _doneButton = new Button(new ButtonStyle()); + _doneButton.Position = new Position(0, 0); + _doneButton.Size = new Size(120, 60); + SetCommonButtonStyle(_doneButton, "Done"); + _doneButton.Clicked += (obj, ee) => + { + TSettings.GetInstance().SubmitManualResult(); + }; + + _run = new Button(new ButtonStyle()); + _run.Position2D = new Position2D(150, 0); + _run.Size = new Size(120, 60); + SetCommonButtonStyle(_run, "Runner"); + _run.Clicked += (obj, ee) => + { + Tizen.Log.Fatal("NUI", "Check all the test case from the first one."); + _currentTCNum = 0; + _initView.Hide(); + _caseView.Hide(); + UpdateDetailPage(); + _detailView.Show(); + }; + + CreateInitList(); + + _initView.Add(_doneButton); + _initView.Add(_run); + _initView.Add(_initList); + Tizen.Log.Fatal("NUI", "TCT : InitializeFirstPage:"); + } + + //Update the Test Page before you want to show it(Click Run/Pre/nect Button, or Click on item in the List). + void UpdateDetailPage() + { + UpdateCurrentTCInfo(); + Tizen.Log.Fatal("NUI", "UpdateDetailPage::::::::::::::::::::::"); + CreateTestCase(); + } + + void InitializeDetailPage() + { + _description = new TextLabel(); + _description.TextColor = Color.White; + _description.PointSize = 3.0f; + _description.ParentOrigin = ParentOrigin.TopLeft; + _description.PivotPoint = PivotPoint.TopLeft; + _description.Size2D = new Size2D(200, 20); + _description.Position2D = new Position2D(50, 0); + _detailView.Add(_description); + + CreateDetailList(); + //To Place the function button, such as PASS, FAIL..... + CreateButtons(); + } + + //To show the detail information of the test case + //Preconditions + //Steps + //PostConditions + void CreateTestCase() + { + if(_detailList) + { + _detailView.Remove(_detailList); + _detailList.Dispose(); + } + Tizen.Log.Fatal("NUI", "Print the CurrentTCNum here::" + _currentTCNum); + CreateDetailList(); + if (_notRun) + { + _notRun.Text = _listItem[_currentTCNum].Result; + } + } + private TextLabel CreateTextLabel(string textStr, int left) + { + TextLabel text = new TextLabel(); + text.TextColor = Color.White; + text.ParentOrigin = ParentOrigin.TopLeft; + text.PivotPoint = PivotPoint.TopLeft; + text.Text = textStr; + text.PointSize = 5.0f; + text.VerticalAlignment = VerticalAlignment.Bottom; + text.HorizontalAlignment = HorizontalAlignment.Center; + text.Size2D = new Size2D(30, 30); + text.Position2D = new Position2D(left, 0); + return text; + } + //Create all the function buttons here, such as PASS, FAIL..... + void CreateButtons() + { + _notRun = new TextLabel(); + _notRun.TextColor = Color.White; + _notRun.Size = new Size(40, 30); + _notRun.PointSize = 2.5f; + _notRun.Position = new Position(100, 32); + _notRun.HorizontalAlignment = HorizontalAlignment.Center; + _notRun.VerticalAlignment = VerticalAlignment.Center; + _notRun.MultiLine = true; + _notRun.Text = "Not Run"; + _passButton = new Button(new ButtonStyle()); + SetCommonButtonStyle(_passButton, "P"); + _passButton.Size = new Size(70, 30); + _passButton.Position = new Position(0, 0); + _passButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.PASS; + ManualTest.Confirm(); + } + Tizen.Log.Fatal("TBT", "Pass Button clicked!"); + }; + + _failButton = new Button(new ButtonStyle()); + SetCommonButtonStyle(_failButton, "F"); + _failButton.Size = new Size(70, 30); + _failButton.Position = new Position(72, 0); + _failButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.FAIL; + ManualTest.Confirm(); + } + Tizen.Log.Fatal("TBT", "Fail Button clicked!"); + }; + + _blockButton = new Button(new ButtonStyle()); + SetCommonButtonStyle(_blockButton, "B"); + _blockButton.Size = new Size(70, 30); + _blockButton.Position = new Position(144, 0); + _blockButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.BLOCK; + ManualTest.Confirm(); + } + }; + + _runButton = new Button(new ButtonStyle()); + SetCommonButtonStyle(_runButton, "R"); + _runButton.Size = new Size(70, 30); + _runButton.Position = new Position(216, 0); + _runButton.Clicked += (obj, ee) => + { + LockUIButton(); + Clear(); + _tsettings.Testcase_ID = _tcIDList[_currentTCNum]; + _tsettings.TCResult = ""; + _tRunner.Execute(); + }; + + _homeButton = new Button(new ButtonStyle()); + SetCommonButtonStyle(_homeButton, "H"); + _homeButton.Size = new Size(70, 30); + _homeButton.Position = new Position(0, 32); + _homeButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.NOTRUN; + ManualTest.Confirm(); + } + else + { + _detailView.Hide(); + _initView.Show(); + } + }; + + _preButton = new Button(new ButtonStyle()); + SetCommonButtonStyle(_preButton, "<<"); + _preButton.Size = new Size(60, 30); + _preButton.Position = new Position(160, 32); + _preButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.NOTRUN; + ManualTest.Confirm(); + } + else + { + if (_currentTCNum != 0) + { + _currentTCNum--; + _notRun.Text = _listItem[_currentTCNum].Result; + ManualTest.Confirm(); + UpdateDetailPage(); + } + } + }; + + _nextButton = new Button(new ButtonStyle()); + SetCommonButtonStyle(_nextButton, ">>"); + _nextButton.Size = new Size(60, 30); + _nextButton.Position = new Position(222, 32); + _nextButton.Clicked += (obj, ee) => + { + Clear(); + if (!ManualTest.IsConfirmed()) + { + _tsettings.TCResult = StrResult.NOTRUN; + ManualTest.Confirm(); + } + if (_currentTCNum + 1 != ResultNumber.Total) + { + Tizen.Log.Fatal("NUI", "Print the [not run] CurrentTCNum::" + _currentTCNum); + _currentTCNum++; + _notRun.Text = _listItem[_currentTCNum].Result; + UpdateDetailPage(); + } + }; + + View buttonView = new View(); + buttonView.ParentOrigin = ParentOrigin.TopLeft; + buttonView.PivotPoint = PivotPoint.TopLeft; + buttonView.Size2D = new Size2D(Window.Instance.Size.Width, 80); + buttonView.Position2D = new Position2D(30, 170); + + buttonView.Add(_passButton); + buttonView.Add(_failButton); + buttonView.Add(_blockButton); + buttonView.Add(_runButton); + buttonView.Add(_homeButton); + buttonView.Add(_notRun); + buttonView.Add(_preButton); + buttonView.Add(_nextButton); + _detailView.Add(buttonView); + } + + public void ExecuteTC(View view) + { + Tizen.Log.Fatal("ManualTCT", "Execute the manual test case!"); + + _caseView = view; + _caseView.ParentOrigin = Position.ParentOriginTopLeft; + _caseView.PivotPoint = PivotPoint.TopLeft; + _caseView.Position = new Position(40.0f, 120.0f, 0.0f); + _detailView.Add(_caseView); + _caseView.Show(); + } + + private void Clear() + { + if (_caseView.IsOnWindow == true) + { + _detailView.Remove(_caseView); + } + } + + public void ClearTestCase(View view) + { + Tizen.Log.Fatal("NUI", "Clear test case!"); + _detailView.Remove(view); + } + + //Use to update the _summaryLabel. + private void SetSummaryResult() + { + ResultNumber.NotRun = ResultNumber.Total - ResultNumber.Pass - ResultNumber.Fail - ResultNumber.Block; + _summaryLabel1.Text = "T : " + ResultNumber.Total + ", P : " + ResultNumber.Pass; + _summaryLabel2.Text = "F : " + ResultNumber.Fail + ", B : " + ResultNumber.Block + ", NR: " + ResultNumber.NotRun; + Tizen.Log.Fatal("ManualTCT", "Set the result Text"); + } + + private void CreateInitList() + { + Tizen.Log.Fatal("ManualTCT", "CreateInitList"); + _initList = new FlexibleView(); + _initList.ParentOrigin = ParentOrigin.TopLeft; + _initList.PivotPoint = PivotPoint.TopLeft; + _initList.Size = new Size(Window.Instance.Size.Width, 400); + _initList.Position = new Position(0, 80); + _initList.ClippingMode = ClippingModeType.ClipChildren; + _adapter = new ListBridge(_tcIDList, _listItem); + _initList.SetAdapter(_adapter); + LinearLayoutManager layoutManager = new LinearLayoutManager(LinearLayoutManager.VERTICAL); + _initList.SetLayoutManager(layoutManager); + _initList.FocusedItemIndex = 0; + _initList.ItemClicked += (obj, e) => + { + Button button = e.ClickedView.ItemView as Button; + if (button) + { + Tizen.Log.Fatal("TBT", "Item clicked!!::" + button.Name); + _currentTCNum = int.Parse(button.Name); + _initView.Hide(); + UpdateDetailPage(); + _caseView.Hide(); + _detailView.Show(); + } + }; + } + + private void CreateDetailList() + { + Tizen.Log.Fatal("NUI", "Print the CreateDetailList::count: " + _currentTCInfo.Count); + _description.Text = _currentTCInfo[0]; + + _detailList = new FlexibleView(); + _detailList.ParentOrigin = ParentOrigin.TopLeft; + _detailList.PivotPoint = PivotPoint.TopLeft; + _detailList.Size = new Size(Window.Instance.Size.Width - 100, _detailScrollHeight); + _detailList.Position = new Position(30, 20); + _detailList.BackgroundColor = Color.Black; + _detailList.ClippingMode = ClippingModeType.ClipChildren; + _adapter_detail = new DetailListBridge(_currentTCInfo); + _detailList.SetAdapter(_adapter_detail); + LinearLayoutManager layoutManager = new LinearLayoutManager(LinearLayoutManager.VERTICAL); + _detailList.SetLayoutManager(layoutManager); + _detailView.Add(_detailList); + } + + //Init all the data, should be offered by Test Framework + void InitData() + { + ResultNumber.Total = _tcIDList.Count; + ResultNumber.Pass = 0; + ResultNumber.Fail = 0; + ResultNumber.Block = 0; + _tcInfoList = new List(); + foreach (var testcaseItem in _listItem) + { + foreach (KeyValuePair pair in _tRunner.GetTestList()) + { + if (testcaseItem.TCName.Equals(pair.Key)) + { + List preconditions = new List(); + preconditions.Add("Preconditions:"); + List steps = new List(); + steps.Add("Steps:"); + List postconditions = new List(); + postconditions.Add("Postconditions:\n"); + IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); + while (customAttributes.MoveNext()) + { + if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + { + steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + { + preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + { + postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + } + _tcInfoList.Add(new TestcaseInfo + { + TestcaseName = pair.Key, + Preconditions = preconditions, + Steps = steps, + Postconditions = postconditions, + }); + break; + } + } + UpdateCurrentTCInfo(); + } + } + + //The data in CurrentTCInfo list will be show in _detailList. + void UpdateCurrentTCInfo() + { + _currentTCInfo = new List(); + Tizen.Log.Fatal("NUI", "Print the CurrentTCNum::" + _currentTCNum); + _currentTCInfo.Add("DESCRIPTION:#" + (_currentTCNum + 1)); + string[] str = _tcInfoList[_currentTCNum].TestcaseName.Split('.'); + _currentTCInfo.Add("CLASS:" + str[str.Length - 2]); + _currentTCInfo.Add("METHOD:" + str[str.Length - 1]); + for(int index = 0; index < _tcInfoList[_currentTCNum].Preconditions.Count; index++) + { + _currentTCInfo.Add(_tcInfoList[_currentTCNum].Preconditions[index]); + } + for(int index = 0; index < _tcInfoList[_currentTCNum].Steps.Count; index++ ) + { + _currentTCInfo.Add(_tcInfoList[_currentTCNum].Steps[index]); + } + for(int index = 0; index < _tcInfoList[_currentTCNum].Postconditions.Count; index++ ) + { + _currentTCInfo.Add(_tcInfoList[_currentTCNum].Postconditions[index]); + } + Tizen.Log.Fatal("NUI", "the CurrentTCNum::" + _currentTCNum); + } + + private void OnSingleTestDone(object sender, SingleTestDoneEventArgs e) + { + //Test when will this event will be triggered + Tizen.Log.Fatal("NUI", "OnSingleTestDone has been triggered!"); + // check old result + if (_listItem[_currentTCNum].Result.Contains(StrResult.FAIL)) + { + ResultNumber.Fail = ResultNumber.Fail - 1; + } + else if (_listItem[_currentTCNum].Result.Contains(StrResult.PASS)) + { + ResultNumber.Pass = ResultNumber.Pass - 1; + } + else if (_listItem[_currentTCNum].Result.Contains(StrResult.BLOCK)) + ResultNumber.Block = ResultNumber.Block - 1; + + // Update new result + _listItem[_currentTCNum].Result = e.Result; + if (e.Result.Contains(StrResult.PASS)) + { + ResultNumber.Pass += 1; + } + else if (e.Result.Contains(StrResult.FAIL)) + { + ResultNumber.Fail += 1; + } + else if (e.Result.Contains(StrResult.BLOCK)) + { + ResultNumber.Block += 1; + } + + FlexibleViewViewHolder holder = _initList?.FindViewHolderForAdapterPosition(_currentTCNum); + if (holder != null) + { + string testcaseName = "#." + (_currentTCNum + 1).ToString() + _tcIDList[_currentTCNum]; + string resultText = "[" + _listItem[(int)_currentTCNum].Result + "]"; + string text = testcaseName + resultText; + Button btn = holder.ItemView as Button; + btn.Text = text; + _adapter?.UpdateItemData(_currentTCNum, _listItem); + } + SetSummaryResult(); + _notRun.Text = _listItem[_currentTCNum].Result; + } + + public void LockUIButton() + { + _runButton.IsEnabled = false; + } + + public void UnlockUIButton() + { + _runButton.IsEnabled = true; + } + } +} + diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/images/controller_btn_check_on.png b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/images/controller_btn_check_on.png new file mode 100755 index 0000000000000000000000000000000000000000..9a3af3a09fd972d112d938b34c8c3897d217ecf3 GIT binary patch literal 1188 zcmaJ>TWAzl7#>_u2?X*I#Q5NJQmcYY29N`%hNoXw8O%o%6S zx|=8nzKA}k2PW1O}Yj5jnqbRC9zuhd7S%{z2E6ICs#r$zHt;N|PJb)^=ZiSHQbx;}7dCwYw zMQAzW2Y-M)6qWGZ(hwdh?9y%IaaL@@HN1eJDXM2{Be3jIi0LvMas4zibN?%bcAYdc zC>Ml6V8E)oeIkSd6MZFnV${|gX6vVPPeUgJ9>f;i@W%W|Z={(8UY)GtW1gWGOz>!$ zSrj!?=%)=7LR#h&)&>C3s>T61l@#SIv?u_X7c?FStN?T%=%PS32SdDtPDL-8xu!3& zOEXoB1D)sV^*UEiawr_(fu?D^Ao8Nf5(_pO_p#Mr{iwUeV8X}_-2l7Dr(;H|jA}T| z5T%P(@Pa~NiP(>tfg&N}8&<#rPT)N+zSn|vgp2S$8OvHnrSSmrMHr!4Xp?+Yx?5lp zyAL~x4T&0kcj%I&SYsx#YaaA*-b^#(3+K3wZb?>BlQh6q%8tUS6)DMNZ22~9`F4r#CRY6*RyRUu zVHB1S8f#TSe-&XARZ&12Mx1qt-Zbd?4ys3+<1{Va+JvEd2s*hCdGtb@b$1yJLdp~j z(NrWw&BgjPQO#z1)r?FIGKxg>FJhf#V%Nl~@5S;&3?CQC|B9w{L@F^}F0}yJEHx4I zN#}&5MLyQMc98b^IdArs8c(L5+-dtp==grt{C02Gk)B#q8yJ4GVy^Sz^k4b!^1+Gq zrH@v>I6JA$uR8T8^W)!-c3!x68t6aSm);(GHg{hB=gxlk@Ur&DgX%aPV%@>cSHr~7byHv`oOYFV7?$^ZE6#Z`MllV{Zz9Gn0l4l}y zWwo8+{(Ly2&F=Ya|Iw$Pb)J9y>dO7T^>3b5PTx4Z;mbL{^X1XWdsKo-Jm?lXCc%N2 NFrV!+Z)H9|_Ag}CfoK2# literal 0 HcmV?d00001 diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/images/rectangle_btn_shadow.png b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/images/rectangle_btn_shadow.png new file mode 100755 index 0000000000000000000000000000000000000000..df385f1ac93d827a9142148af02426f705dd143a GIT binary patch literal 1368 zcmeAS@N?(olHy`uVBq!ia0vp^79h;Q1|(OsS<3+_$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%xak-5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8hm3bwJ6}oxF$}kgLQj3#|G7CyF^YauyCMG83 zmzLNn0bL65LT-VtFWlg~VrW1CgG|37u|VHY&pf(~1RD?6IsxA(xEJ)Q4 zN-fSWElLK)N18HBGcfG%TLe-Fbd8luesXDUYF>$_i>(q+L@y;X#mdRZ+`z)k$i>XU z$j#8u)f^atE>4DK&Mp>)ZcZkShA_RJdBr7(dC93Ty_pET&Up1&ITxiSmgE=c`5nj#hRetg}OGiD6=dz#jPkmR{sBcEG(RJ&IOCPQ0E@YJd(RxH7JOltva~qg7xQLduznA1bg=$|IQwN z@BKTOKOfFL{}kM;5a6O08d_f~H}_{j%QRN6IYNuia6YP8&ZDt@irxNsY(jlswXbHC z>d!xadu2#g>}8W!mbveL&wIVgZ}rt(8e-k)C9gY;{*-JCpYlFt)7?Dz=S4eZC&u6O zTVCwhCY&XI)6eb4--?|vb^@};wPv54HP!3sgj=pwrs_D%?b4lmphGF%HKnySoQXrBfq@v}hkJs8b%Du(NvuyR=dJ%R z^P<3wa+%{(Sv{szr`kyTW_@$@^;hl4hC7#%Yb^w<{r{#dzG$&2x7s@;X7kNG8+Be! zxfOlt_LC#}v)A9znCkVr)hW?>@=2A_*#54DPqpN{ZM|h$`@gs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oSy+k@@* z+g?q)^4>o7ME2FpKfiyLJ>9kT%hcpleU=2Px#G)bep=SkQm13K-Rt{3t?OmYN&Tvv ziiiFjtAD<*NcGDCt}Q2JwWgn%Trah7@2Z)f)?DU(>TqJS(T3$cQ(L)fICp-T7AIM; zWY3O@Ypd&(%@17pu3M0DQA|xxBa*FQhSlvo^R^4e+VWp=uC8)mm&54IH + + Testing Context Menu + + + +

Context Menu Test Page

+

Please right click below image.

+ Test image + + diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/index.html b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/index.html new file mode 100755 index 0000000..10e4f94 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/index.html @@ -0,0 +1,11 @@ + + + + Title of the document + + +

Heading

+

This is photo

+ tizen + + \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/openwindow.html b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/openwindow.html new file mode 100755 index 0000000..55a0090 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/openwindow.html @@ -0,0 +1,17 @@ + + + + + + + +
+ +
+ + + diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/tizen.png b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/tizen.png new file mode 100755 index 0000000000000000000000000000000000000000..46b80abf2bf1905fe50be47c187d047ee013198f GIT binary patch literal 3994 zcmaJ^c{o)4-_}aDEK`=m7z$x#Ft%YVWogJhWesCyEHR6jVI)RE%8;$>As$Id$P$uB zWY3f}OZMyu$=W+Tzo+N-{_*yn>zwmluKT_}pU?MmU)QGcKT^*oy0GuU&$5GM10K5-@0uMld{?>)F=D)TfAmHB+sy71k zpQP-}EP>~UWE@ZxtfGj4Dk%Z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kE!pTic3RpNV7%t-j) zAg|<{;n+GfLk}wOUNsWe;x^lBaF;{{{yd@lm%V=Re2(&^nX0#K#x`1qn8zSOdNd(FG9YUpuJ&?D{K=Igsi6N z(dqV2xxI(qD9db}Zl*qx4%?9#KK8udn;o?G!$KoN(u) zR?-QyMuK!-Z?FGF6w08yL2K!S6l1czB-d}~EbN3G)k$Fv4yF~{Z)CYj}Mb4T5IXeKMxAC!4y&*3w2xDfBh{Z4b2UT&br?C EA7ry5_W%F@ literal 0 HcmV?d00001 diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/webform.html b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/webform.html new file mode 100755 index 0000000..3fc93eb --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/webform.html @@ -0,0 +1,16 @@ + + + + +

Display a Password Field

+ +
+ +

+ +

+ +
+ + + \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/webscrolledge.html b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/webscrolledge.html new file mode 100755 index 0000000..98b5871 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/res/webview/webscrolledge.html @@ -0,0 +1,45 @@ + + + +Page Title + + + +

This is a testing page for scrolling to bottom edge

+

Please scroll to bottom!

+
+
+
+

Please continue to scroll to bottom!

+
+
+
+
+
+
+

Please continue to scroll to bottom!

+
+
+
+
+
+

Please continue to scroll to bottom!

+
+
+
+
+
+
+
+

Please continue to scroll to bottom!

+
+
+
+
+
+
+
+
+

You have scrolled to bottom edge!

+ + \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/shared/res/Tizen.NUI.Devel.Manual.Tests.png b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/shared/res/Tizen.NUI.Devel.Manual.Tests.png new file mode 100755 index 0000000000000000000000000000000000000000..9765b1bda7e5bddf0925555ab204b887a873bf24 GIT binary patch literal 57662 zcmdU&2Y{Bv)wXAQhoyJerGpfaq9DE5J1S~atXN|Avn3kQ*!`l$D2ie%v3Ct9iU9$! zARxVWkS4wCvh_dLJny{>uV6_upZ~zTGjrz5nKS2}_RLfEz7vl>A}6zMrgJXms3ZHI zY~lal(^KvD>g2b^T99$|k!M`zTvj!Ff*bL4ZRavixU^rt6HmP4s_U=1?vksn&O54K zzr3rjz3Spie}9p4H!U1_%FscltgqRlVCl}j$J~4S-;TNJ8N(x+7h3`nl`#k2P&{pByWKUm|WHre-Q&QDvN|NLL>eBs{vzbanwhZioN zJGS84sb!<)^<4YLj*;(APaB_}{rHg`PwISo_N#pxR#|@M=aVL{SlzDou*{}cyWI5m zFU-HLv`K<1ysdlpgBp)d`cVb&Nq{W}Uo#k#HS@`5165LsT%de5} z>?1C(+C}&Fcb6RQ-k5&c{R7 zy7#VDF8L2`$QMnT+~ofJq^mw~`{~`c9rRZ2+SX>NC*SKnrfJs!!_G=?drjKur?+d^ za@tX~4yxYeyu|ZH^lmrd<|peMGOSbO`OD}^=eFH2 zF15Vz`RA`HTQmLjt9v`Q;`-ZWl(lL9e%;#-Prdz$vgey^PQK)vtY`nH;DL+ZtK55( zdv^W8(|25rZ3aB|@R$V))~sGV|L945&pPj`({C*sI^o>$rQvN1Z=raO>);PO5s%U;2-D zaK|ApHomX#Ut4|FY-ag|E0?t?PU^X=vwP>Vo(X?=r0pwbUy!u>m=?K%uOGj%z`5-o zU-jwimgz~iUvlS)={J^d=~a5fv(4P?7a#T4Yn(f$f75n@zIwmc=jqP%e|A{wcly-Z z`DyJo<5TN@nzH!Qtdb#J{@l0eqzQd<`(|Evd;M#Nw0h%?zAf*b`c8w^L)y>o-JsL> zlP9wA`t1$o5 zBa^E>&@}JMd#j(+_?SmJAKBsL`v>KndSrv`J+4jcde83$e)P!UU${f=D7ky=5gqMx?DE{&Z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KmR{oN3@*X{2^C5O$DP8HE&8W8hI-bfv}r zLm?dqClFOubrXh8^{FoLS^1eJ>rn&qMdJs|Uwo2!1ic#Vf?b-djrddQ~P z@y7aJ0~5V)`)m9EIjE6pUO5nCT29W(%d2Uh+WEa1@I+I(nS~L$K_g`J5D3ZoPeU1s z5cx_Y*XlJ=`63J7wzuLQTfTfbkIwQS&96GmQuqE`sGIVCGoVT#LQ@oQnVOTEHf`F% zHdQ=f(Z}d*jOItM8iUb8Z}}A?4*G$d%7-CwdC7^%U_{O~AjjFw?|;~{!}Bd4Aemyn zzb!scrN07Q`iG)_lb}jLQd`!VcPK4UMIq`6?FY>(F@k_}g5RW$5yke+hYkW}9Kd?XEQzUukRQ0^7NMWv|@x zwG+T&6#DSD0;1`&kBdyQ56LC)MX~>1olS!p$pSkJiQ^PTspwbpG9e!D!m!-zBA%$k kZ}gYfNaCF}xV$|1>H6z0+kD tcs = new TaskCompletionSource(false); + EventHandler onLoadFinished = (s, e) => + { + Log.Info(tag, "onLoadFinished is called."); + tcs.TrySetResult(true); + }; + Log.Info(tag, "onLoadFinished is called."); + _webView.PageLoadFinished += onLoadFinished; + _webView.ContextMenuShown += OnContextMenuShown; + Log.Info(tag, "onLoadFinished is called."); + _webView.LoadUrl(urlForContextMenu); + + Log.Info(tag, "onLoadFinished is called."); + var result = await tcs.Task; + Assert.IsTrue(result, "PageLoadFinished event should be invoked"); + + Log.Info(tag, "onLoadFinished is called."); + + // Waits for user confirmation. + await ManualTest.WaitForConfirm(); + _webView.PageLoadFinished -= onLoadFinished; + _webView.ContextMenuShown -= OnContextMenuShown; + _window.GetDefaultLayer().Remove(_webView); + } + } + + [Test] + [Category("P1")] + [Description("Test: Handle event. Try to long-press to trigger the event.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.WebView.ContextMenuShown E")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "EVL")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Precondition(1, "In case of Emulator, only use PC keyboard or remote controller of emulator itself.")] + [Precondition(2, "If test on TV, prepare mouse and connect to TV.")] + [Step(1, "Click to runt TC.")] + [Step(2, "Long press image of test page.")] + [Step(3, "If there is no exception, test will be automatically passed.")] + [Postcondition(1, "NA")] + public async Task ContextMenuHidden_CB() + { + if (ManualTest.IsWearable()) + { + _wearTestPage.ExecuteTC(_label); + await ManualTest.WaitForConfirm(); + _wearTestPage.ClearTestCase(_label); + } + else + { + _window.GetDefaultLayer().Add(_webView); + FocusManager.Instance.SetCurrentFocusView(_webView); + + TaskCompletionSource tcs = new TaskCompletionSource(false); + EventHandler onLoadFinished = (s, e) => + { + Log.Info(tag, "onLoadFinished is called."); + tcs.TrySetResult(true); + }; + Log.Info(tag, "onLoadFinished is called."); + _webView.PageLoadFinished += onLoadFinished; + + EventHandler onContextMenuShown = (s, e) => + { + Log.Info(tag, "onContextMenuShown is called."); + if (_menu == null) + { + _menu = new Button(); + _menu.Text = "Click here to trigger menu hide event."; + _menu.Feedback = false; + _menu.PointSize = 20.0f; + _menu.BackgroundColor = Color.Cyan; + _menu.Size = new Size(Window.Instance.Size.Width * 0.1f, Window.Instance.Size.Height * 0.05f); + _menu.Clicked += OnMenuClicked; + _window.GetDefaultLayer().Add(_menu); + } + _contextMenu = e.ContextMenu; + }; + _webView.ContextMenuShown += onContextMenuShown; + + _webView.ContextMenuHidden += OnContextMenuHidden; + Log.Info(tag, "onLoadFinished is called."); + _webView.LoadUrl(urlForContextMenu); + + Log.Info(tag, "onLoadFinished is called."); + var result = await tcs.Task; + Assert.IsTrue(result, "PageLoadFinished event should be invoked"); + + Log.Info(tag, "onLoadFinished is called."); + + // Waits for user confirmation. + await ManualTest.WaitForConfirm(); + _webView.PageLoadFinished -= onLoadFinished; + _webView.ContextMenuShown -= OnContextMenuShown; + _webView.ContextMenuHidden -= OnContextMenuHidden; + _window.GetDefaultLayer().Remove(_webView); + } + } + + [Test] + [Category("P1")] + [Description("Test: Handle event. Try to sroll to edge to trigger the event.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.WebView.ScrollEdgeReached E")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "EVL")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Precondition(1, "In case of Emulator, only use PC keyboard or remote controller of emulator itself.")] + [Precondition(2, "If test on TV, prepare mouse and connect to TV.")] + [Step(1, "Click to runt TC.")] + [Step(2, "Scroll testing page to edge.")] + [Step(3, "If there is no exception, test will be automatically passed.")] + [Postcondition(1, "NA")] + public async Task ScrollEdgeReached_CB() + { + if (ManualTest.IsWearable()) + { + _wearTestPage.ExecuteTC(_label); + await ManualTest.WaitForConfirm(); + _wearTestPage.ClearTestCase(_label); + } + else + { + _window.GetDefaultLayer().Add(_webView); + FocusManager.Instance.SetCurrentFocusView(_webView); + + TaskCompletionSource tcs = new TaskCompletionSource(false); + EventHandler onLoadFinished = (s, e) => + { + Log.Info(tag, "onLoadFinished is called."); + tcs.TrySetResult(true); + }; + Log.Info(tag, "onLoadFinished is called."); + _webView.PageLoadFinished += onLoadFinished; + + EventHandler onScrollEdgeReached = (s, e) => + { + Log.Info(tag, "TUnit WebView.ScrollEdgeReached!!!!!!!!!!!!!!!!!!!!!"); + ManualTest.Confirm(); + }; + _webView.ScrollEdgeReached += onScrollEdgeReached; + Log.Info(tag, "onLoadFinished is called."); + _webView.LoadUrl(urlForScrollEdge); + + Log.Info(tag, "onLoadFinished is called."); + var result = await tcs.Task; + Assert.IsTrue(result, "PageLoadFinished event should be invoked"); + + Log.Info(tag, "onLoadFinished is called."); + + // Waits for user confirmation. + await ManualTest.WaitForConfirm(); + _webView.PageLoadFinished -= onLoadFinished; + _webView.ScrollEdgeReached -= onScrollEdgeReached; + _window.GetDefaultLayer().Remove(_webView); + } + } + + [Test] + [Category("P1")] + [Description("Test: Handle event. Try to sroll to edge to trigger the event.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.WebView.NewWindowCreated E")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "EVL")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Precondition(1, "In case of Emulator, only use PC keyboard or remote controller of emulator itself.")] + [Precondition(2, "If test on TV, prepare mouse and connect to TV.")] + [Step(1, "Click to runt TC.")] + [Step(2, "Click button to open new window.")] + [Step(3, "If there is no exception, test will be automatically passed.")] + [Postcondition(1, "NA")] + public async Task NewWindowCreated_CB() + { + if (ManualTest.IsWearable()) + { + _wearTestPage.ExecuteTC(_label); + await ManualTest.WaitForConfirm(); + _wearTestPage.ClearTestCase(_label); + } + else + { + _window.GetDefaultLayer().Add(_webView); + FocusManager.Instance.SetCurrentFocusView(_webView); + + TaskCompletionSource tcs = new TaskCompletionSource(false); + EventHandler onLoadFinished = (s, e) => + { + Log.Info(tag, "onLoadFinished is called."); + tcs.TrySetResult(true); + }; + Log.Info(tag, "onLoadFinished is called."); + _webView.PageLoadFinished += onLoadFinished; + + EventHandlerWithReturnType onNewWindowCreated = (s, e) => + { + Log.Info(tag, "TUnit WebView.NewWindowCreated!!!!!!!!!!!!!!!!!!!!!"); + ManualTest.Confirm(); + return null; + }; + _webView.NewWindowCreated += onNewWindowCreated; + Log.Info(tag, "onLoadFinished is called."); + _webView.LoadUrl(urlForOpenWindow); + + Log.Info(tag, "onLoadFinished is called."); + var result = await tcs.Task; + Assert.IsTrue(result, "PageLoadFinished event should be invoked"); + + Log.Info(tag, "onLoadFinished is called."); + + // Waits for user confirmation. + await ManualTest.WaitForConfirm(); + _webView.PageLoadFinished -= onLoadFinished; + _webView.NewWindowCreated -= onNewWindowCreated; + _window.GetDefaultLayer().Remove(_webView); + } + } + + //TODO... FormRepostPolicyDecided event is very hard to be triggered. And this event is used rarely. + //[Test] + //[Category("P1")] + //[Description("Test: Handle event. Try to sroll to edge to trigger the event.")] + //[Property("SPEC", "Tizen.NUI.BaseComponents.WebView.FormRepostPolicyDecided E")] + //[Property("SPEC_URL", "-")] + //[Property("CRITERIA", "EVL")] + //[Property("AUTHOR", "guowei.wang@samsung.com")] + //[Precondition(1, "In case of Emulator, only use PC keyboard or remote controller of emulator itself.")] + //[Precondition(2, "If test on TV, prepare mouse and connect to TV.")] + //[Step(1, "Click to runt TC.")] + //[Step(2, "Click submit button.")] + //[Step(3, "Click submit button again to simulate form repost.")] + //[Step(4, "If there is no exception, test will be automatically passed.")] + //[Postcondition(1, "NA")] + //public async Task FormRepostPolicyDecided_CB() + //{ + // if (ManualTest.IsWearable()) + // { + // _wearTestPage.ExecuteTC(_label); + // await ManualTest.WaitForConfirm(); + // _wearTestPage.ClearTestCase(_label); + // } + // else + // { + // _window.GetDefaultLayer().Add(_webView); + // FocusManager.Instance.SetCurrentFocusView(_webView); + + // TaskCompletionSource tcs1 = new TaskCompletionSource(false); + // EventHandler onLoadFinished = async (s, e) => + // { + // if (_webView.Url.Contains("index.html")) + // { + // tcs1.TrySetResult(true); + // } + // }; + // Log.Info(tag, "onLoadFinished is called."); + // _webView.PageLoadFinished += onLoadFinished; + + // EventHandler onFormRepostPolicyDecided = (s, e) => + // { + // Log.Info(tag, "TUnit WebView.FormRepostPolicyDecided!!!!!!!!!!!!!!!!!!!!!"); + // ManualTest.Confirm(); + // }; + // _webView.FormRepostPolicyDecided += onFormRepostPolicyDecided; + // EventHandlerWithReturnType onTouched = (s, e) => + // { + // // Load index.html. + // Log.Info(tag, "TUnit WebView.TouchEvent !!!!!!!!!!!!!!!!!!!!!"); + // _webView.LoadUrl(url); + // return false; + // }; + // _webView.TouchEvent += onTouched; + // Log.Info(tag, "onLoadFinished is called."); + // _webView.LoadUrl(urlForFormSubmit); + + // Log.Info(tag, "onLoadFinished is called."); + // var result = await tcs1.Task; + // Assert.IsTrue(result, "PageLoadFinished event should be invoked"); + + // if (_webView.CanGoBack()) + // { + // Log.Info(tag, $"GoBack is called. url: {_webView.Url}"); + // _webView.GoBack(); + // } + + // _webView.PageLoadFinished -= onLoadFinished; + + // // Waits for user confirmation. + // await ManualTest.WaitForConfirm(); + // _webView.FormRepostPolicyDecided -= onFormRepostPolicyDecided; + // _window.GetDefaultLayer().Remove(_webView); + // } + //} + } +} diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/tizen-manifest.xml b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/tizen-manifest.xml new file mode 100755 index 0000000..c1155d3 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Manual.Tests/tizen-manifest.xml @@ -0,0 +1,21 @@ + + + + + Tizen.NUI.Devel.Manual.Tests.png + + + + http://tizen.org/privilege/appmanager.launch + http://tizen.org/privilege/window.priority.set + http://tizen.org/privilege/filesystem.write + http://tizen.org/privilege/internet + http://tizen.org/privilege/mediastorage + http://tizen.org/privilege/externalstorage + + -- 2.7.4