[ElmSharp][Non-ACR] Except TC related to product TV specification feature 34/216834/3
authorJeonghyun Yun <jh0506.yun@samsung.com>
Mon, 4 Nov 2019 01:42:30 +0000 (10:42 +0900)
committerJeonghyun Yun <jh0506.yun@samsung.com>
Mon, 4 Nov 2019 03:11:01 +0000 (12:11 +0900)
Change-Id: I33e974fc3a0f2c33500f65fa5c94754c75368c31
Signed-off-by: Jeonghyun Yun <jh0506.yun@samsung.com>
tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSModeName.cs [new file with mode: 0644]
tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSProfile.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs

diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSModeName.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSModeName.cs
new file mode 100644 (file)
index 0000000..a3afdb6
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ *  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 NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using System.Threading.Tasks;
+using Tizen.System;
+
+namespace ElmSharp.Tests {
+
+    [TestFixture]
+    [Description("ElmSharp.Manual Tests")]
+    public class ElmSharpModelName {
+
+        private static string _nameKey = "tizen.org/system/model_name";
+        private static string _name = string.Empty;
+
+        public static string GetModelName()
+        {
+            if(string.IsNullOrEmpty(_name))
+                Information.TryGetValue<string>(_nameKey, out _name);
+
+            return _name;
+        }
+    }
+}
old mode 100755 (executable)
new mode 100644 (file)
index 3b32380..025083f
@@ -28,6 +28,7 @@ namespace ElmSharp.Tests {
 
         public static string MobileProfile = "mobile";
         public static string WearableProfile = "wearable";
+        public static string TvProfile = "tv";
         private static string _profileKey = "tizen.org/feature/profile";
         private static string _profile = string.Empty;
 
index ea48a80f9d0885a471e4c916a8367d521719ecda..0ffb7916504fb35bbbcec4cc9b9fb0fe49c39e99 100644 (file)
@@ -601,7 +601,7 @@ namespace ElmSharp.Tests
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "UILK")]
         [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")]
-        [Precondition(1, "NA")]
+        [Precondition(1, "This test will be automatically passed on TV product due to the difference UX of InputPanel.")]
         [Step(1, "Click Run TC")]
         [Step(2, "Input Entry.")]
         [Step(3, "Check Entry InputPanel is Number type or not.")]
@@ -610,10 +610,19 @@ namespace ElmSharp.Tests
         [Postcondition(1, "NA")]
         public async Task SetInputPanelLayout_UILK()
         {
-            CreateEntry();
-            _entry.SetInputPanelLayout(InputPanelLayout.NumberOnly);
-            // Waits for user confirmation.
-            await ManualTest.WaitForConfirm();
+            if ((ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.TvProfile) == 0) &&
+                (ElmSharpModelName.GetModelName().CompareTo("xu3") != 0))
+            {
+                _testPage.UnlockUIButton();
+                Assert.Pass("Not Supported");
+            }
+            else
+            {
+                CreateEntry();
+                _entry.SetInputPanelLayout(InputPanelLayout.NumberOnly);
+                // Waits for user confirmation.
+                await ManualTest.WaitForConfirm();
+            }
         }
 
         [Test]
@@ -623,7 +632,7 @@ namespace ElmSharp.Tests
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "UILK")]
         [Property("AUTHOR", "Yan Zhao, yan97.zhao@samsung.com")]
-        [Precondition(1, "NA")]
+        [Precondition(1, "This test will be automatically passed on TV product due to the difference UX of InputPanel.")]
         [Step(1, "Click Run TC")]
         [Step(2, "Input Entry.")]
         [Step(3, "Check the 'return button' in Entry InputPanel shows as 'Done' button")]
@@ -632,10 +641,19 @@ namespace ElmSharp.Tests
         [Postcondition(1, "NA")]
         public async Task SetInputPanelReturnKeyType_UILK()
         {
-            CreateEntry();
-            _entry.SetInputPanelReturnKeyType(InputPanelReturnKeyType.Done);
-            // Waits for user confirmation.
-            await ManualTest.WaitForConfirm();
+            if ((ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.TvProfile) == 0) &&
+                (ElmSharpModelName.GetModelName().CompareTo("xu3") != 0))
+            {
+                _testPage.UnlockUIButton();
+                Assert.Pass("Not Supported");
+            }
+            else
+            {
+                CreateEntry();
+                _entry.SetInputPanelReturnKeyType(InputPanelReturnKeyType.Done);
+                // Waits for user confirmation.
+                await ManualTest.WaitForConfirm();
+            }
         }
 
         [Test]