private FlexibleView _initList;\r
private ListBridge _adapter;\r
private TableView _detailList;\r
+ private View _exceptionLabelContainer;\r
private View _buttonContainer;\r
private View _buttonContainer2;\r
private TableView _firstPageContainer;\r
CreateTestCase();\r
}\r
\r
+ public void AddExceptionLabel(string info)\r
+ {\r
+ TextLabel exceptionLabel = new TextLabel();\r
+ exceptionLabel.ParentOrigin = Position.ParentOriginTopLeft;\r
+ exceptionLabel.PivotPoint = PivotPoint.TopLeft;\r
+ exceptionLabel.Position = new Position(0.0f, 0.0f, 0.0f);\r
+ exceptionLabel.Size2D = new Size2D((int)(Window.Instance.Size.Width * 0.9895), (int)(Window.Instance.Size.Height * 0.0462));\r
+ exceptionLabel.HorizontalAlignment = HorizontalAlignment.Begin;\r
+ exceptionLabel.PointSize = _pointSize;\r
+ exceptionLabel.MultiLine = true;\r
+ exceptionLabel.Ellipsis = false;\r
+ exceptionLabel.Text = info + " is not support on this profile.\nSo, you can not test this TC. please mark as PASS";\r
+ _exceptionLabelContainer.Add(exceptionLabel);\r
+ }\r
+\r
void InitializeDetailPage()\r
{\r
_detailList = new TableView(23, 1);\r
CreateDetailList();\r
_detailView.Add(_detailList);\r
\r
+ // label printing view\r
+ _exceptionLabelContainer = new View();\r
+ _exceptionLabelContainer.Focusable = true;\r
+ _exceptionLabelContainer.PivotPoint = PivotPoint.TopLeft;\r
+ _exceptionLabelContainer.ParentOrigin = Position.ParentOriginTopLeft;\r
+ _exceptionLabelContainer.Position = new Position(0, Window.Instance.Size.Height * 0.58f, 0);\r
+ _exceptionLabelContainer.Size = new Size(Window.Instance.Size.Width * 0.8f, Window.Instance.Size.Height * 0.1f);\r
+ _detailView.Add(_exceptionLabelContainer);\r
+\r
//To Place the function button, such as PASS, FAIL.....\r
_buttonContainer = new View();\r
_buttonContainer.PivotPoint = PivotPoint.TopLeft;\r
mLabel.Size2D = new Size2D(300, 50);
return mLabel;
}
+
+ public static void DisplayExceptionLabel(string info)
+ {
+ ManualTestNUI.GetInstance().AddExceptionLabel(info);
+ }
}
enum NavigationButton
using Tizen.NUI.BaseComponents;
using System.Threading.Tasks;
using Tizen.NUI.WindowSystem;
-using ElmSharp;\r
-using Microsoft.VisualBasic.FileIO;\r
-\r
+using ElmSharp;
+using Microsoft.VisualBasic.FileIO;
+
namespace Tizen.NUI.WindowSystem.Tests
{
[TestFixture]
[Postcondition(1, "N/A")]
public async Task OrientationChanged_EVENT()
{
+ string profile;
+ bool isAvailableFeature = false;
+
+ System.Information.TryGetValue<string>("http://tizen.org/feature/profile", out profile);
+ if (String.Compare(profile, "mobile", true) == 0 ||
+ String.Compare(profile, "wearable", true) == 0)
+ {
+ Tizen.Log.Info(TAG, "Device is support quickpanel : " + profile);
+ isAvailableFeature = true;
+ }
+ else
+ {
+ // Common profile could not test Orientation changed event.
+ Tizen.Log.Info(TAG, "Device is not support quickpanel : " + profile);
+ isAvailableFeature = false;
+ }
+
/* TEST CODE */
- Shell.TizenShell tzsh = new Shell.TizenShell();
- Window win = NUIApplication.GetDefaultWindow();
- var qpClient = new Shell.QuickPanelClient(tzsh, win, Shell.QuickPanelClient.Types.SystemDefault);
+ try
+ {
+ Shell.TizenShell tzsh = new Shell.TizenShell();
+ Window win = NUIApplication.GetDefaultWindow();
+ var qpClient = new Shell.QuickPanelClient(tzsh, win, Shell.QuickPanelClient.Types.SystemDefault);
- if (!ManualTest.IsMobile())\r
- {\r
- ManualTest.Confirm();\r
+ if (!ManualTest.IsMobile())
+ {
+ ManualTest.Confirm();
+ }
+ else
+ {
+ qpClient.OrientationChanged += OnOrientationEvent;
+ await ManualTest.WaitForConfirm();
+ qpClient.OrientationChanged -= OnOrientationEvent;
+ }
}
- else\r
- {\r
- qpClient.OrientationChanged += OnOrientationEvent;\r
- await ManualTest.WaitForConfirm();\r
- qpClient.OrientationChanged -= OnOrientationEvent;\r
+ catch (NotSupportedException)
+ {
+ if (!isAvailableFeature)
+ {
+ ManualTest.DisplayExceptionLabel("OrientationChanged_EVENT");
+ await ManualTest.WaitForConfirm();
+ }
}
}
}
[SetUp]\r
public void Init()\r
{\r
+ string profile;\r
+\r
Tizen.Log.Info(TAG, "Init() is called!");\r
+\r
+ System.Information.TryGetValue<string>("http://tizen.org/feature/profile", out profile);\r
+ if (String.Compare(profile, "mobile", true) == 0 ||\r
+ String.Compare(profile, "wearable", true) == 0 ||\r
+ String.Compare(profile, "common", true) == 0)\r
+ {\r
+ Tizen.Log.Info(TAG, "Device is support quickpanel : " + profile);\r
+ }\r
+ else\r
+ {\r
+ Tizen.Log.Info(TAG, "Device is not support quickpanel : " + profile);\r
+ Assert.Pass("Device is not support Quickpanel. passed.");\r
+ }\r
}\r
\r
[TearDown]\r
[SetUp]\r
public void Init()\r
{\r
+ string profile;\r
+\r
Tizen.Log.Info(TAG, "Init() is called!");\r
+\r
+ System.Information.TryGetValue<string>("http://tizen.org/feature/profile", out profile);\r
+ if (String.Compare(profile, "mobile", true) == 0 ||\r
+ String.Compare(profile, "wearable", true) == 0 ||\r
+ String.Compare(profile, "common", true) == 0)\r
+ {\r
+ Tizen.Log.Info(TAG, "Device is support quickpanel : " + profile);\r
+ }\r
+ else\r
+ {\r
+ Tizen.Log.Info(TAG, "Device is not support quickpanel : " + profile);\r
+ Assert.Pass("Device is not support Quickpanel. passed.");\r
+ }\r
}\r
\r
[TearDown]\r