[Information][Manual][Non-ACR] Arrange precondition 66/216166/3
authorKichan Kwon <k_c.kwon@samsung.com>
Tue, 22 Oct 2019 01:08:24 +0000 (10:08 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Tue, 22 Oct 2019 01:22:48 +0000 (10:22 +0900)
- Vibration : check newly created feature
- Audiojack : test only on mobile profile
- Bluetooth : except on DA devices
- Remove wearable exception : model-config is fixed

Change-Id: Iec86996515d9c9479a29e6ddba09fd33797ab1de
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
tct-suite-vs/Tizen.Information.Manual.Tests/support/SupportChecker.cs
tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSInformation.cs
tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSRuntimeFeatureStatusChangedEventArgs.cs

index 172a3dcc9eefff338c799bb95fca23cfb5ff7f9f..b9950f0b5b279f477bec1d9405a195045a01fb43 100755 (executable)
@@ -1,7 +1,6 @@
 
 namespace Tizen.System.Tests
 {
-
     public class SupportChecker
     {
         public static bool IsSupported(string feature)
@@ -12,42 +11,58 @@ namespace Tizen.System.Tests
                 return supported;
 
             return false;
+        }\r
+\r
+        public enum Profile\r
+        {\r
+            tv,\r
+            wearable,\r
+            mobile,\r
         }
 
-        public static bool IsTV()
-        {
-            bool is_successful = Tizen.System.Information.TryGetValue<string>("http://tizen.org/feature/profile", out string profile);
-
-
-                if (is_successful && string.Compare(profile, "tv") == 0)
-                return true;
-
-            return false;
-        }
-
-        public static bool IsWearable()
-        {
-            bool is_successful = Tizen.System.Information.TryGetValue<string>("http://tizen.org/feature/profile", out string profile);
-
-            if (is_successful && string.Compare(profile, "wearable") == 0)
-                return true;
-
-            return false;
+        public static bool IsSpecificProfile(Profile profile)\r
+        {\r
+            bool is_successful = Tizen.System.Information.TryGetValue<string>("http://tizen.org/feature/profile", out string val);\r
+\r
+            if (!is_successful)\r
+                return false;\r
+\r
+            if (string.Compare(val, profile.ToString()) != 0)\r
+                return false;\r
+\r
+            // DA platform is based on mobile profile, so we have to exclude it\r
+            if (profile == Profile.mobile && IsDA())\r
+                return false;\r
+\r
+            return true;\r
         }
 
         public static bool IsMobileNetworksMenuSupported()
         {
-            bool is_successful;
+            // Mobile networks menu only available in ARM mobile device
 
-            is_successful = Tizen.System.Information.TryGetValue<string>("http://tizen.org/feature/platform.core.cpu.arch", out string arch);
-           if (!is_successful || string.Compare(arch, 0, "arm", 0, 3) != 0)
+            if (!IsSpecificProfile(Profile.mobile))
+                return false;\r
+\r
+            bool is_successful = Tizen.System.Information.TryGetValue<string>("http://tizen.org/feature/platform.core.cpu.arch", out string arch);\r
+            if (!is_successful || string.Compare(arch, 0, "arm", 0, 3) != 0)\r
                 return false;
 
-            is_successful = Tizen.System.Information.TryGetValue<string>("http://tizen.org/feature/profile", out string profile);
-            if (!is_successful || string.Compare(profile, "mobile") != 0)
-                return false;
             return true;
+        }\r
+\r
+        public static bool IsDA()
+        {
+            bool is_successful = Tizen.System.Information.TryGetValue<string>("http://tizen.org/feature/platform.communication_processor", out string cp);
+            if (!is_successful)
+                return false;\r
+\r
+            // QCA9379 : Family Hub (KantM, Meson64)\r
+            // AR1021X : R18 based device\r
+            if (string.Compare(cp, "QCA9379") == 0 || (string.Compare(cp, "AR1021X") == 0))
+                return true;
+
+            return false;
         }
     }
-
 }
index 295d231b0b14c30f826ee9e156bc1d3e29e39e68..c5f9d1ecd679ccd4457c5b769eae4c73db17434b 100755 (executable)
@@ -52,7 +52,9 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "Enable Bluetooth : Settings-> Bluetooth -> Bluetooth Enable")]
         public async Task BluetoothEnabled_CHECK_ENABLE() {
-            if (!SupportChecker.IsTV() && SupportChecker.IsSupported("http://tizen.org/feature/network.bluetooth"))
+            if (SupportChecker.IsSupported("http://tizen.org/feature/network.bluetooth") &&
+                !SupportChecker.IsSpecificProfile(SupportChecker.Profile.tv) &&
+                !SupportChecker.IsDA())
             {
                 Information.SetCallback(Bluetooth, BluetoothEnableCallback);
                 await ManualTest.WaitForConfirm();
@@ -78,8 +80,10 @@ namespace Tizen.System.Tests {
         [Precondition(2, "Bluetooth should be already enabled")]
         [Step(1, "Click run button")]
         [Step(2, "Disable Bluetooth : Settings-> Bluetooth -> Bluetooth Disable")]
-        public async Task BluetoothEnabled_CHECK_DISABLE() {
-            if (!SupportChecker.IsTV() && SupportChecker.IsSupported("http://tizen.org/feature/network.bluetooth"))
+        public async Task BluetoothEnabled_CHECK_DISABLE() {\r
+            if (SupportChecker.IsSupported("http://tizen.org/feature/network.bluetooth") &&\r
+                !SupportChecker.IsSpecificProfile(SupportChecker.Profile.tv) &&\r
+                !SupportChecker.IsDA())
             {
                 Information.SetCallback(Bluetooth, BluetoothDisableCallback);
                 await ManualTest.WaitForConfirm();
@@ -376,7 +380,7 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "Enable Vibration : Open Quick panel -> Toggle sound button until it is in vibrate mode")]
         public async Task VibrationEnabled_CHECK_ENABLE() {
-            if (!SupportChecker.IsTV())
+            if (SupportChecker.IsSupported("http://tizen.org/feature/feedback.vibration"))
             {
                 Information.SetCallback(Vibration, VibrationEnableCallback);
                 await ManualTest.WaitForConfirm();
@@ -401,7 +405,7 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "Disable Vibration : Open Quick panel -> Toggle sound button until it is in silent mode")]
         public async Task VibrationEnabled_CHECK_DISABLE() {
-            if (!SupportChecker.IsTV())
+            if (SupportChecker.IsSupported("http://tizen.org/feature/feedback.vibration"))
             {
                 Information.SetCallback(Vibration, VibrationDisableCallback);
                 await ManualTest.WaitForConfirm();
@@ -426,7 +430,7 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "AudioJackConnected Connected: Connect an audio jack to phone")]
         public async Task AudioJackConnected_CHECK_CONNECTED() {
-            if (!SupportChecker.IsTV() && !SupportChecker.IsWearable())
+            if (SupportChecker.IsSpecificProfile(SupportChecker.Profile.mobile))
             {
                 Information.SetCallback(AudioJack, AudioJackEnableCallback);
                 await ManualTest.WaitForConfirm();
@@ -451,7 +455,7 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "AudioJackConnected Disconnected: Disconnect the audio jack from phone")]
         public async Task AudioJackConnected_CHECK_DISCONNECTED() {
-            if (!SupportChecker.IsTV() && !SupportChecker.IsWearable())
+            if (SupportChecker.IsSpecificProfile(SupportChecker.Profile.mobile))
             {
                 Information.SetCallback(AudioJack, AudioJackDisableCallback);
                 await ManualTest.WaitForConfirm();
@@ -555,7 +559,8 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "TvOut: Connect a TVOut connector like micro-USB-to-HDMI to the phone")]
         public async Task TvOutConnected_CHECK_CONNECTED() {
-            if ((SupportChecker.IsSupported("http://tizen.org/feature/screen.output.hdmi") || SupportChecker.IsSupported("http://tizen.org/feature/screen.output.rca")) && SupportChecker.IsSupported("http://tizen.org/feature/screen"))
+            if ((SupportChecker.IsSupported("http://tizen.org/feature/screen.output.hdmi") || SupportChecker.IsSupported("http://tizen.org/feature/screen.output.rca")) && 
+                SupportChecker.IsSupported("http://tizen.org/feature/screen"))
             {
                 Information.SetCallback(TvOut, TvOutConnectedCallback);
                 await ManualTest.WaitForConfirm();
@@ -581,7 +586,8 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "TvOut: Disonnect TVOut connector like micro-USB-to-HDMI from the phone")]
         public async Task TvOutConnected_CHECK_DISCONNECTED() {
-            if (SupportChecker.IsSupported("http://tizen.org/feature/screen.output.hdmi") || SupportChecker.IsSupported("http://tizen.org/feature/screen.output.rca"))
+            if ((SupportChecker.IsSupported("http://tizen.org/feature/screen.output.hdmi") || SupportChecker.IsSupported("http://tizen.org/feature/screen.output.rca")) &&\r
+                SupportChecker.IsSupported("http://tizen.org/feature/screen"))
             {
                 Information.SetCallback(TvOut, TvOutDisconnectedCallback);
                 await ManualTest.WaitForConfirm();
@@ -606,7 +612,7 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "AudioJackConnector: Connect 3-wire or 4-wire AudioJack")]
         public async Task AudioJackConnectorChanged_TEST() {
-            if (!SupportChecker.IsTV() && !SupportChecker.IsWearable())
+            if (SupportChecker.IsSpecificProfile(SupportChecker.Profile.mobile))
             {
                 Information.SetCallback(AudioJackConnector, AudioJackConnectorCallback);
                 await ManualTest.WaitForConfirm();
@@ -632,7 +638,7 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "Connect a battery charger to the phone")]
         public async Task ChargerConnected_CHECK_CONNECTED() {
-            if (!SupportChecker.IsTV() && SupportChecker.IsSupported("http://tizen.org/feature/battery"))
+            if (SupportChecker.IsSupported("http://tizen.org/feature/battery"))
             {
                 Information.SetCallback(Charger, ChargerConnectedCallback);
                 await ManualTest.WaitForConfirm();
@@ -658,7 +664,7 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "Disonnect a battery charger from the phone")]
         public async Task ChargerConnected_CHECK_DISCONNECTED() {
-            if (!SupportChecker.IsTV() && SupportChecker.IsSupported("http://tizen.org/feature/battery"))
+            if (SupportChecker.IsSupported("http://tizen.org/feature/battery"))
             {
                 Information.SetCallback(Charger, ChargerDisconnectedCallback);
                 await ManualTest.WaitForConfirm();
@@ -684,7 +690,7 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "Enable AutoRotation:  Home screen -> Drop down menu -> Auto Rotate -> Enable ")]
         public async Task AutoRotationEnabled_CHECK_ENABLE() {
-            if (SupportChecker.IsSupported("http://tizen.org/feature/screen.auto_rotation") && !SupportChecker.IsWearable())
+            if (SupportChecker.IsSupported("http://tizen.org/feature/screen.auto_rotation"))
             {
                 Information.SetCallback(AutoRotation, AutoRotationEnableCallback);
                 await ManualTest.WaitForConfirm();
@@ -710,7 +716,7 @@ namespace Tizen.System.Tests {
         [Step(1, "Click Run button")]
         [Step(2, "Disable AutoRotation:  Home screen -> Drop down menu -> Auto Rotate -> Disable ")]
         public async Task AutoRotationEnabled_CHECK_DISABLE() {
-            if (SupportChecker.IsSupported("http://tizen.org/feature/screen.auto_rotation") && !SupportChecker.IsWearable())
+            if (SupportChecker.IsSupported("http://tizen.org/feature/screen.auto_rotation"))
             {
                 Information.SetCallback(AutoRotation, AutoRotationDisableCallback);
                 await ManualTest.WaitForConfirm();
index 124a4301551da6f07aacea96b2d28be972138d4d..333ed62ea1a604e24df2758ce1f80b684da59bcf 100755 (executable)
@@ -49,7 +49,9 @@ namespace Tizen.System.Tests {
         [Step(1, "Click run TC")]
         [Step(2, "Enable/Disable Bluetooth : Settings-> Bluetooth -> Bluetooth Enable/Disable")]
         public async Task Key_PROPERTY_READ_ONLY() {
-            if (!SupportChecker.IsTV() && SupportChecker.IsSupported("http://tizen.org/feature/network.bluetooth"))
+            if (SupportChecker.IsSupported("http://tizen.org/feature/network.bluetooth") &&
+                !SupportChecker.IsSpecificProfile(SupportChecker.Profile.tv) &&
+                !SupportChecker.IsDA())
             {
                 Information.SetCallback(BluetoothRuntimeFeatureKey, RuntimeKeyStatusChangedCallback);
                 await ManualTest.WaitForConfirm();