|
3 | 3 | exports[`Connection reporting storage > Should create a connection report if its after a day 1`] = ` |
4 | 4 | [ |
5 | 5 | { |
6 | | - "client_id": "client_week", |
| 6 | + "client_id": "client_one", |
7 | 7 | "sdk": "powersync-js/1.24.5", |
8 | 8 | "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
9 | 9 | "user_id": "user_week", |
10 | 10 | }, |
11 | 11 | { |
12 | | - "client_id": "client_week", |
| 12 | + "client_id": "client_one", |
13 | 13 | "sdk": "powersync-js/1.24.5", |
14 | 14 | "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
15 | 15 | "user_id": "user_week", |
@@ -213,3 +213,239 @@ exports[`Report storage tests > Should show currently connected users 1`] = ` |
213 | 213 | "users": 2, |
214 | 214 | } |
215 | 215 | `; |
| 216 | + |
| 217 | +exports[`Report storage tests > Should show paginated response of all connections of specified client_id 1`] = ` |
| 218 | +{ |
| 219 | + "count": 1, |
| 220 | + "cursor": undefined, |
| 221 | + "items": [ |
| 222 | + { |
| 223 | + "client_id": "client_two", |
| 224 | + "sdk": "powersync-js/1.21.1", |
| 225 | + "user_agent": "powersync-js/1.21.0 powersync-web Chromium/138 linux", |
| 226 | + "user_id": "user_two", |
| 227 | + }, |
| 228 | + ], |
| 229 | + "more": false, |
| 230 | +} |
| 231 | +`; |
| 232 | + |
| 233 | +exports[`Report storage tests > Should show paginated response of all connections with a limit 1`] = ` |
| 234 | +{ |
| 235 | + "count": 4, |
| 236 | + "cursor": "<removed-for-snapshot>", |
| 237 | + "items": [ |
| 238 | + { |
| 239 | + "client_id": "client_one", |
| 240 | + "sdk": "powersync-dart/1.6.4", |
| 241 | + "user_agent": "powersync-dart/1.6.4 Dart (flutter-web) Chrome/128 android", |
| 242 | + "user_id": "user_one", |
| 243 | + }, |
| 244 | + { |
| 245 | + "client_id": "client_four", |
| 246 | + "sdk": "powersync-js/1.21.4", |
| 247 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 248 | + "user_id": "user_four", |
| 249 | + }, |
| 250 | + { |
| 251 | + "client_id": "", |
| 252 | + "sdk": "unknown", |
| 253 | + "user_agent": "Dart (flutter-web) Chrome/128 android", |
| 254 | + "user_id": "user_one", |
| 255 | + }, |
| 256 | + { |
| 257 | + "client_id": "client_two", |
| 258 | + "sdk": "powersync-js/1.21.1", |
| 259 | + "user_agent": "powersync-js/1.21.0 powersync-web Chromium/138 linux", |
| 260 | + "user_id": "user_two", |
| 261 | + }, |
| 262 | + ], |
| 263 | + "more": true, |
| 264 | +} |
| 265 | +`; |
| 266 | + |
| 267 | +exports[`Report storage tests > Should show paginated response of all connections with a limit 2`] = ` |
| 268 | +{ |
| 269 | + "count": 4, |
| 270 | + "cursor": undefined, |
| 271 | + "items": [ |
| 272 | + { |
| 273 | + "client_id": "client_three", |
| 274 | + "sdk": "powersync-js/1.21.2", |
| 275 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 276 | + "user_id": "user_three", |
| 277 | + }, |
| 278 | + { |
| 279 | + "client_id": "client_one", |
| 280 | + "sdk": "powersync-js/1.24.5", |
| 281 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 282 | + "user_id": "user_week", |
| 283 | + }, |
| 284 | + { |
| 285 | + "client_id": "client_month", |
| 286 | + "sdk": "powersync-js/1.23.6", |
| 287 | + "user_agent": "powersync-js/1.23.0 powersync-web Firefox/141 linux", |
| 288 | + "user_id": "user_month", |
| 289 | + }, |
| 290 | + { |
| 291 | + "client_id": "client_expired", |
| 292 | + "sdk": "powersync-js/1.23.7", |
| 293 | + "user_agent": "powersync-js/1.23.0 powersync-web Firefox/141 linux", |
| 294 | + "user_id": "user_expired", |
| 295 | + }, |
| 296 | + ], |
| 297 | + "more": false, |
| 298 | +} |
| 299 | +`; |
| 300 | + |
| 301 | +exports[`Report storage tests > Should show paginated response of all connections with a limit with date range 1`] = ` |
| 302 | +{ |
| 303 | + "count": 4, |
| 304 | + "cursor": "<removed-for-snapshot>", |
| 305 | + "items": [ |
| 306 | + { |
| 307 | + "client_id": "", |
| 308 | + "sdk": "unknown", |
| 309 | + "user_agent": "Dart (flutter-web) Chrome/128 android", |
| 310 | + "user_id": "user_one", |
| 311 | + }, |
| 312 | + { |
| 313 | + "client_id": "client_two", |
| 314 | + "sdk": "powersync-js/1.21.1", |
| 315 | + "user_agent": "powersync-js/1.21.0 powersync-web Chromium/138 linux", |
| 316 | + "user_id": "user_two", |
| 317 | + }, |
| 318 | + { |
| 319 | + "client_id": "client_three", |
| 320 | + "sdk": "powersync-js/1.21.2", |
| 321 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 322 | + "user_id": "user_three", |
| 323 | + }, |
| 324 | + { |
| 325 | + "client_id": "client_one", |
| 326 | + "sdk": "powersync-js/1.24.5", |
| 327 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 328 | + "user_id": "user_week", |
| 329 | + }, |
| 330 | + ], |
| 331 | + "more": true, |
| 332 | +} |
| 333 | +`; |
| 334 | + |
| 335 | +exports[`Report storage tests > Should show paginated response of all connections with a limit with date range 2`] = ` |
| 336 | +{ |
| 337 | + "count": 2, |
| 338 | + "cursor": undefined, |
| 339 | + "items": [ |
| 340 | + { |
| 341 | + "client_id": "", |
| 342 | + "sdk": "unknown", |
| 343 | + "user_agent": "Dart (flutter-web) Chrome/128 android", |
| 344 | + "user_id": "user_one", |
| 345 | + }, |
| 346 | + { |
| 347 | + "client_id": "client_two", |
| 348 | + "sdk": "powersync-js/1.21.1", |
| 349 | + "user_agent": "powersync-js/1.21.0 powersync-web Chromium/138 linux", |
| 350 | + "user_id": "user_two", |
| 351 | + }, |
| 352 | + { |
| 353 | + "client_id": "client_three", |
| 354 | + "sdk": "powersync-js/1.21.2", |
| 355 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 356 | + "user_id": "user_three", |
| 357 | + }, |
| 358 | + { |
| 359 | + "client_id": "client_one", |
| 360 | + "sdk": "powersync-js/1.24.5", |
| 361 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 362 | + "user_id": "user_week", |
| 363 | + }, |
| 364 | + ], |
| 365 | + "more": false, |
| 366 | +} |
| 367 | +`; |
| 368 | + |
| 369 | +exports[`Report storage tests > Should show paginated response of connections of specified user_id 1`] = ` |
| 370 | +{ |
| 371 | + "count": 2, |
| 372 | + "cursor": undefined, |
| 373 | + "items": [ |
| 374 | + { |
| 375 | + "client_id": "client_one", |
| 376 | + "sdk": "powersync-dart/1.6.4", |
| 377 | + "user_agent": "powersync-dart/1.6.4 Dart (flutter-web) Chrome/128 android", |
| 378 | + "user_id": "user_one", |
| 379 | + }, |
| 380 | + { |
| 381 | + "client_id": "", |
| 382 | + "sdk": "unknown", |
| 383 | + "user_agent": "Dart (flutter-web) Chrome/128 android", |
| 384 | + "user_id": "user_one", |
| 385 | + }, |
| 386 | + ], |
| 387 | + "more": false, |
| 388 | +} |
| 389 | +`; |
| 390 | + |
| 391 | +exports[`Report storage tests > Should show paginated response of connections over a date range 1`] = ` |
| 392 | +{ |
| 393 | + "count": 6, |
| 394 | + "cursor": undefined, |
| 395 | + "items": [ |
| 396 | + { |
| 397 | + "client_id": "client_one", |
| 398 | + "sdk": "powersync-dart/1.6.4", |
| 399 | + "user_agent": "powersync-dart/1.6.4 Dart (flutter-web) Chrome/128 android", |
| 400 | + "user_id": "user_one", |
| 401 | + }, |
| 402 | + { |
| 403 | + "client_id": "client_four", |
| 404 | + "sdk": "powersync-js/1.21.4", |
| 405 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 406 | + "user_id": "user_four", |
| 407 | + }, |
| 408 | + { |
| 409 | + "client_id": "client_two", |
| 410 | + "sdk": "powersync-js/1.21.1", |
| 411 | + "user_agent": "powersync-js/1.21.0 powersync-web Chromium/138 linux", |
| 412 | + "user_id": "user_two", |
| 413 | + }, |
| 414 | + { |
| 415 | + "client_id": "", |
| 416 | + "sdk": "unknown", |
| 417 | + "user_agent": "Dart (flutter-web) Chrome/128 android", |
| 418 | + "user_id": "user_one", |
| 419 | + }, |
| 420 | + { |
| 421 | + "client_id": "client_three", |
| 422 | + "sdk": "powersync-js/1.21.2", |
| 423 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 424 | + "user_id": "user_three", |
| 425 | + }, |
| 426 | + { |
| 427 | + "client_id": "client_one", |
| 428 | + "sdk": "powersync-js/1.24.5", |
| 429 | + "user_agent": "powersync-js/1.21.0 powersync-web Firefox/141 linux", |
| 430 | + "user_id": "user_week", |
| 431 | + }, |
| 432 | + ], |
| 433 | + "more": false, |
| 434 | +} |
| 435 | +`; |
| 436 | + |
| 437 | +exports[`Report storage tests > Should show paginated response of connections over a date range of specified client_id and user_id 1`] = ` |
| 438 | +{ |
| 439 | + "count": 1, |
| 440 | + "cursor": undefined, |
| 441 | + "items": [ |
| 442 | + { |
| 443 | + "client_id": "client_one", |
| 444 | + "sdk": "powersync-dart/1.6.4", |
| 445 | + "user_agent": "powersync-dart/1.6.4 Dart (flutter-web) Chrome/128 android", |
| 446 | + "user_id": "user_one", |
| 447 | + }, |
| 448 | + ], |
| 449 | + "more": false, |
| 450 | +} |
| 451 | +`; |
0 commit comments