feat: session start screen, question context input, and G4F-style AI multi-provider fallback
This commit is contained in:
@@ -63,25 +63,30 @@ void main() {
|
||||
expect(repo.getPreviousWord(0).sessionNumber, equals(999));
|
||||
});
|
||||
|
||||
test('History entries can be added, retrieved, and cleared', () async {
|
||||
test('History entries can be added, updated with AI interpretation, and cleared', () async {
|
||||
await repo.clearHistory();
|
||||
expect(repo.history.isEmpty, isTrue);
|
||||
|
||||
final entry = HistoryEntry(
|
||||
id: '1',
|
||||
id: 'hist_1',
|
||||
timestamp: DateTime(2026, 8, 31, 12, 0),
|
||||
word: 'огонь',
|
||||
sessionNumber: 777,
|
||||
partOfSpeech: 'существительное',
|
||||
symbolicMeaning: 'Очищающее пламя трансформации',
|
||||
readingType: 'Жребий момента',
|
||||
question: 'В чем суть текущего вызова?',
|
||||
);
|
||||
|
||||
await repo.addHistoryEntry(entry);
|
||||
expect(repo.history.length, equals(1));
|
||||
expect(repo.history.first.word, equals('огонь'));
|
||||
expect(repo.history.first.question, equals('В чем суть текущего вызова?'));
|
||||
expect(repo.history.first.formattedSessionNumber, equals('777'));
|
||||
expect(repo.history.first.formattedDate, contains('31.08.2026 12:00:00'));
|
||||
|
||||
// Update with AI interpretation
|
||||
await repo.updateHistoryEntry('hist_1', aiInterpretation: 'Огонь призывает отпустить старые страхи');
|
||||
expect(repo.history.first.aiInterpretation, equals('Огонь призывает отпустить старые страхи'));
|
||||
|
||||
await repo.clearHistory();
|
||||
expect(repo.history.isEmpty, isTrue);
|
||||
|
||||
Reference in New Issue
Block a user