orderby_spec_test.json 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. {
  2. "orderBy applies filtering based on local state": {
  3. "describeName": "OrderBy:",
  4. "itName": "orderBy applies filtering based on local state",
  5. "tags": [],
  6. "config": {
  7. "useGarbageCollection": true
  8. },
  9. "steps": [
  10. {
  11. "userSet": [
  12. "collection/a",
  13. {
  14. "key": "a",
  15. "sort": 1
  16. }
  17. ]
  18. },
  19. {
  20. "userPatch": [
  21. "collection/b",
  22. {
  23. "sort": 2
  24. }
  25. ]
  26. },
  27. {
  28. "userSet": [
  29. "collection/c",
  30. {
  31. "key": "b"
  32. }
  33. ]
  34. },
  35. {
  36. "userListen": [
  37. 2,
  38. {
  39. "path": "collection",
  40. "filters": [],
  41. "orderBys": [
  42. [
  43. "sort",
  44. "asc"
  45. ]
  46. ]
  47. }
  48. ],
  49. "stateExpect": {
  50. "activeTargets": {
  51. "2": {
  52. "query": {
  53. "path": "collection",
  54. "filters": [],
  55. "orderBys": [
  56. [
  57. "sort",
  58. "asc"
  59. ]
  60. ]
  61. },
  62. "resumeToken": ""
  63. }
  64. }
  65. },
  66. "expect": [
  67. {
  68. "query": {
  69. "path": "collection",
  70. "filters": [],
  71. "orderBys": [
  72. [
  73. "sort",
  74. "asc"
  75. ]
  76. ]
  77. },
  78. "added": [
  79. [
  80. "collection/a",
  81. 0,
  82. {
  83. "key": "a",
  84. "sort": 1
  85. },
  86. "local"
  87. ]
  88. ],
  89. "errorCode": 0,
  90. "fromCache": true,
  91. "hasPendingWrites": true
  92. }
  93. ]
  94. },
  95. {
  96. "watchAck": [
  97. 2
  98. ]
  99. },
  100. {
  101. "watchEntity": {
  102. "docs": [
  103. [
  104. "collection/b",
  105. 1001,
  106. {
  107. "key": "b"
  108. }
  109. ]
  110. ],
  111. "targets": [
  112. 2
  113. ]
  114. }
  115. },
  116. {
  117. "watchCurrent": [
  118. [
  119. 2
  120. ],
  121. "resume-token-2000"
  122. ],
  123. "watchSnapshot": 2000,
  124. "expect": [
  125. {
  126. "query": {
  127. "path": "collection",
  128. "filters": [],
  129. "orderBys": [
  130. [
  131. "sort",
  132. "asc"
  133. ]
  134. ]
  135. },
  136. "added": [
  137. [
  138. "collection/b",
  139. 1001,
  140. {
  141. "key": "b",
  142. "sort": 2
  143. },
  144. "local"
  145. ]
  146. ],
  147. "errorCode": 0,
  148. "fromCache": false,
  149. "hasPendingWrites": true
  150. }
  151. ]
  152. }
  153. ]
  154. }
  155. }