From: wei.ji Date: Thu, 20 Apr 2017 06:00:32 +0000 (+0800) Subject: [common][feedback][update 2 manual TCs to find supported pattern] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc5331372b198dfed2adcdcafaf32bd45e17e18c;p=test%2Ftct%2Fweb%2Fapi.git [common][feedback][update 2 manual TCs to find supported pattern] - update 2 manual TCs to iterate all patterns to find supported pattern - delete whitespaces - use isPatternSupported() to find supported pattern Change-Id: I0c8634d55f4e9adb51cd10eaf0e9193ce2599306 Signed-off-by: wei.ji --- diff --git a/common/tct-feedback-tizen-tests/feedback/FeedbackManager_play_with_type.html b/common/tct-feedback-tizen-tests/feedback/FeedbackManager_play_with_type.html index 3c687d1c6..59bdfd213 100755 --- a/common/tct-feedback-tizen-tests/feedback/FeedbackManager_play_with_type.html +++ b/common/tct-feedback-tizen-tests/feedback/FeedbackManager_play_with_type.html @@ -39,11 +39,28 @@ Authors: //==== TEST_CRITERIA MOA MR test(function () { - var pattern, type, retval = null; + var pattern, type, retval = null, i; - pattern = "VOLUME_KEY"; + pattern = new Array("TAP", "SIP", "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7", + "KEY8", "KEY9", "KEY_STAR", "KEY_SHARP", "KEY_BACK", "HOLD", "HW_TAP", "HW_HOLD", "MESSAGE", + "EMAIL", "WAKEUP", "SCHEDULE", "TIMER", "GENERAL", "POWERON", "POWEROFF", "CHARGERCONN", + "CHARGING_ERROR", "FULLCHARGED", "LOWBATT", "LOCK", "UNLOCK", "VIBRATION_ON", "SILENT_OFF", + "BT_CONNECTED", "BT_DISCONNECTED", "LIST_REORDER", "LIST_SLIDER", "VOLUME_KEY"); type = "TYPE_VIBRATION"; - retval = tizen.feedback.play(pattern, type); + + retval = false; + for (i = 0; i < pattern.length; i++) { + try{ + retval = tizen.feedback.isPatternSupported(pattern[i], type); + }catch (e){ + } + + if (retval == true) { + break; + } + } + + retval = tizen.feedback.play(pattern[i], type); assert_equals(retval, undefined, "Return value should be undefined."); }, document.title); diff --git a/common/tct-feedback-tizen-tests/feedback/FeedbackManager_stop.html b/common/tct-feedback-tizen-tests/feedback/FeedbackManager_stop.html index a468d7d73..737a4ad23 100755 --- a/common/tct-feedback-tizen-tests/feedback/FeedbackManager_stop.html +++ b/common/tct-feedback-tizen-tests/feedback/FeedbackManager_stop.html @@ -38,11 +38,28 @@ Authors: //==== TEST_CRITERIA MR MNA test(function () { - var pattern, type, retval = null; + var pattern, type, retval = null, i; - pattern = "VOLUME_KEY"; + pattern = new Array("TAP", "SIP", "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7", + "KEY8", "KEY9", "KEY_STAR", "KEY_SHARP", "KEY_BACK", "HOLD", "HW_TAP", "HW_HOLD", "MESSAGE", + "EMAIL", "WAKEUP", "SCHEDULE", "TIMER", "GENERAL", "POWERON", "POWEROFF", "CHARGERCONN", + "CHARGING_ERROR", "FULLCHARGED", "LOWBATT", "LOCK", "UNLOCK", "VIBRATION_ON", "SILENT_OFF", + "BT_CONNECTED", "BT_DISCONNECTED", "LIST_REORDER", "LIST_SLIDER", "VOLUME_KEY"); type = "TYPE_VIBRATION"; - tizen.feedback.play(pattern, type); + + retval = false; + for (i = 0; i < pattern.length; i++) { + try{ + retval = tizen.feedback.isPatternSupported(pattern[i], type); + }catch (e){ + } + + if (retval == true) { + break; + } + } + + tizen.feedback.play(pattern[i], type); retval = tizen.feedback.stop(); assert_equals(retval, undefined, "Return value should be undefined."); }, document.title);