import 'package:flutter_test/flutter_test.dart'; import 'package:cxyz_android/sources/mangatown/mangatown_source.dart'; import 'package:cxyz_android/sources/source.dart'; @Tags(['network']) void main() { test( 'latest pagination: offset 0 and 30 yield different first slugs', () async { final source = MangaTownSource(); final first = await source.loadCatalog( CatalogMenuKind.latest, offset: 0, limit: 30, ); final second = await source.loadCatalog( CatalogMenuKind.latest, offset: 30, limit: 30, ); expect(first, isNotEmpty); expect(second, isNotEmpty); expect(first.first.slug, isNot(second.first.slug)); final firstSlugs = first.map((c) => c.slug).toSet(); expect( second.any((c) => firstSlugs.contains(c.slug)), isFalse, reason: 'page 2 should not overlap page 1', ); }, timeout: const Timeout(Duration(seconds: 90)), ); }