[Archive TCT] Fixes in tests code 65/270365/3
authorPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Fri, 28 Jan 2022 12:10:53 +0000 (13:10 +0100)
committerPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Wed, 9 Feb 2022 09:13:06 +0000 (10:13 +0100)
[removed TCT]
ArchiveFileEntry_extract_destinationDirectory_TypeMismatch
ArchiveFileEntry_extract_overwrite_TypeMismatch
ArchiveFileEntry_extract_stripName_TypeMismatch

[updated TCT]
ArchiveFile_extractAll_onprogress_TypeMismatch
ArchiveFileEntry_extract_onerror_TypeMismatch

[ACR] Related ACR
https://code.sec.samsung.net/jira/browse/TWDAPI-286

Change-Id: I947d50ae52f08e18258d82f8f118e34ceb0d1c31
Signed-off-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_destinationDirectory_TypeMismatch.html [deleted file]
common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_onerror_TypeMismatch.html
common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_overwrite_TypeMismatch.html [deleted file]
common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_stripName_TypeMismatch.html [deleted file]
common/tct-archive-tizen-tests/archive/ArchiveFile_extractAll_onprogress_TypeMismatch.html
common/tct-archive-tizen-tests/tests.full.xml
common/tct-archive-tizen-tests/tests.xml

diff --git a/common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_destinationDirectory_TypeMismatch.html b/common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_destinationDirectory_TypeMismatch.html
deleted file mode 100755 (executable)
index 08f610a..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 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>ArchiveFileEntry_extract_destinationDirectory_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/archive_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ArchiveFileEntry_extract_destinationDirectory_TypeMismatch
-//==== LABEL Check argument ArchiveFileEntry extract method destinationDirectory conversions exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:I/O:Archive:ArchiveFileEntry:extract M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html
-//==== TEST_CRITERIA MC
-
-var t = async_test(document.title), i, createSuccess, getEntrySuccess, destinationDirectory, exceptionName,
-    conversionTable;
-
-t.step(function () {
-    getEntrySuccess = t.step_func(function (entry) {
-        conversionTable = getTypeConversionExceptions("object", true);
-        for (i = 0; i < conversionTable.length; i++) {
-            destinationDirectory = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-            assert_throws({name: exceptionName}, function () {
-                entry.extract(destinationDirectory);
-            }, exceptionName + " should be thrown - given incorrect.");
-        }
-        t.done();
-    });
-
-    createSuccess = t.step_func(function (archive) {
-        archive.getEntryByName("my_file.txt", getEntrySuccess);
-    });
-
-    tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "r", createSuccess);
-});
-
-</script>
-</body>
-</html>
\ No newline at end of file
index c542ec309064b49c01396190fe74b6ed0e822594..a04d55bc3b95c57222f8ca7c9a711a6cf6c8d02b 100755 (executable)
@@ -44,7 +44,7 @@ t.step(function () {
     });
 
     getEntrySuccess = t.step_func(function (entry) {
-        conversionTable = getTypeConversionExceptions("functionObject", false);
+        conversionTable = getTypeConversionExceptions("functionObject", true);
         for (i = 0; i < conversionTable.length; i++) {
             errorCallback = conversionTable[i][0];
             exceptionName = conversionTable[i][1];
diff --git a/common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_overwrite_TypeMismatch.html b/common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_overwrite_TypeMismatch.html
deleted file mode 100755 (executable)
index 36a0d65..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 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>ArchiveFileEntry_extract_overwrite_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/archive_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ArchiveFileEntry_extract_overwrite_TypeMismatch
-//==== LABEL Check argument ArchiveFileEntry extract method overwrite conversions exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:I/O:Archive:ArchiveFileEntry:extract M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html
-//==== TEST_CRITERIA MC
-
-var t = async_test(document.title), i, createSuccess, getEntrySuccess, extractSuccessCallback,
-    exceptionName, conversionTable, errorCallback, progressCallback, overwrite;
-
-t.step(function () {
-    extractSuccessCallback = t.step_func(function () {
-        assert_unreached("extractSuccessCallback callback invoked");
-    });
-
-    errorCallback = t.step_func(function () {
-        assert_unreached("errorCallback callback invoked");
-    });
-
-    progressCallback = t.step_func(function () {
-        assert_unreached("progressCallback callback invoked");
-    });
-
-    getEntrySuccess = t.step_func(function (entry) {
-        conversionTable = getTypeConversionExceptions("boolean", true);
-        for (i = 0; i < conversionTable.length; i++) {
-            overwrite = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-            assert_throws({name: exceptionName}, function () {
-                entry.extract("/home/owner/share/Downloads", extractSuccessCallback, errorCallback, progressCallback, false, overwrite);
-            }, exceptionName + " should be thrown - given incorrect.");
-        }
-        t.done();
-    });
-
-    createSuccess = t.step_func(function (archive) {
-        archive.getEntryByName("my_file.txt", getEntrySuccess);
-    });
-
-    tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "r", createSuccess);
-});
-
-</script>
-</body>
-</html>
\ No newline at end of file
diff --git a/common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_stripName_TypeMismatch.html b/common/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_stripName_TypeMismatch.html
deleted file mode 100755 (executable)
index 28ee763..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 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>ArchiveFileEntry_extract_stripName_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/archive_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ArchiveFileEntry_extract_stripName_TypeMismatch
-//==== LABEL Check argument ArchiveFileEntry extract method stripName conversions exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:I/O:Archive:ArchiveFileEntry:extract M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html
-//==== TEST_CRITERIA MC
-
-var t = async_test(document.title), i, createSuccess, getEntrySuccess, extractSuccessCallback,
-    exceptionName, conversionTable, errorCallback, progressCallback, stripName;
-
-t.step(function () {
-    extractSuccessCallback = t.step_func(function () {
-        assert_unreached("extractSuccessCallback callback invoked");
-    });
-
-    errorCallback = t.step_func(function () {
-        assert_unreached("errorCallback callback invoked");
-    });
-
-    progressCallback = t.step_func(function () {
-        assert_unreached("progressCallback callback invoked");
-    });
-
-    getEntrySuccess = t.step_func(function (entry) {
-        conversionTable = getTypeConversionExceptions("boolean", true);
-        for (i = 0; i < conversionTable.length; i++) {
-            stripName = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-            assert_throws({name: exceptionName}, function () {
-                entry.extract("/home/owner/share/Downloads", extractSuccessCallback, errorCallback, progressCallback, stripName);
-            }, exceptionName + " should be thrown - given incorrect.");
-        }
-        t.done();
-    });
-
-    createSuccess = t.step_func(function (archive) {
-        archive.getEntryByName("my_file.txt", getEntrySuccess);
-    });
-
-    tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "r", createSuccess);
-});
-
-</script>
-</body>
-</html>
\ No newline at end of file
index 08133b218556b3a28dde30fad82376b4591c884b..94b542df8f20f960587547ed150ea25d8b695c93 100755 (executable)
@@ -48,18 +48,18 @@ t.step(function () {
     });
 
     createSuccess = t.step_func(function (archive) {
-        conversionTable = getTypeConversionExceptions("object", true);
+        conversionTable = getTypeConversionExceptions("functionObject", true);
         for (i = 0; i < conversionTable.length; i++) {
-            onprogress = conversionTable[i][0];
+            onprogressCallback = conversionTable[i][0];
             exceptionName = conversionTable[i][1];
             assert_throws({name: exceptionName}, function () {
-                archive.extractAll("../resources/extracted", successCallback, errorCallback, onprogress);
-            }, exceptionName + " sGiven incorrect successCallback.");
+                archive.extractAll("../resources/extracted", successCallback, errorCallback, onprogressCallback);
+            }, exceptionName + " sGiven incorrect successCallback = " + onprogressCallback);
         };
         t.done();
     });
 
-    tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "a", createSuccess);
+    tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "r", createSuccess);
 });
 
 </script>
index 2610bbe02e344a4d9aa2483343741eabc89b21e4..45625cd440b22eb0a1e8bb10e960f94b7f6bd753 100755 (executable)
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check argument ArchiveFileEntry extract method destinationDirectory conversions exception" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P2" id="ArchiveFileEntry_extract_destinationDirectory_TypeMismatch">
-        <description>
-          <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_destinationDirectory_TypeMismatch.html</test_script_entry>
-        </description>
-        <specs>
-          <spec>
-            <spec_assertion interface="ArchiveFileEntry" element_type="method" element_name="description" specification="Archive" section="IO" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html</spec_url>
-            <spec_statement>TBD</spec_statement>
-          </spec>
-        </specs>
-      </testcase>
       <testcase purpose="Check if method extract of ArchiveFileEntry exist" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P0" id="ArchiveFileEntry_extract_exist">
         <description>
           <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_exist.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check argument ArchiveFileEntry extract method overwrite conversions exception" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P2" id="ArchiveFileEntry_extract_overwrite_TypeMismatch">
-        <description>
-          <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_overwrite_TypeMismatch.html</test_script_entry>
-        </description>
-        <specs>
-          <spec>
-            <spec_assertion interface="ArchiveFileEntry" element_type="method" element_name="description" specification="Archive" section="IO" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html</spec_url>
-            <spec_statement>TBD</spec_statement>
-          </spec>
-        </specs>
-      </testcase>
-      <testcase purpose="Check argument ArchiveFileEntry extract method stripName conversions exception" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P2" id="ArchiveFileEntry_extract_stripName_TypeMismatch">
-        <description>
-          <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_stripName_TypeMismatch.html</test_script_entry>
-        </description>
-        <specs>
-          <spec>
-            <spec_assertion interface="ArchiveFileEntry" element_type="method" element_name="description" specification="Archive" section="IO" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html</spec_url>
-            <spec_statement>TBD</spec_statement>
-          </spec>
-        </specs>
-      </testcase>
       <testcase purpose="Check if ArchiveFileEntry::extract() method functions properly with optional arguments" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P1" id="ArchiveFileEntry_extract_with_onerror">
         <description>
           <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_with_onerror.html</test_script_entry>
index d8aa698bf47a32c4c0056d7ca37621cf53ec7482..9fc996eb6e743ecd25905e4b334ea44f34e5de8f 100755 (executable)
           <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_by_FileObject.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check argument ArchiveFileEntry extract method destinationDirectory conversions exception" execution_type="auto" id="ArchiveFileEntry_extract_destinationDirectory_TypeMismatch" priority="P2" component="Tizen Device APIs/IO/Archive">
-        <description>
-          <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_destinationDirectory_TypeMismatch.html</test_script_entry>
-        </description>
-      </testcase>
       <testcase purpose="Check if method extract of ArchiveFileEntry exist" execution_type="auto" id="ArchiveFileEntry_extract_exist" priority="P0" component="Tizen Device APIs/IO/Archive">
         <description>
           <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_exist.html</test_script_entry>
           <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_onsuccess_TypeMismatch.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check argument ArchiveFileEntry extract method overwrite conversions exception" execution_type="auto" id="ArchiveFileEntry_extract_overwrite_TypeMismatch" priority="P2" component="Tizen Device APIs/IO/Archive">
-        <description>
-          <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_overwrite_TypeMismatch.html</test_script_entry>
-        </description>
-      </testcase>
-      <testcase purpose="Check argument ArchiveFileEntry extract method stripName conversions exception" execution_type="auto" id="ArchiveFileEntry_extract_stripName_TypeMismatch" priority="P2" component="Tizen Device APIs/IO/Archive">
-        <description>
-          <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_stripName_TypeMismatch.html</test_script_entry>
-        </description>
-      </testcase>
       <testcase purpose="Check if ArchiveFileEntry::extract() method functions properly with optional arguments" execution_type="auto" id="ArchiveFileEntry_extract_with_onerror" priority="P1" component="Tizen Device APIs/IO/Archive">
         <description>
           <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_with_onerror.html</test_script_entry>