Files
firebase-ios-sdk/Firestore/Example/Tests/SpecTests/json/collection_spec_test.json
T
wu-hui 14e28121e2 Release LimitToLast (#4616)
* [1/4] Split Query and Target, and make LocalStore/RemoteStore work with Target. (#4413)

* [2/4]LimitToLast: Make SyncEngine work with Target (#4491)

* [3/4] Implement LimitToLast (#4505)
2020-01-08 09:04:28 -08:00

170 lines
3.6 KiB
JSON

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