feat: unified 1..9 words session narrative, dice input before reveal, dedicated results screen, and clean session history grouping

This commit is contained in:
Alma Alexyz
2026-08-31 15:23:59 +05:00
parent bc892c3388
commit 6f9d4d4cca
11 changed files with 1207 additions and 1099 deletions
+2 -3
View File
@@ -11,10 +11,9 @@ void main() {
await tester.pump();
await tester.pump(const Duration(milliseconds: 300));
// Verify app title and destinations
// Verify app title and 3 unified destinations
expect(find.text('Оракул 999'), findsOneWidget);
expect(find.text('Поиск 000..999'), findsOneWidget);
expect(find.text('Расклады'), findsOneWidget);
expect(find.text('Оракул'), findsOneWidget);
expect(find.text('Каталог 999'), findsOneWidget);
expect(find.text('История'), findsOneWidget);
});
+38 -19
View File
@@ -35,7 +35,6 @@ void main() {
test('Reshuffling changes the order / mapping of words to session numbers', () {
repo.reshuffleSessionNumbers();
// Verify total count is still 1000 and all numbers 0..999 are present
expect(repo.totalWords, equals(1000));
for (int i = 0; i < 1000; i++) {
expect(repo.getWordBySessionNumber(i)?.sessionNumber, equals(i));
@@ -63,33 +62,53 @@ void main() {
expect(repo.getPreviousWord(0).sessionNumber, equals(999));
});
test('History entries can be added, updated with AI interpretation, and cleared', () async {
test('Multi-word session history can be saved, updated with AI interpretation, and cleared', () async {
await repo.clearHistory();
expect(repo.history.isEmpty, isTrue);
expect(repo.sessions.isEmpty, isTrue);
final entry = HistoryEntry(
id: 'hist_1',
final session = OracleSession(
id: 'session_1',
timestamp: DateTime(2026, 8, 31, 12, 0),
word: 'огонь',
sessionNumber: 777,
partOfSpeech: 'существительное',
symbolicMeaning: 'Очищающее пламя трансформации',
readingType: 'Жребий момента',
question: 'В чем суть текущего вызова?',
question: 'В чем скрытый конфликт?',
wordsCount: 3,
words: [
const SessionWord(
word: 'огонь',
sessionNumber: 777,
partOfSpeech: 'существительное',
category: 'Образ',
symbolicMeaning: 'Очищающее пламя',
),
const SessionWord(
word: 'вода',
sessionNumber: 15,
partOfSpeech: 'существительное',
category: 'Образ',
symbolicMeaning: 'Поток интуиции',
),
const SessionWord(
word: 'мир',
sessionNumber: 999,
partOfSpeech: 'существительное',
category: 'Образ',
symbolicMeaning: 'Гармония согласия',
),
],
);
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'));
await repo.saveSession(session);
expect(repo.sessions.length, equals(1));
expect(repo.sessions.first.words.length, equals(3));
expect(repo.sessions.first.words[0].word, equals('огонь'));
expect(repo.sessions.first.words[1].word, equals('вода'));
expect(repo.sessions.first.question, equals('В чем скрытый конфликт?'));
// Update with AI interpretation
await repo.updateHistoryEntry('hist_1', aiInterpretation: 'Огонь призывает отпустить старые страхи');
expect(repo.history.first.aiInterpretation, equals('Огонь призывает отпустить старые страхи'));
await repo.updateSession('session_1', aiInterpretation: 'Связка огня и воды рождает баланс мира.');
expect(repo.sessions.first.aiInterpretation, equals('Связка огня и воды рождает баланс мира.'));
await repo.clearHistory();
expect(repo.history.isEmpty, isTrue);
expect(repo.sessions.isEmpty, isTrue);
});
});
}