[common][systeminfo][Add 2 tcs] 97/140797/1
authormengli.zhang <mengli.zhang@samsung.com>
Wed, 26 Jul 2017 22:07:48 +0000 (18:07 -0400)
committermengli.zhang <mengli.zhang@samsung.com>
Wed, 26 Jul 2017 22:07:58 +0000 (18:07 -0400)
Change-Id: If65675c82f61f0070dc490ee5dc51dd77efc7504
Signed-off-by: mengli.zhang <mengli.zhang@samsung.com>
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToDischarge_attribute.html [new file with mode: 0755]
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToFullcharge_attribute.html [new file with mode: 0755]
common/tct-systeminfo-tizen-tests/tests.xml

diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToDischarge_attribute.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToDischarge_attribute.html
new file mode 100755 (executable)
index 0000000..c32e3d5
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2017 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:
+        Mengli Zhang <mengli.zhang@samsung.com>
+
+-->
+<html>
+<head>
+<title>SystemInfoBattery_timeToDischarge_attribute</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SystemInfoBattery_timeToDischarge_attribute
+//==== LABEL Check attribute timeToDischarge in SystemInfoBattery
+//==== ONLOAD_DELAY 90
+//==== SPEC Tizen Web API:System:SystemInfo:SystemInfoBattery:timeToDischarge A
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/systeminfo.html
+//==== TEST_CRITERIA AE AT ARO
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}),
+    getPropertyValueSuccess, getPropertyValueError;
+
+t.step(function () {
+    getPropertyValueSuccess = t.step_func(function (property) {
+        assert_own_property(property, "timeToDischarge", "BATTERY doesn't own timeToDischarge property.");
+        check_readonly(property, "timeToDischarge", property.timeToDischarge, "number", 5);
+        t.done();
+    });
+
+    getPropertyValueError = t.step_func(function (error) {
+        assert_unreached("getPropertyValue() error callback invoked: name: " +
+            error.message + ", msg: " + error.message);
+    });
+
+    tizen.systeminfo.getPropertyValue("BATTERY", getPropertyValueSuccess, getPropertyValueError);
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToFullcharge_attribute.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToFullcharge_attribute.html
new file mode 100755 (executable)
index 0000000..d880f01
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2017 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:
+        Mengli Zhang <mengli.zhang@samsung.com>
+
+-->
+<html>
+<head>
+<title>SystemInfoBattery_timeToFullcharge_attribute</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: SystemInfoBattery_timeToFullcharge_attribute
+//==== LABEL Check attribute timeToFullCharge in SystemInfoBattery
+//==== ONLOAD_DELAY 90
+//==== SPEC Tizen Web API:System:SystemInfo:SystemInfoBattery:timeToFullCharge A
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/systeminfo.html
+//==== TEST_CRITERIA AE AT ARO
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}),
+    getPropertyValueSuccess, getPropertyValueError;
+
+t.step(function () {
+    getPropertyValueSuccess = t.step_func(function (property) {
+        assert_own_property(property, "timeToFullCharge", "BATTERY doesn't own timeToFullCharge property.");
+        check_readonly(property, "timeToFullCharge", property.timeToFullCharge, "number", 5);
+        t.done();
+    });
+
+    getPropertyValueError = t.step_func(function (error) {
+        assert_unreached("getPropertyValue() error callback invoked: name: " +
+            error.message + ", msg: " + error.message);
+    });
+
+    tizen.systeminfo.getPropertyValue("BATTERY", getPropertyValueSuccess, getPropertyValueError);
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
index d31f3a7ffbe97cb3fb530e77330e7b3bbd669420..9c1af9c62f3b2469fccd312a5ef018e7bde5d0f7 100755 (executable)
           <test_script_entry>/opt/tct-systeminfo-tizen-tests/systeminfo/SystemInfoADS_id_attribute.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check attribute timeToDischarge in SystemInfoBattery" component="TizenAPI/System/SystemInfo" execution_type="auto" id="SystemInfoBattery_timeToDischarge_attribute">
+        <description>
+          <test_script_entry>/opt/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToDischarge_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check attribute timeToFullcharge in SystemInfoBattery" component="TizenAPI/System/SystemInfo" execution_type="auto" id="SystemInfoBattery_timeToFullcharge_attribute">
+        <description>
+          <test_script_entry>/opt/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToFullcharge_attribute.html</test_script_entry>
+        </description>
+      </testcase>
     </set>
     <set name="SystemInfo_WEARABLE" type="js">
       <capabilities>
           <test_script_entry>/opt/tct-systeminfo-tizen-tests/systeminfo/SystemInfoADS_id_attribute.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check attribute timeToDischarge in SystemInfoBattery" component="TizenAPI/System/SystemInfo" execution_type="auto" id="SystemInfoBattery_timeToDischarge_attribute">
+        <description>
+          <test_script_entry>/opt/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToDischarge_attribute.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check attribute timeToFullcharge in SystemInfoBattery" component="TizenAPI/System/SystemInfo" execution_type="auto" id="SystemInfoBattery_timeToFullcharge_attribute">
+        <description>
+          <test_script_entry>/opt/tct-systeminfo-tizen-tests/systeminfo/SystemInfoBattery_timeToFullcharge_attribute.html</test_script_entry>
+        </description>
+      </testcase>
     </set>
     <set name="SystemInfo_TV" type="js">
       <capabilities>