From: zy123.yuan Date: Thu, 18 Jan 2018 02:52:29 +0000 (+0800) Subject: [common][humanactivity][DPTTIZEN-2993, fix tc issue] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3ebe9cf9a5f68759fa8084f9de679c3c411a4fc;p=test%2Ftct%2Fweb%2Fapi.git [common][humanactivity][DPTTIZEN-2993, fix tc issue] Change-Id: I61d9c3bd7a0a8df780280b8aea24a4c7f6d4682e --- diff --git a/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_x_attribute.html b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_x_attribute.html index 8c89e9fe7..63d3b251e 100755 --- a/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_x_attribute.html +++ b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_x_attribute.html @@ -33,25 +33,30 @@ Authors: //==== SPEC_URL TBD //==== PRIORITY P1 //==== EXECUTION_TYPE manual -//==== STEP Click Run button, and then tilt device +//==== STEP Click Run button, and then pick up device //==== EXPECT Pass should be shown in the page //==== TEST_CRITERIA AE AT ARO setup({timeout: 90000}); -var t = async_test(document.title, {timeout: 90000}), watchID = null, listener, gestureType = "GESTURE_TILT"; +var t = async_test(document.title, {timeout: 90000}), watchID = null, listener, gestureType = "GESTURE_PICK_UP", isSupported; t.step(function () { add_result_callback(function () { tizen.humanactivitymonitor.removeGestureRecognitionListener(watchID); }); - listener = t.step_func(function (gestureData) { - check_readonly(gestureData, "x", gestureData.x, "number", gestureData.x + 1); - t.done(); - }); + isSupported = tizen.humanactivitymonitor.isGestureSupported(gestureType); + if(isSupported){ + listener = t.step_func(function (gestureData) { + check_readonly(gestureData, "x", gestureData.x, "number", gestureData.x + 1); + t.done(); + }); - watchID = tizen.humanactivitymonitor.addGestureRecognitionListener(gestureType, listener); + watchID = tizen.humanactivitymonitor.addGestureRecognitionListener(gestureType, listener); + }else{ + t.done(); + } }); diff --git a/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_y_attribute.html b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_y_attribute.html index c40828cb3..5f61f7849 100755 --- a/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_y_attribute.html +++ b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureData_y_attribute.html @@ -33,25 +33,30 @@ Authors: //==== SPEC_URL TBD //==== PRIORITY P1 //==== EXECUTION_TYPE manual -//==== STEP Click Run button, and then tilt device +//==== STEP Click Run button, and then pick up device //==== EXPECT Pass should be shown in the page //==== TEST_CRITERIA AE AT ARO setup({timeout: 90000}); -var t = async_test(document.title, {timeout: 90000}), watchID = null, listener, gestureType = "GESTURE_TILT"; +var t = async_test(document.title, {timeout: 90000}), watchID = null, listener, gestureType = "GESTURE_PICK_UP"; t.step(function () { add_result_callback(function () { tizen.humanactivitymonitor.removeGestureRecognitionListener(watchID); }); - listener = t.step_func(function (gestureData) { - check_readonly(gestureData, "y", gestureData.y, "number", gestureData.y + 1); - t.done(); - }); + isSupported = tizen.humanactivitymonitor.isGestureSupported(gestureType); + if(isSupported){ + listener = t.step_func(function (gestureData) { + check_readonly(gestureData, "y", gestureData.y, "number", gestureData.y + 1); + t.done(); + }); - watchID = tizen.humanactivitymonitor.addGestureRecognitionListener(gestureType, listener); + watchID = tizen.humanactivitymonitor.addGestureRecognitionListener(gestureType, listener); + }else{ + t.done(); + } }); diff --git a/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureRecognitionCallback_onsuccess.html b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureRecognitionCallback_onsuccess.html index 27eef73d6..a46004a1d 100644 --- a/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureRecognitionCallback_onsuccess.html +++ b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/GestureRecognitionCallback_onsuccess.html @@ -51,7 +51,7 @@ t.step(function () { assert_not_equals(gestureData , null, "Argument should not be null."); check_readonly(gestureData, "type", gestureData.type, "string", gestureData.type + "1"); check_readonly(gestureData, "event", gestureData.event, "string", gestureData.event + "1"); - check_readonly(gestureData, "timestamp", gestureData.timestamp, "string", gestureData.timestamp + 1); + check_readonly(gestureData, "timestamp", gestureData.timestamp, "number", gestureData.timestamp + 1); t.done(); }); diff --git a/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_addGestureRecognitionListener_errorCallback_TypeMismatch.html b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_addGestureRecognitionListener_errorCallback_TypeMismatch.html index 085c8d1a5..2a6515354 100755 --- a/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_addGestureRecognitionListener_errorCallback_TypeMismatch.html +++ b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_addGestureRecognitionListener_errorCallback_TypeMismatch.html @@ -41,7 +41,7 @@ var t = async_test(document.title, {timeout: 30000}), gestureType = "GESTURE_PIC conversionTable, errorCallback, exceptionName, i; t.step(function () { - 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-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_removeGestureRecognitionListener.html b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_removeGestureRecognitionListener.html index e083f4973..7681feee4 100755 --- a/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_removeGestureRecognitionListener.html +++ b/common/tct-humanactivitymonitor-tizen-tests/humanactivitymonitor/HumanActivityMonitorManager_removeGestureRecognitionListener.html @@ -40,8 +40,8 @@ var t = async_test(document.title, {timeout: 90000}), returnedValue = null, watc t.step(function () { listener = t.step_func(function (data) { - returnedValue = tizen.humanactivitymonitor.removeGestureRecognitionListener(watchID); - assert_type(returnedValue, undefined, "Return value is not undefined"); + returnedValue = tizen.humanactivitymonitor.removeGestureRecognitionListener(watchID); + assert_type(returnedValue, "undefined", "Return value is not undefined"); t.done(); }); diff --git a/common/tct-humanactivitymonitor-tizen-tests/tests.xml b/common/tct-humanactivitymonitor-tizen-tests/tests.xml index 2cbd061b6..2d433712b 100755 --- a/common/tct-humanactivitymonitor-tizen-tests/tests.xml +++ b/common/tct-humanactivitymonitor-tizen-tests/tests.xml @@ -1321,7 +1321,7 @@ - Click Run button, and then tilt device + Click Run button, and then pick up device Pass should be shown in the page @@ -1332,7 +1332,7 @@ - Click Run button, and then tilt device + Click Run button, and then pick up device Pass should be shown in the page @@ -2684,7 +2684,7 @@ - Click Run button, and then tilt device + Click Run button, and then pick up device Pass should be shown in the page @@ -2695,7 +2695,7 @@ - Click Run button, and then tilt device + Click Run button, and then pick up device Pass should be shown in the page