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:drift/native.dart' show NativeDatabase;
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
@@ -11,13 +8,6 @@ import 'package:minstrel/cache/db.dart';
import 'package:minstrel/models/track.dart';
import 'package:minstrel/quarantine/quarantine_provider.dart';
// SKIP NOTE: drift's NativeDatabase needs the system libsqlite3.so.
// The flutter-ci runner image doesn't ship it. Same skip as
// sync_controller_test.dart — unblock by adding libsqlite3-dev to the
// CI image, or switch to sqlite3/wasm. On-device runs cover real
// behaviour today.
const _skipDrift = 'libsqlite3 missing on flutter-ci runner; on-device covers';
class _StubQuarantineApi implements QuarantineApi {
_StubQuarantineApi({this.shouldThrow = false});
bool shouldThrow;
@@ -72,7 +62,7 @@ Future<void> _seed(AppDb db) async {
}
void main() {
test('flag inserts a drift row and calls the server', skip: _skipDrift,
test('flag inserts a drift row and calls the server',
() async {
final db = AppDb(NativeDatabase.memory());
addTearDown(db.close);
@@ -92,8 +82,7 @@ void main() {
expect(rows.first.reason, 'bad_rip');
});
test('flag keeps drift optimistic + queues mutation on server failure',
skip: _skipDrift, () async {
test('flag keeps drift optimistic + queues mutation on server failure', () async {
final db = AppDb(NativeDatabase.memory());
addTearDown(db.close);
final api = _StubQuarantineApi(shouldThrow: true);
@@ -115,7 +104,7 @@ void main() {
expect(mutations.first.kind, 'quarantine.flag');
});
test('unflag deletes the drift row and calls the server', skip: _skipDrift,
test('unflag deletes the drift row and calls the server',
() async {
final db = AppDb(NativeDatabase.memory());
addTearDown(db.close);
@@ -132,7 +121,7 @@ void main() {
expect(rows, isEmpty);
});
test('isHidden reflects drift state', skip: _skipDrift, () async {
test('isHidden reflects drift state', () async {
final db = AppDb(NativeDatabase.memory());
addTearDown(db.close);
await _seed(db);