From: qunfang.lin Date: Wed, 21 Aug 2019 19:28:51 +0000 (+0800) Subject: [common][systeminfo][fix assert_throws description] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5574a682ce1aad80569015c9bf6b51c6cb50d1e;p=test%2Ftct%2Fweb%2Fapi.git [common][systeminfo][fix assert_throws description] -increase readability for reporting errors Change-Id: I01bcdf8d34e46ff3ba4f9a2aeeb43a28a464780e Signed-off-by: qunfang.lin --- diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_errorCallback_invalid_cb.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_errorCallback_invalid_cb.html index 409dc4e31..24e78930b 100755 --- a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_errorCallback_invalid_cb.html +++ b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_errorCallback_invalid_cb.html @@ -53,7 +53,7 @@ t.step(function () { assert_throws(TYPE_MISMATCH_EXCEPTION, function () { tizen.systeminfo.addPropertyValueArrayChangeListener("STORAGE", addPropertyValueArrayChangeListenerSuccess, {highThreshold: 0, lowThreshold: 1}, addPropertyValueArrayChangeListenerError); - }, TYPE_MISMATCH_EXCEPTION + " should be thrown - given incorrect error callback."); + }, "TypeMismatchError should be thrown - given incorrect error callback."); t.done(); }); diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_successCallback_invalid_cb.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_successCallback_invalid_cb.html index 178c1656e..adc5ee907 100755 --- a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_successCallback_invalid_cb.html +++ b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_successCallback_invalid_cb.html @@ -47,7 +47,7 @@ t.step(function () { assert_throws(TYPE_MISMATCH_EXCEPTION, function () { tizen.systeminfo.addPropertyValueArrayChangeListener("STORAGE", addPropertyValueArrayChangeListenerSuccess); - }, TYPE_MISMATCH_EXCEPTION + " should be thrown - given incorrect success callback."); + }, "TypeMismatchError should be thrown - given incorrect success callback."); t.done(); }); diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueChangeListener_options_invalid.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueChangeListener_options_invalid.html index bf2bf33f8..044bbcd6e 100755 --- a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueChangeListener_options_invalid.html +++ b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueChangeListener_options_invalid.html @@ -44,12 +44,11 @@ t.step(function () { addPropertyValueChangeListenerSuccess = t.step_func(function (property) { assert_unreached("Should not be here."); }); - - assert_throws(INVALID_VALUES_EXCEPTION, function () { - for (i = 0; i < systemInfoPropertyId.length; i++) { - tizen.systeminfo.addPropertyValueChangeListener(systemInfoPropertyId[i], addPropertyValueChangeListenerSuccess, {highThreshold: -1, lowThreshold: 1}); - }}, INVALID_VALUES_EXCEPTION + " should be thrown - given incorrect error callback."); + assert_throws(INVALID_VALUES_EXCEPTION, function () { + for (i = 0; i < systemInfoPropertyId.length; i++) { + tizen.systeminfo.addPropertyValueChangeListener(systemInfoPropertyId[i], addPropertyValueChangeListenerSuccess, {highThreshold: -1, lowThreshold: 1}); + }}, "InvalidValuesError should be thrown - given incorrect error callback."); t.done(); }); diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getCount_misarg.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getCount_misarg.html index e2ef6fbb1..7653f9fb7 100755 --- a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getCount_misarg.html +++ b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getCount_misarg.html @@ -38,7 +38,7 @@ Author: test(function () { assert_throws( TYPE_MISMATCH_EXCEPTION, function () { tizen.systeminfo.getCount(); - }, TYPE_MISMATCH_EXCEPTION + " should be thrown"); + }, "TypeMismatchError should be thrown"); }, document.title); diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_errorCallback_invalid_cb.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_errorCallback_invalid_cb.html index 9f6e73f82..c42795caf 100755 --- a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_errorCallback_invalid_cb.html +++ b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_errorCallback_invalid_cb.html @@ -54,7 +54,7 @@ t.step(function () { for (i = 0; i < systemInfoPropertyId.length; i++) { assert_throws(TYPE_MISMATCH_EXCEPTION, function () { tizen.systeminfo.getPropertyValueArray(systemInfoPropertyId[i], getPropertyValueArraySuccess, getPropertyValueArrayError); - }, TYPE_MISMATCH_EXCEPTION + " should be thrown"); + }, "TypeMismatchError should be thrown"); } t.done(); }); diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_misarg.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_misarg.html index 92c104519..b4fab9552 100755 --- a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_misarg.html +++ b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_misarg.html @@ -37,7 +37,7 @@ Author: test(function () { assert_throws( TYPE_MISMATCH_EXCEPTION, function () { tizen.systeminfo.getPropertyValueArray(); - }, TYPE_MISMATCH_EXCEPTION + " should be thrown"); + }, "TypeMismatchError should be thrown"); }, document.title); diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_successCallback_invalid_cb.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_successCallback_invalid_cb.html index 22590cd3e..723052036 100755 --- a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_successCallback_invalid_cb.html +++ b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_successCallback_invalid_cb.html @@ -25,6 +25,7 @@ Author: +
diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValue_successCallback_missarg.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValue_successCallback_missarg.html index cd521607f..0405b83b8 100755 --- a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValue_successCallback_missarg.html +++ b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValue_successCallback_missarg.html @@ -44,7 +44,7 @@ test(function () { assert_throws(TYPE_MISMATCH_EXCEPTION, function () { tizen.systeminfo.getPropertyValue(systemInfoPropertyId[i]); - }, TYPE_MISMATCH_ERR + " should be thrown"); + }, "TypeMismatchError should be thrown"); } }, document.title); diff --git a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_removePropertyValueChangeListener_listenerId_TypeMismatch.html b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_removePropertyValueChangeListener_listenerId_TypeMismatch.html index 72d60d566..ebb051eb3 100755 --- a/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_removePropertyValueChangeListener_listenerId_TypeMismatch.html +++ b/common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_removePropertyValueChangeListener_listenerId_TypeMismatch.html @@ -45,7 +45,7 @@ test(function () { assert_throws(INVALID_VALUES_EXCEPTION, function () { tizen.systeminfo.removePropertyValueChangeListener(listenerId); - }, InvalidValuesError + " should be thrown"); + }, "InvalidValuesError should be thrown"); } }, document.title);