Files
Tracker/test/cycle_entry_test.dart
Sterlen b4b2bfe749 feat: Implement husband features and fix iOS Safari web startup
Implement initial features for husband's companion app, including mock data
service and husband notes screen. Refactor scripture and cycle services
for improved stability and testability. Address iOS Safari web app
startup issue by removing deprecated initialization.

- Implemented MockDataService and HusbandNotesScreen.
- Converted _DashboardTab and DevotionalScreen to StatefulWidgets for robust
  scripture provider initialization.
- Refactored CycleService to use immutable CycleInfo class, reducing UI rebuilds.
- Removed deprecated window.flutterConfiguration from index.html, resolving
  Flutter web app startup failure on iOS Safari.
- Updated and fixed related tests.
2025-12-26 22:40:52 -06:00

41 lines
1.1 KiB
Dart

import 'package:christian_period_tracker/models/cycle_entry.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('CycleEntry', () {
test('hasSymptoms returns true when there are symptoms', () {
final entry = CycleEntry(
id: '1',
date: DateTime.now(),
createdAt: DateTime.now(),
updatedAt: DateTime.now(),
hasHeadache: true,
);
expect(entry.hasSymptoms, isTrue);
});
test('hasSymptoms returns false when there are no symptoms', () {
final entry = CycleEntry(
id: '1',
date: DateTime.now(),
createdAt: DateTime.now(),
updatedAt: DateTime.now(),
);
expect(entry.hasSymptoms, isFalse);
});
test('symptomCount returns the correct number of symptoms', () {
final entry = CycleEntry(
id: '1',
date: DateTime.now(),
createdAt: DateTime.now(),
updatedAt: DateTime.now(),
hasHeadache: true,
hasBloating: true,
crampIntensity: 2,
);
expect(entry.symptomCount, 3);
});
});
}