{ "Events are raised after watch ack": { "describeName": "Collections:", "itName": "Events are raised after watch ack", "tags": [ ], "config": { "numClients": 1, "useEagerGCForMemory": true }, "steps": [ { "userListen": { "query": { "filters": [ ], "orderBys": [ ], "path": "collection" }, "targetId": 2 }, "expectedState": { "activeTargets": { "2": { "queries": [ { "filters": [ ], "orderBys": [ ], "path": "collection" } ], "resumeToken": "" } } } }, { "watchAck": [ 2 ] }, { "watchEntity": { "docs": [ { "createTime": 0, "key": "collection/key", "options": { "hasCommittedMutations": false, "hasLocalMutations": false }, "value": { "foo": "bar" }, "version": 1000 } ], "targets": [ 2 ] } }, { "watchCurrent": [ [ 2 ], "resume-token-1001" ] }, { "watchSnapshot": { "targetIds": [ ], "version": 1001 }, "expectedSnapshotEvents": [ { "added": [ { "createTime": 0, "key": "collection/key", "options": { "hasCommittedMutations": false, "hasLocalMutations": false }, "value": { "foo": "bar" }, "version": 1000 } ], "errorCode": 0, "fromCache": false, "hasPendingWrites": false, "query": { "filters": [ ], "orderBys": [ ], "path": "collection" } } ] } ] }, "Events are raised for local sets before watch ack": { "describeName": "Collections:", "itName": "Events are raised for local sets before watch ack", "tags": [ ], "config": { "numClients": 1, "useEagerGCForMemory": true }, "steps": [ { "userListen": { "query": { "filters": [ ], "orderBys": [ ], "path": "collection" }, "targetId": 2 }, "expectedState": { "activeTargets": { "2": { "queries": [ { "filters": [ ], "orderBys": [ ], "path": "collection" } ], "resumeToken": "" } } } }, { "userSet": [ "collection/key", { "foo": "bar" } ], "expectedSnapshotEvents": [ { "added": [ { "createTime": 0, "key": "collection/key", "options": { "hasCommittedMutations": false, "hasLocalMutations": true }, "value": { "foo": "bar" }, "version": 0 } ], "errorCode": 0, "fromCache": true, "hasPendingWrites": true, "query": { "filters": [ ], "orderBys": [ ], "path": "collection" } } ] } ] } }