From b4d0fad53944e5538dbe578a6254b47b8e18a5fa Mon Sep 17 00:00:00 2001 From: Kichan Kwon Date: Tue, 22 Oct 2019 10:08:24 +0900 Subject: [PATCH] [Information][Manual][Non-ACR] Arrange precondition - 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 --- .../support/SupportChecker.cs | 69 +++++++++++++--------- .../testcase/TSInformation.cs | 34 ++++++----- .../TSRuntimeFeatureStatusChangedEventArgs.cs | 4 +- 3 files changed, 65 insertions(+), 42 deletions(-) diff --git a/tct-suite-vs/Tizen.Information.Manual.Tests/support/SupportChecker.cs b/tct-suite-vs/Tizen.Information.Manual.Tests/support/SupportChecker.cs index 172a3dc..b9950f0 100755 --- a/tct-suite-vs/Tizen.Information.Manual.Tests/support/SupportChecker.cs +++ b/tct-suite-vs/Tizen.Information.Manual.Tests/support/SupportChecker.cs @@ -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; + } + + public enum Profile + { + tv, + wearable, + mobile, } - public static bool IsTV() - { - bool is_successful = Tizen.System.Information.TryGetValue("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("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) + { + bool is_successful = Tizen.System.Information.TryGetValue("http://tizen.org/feature/profile", out string val); + + if (!is_successful) + return false; + + if (string.Compare(val, profile.ToString()) != 0) + return false; + + // DA platform is based on mobile profile, so we have to exclude it + if (profile == Profile.mobile && IsDA()) + return false; + + return true; } public static bool IsMobileNetworksMenuSupported() { - bool is_successful; + // Mobile networks menu only available in ARM mobile device - is_successful = Tizen.System.Information.TryGetValue("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; + + bool is_successful = Tizen.System.Information.TryGetValue("http://tizen.org/feature/platform.core.cpu.arch", out string arch); + if (!is_successful || string.Compare(arch, 0, "arm", 0, 3) != 0) return false; - is_successful = Tizen.System.Information.TryGetValue("http://tizen.org/feature/profile", out string profile); - if (!is_successful || string.Compare(profile, "mobile") != 0) - return false; return true; + } + + public static bool IsDA() + { + bool is_successful = Tizen.System.Information.TryGetValue("http://tizen.org/feature/platform.communication_processor", out string cp); + if (!is_successful) + return false; + + // QCA9379 : Family Hub (KantM, Meson64) + // AR1021X : R18 based device + if (string.Compare(cp, "QCA9379") == 0 || (string.Compare(cp, "AR1021X") == 0)) + return true; + + return false; } } - } diff --git a/tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSInformation.cs b/tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSInformation.cs index 295d231..c5f9d1e 100755 --- a/tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSInformation.cs +++ b/tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSInformation.cs @@ -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() { + if (SupportChecker.IsSupported("http://tizen.org/feature/network.bluetooth") && + !SupportChecker.IsSpecificProfile(SupportChecker.Profile.tv) && + !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")) && + 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(); diff --git a/tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSRuntimeFeatureStatusChangedEventArgs.cs b/tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSRuntimeFeatureStatusChangedEventArgs.cs index 124a430..333ed62 100755 --- a/tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSRuntimeFeatureStatusChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Information.Manual.Tests/testcase/TSRuntimeFeatureStatusChangedEventArgs.cs @@ -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(); -- 2.7.4