Fix bug 1170271 - Provider does not sync single occurrences deleted occurrences. r=redDragon
CLOSED TREE to test m-c fix bug 1197612 / bug 1156068 --HG-- extra : commitid : 6VrbIb2NnVx
This commit is contained in:
Родитель
ed8428b58c
Коммит
e28211b9c9
|
@ -984,6 +984,7 @@ ItemSaver.prototype = {
|
|||
item = this.masterItems[exc.id];
|
||||
} else {
|
||||
item = (yield this.promiseOfflineStorage.getItem(exc.id))[0];
|
||||
item = item.clone();
|
||||
}
|
||||
|
||||
// If an item was found, we can process this exception. Otherwise
|
||||
|
|
|
@ -967,6 +967,75 @@ add_task(function* test_recurring_event() {
|
|||
gServer.resetClient(client);
|
||||
});
|
||||
|
||||
add_task(function* test_recurring_exception() {
|
||||
gServer.syncs = [{
|
||||
token: "1",
|
||||
events: [{
|
||||
"kind": "calendar#event",
|
||||
"etag": "\"1\"",
|
||||
"id": "go6ijb0b46hlpbu4eeu92njevo",
|
||||
"created": "2006-06-08T21:04:52.000Z",
|
||||
"updated": "2006-06-08T21:05:49.138Z",
|
||||
"summary": "New Event",
|
||||
"creator": gServer.creator,
|
||||
"organizer": gServer.creator,
|
||||
"start": { "dateTime": "2006-06-10T18:00:00+02:00" },
|
||||
"end": {"dateTime": "2006-06-10T20:00:00+02:00" },
|
||||
"iCalUID": "go6ijb0b46hlpbu4eeu92njevo@google.com",
|
||||
"recurrence": [
|
||||
"RRULE:FREQ=WEEKLY"
|
||||
]
|
||||
},{
|
||||
"kind": "calendar#event",
|
||||
"etag": "\"2\"",
|
||||
"id": "go6ijb0b46hlpbu4eeu92njevo_20060617T160000Z",
|
||||
"summary": "New Event changed",
|
||||
"start": { "dateTime": "2006-06-17T18:00:00+02:00" },
|
||||
"end": {"dateTime": "2006-06-17T20:00:00+02:00" },
|
||||
"recurringEventId": "go6ijb0b46hlpbu4eeu92njevo",
|
||||
"originalStartTime": { "dateTime": "2006-06-17T18:00:00+02:00" }
|
||||
}]
|
||||
},{
|
||||
// This sync run tests an exception where the master item is not part
|
||||
// of the item stream.
|
||||
token: "2",
|
||||
events: [{
|
||||
"kind": "calendar#event",
|
||||
"etag": "\"3\"",
|
||||
"id": "go6ijb0b46hlpbu4eeu92njevo_20060617T160000Z",
|
||||
"summary": "New Event changed",
|
||||
"start": { "dateTime": "2006-06-17T18:00:00+02:00" },
|
||||
"end": {"dateTime": "2006-06-17T20:00:00+02:00" },
|
||||
"status": "cancelled",
|
||||
"recurringEventId": "go6ijb0b46hlpbu4eeu92njevo",
|
||||
"originalStartTime": { "dateTime": "2006-06-17T18:00:00+02:00" }
|
||||
}]
|
||||
}];
|
||||
|
||||
let client = yield gServer.getClient();
|
||||
let pclient = cal.async.promisifyCalendar(client.wrappedJSObject);
|
||||
|
||||
let items = yield pclient.getAllItems();
|
||||
equal(items.length, 1);
|
||||
|
||||
let exIds = items[0].recurrenceInfo.getExceptionIds({});
|
||||
equal(exIds.length, 1);
|
||||
|
||||
let ex = items[0].recurrenceInfo.getExceptionFor(exIds[0]);
|
||||
equal(ex.title, "New Event changed");
|
||||
|
||||
client.refresh();
|
||||
yield gServer.waitForLoad(client);
|
||||
|
||||
items = yield pclient.getAllItems();
|
||||
equal(items.length, 1);
|
||||
|
||||
exIds = items[0].recurrenceInfo.getExceptionIds({});
|
||||
equal(exIds.length, 0);
|
||||
|
||||
gServer.resetClient(client);
|
||||
});
|
||||
|
||||
add_task(function* test_import_invitation() {
|
||||
Preferences.set("calendar.google.enableAttendees", true);
|
||||
let client = yield gServer.getClient();
|
||||
|
|
Загрузка…
Ссылка в новой задаче