Files
BlockSeasons/test/data/content_repository_test.dart
T
airkjw 7bc26447f7 Wire season flow: map screen, progress save, win recording, next stage
SaveRepository (versioned JSON over prefs) with best-result merging and
unlock walking; ContentRepository loads the bundled pack; SeasonFlow/
Progress notifiers orchestrate stage start -> win record -> advance.
Season map grid with stars/locks, Home -> Map -> Game navigation,
close button, next-stage action on the win overlay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 17:04:45 +09:00

29 lines
1.1 KiB
Dart

import 'package:block_seasons/data/content_repository.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
test('loads the bundled Season 1 pack with 60 calibrated stages', () async {
final repo = ContentRepository();
final pack = await repo.loadBundledSeason('season_001');
expect(pack.seasonId, 'season_001');
expect(pack.stages, hasLength(60));
expect(pack.titleFor('ko'), '첫 개화');
// Sanity: every stage has a positive budget and at least one objective.
for (final stage in pack.stages) {
expect(stage.moveLimit, greaterThan(0), reason: stage.id);
expect(stage.objectives, isNotEmpty, reason: stage.id);
expect(stage.stars.threeMovesLeft, greaterThan(stage.stars.twoMovesLeft),
reason: stage.id);
}
});
test('availableSeasons returns the bundled season', () async {
final repo = ContentRepository();
final seasons = await repo.availableSeasons();
expect(seasons.map((s) => s.seasonId), contains('season_001'));
});
}