From f1f55d51393d3a7c9fa4ab880744f34d7025f18d Mon Sep 17 00:00:00 2001 From: Jeonghyun Yun Date: Mon, 4 Nov 2019 10:42:30 +0900 Subject: [PATCH] [ElmSharp][Non-ACR] Except TC related to product TV specification feature Change-Id: I33e974fc3a0f2c33500f65fa5c94754c75368c31 Signed-off-by: Jeonghyun Yun --- .../Common/TSModeName.cs | 40 ++++++++++++++++++++++ .../Common/TSProfile.cs | 1 + .../testcase/TSEntry.cs | 38 ++++++++++++++------ 3 files changed, 69 insertions(+), 10 deletions(-) create mode 100644 tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSModeName.cs mode change 100755 => 100644 tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSProfile.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 index 0000000..a3afdb6 --- /dev/null +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSModeName.cs @@ -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(_nameKey, out _name); + + return _name; + } + } +} diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSProfile.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSProfile.cs old mode 100755 new mode 100644 index 3b32380..025083f --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSProfile.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/Common/TSProfile.cs @@ -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; diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs index ea48a80..0ffb791 100644 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSEntry.cs @@ -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] -- 2.7.4