[common][tv-info][TWDAPI-260, add 1 tc for new spec] 06/232306/1
authorzhongyuan <zy123.yuan@samsung.com>
Thu, 30 Apr 2020 09:53:23 +0000 (17:53 +0800)
committerzhongyuan <zy123.yuan@samsung.com>
Thu, 30 Apr 2020 09:53:23 +0000 (17:53 +0800)
Change-Id: I8b211a3aced3d49b9ba738d460f8c13410b5ed3f

common/tct-tv-info-tizen-tests/tests.full.xml
common/tct-tv-info-tizen-tests/tests.xml
common/tct-tv-info-tizen-tests/tv-info/TVInfoManager_getCaptionValue_captionStyle.html [new file with mode: 0755]
common/tct-tv-info-tizen-tests/tv-info/support/tv-info_common.js

index 39ac22b35fbda53602441f8cd2ec8e16bc0e165a..f016d9992e67aef0f04e75f97047fb7e4444200e 100755 (executable)
@@ -167,6 +167,18 @@ enable captions or the command 'vconftool set -t int db/menu/caption/caption "0"
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if getCaptionValue method works properly when key is CAPTION_STYLE_KEY" type="compliance" status="approved" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="TVInfoManager_getCaptionValue_captionStyle">
+        <description>
+          <test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_getCaptionValue_captionStyle.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="TVInfoManager" element_type="method" element_name="getCaptionValue" specification="TVInfo" section="TBD" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/tvinfo.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
       <testcase purpose="Check if getCaptionValue method works properly when key is CAPTION_EDGE_COLOR_KEY" type="compliance" status="approved" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="TVInfoManager_getCaptionValue_edgeColor">
         <description>
           <test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_getCaptionValue_edgeColor.html</test_script_entry>
index ae83870adf1b6e7d364a284b0b66aa9e2da87b0f..3278bf15371fe99a37254502adec00e772836e3b 100755 (executable)
@@ -83,6 +83,11 @@ enable captions or the command 'vconftool set -t int db/menu/caption/caption "0"
           <test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_getCaptionValue_bgOpacity.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check if getCaptionValue method works properly when key is CAPTION_STYLE_KEY" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="TVInfoManager_getCaptionValue_captionStyle">
+        <description>
+          <test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_getCaptionValue_captionStyle.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase purpose="Check if getCaptionValue method works properly when key is CAPTION_EDGE_COLOR_KEY" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="TVInfoManager_getCaptionValue_edgeColor">
         <description>
           <test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_getCaptionValue_edgeColor.html</test_script_entry>
diff --git a/common/tct-tv-info-tizen-tests/tv-info/TVInfoManager_getCaptionValue_captionStyle.html b/common/tct-tv-info-tizen-tests/tv-info/TVInfoManager_getCaptionValue_captionStyle.html
new file mode 100755 (executable)
index 0000000..4befc6f
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2020 Samsung Electronics Co., Ltd.
+
+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.
+
+Authors:
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
+
+-->
+<html>
+<head>
+<title>TVInfoManager_getCaptionValue_captionStyle</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/tv-info_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: TVInfoManager_getCaptionValue_captionStyle
+//==== LABEL Check if getCaptionValue method works properly when key is CAPTION_STYLE_KEY
+//==== SPEC Tizen Web API:TBD:TVInfo:TVInfoManager:getCaptionValue M
+//==== SPEC_URL TBD
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR
+
+test(function () {
+    var captionStyleValue = tizen.tvinfo.getCaptionValue("CAPTION_STYLE_KEY");
+    assert_in_array(captionStyleValue, CAPTION_STYLE_VALUE, "Incorrect value of CaptionStyle");
+    assert_type(captionStyleValue, "string", "captionStyleValue should be a string");
+}, document.title);
+
+</script>
+</body>
+</html>
index 8f156a0f76f9e5ff154bce70ac5359c1c5a549f1..0edb4afd56a7aeaac6973dbae428ee40f5ae8622 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
+Copyright (c) 2020 Samsung Electronics Co., Ltd.
 
 Licensed under the Apache License, Version 2.0 (the License);
 you may not use this file except in compliance with the License.
@@ -41,3 +41,4 @@ var WINDOW_OPACITY_VALUE = ["CAPTION_OPACITY_SOLID", "CAPTION_OPACITY_FLASHING",
         "CAPTION_OPACITY_TRANSPARENT", "CAPTION_OPACITY_DEFAULT"];
 var EDGE_TYPE_VALUE = ["CAPTION_EDGE_NONE", "CAPTION_EDGE_RAISED", "CAPTION_EDGE_DEPRESSED", "CAPTION_EDGE_UNIFORM",
         "CAPTION_EDGE_DROP_SHADOWED"];
+var CAPTION_STYLE_VALUE = ["CAPTION_STYLE_DEFAULT", "CAPTION_STYLE_BOLD", "CAPTION_STYLE_ITALIC"];