[time][Fix tc issue, divide 1 tc as mobile, wearable and tv] 62/123262/3
authoryuanzhongyuan <zy123.yuan@samsung.com>
Wed, 5 Apr 2017 05:50:23 +0000 (13:50 +0800)
committeryuanzhongyuan <zy123.yuan@samsung.com>
Wed, 5 Apr 2017 08:39:02 +0000 (16:39 +0800)
Change-Id: I466b6f8415e9883ea8d17271b7d34a1cf7d61878

common/tct-time-tizen-tests/tests.xml
common/tct-time-tizen-tests/time/TimeUtil_getDateFormat.html
common/tct-time-tizen-tests/time/TimeUtil_getDateFormat_tv.html [new file with mode: 0755]

index 8f60559433b1572529685fca75ea790e0b421bee..11043ed51f93039d6b2ecddc8f79a5110abb17ac 100755 (executable)
         </description>
       </testcase>
     </set>
+    <set name="Time_tv" type="js">
+      <capabilities>
+        <capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
+      </capabilities>
+      <testcase purpose="Check if method getDateFormat of TimeUtil works properly." component="Tizen Device APIs/System/Time" execution_type="auto" priority="P1" id="TimeUtil_getDateFormat_tv">
+        <description>
+          <test_script_entry>/opt/tct-time-tizen-tests/time/TimeUtil_getDateFormat_tv.html</test_script_entry>
+        </description>
+      </testcase>
+    </set>
   </suite>
-</test_definition>
\ No newline at end of file
+</test_definition>
index 27678381230b85fb6a7c767dea18ff5032676a27..5f4d0ba0f821ec3b8b97b7cc14e2cbeaecb4b4c1 100755 (executable)
@@ -38,10 +38,10 @@ Authors:
 //==== PRIORITY P1
 //==== TEST_CRITERIA MOA MR
 test(function () {
-    var returnedValue, shortformat = true;
+    var returnedValue, def = "m/d/y", shortformat = true;
     returnedValue = tizen.time.getDateFormat(shortformat);
     assert_type(returnedValue, "string", "Timezone type");
-    assert_equals(returnedValue, getShortDateFormat(DATE_FORMAT), "Date format");
+    assert_equals(returnedValue, def, "Date format");
 }, document.title);
 
 </script>
diff --git a/common/tct-time-tizen-tests/time/TimeUtil_getDateFormat_tv.html b/common/tct-time-tizen-tests/time/TimeUtil_getDateFormat_tv.html
new file mode 100755 (executable)
index 0000000..e702ae9
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+        Beata Koziarek <b.koziarek@samsung.com>
+        Lin Guo <lin87.guo@samsung.com>
+
+-->
+<html>
+<head>
+<title>TimeUtil_getDateFormat_tv</title>
+<meta charset="utf-8"/>
+<script type="text/javascript" src="support/unitcommon.js"></script>
+<script type="text/javascript" src="support/time_common.js"></script>
+</head>
+
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: TimeUtil_getDateFormat_tv
+//==== LABEL Check if method getDateFormat of TimeUtil works properly.
+//==== SPEC: Tizen Web API:System:Time:TimeUtil:getDateFormat M
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
+//==== PRIORITY P1
+//==== TEST_CRITERIA MOA MR
+test(function () {
+    var returnedValue, shortformat = true;
+    returnedValue = tizen.time.getDateFormat(shortformat);
+    assert_type(returnedValue, "string", "Timezone type");
+    assert_equals(returnedValue, getShortDateFormat(DATE_FORMAT), "Date format");
+}, document.title);
+
+</script>
+</body>
+</html>