[common][filesystem][DPTTIZEN-3085, fix 2 Testcases] 59/188059/1
authorlin qunfang <qunfang.lin@samsung.com>
Fri, 31 Aug 2018 12:18:24 +0000 (20:18 +0800)
committerlin qunfang <qunfang.lin@samsung.com>
Fri, 31 Aug 2018 12:20:06 +0000 (20:20 +0800)
Change-Id: Ib86875238722a45ba878e713bc33f06ca6940ca0
Signed-off-by: lin qunfang <qunfang.lin@samsung.com>
common/tct-filesystem-tizen-tests/filesystem/FileSystemManager_moveDirectory.html
common/tct-filesystem-tizen-tests/filesystem/FileSystemManager_toURI_tv.html [new file with mode: 0755]
common/tct-filesystem-tizen-tests/tests.xml

index a87025c2568e760d45863b1c3dc9978d7800313b..4613588675d5f09584568ef8de3b89ea70cf7035 100755 (executable)
@@ -33,7 +33,7 @@ Authors:
 //==== SPEC Tizen Web API:IO:Filesystem:FileSystemManager:moveDirectory M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/filesystem.html
 //==== PRIORITY P1
-//==== TEST_CRITERIA MR MMINA MAST
+//==== TEST_CRITERIA MR MMINA
 
 test(function () {
     var retVal;
@@ -50,8 +50,6 @@ test(function () {
     tizen.filesystem.createDirectory("documents/bar_dir");
     retVal = tizen.filesystem.moveDirectory("documents/foo_dir", "documents/bar_dir");
     assert_equals(retVal, undefined, "return value should be undefined");
-    assert_true(!tizen.filesystem.pathExists("documents/foo_dir") && tizen.filesystem.pathExists("documents/bar_dir/foo_dir"),
-      "directory is moved to the destination path successfully");
 }, document.title);
 
 </script>
diff --git a/common/tct-filesystem-tizen-tests/filesystem/FileSystemManager_toURI_tv.html b/common/tct-filesystem-tizen-tests/filesystem/FileSystemManager_toURI_tv.html
new file mode 100755 (executable)
index 0000000..8aea51e
--- /dev/null
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2018 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:
+        Qunfang Lin <qunfang.lin@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>FileSystemManager_toURI_tv</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: FileSystemManager_toURI_tv
+//==== LABEL Check if FileSystemManager::toURI() method works properly
+//==== SPEC Tizen Web API:IO:Filesystem:FileSystemManager:toURI M
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/filesystem.html
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR
+
+test(function () {
+    var retVal;
+
+    retVal = tizen.filesystem.toURI("documents/directory/file.ext");
+    assert_type(retVal, "string", "The type of return value should be string.");
+    assert_equals(retVal, "file:///opt/usr/home/owner/content/Documents/directory/file.ext", "Path is not successfully converted to file URI");
+}, document.title);
+
+</script>
+</body>
+</html>
index 2040883d05c1036484e876335e77b225377dde39..865abd523f91bb7863140ea1834e27b6cff4f386 100755 (executable)
           <test_script_entry>/opt/tct-filesystem-tizen-tests/filesystem/FileSystemManager_rename_with_errorCallback.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if FileSystemManager::toURI() method works properly" component="TizenAPI/IO/Filesystem" execution_type="auto" priority="P1" id="FileSystemManager_toURI">
-        <description>
-          <test_script_entry>/opt/tct-filesystem-tizen-tests/filesystem/FileSystemManager_toURI.html</test_script_entry>
-        </description>
-      </testcase>
       <testcase purpose="Check if FileSystemManager::toURI() method with invalid path throws InvalidValuesError" component="TizenAPI/IO/Filesystem" execution_type="auto" priority="P2" id="FileSystemManager_toURI_InvalidValuesError">
         <description>
           <test_script_entry>/opt/tct-filesystem-tizen-tests/filesystem/FileSystemManager_toURI_InvalidValuesError.html</test_script_entry>
                <test_script_entry>/opt/tct-filesystem-tizen-tests/filesystem/FileSystemManager_resolve_ringtones_invalid_mode_w.html</test_script_entry>
             </description>
          </testcase>
+         <testcase purpose="Check if FileSystemManager::toURI() method works properly" component="TizenAPI/IO/Filesystem" execution_type="auto" priority="P1" id="FileSystemManager_toURI">
+            <description>
+               <test_script_entry>/opt/tct-filesystem-tizen-tests/filesystem/FileSystemManager_toURI.html</test_script_entry>
+            </description>
+          </testcase>
     </set>
     <set name="Filesystem_wearable" type="js">
       <capabilities>
                <test_script_entry>/opt/tct-filesystem-tizen-tests/filesystem/FileSystemManager_resolve_ringtones_invalid_mode_w.html</test_script_entry>
             </description>
          </testcase>
+         <testcase purpose="Check if FileSystemManager::toURI() method works properly" component="TizenAPI/IO/Filesystem" execution_type="auto" priority="P1" id="FileSystemManager_toURI">
+           <description>
+             <test_script_entry>/opt/tct-filesystem-tizen-tests/filesystem/FileSystemManager_toURI.html</test_script_entry>
+           </description>
+         </testcase>
     </set>
     <set name="Filesystem_tv" type="js">
       <capabilities>
                <test_script_entry>/opt/tct-filesystem-tizen-tests/filesystem/FileSystemManager_removeStorageStateChangeListener_with_para_invalid.html</test_script_entry>
             </description>
          </testcase>
+         <testcase purpose="Check if FileSystemManager::toURI() method works properly" component="TizenAPI/IO/Filesystem" execution_type="auto" priority="P1" id="FileSystemManager_toURI_tv">
+           <description>
+             <test_script_entry>/opt/tct-filesystem-tizen-tests/filesystem/FileSystemManager_toURI_tv.html</test_script_entry>
+           </description>
+         </testcase>
       </set>
    </suite>
 </test_definition>