test(flutter): re-enable drift tests after ci-flutter:1.26 ships libsqlite3-0

Drops the libsqlite3-missing skip cohort now that the ci-flutter
runner image installs libsqlite3-0 (CI-runner commit on its main).

Per-file removals (no behavior change in tests themselves — they
just stop being skipped):
- `@Tags(['drift'])` + `library;` directive from 5 files.
- `const _skipDrift = ...;` declaration + its rationale comment
  from 6 files (the 5 above + like_button_test.dart, which had its
  own _skipDrift for the rollback-via-drift case).
- `skip: _skipDrift` annotations from 17 test invocations across
  those 6 files (16 single-line + 1 multi-line in like_button).
- Stale `@Tags(['drift']) tier covers it` reference in
  home_screen_test.dart's drift-coverage comment.

Net -79 +18 lines across 7 files; 17 previously-silent tests are
now part of the CI signal. Fable #399.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 18:02:17 -04:00
parent 461c6bf514
commit 85183c455a
7 changed files with 18 additions and 79 deletions
@@ -1,6 +1,3 @@
@Tags(['drift'])
library;
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
@@ -13,22 +10,12 @@ import 'package:minstrel/theme/theme_data.dart';
class _MockStorage extends Mock implements FlutterSecureStorage {}
// StorageSection.initState calls audioCacheManagerProvider.usageBytes()
// which opens the AppDb via NativeDatabase. CI's flutter-ci runner
// lacks libsqlite3.so so this silently emits a warning today and would
// break under stricter analyze. Skipped with the drift cohort.
//
// testWidgets only accepts a bool for skip (unlike test() which takes
// a String reason). Reason: 'libsqlite3 missing on flutter-ci runner;
// on-device covers'. See Fable #399.
const _skipDrift = true;
void main() {
setUpAll(() {
registerFallbackValue('');
});
testWidgets('renders Storage heading + all controls', skip: _skipDrift, (t) async {
testWidgets('renders Storage heading + all controls', (t) async {
final storage = _MockStorage();
when(() => storage.read(key: any(named: 'key')))
.thenAnswer((_) async => null);
@@ -57,7 +44,7 @@ void main() {
expect(find.byKey(const Key('prefetch_selector')), findsOneWidget);
});
testWidgets('Clear cache button shows confirm dialog', skip: _skipDrift, (t) async {
testWidgets('Clear cache button shows confirm dialog', (t) async {
final storage = _MockStorage();
when(() => storage.read(key: any(named: 'key')))
.thenAnswer((_) async => null);