From: Andrzej Krolikowski Date: Mon, 14 Oct 2013 15:17:40 +0000 (+0200) Subject: [Calendar] various fixes, part 4 X-Git-Tag: 2.2.1_release~51^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0676893e765c14a63497714a2d149e497e92b5d;p=test%2Ftct%2Fweb%2Fapi.git [Calendar] various fixes, part 4 Change-Id: I9dab46b242269210610c380e9f249b9e6d42c76e --- diff --git a/tct-calendar-tizen-tests/calendar/CalendarAlarm_constructor_TZDate.html b/tct-calendar-tizen-tests/calendar/CalendarAlarm_constructor_TZDate.html index bdecf2bb9..c2e5e4b8d 100644 --- a/tct-calendar-tizen-tests/calendar/CalendarAlarm_constructor_TZDate.html +++ b/tct-calendar-tizen-tests/calendar/CalendarAlarm_constructor_TZDate.html @@ -32,8 +32,6 @@ Authors:
diff --git a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_endDate_invalid_obj.html b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_endDate_invalid_obj.html index 1c300ad44..6f4b5a9ef 100644 --- a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_endDate_invalid_obj.html +++ b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_endDate_invalid_obj.html @@ -40,7 +40,7 @@ Authors: //==== SPEC Tizen Web API:Social:Calendar:CalendarEvent:expandRecurrence M //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html //==== TEST_CRITERIA MTO -var t = async_test(document.title), startDate, endDate, ev; +var t = async_test(document.title), startDate, endDate, ev, expandSuccessCB; t.step(function () { startDate = new tizen.TZDate(2012, 0, 31); ev = new tizen.CalendarEvent({ @@ -53,9 +53,9 @@ t.step(function () { }) }); - function expandSuccessCB(events) { + expandSuccessCB = t.step_func(function (events) { assert_unreached("expandRecurrence() success callback"); - } + }); endDate = { year: 2013, @@ -66,7 +66,7 @@ t.step(function () { ev.expandRecurrence(startDate, endDate, expandSuccessCB); }); - this.done(); + t.done(); }); diff --git a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_errorCallback_TypeMismatch.html b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_errorCallback_TypeMismatch.html index 70582a399..e0ad718e2 100644 --- a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_errorCallback_TypeMismatch.html +++ b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_errorCallback_TypeMismatch.html @@ -69,7 +69,7 @@ t.step(function () { }, exceptionName + " should be thrown - given incorrect."); } - this.done(); + t.done(); }); diff --git a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_errorCallback_invalid_cb.html b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_errorCallback_invalid_cb.html index 0436caeff..9dc966970 100644 --- a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_errorCallback_invalid_cb.html +++ b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_errorCallback_invalid_cb.html @@ -40,7 +40,8 @@ Authors: //==== SPEC Tizen Web API:Social:Calendar:CalendarEvent:expandRecurrence M //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html //==== TEST_CRITERIA MTCB -var t = async_test(document.title), startDate, endDate, ev; +var t = async_test(document.title), startDate, endDate, ev, + expandSuccessCB; t.step(function () { startDate = new tizen.TZDate(2012, 0, 31); endDate = new tizen.TZDate(2012, 4, 31); @@ -54,15 +55,15 @@ t.step(function () { }) }); - function expandSuccessCB(events) { + expandSuccessCB = t.step_func(function (events) { assert_unreached("expandRecurrence() success callback"); - } + }); assert_throws(TYPE_MISMATCH_EXCEPTION, function () { ev.expandRecurrence(startDate, endDate, expandSuccessCB, {onerror:function (){}}); }); - this.done(); + t.done(); }); diff --git a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_missarg.html b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_missarg.html index 84ebda3a0..733cf258e 100644 --- a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_missarg.html +++ b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_missarg.html @@ -39,7 +39,7 @@ Authors: //==== SPEC Tizen Web API:Social:Calendar:CalendarEvent:expandRecurrence M //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html //==== TEST_CRITERIA MC MMA -var t = async_test(document.title), startDate, endDate, ev; +var t = async_test(document.title), startDate, endDate, ev, expandSuccessCB; t.step(function () { startDate = new tizen.TZDate(2012, 0, 1); endDate = new tizen.TZDate(2012, 0, 31); @@ -53,9 +53,9 @@ t.step(function () { }) }); - function expandSuccessCB(events) { + expandSuccessCB = t.step_func(function (events) { assert_unreached("expandRecurrence() success callback"); - } + }); assert_throws(TYPE_MISMATCH_EXCEPTION, function () { ev.expandRecurrence(1, endDate, expandSuccessCB, null); @@ -100,7 +100,8 @@ t.step(function () { assert_throws(TYPE_MISMATCH_EXCEPTION, function () { ev.expandRecurrence(1, 2); }); - this.done(); + + t.done(); }); diff --git a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_startDate_TypeMismatch.html b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_startDate_TypeMismatch.html index d20745991..963a0c60b 100644 --- a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_startDate_TypeMismatch.html +++ b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_startDate_TypeMismatch.html @@ -40,7 +40,8 @@ Authors: //==== SPEC Tizen Web API:Social:Calendar:CalendarEvent:expandRecurrence M //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html //==== TEST_CRITERIA MC -var t = async_test(document.title), endDate, ev, i, param, exceptionName, conversionTable; +var t = async_test(document.title), endDate, ev, i, param, exceptionName, conversionTable, + expandSuccessCB; t.step(function () { endDate = new tizen.TZDate(2012, 0, 31); ev = new tizen.CalendarEvent({ @@ -53,9 +54,9 @@ t.step(function () { }) }); - function expandSuccessCB(events) { + expandSuccessCB = t.step_func(function (events) { assert_unreached("expandRecurrence() success callback"); - } + }); conversionTable = getTypeConversionExceptions("object", false); for (i = 0; i < conversionTable.length; i++) { @@ -68,7 +69,7 @@ t.step(function () { }, exceptionName + " should be thrown - given incorrect."); } - this.done(); + t.done(); }); diff --git a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_startDate_invalid_obj.html b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_startDate_invalid_obj.html index e110b3b64..a1ac027b5 100644 --- a/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_startDate_invalid_obj.html +++ b/tct-calendar-tizen-tests/calendar/CalendarEvent_expandRecurrence_startDate_invalid_obj.html @@ -40,7 +40,7 @@ Authors: //==== SPEC Tizen Web API:Social:Calendar:CalendarEvent:expandRecurrence M //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html //==== TEST_CRITERIA MTO -var t = async_test(document.title), startDate, endDate, ev; +var t = async_test(document.title), startDate, endDate, ev, expandSuccessCB; t.step(function () { endDate = new tizen.TZDate(2012, 0, 31); ev = new tizen.CalendarEvent({ @@ -53,9 +53,9 @@ t.step(function () { }) }); - function expandSuccessCB(events) { + expandSuccessCB = t.step_func(function (events) { assert_unreached("expandRecurrence() success callback"); - } + }); startDate = { year: 2013, @@ -66,7 +66,7 @@ t.step(function () { ev.expandRecurrence(startDate, endDate, expandSuccessCB); }); - this.done(); + t.done(); }); diff --git a/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_errorCallback_invalid_cb.html b/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_errorCallback_invalid_cb.html index bbd571c83..48194d9ea 100644 --- a/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_errorCallback_invalid_cb.html +++ b/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_errorCallback_invalid_cb.html @@ -39,7 +39,7 @@ var t = async_test(document.title), calendar, successCallback, errorCallback; t.step(function () { successCallback = t.step_func(function (calendars) { - assert_unreached("Invalid callback invoked"); + assert_unreached("Success callback invoked"); }); errorCallback = { diff --git a/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_missarg.html b/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_missarg.html index 644c73185..e280c4199 100644 --- a/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_missarg.html +++ b/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_missarg.html @@ -32,22 +32,19 @@ Authors:
diff --git a/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getCalendars_successcallback_invalid.html b/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getCalendars_successcallback_invalid.html index 020622983..d064b315e 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getCalendars_successcallback_invalid.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getCalendars_successcallback_invalid.html @@ -49,7 +49,7 @@ Authors: test(function (){ assert_throws(TYPE_MISMATCH_EXCEPTION, function (){ tizen.calendar.getCalendars("EVENT", false); - }, "TypeMismatchError exception."); + }, "Given incorrect successCallback"); }, document.title); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_CalendarType_error.html b/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_CalendarType_error.html index 73fbe171b..5b08db47c 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_CalendarType_error.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_CalendarType_error.html @@ -47,7 +47,7 @@ Authors: test(function (){ assert_throws(TYPE_MISMATCH_EXCEPTION, function (){ tizen.calendar.getDefaultCalendar("123"); - }, "TypeMismatchError exception."); + }, "Given incorrect type"); }, document.title); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_null.html b/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_null.html index 8ce64e59b..67f997791 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_null.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_null.html @@ -48,7 +48,7 @@ Authors: test(function (){ assert_throws(TYPE_MISMATCH_EXCEPTION, function (){ tizen.calendar.getDefaultCalendar(null); - }, "TypeMismatchError exception."); + }, "Given incorrect type"); }, document.title); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_Calendar_addBatch_error_events.html b/tct-calendar-tizen-tests/calendar/Calendar_Calendar_addBatch_error_events.html index 8bb016784..1855ce02c 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_Calendar_addBatch_error_events.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_Calendar_addBatch_error_events.html @@ -41,18 +41,17 @@ Authors:
diff --git a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_errorCallback_TypeMismatch.html b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_errorCallback_TypeMismatch.html index 1fefc55f4..34e3ca001 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_errorCallback_TypeMismatch.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_errorCallback_TypeMismatch.html @@ -44,7 +44,7 @@ setup({timeout: 10000}); t.step(function () { successCallback = t.step_func(function () { - assert_unreached("addBatch() success callback shoult not be invoked."); + assert_unreached("addBatch() success callback invoked."); }); calendar = tizen.calendar.getDefaultCalendar("EVENT"); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_errorCallback_invalid_cb.html b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_errorCallback_invalid_cb.html index ed9edb791..da04299ef 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_errorCallback_invalid_cb.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_errorCallback_invalid_cb.html @@ -32,28 +32,34 @@ Authors:
diff --git a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_items_TypeMismatch.html b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_items_TypeMismatch.html index 04e07a25a..28e0a8b89 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_items_TypeMismatch.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_items_TypeMismatch.html @@ -43,12 +43,12 @@ setup({timeout: 10000}); t.step(function () { - successCallback = t.step_func(function (value) { - assert_unreached("addBatch() success callback shoult not be invoked."); + successCallback = t.step_func(function (items) { + assert_unreached("addBatch() success callback invoked."); }); errorCallback = t.step_func(function (error) { - assert_unreached("addBatch() error callback shoult not be invoked: " + error.name + " msg: " + error.message); + assert_unreached("addBatch() error callback invoked: " + error.name + " msg: " + error.message); }); calendar = tizen.calendar.getDefaultCalendar("EVENT"); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_successCallback_TypeMismatch.html b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_successCallback_TypeMismatch.html index 8f518f5a5..780d95518 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_successCallback_TypeMismatch.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_successCallback_TypeMismatch.html @@ -44,7 +44,7 @@ setup({timeout: 10000}); t.step(function () { errorCallback = t.step_func(function (error) { - assert_unreached("addBatch() error callback shoult not be invoked: " + error.name + " msg: " + error.message); + assert_unreached("addBatch() error callback invoked: " + error.name + " msg: " + error.message); }); calendar = tizen.calendar.getDefaultCalendar("EVENT"); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_find_event_usage.html b/tct-calendar-tizen-tests/calendar/Calendar_find_event_usage.html index 5a38b4362..0d7fe63fe 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_find_event_usage.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_find_event_usage.html @@ -46,8 +46,6 @@ var t = async_test(document.title, {"timeout": 30000}), succCount = 10, firstFilter, secondFilter, eventCalendar = tizen.calendar.getDefaultCalendar("EVENT"); t.step(function () { - - onFindSuccessCB = t.step_func(function (items) { succCount--; if (succCount === 0) { diff --git a/tct-calendar-tizen-tests/calendar/Calendar_find_sortMode_TypeMismatch.html b/tct-calendar-tizen-tests/calendar/Calendar_find_sortMode_TypeMismatch.html index ba08bbf38..5b9dab767 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_find_sortMode_TypeMismatch.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_find_sortMode_TypeMismatch.html @@ -36,7 +36,7 @@ Authors: //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html //==== TEST_CRITERIA MC var t = async_test(document.title), successCallback, eventInit, - calendar, ev, conversionTable, exceptionName = "TypeMismatchError", i, errorCallback, + calendar, ev, conversionTable, exceptionName, i, errorCallback, filter, sortMode; t.step(function () { eventInit = {description:"HTML5 Introduction", diff --git a/tct-calendar-tizen-tests/calendar/Calendar_get_NotFoundError.html b/tct-calendar-tizen-tests/calendar/Calendar_get_NotFoundError.html index b82e8d554..85bc24d92 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_get_NotFoundError.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_get_NotFoundError.html @@ -63,7 +63,7 @@ test(function () { assert_throws(NOT_FOUND_EXCEPTION, function () { calendar.get(ev1.id); - }, "NotFoundError exception should be thrown."); + }, "Trying to get removed id"); }, document.title); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_errorCallback_invalid_cb.html b/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_errorCallback_invalid_cb.html index 6f4b9f162..b1a17b47c 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_errorCallback_invalid_cb.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_errorCallback_invalid_cb.html @@ -48,7 +48,7 @@ t.step(function () { calendar = tizen.calendar.getDefaultCalendar("EVENT"); assert_throws(TYPE_MISMATCH_EXCEPTION, function () { calendar.removeBatch([123], successCallback, {onerror:function (){}}); - }, "TypeMismatchError should be thrown - given incorrect ids."); + }, "Given incorrect ids."); t.done(); }); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener.html b/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener.html index 31b776445..d1bd2e9c2 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener.html @@ -36,32 +36,38 @@ Authors: //==== LABEL Check whether removeChangeListener() works correctly //==== SPEC Tizen Web API:Social:Calendar:Calendar:removeChangeListener M //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html +//==== ONLOAD_DELAY 10 //==== TEST_CRITERIA MMINA MAST MR -var t = async_test(document.title, {timeout: 3000}), - watcherId = 0, watcher, ev, calendar, start, end, rule, i = 0, - onError, onsuccess, filter, returnedValue; +setup({timeout: 10000}); + +var t = async_test(document.title, {timeout: 10000}), + watcherId = 0, watcher, ev, calendar, start, end, rule, + findError, findSuccess, filter, returnedValue; t.step(function () { - onError = t.step_func(function (events) { - assert_unreached("removeChangeListener failed"); - }); - onsuccess = t.step_func(function (events) { - calendar.remove(events[0].id); + findSuccess = t.step_func(function (events) { + assert_greater_than(events.length, 0, "Received empty events array"); returnedValue = calendar.removeChangeListener(watcherId); + + calendar.remove(events[0].id); assert_equals(returnedValue, undefined, "Incorect returned value from removeChangeListener method"); - if (i !== 3) { + setTimeout(t.step_func(function () { t.done(); - } - assert_unreached("removeChangeListener failed"); + }, 3000)); + }); + + findError = t.step_func(function (error) { + assert_unreached("find() error callback: name:" + error.name + ", msg:" + error.message); }); + watcher = { onitemsadded: t.step_func(function (items) { - calendar.find(onsuccess, onError, filter); + calendar.find(findSuccess, findError, filter); }), onitemsremoved: t.step_func( function (ids) { - i = 3; + assert_unreached("onitemsremoved() invoked with ids = " + ids); }) }; diff --git a/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener_valid_argument.html b/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener_valid_argument.html index 1724861c0..a86dec192 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener_valid_argument.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener_valid_argument.html @@ -37,43 +37,39 @@ Authors: //==== SPEC Tizen Web API:Social:Calendar:Calendar:removeChangeListener M //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html //==== TEST_CRITERIA MMINA -var listenerArrayEvent = []; -var listenerArrayTask = []; -var eventWatcher = { - onitemsadded: function (events) { - }, - onitemsupdated: function (events) { - }, - onitemsremoved: function (ids) { - } -}; - -var taskWatcher = { - onitemsadded: function (tasks) { - }, - onitemsupdated: function (tasks) { - }, - onitemsremoved: function (ids) { - } -}; test(function () { - var eventCalendar = tizen.calendar.getDefaultCalendar("EVENT"), + var listenerArrayEvent = [], listenerArrayTask = [], eventWatcher, taskWatcher, + eventCalendar = tizen.calendar.getDefaultCalendar("EVENT"), taskCalendar = tizen.calendar.getDefaultCalendar("TASK"); + eventWatcher = { + onitemsadded: function (events) { + }, + onitemsupdated: function (events) { + }, + onitemsremoved: function (ids) { + } + }; + + taskWatcher = { + onitemsadded: function (tasks) { + }, + onitemsupdated: function (tasks) { + }, + onitemsremoved: function (ids) { + } + }; + if (!listenerArrayTask.length) { - listenerArrayTask.push( - taskCalendar.addChangeListener(taskWatcher) - ); + listenerArrayTask.push(taskCalendar.addChangeListener(taskWatcher)); } taskCalendar.removeChangeListener(listenerArrayTask[0]); listenerArrayEvent.shift(); if (!listenerArrayEvent.length) { - listenerArrayEvent.push( - eventCalendar.addChangeListener(eventWatcher) - ); + listenerArrayEvent.push(eventCalendar.addChangeListener(eventWatcher)); } taskCalendar.removeChangeListener(listenerArrayTask[0], 1); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_eventType_with_optional_null.html b/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_eventType_with_optional_null.html index e3b0770a9..8db2daeac 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_eventType_with_optional_null.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_eventType_with_optional_null.html @@ -40,8 +40,8 @@ Authors: //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html //==== PRIORITY P1 //==== TEST_CRITERIA MMINA -var t = async_test(document.title), succCount = 3, onUpdateBatchErrorCB, onUpdateBatchSuccessCB, i, eventCalendar = tizen.calendar.getDefaultCalendar("EVENT"), - events, onAddBatchSuccessCB; +var t = async_test(document.title), succCount = 3, onUpdateBatchErrorCB, onUpdateBatchSuccessCB, + i, eventCalendar = tizen.calendar.getDefaultCalendar("EVENT"), events, onAddBatchSuccessCB; t.step(function () { onUpdateBatchErrorCB = t.step_func(function (response) { @@ -49,7 +49,8 @@ t.step(function () { }); onUpdateBatchSuccessCB = t.step_func(function () { - if (--succCount === 0) { + succCount--; + if (succCount === 0) { t.done(); } }); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_missarg.html b/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_missarg.html index 3eae6ffa7..b5da170c7 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_missarg.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_missarg.html @@ -69,7 +69,7 @@ t.step(function () { eventCalendar.updateBatch(); }); - this.done(); + t.done(); }); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_taskType_with_optional_null.html b/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_taskType_with_optional_null.html index 2a0990066..386b41f2b 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_taskType_with_optional_null.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_taskType_with_optional_null.html @@ -53,7 +53,8 @@ t.step(function () { }); onUpdateBatchSuccessCB = t.step_func(function () { - if (--succCount === 0) { + succCount--; + if (succCount === 0) { t.done(); } }); diff --git a/tct-calendar-tizen-tests/calendar/support/calendar_common.js b/tct-calendar-tizen-tests/calendar/support/calendar_common.js index cdda81dd1..c5ddaaf3f 100644 --- a/tct-calendar-tizen-tests/calendar/support/calendar_common.js +++ b/tct-calendar-tizen-tests/calendar/support/calendar_common.js @@ -29,25 +29,10 @@ Authors: */ -var CalendarType = { "EVENT":2, "TASK":1 }; -var CalendarTextFormat = { "ICALENDAR_20":0, "VCALENDAR_10":1 }; var AlarmMethod = { "SOUND":0, "DISPLAY":1 }; var RecurrenceRuleFrequency = { "DAILY":0, "WEEKLY":1, "MONTHLY":2, "YEARLY":3 }; -var EventAvailability = { "BUSY":0, "FREE":1 }; -var AttendeeType = { "INDIVIDUAL":0, "GROUP":1, "RESOURCE":2, "ROOM":3, "UNKNOWN":4 }; -var AttendeeStatus = { "PENDING":0, "ACCEPTED":1, "DECLINED":2, "TENTATIVE":3, "DELEGATED":4, "COMPLETED":5, "IN_PROCESS":6 }; -var AttendeeRole = { "REQ_PARTICIPANT":0, "OPT_PARTICIPANT":1, "NON_PARTICIPANT":2, "CHAIR":3 }; -var CalendarItemPriority = { "HIGH":0, "MEDIUM":1, "LOW":2 }; -var CalendarItemVisibility = { "PUBLIC":0, "PRIVATE":1, "CONFIDENTIAL":2 }; -var CalendarItemStatus = { "TENTATIVE":0, "CONFIRMED":1, "CANCELLED":2, "NEEDS_ACTION":3, "IN_PROCESS":4, "COMPLETED":5 }; var DAYS = ["MO", "TU", "WE", "TH", "FR", "SA", "SU"]; -var TYPE_MISMATCH_ERR = 'TypeMismatchError'; -var INVALID_VALUES_ERR = 'InvalidValuesError'; -var NOT_SUPPORTED_ERR = 'NotSupportedError'; -var NOT_FOUND_ERR = 'NotFoundError'; - - function events_to_ids(events) { var ids = []; for (var i=0; i - + /opt/tct-calendar-tizen-tests/calendar/Calendar_Calendar_addBatch_error_events.html @@ -3063,7 +3063,7 @@ - + /opt/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener.html diff --git a/tct-calendar-tizen-tests/tests.xml b/tct-calendar-tizen-tests/tests.xml index b4cceb88b..65edeb980 100644 --- a/tct-calendar-tizen-tests/tests.xml +++ b/tct-calendar-tizen-tests/tests.xml @@ -228,7 +228,7 @@ /opt/tct-calendar-tizen-tests/calendar/Calendar_CalendarEvent_attri_id.html - + /opt/tct-calendar-tizen-tests/calendar/Calendar_Calendar_addBatch_error_events.html @@ -1278,7 +1278,7 @@ /opt/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_with_successCallback.html - + /opt/tct-calendar-tizen-tests/calendar/Calendar_removeChangeListener.html