import 'package:flutter_test/flutter_test.dart'; import 'package:words999/services/words_repository.dart'; import 'package:words999/services/traditions_repository.dart'; import 'package:words999/services/lenormand_pairs_repository.dart'; import 'package:words999/services/tarot_majors_repository.dart'; import 'package:words999/services/ogham_feda_repository.dart'; void main() { setUpAll(() async { TestWidgetsFlutterBinding.ensureInitialized(); await WordsRepository().init(); await TraditionsRepository().init(); await LenormandPairsRepository().init(); await TarotMajorsRepository().init(); await OghamFedaRepository().init(); }); test('Traditions matches for sample words in lexicon', () { final repo = TraditionsRepository(); expect(repo.traditions.isNotEmpty, true); // Look for matches for known symbols final matchesVtor = repo.findMatchesForWord('вторник'); expect(matchesVtor.isNotEmpty, true); expect(matchesVtor.any((m) => m.tradition.id == 'days_of_week'), true); final matchesKlever = repo.findMatchesForWord('клевер'); expect(matchesKlever.isNotEmpty, true); expect(matchesKlever.any((m) => m.tradition.id == 'lenormand'), true); final matchesShut = repo.findMatchesForWord('шут'); expect(matchesShut.isNotEmpty, true); expect(matchesShut.any((m) => m.tradition.id == 'tarot'), true); }); test('Words retain both canonical description and oracle meaning', () { final wordsRepo = WordsRepository(); final sample = wordsRepo.allWords.take(50); for (final w in sample) { // canonical description must never be empty expect(w.description.isNotEmpty, true); } }); }