Files
umbrix/test/core/database/migrations_test.dart
Umbrix Developer 76a374950f feat: mobile-like window size and always-visible stats
- Changed window size to mobile phone format (400x800)
- Removed width condition for ActiveProxyFooter - now always visible
- Added run-umbrix.sh launch script with icon copying
- Stats cards now display on all screen sizes
2026-01-17 13:09:20 +03:00

43 lines
1.2 KiB
Dart

import 'package:drift_dev/api/migrations.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:umbrix/core/database/app_database.dart';
import 'generated_migrations/schema.dart';
void main() {
late SchemaVerifier verifier;
setUpAll(() {
verifier = SchemaVerifier(GeneratedHelper());
});
test('upgrade from v1 to v2', () async {
final connection = await verifier.startAt(1);
final db = AppDatabase(connection: connection);
await verifier.migrateAndValidate(db, 2);
await db.close();
});
test('upgrade from v2 to v3', () async {
final connection = await verifier.startAt(2);
final db = AppDatabase(connection: connection);
await verifier.migrateAndValidate(db, 3);
// final prePopulated = await db.select(db.geoAssetEntries).get();
await db.close();
// expect(prePopulated.length, equals(2));
});
test('upgrade from v1 to v3 with pre-population', () async {
final connection = await verifier.startAt(1);
final db = AppDatabase(connection: connection);
await verifier.migrateAndValidate(db, 3);
// final prePopulated = await db.select(db.geoAssetEntries).get();
await db.close();
// expect(prePopulated.length, equals(2));
});
}