chore: Halkyon Learn moves into apps/learn

Its server, client, app and curator, and the tools that write its
assets (maps, Anki fixtures, icons), as they are; paths are fixed in
the commits that follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-19 20:08:06 +02:00
commit 649499be23
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -0,0 +1,59 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:halkyon_learn_flutter/src/feature/about/bloc/about_bloc.dart';
import 'package:halkyon_learn_flutter/src/feature/about/data/about_repository.dart';
import 'package:material_ui/material_ui.dart';
import '../../support/fake_about_gateway.dart';
import '../../support/pump_app.dart';
import '../../support/test_dependencies.dart';
void main() {
group('AboutBloc', () {
test('finds where the instance says its source is', () async {
final bloc = AboutBloc(AboutRepository(FakeAboutGateway()))
..add(const AboutEventStarted());
addTearDown(bloc.close);
await expectLater(
bloc.stream,
emits(const AboutStateLoaded('https://example.org/halkyon-learn')),
);
});
test('says so when the instance cannot be reached', () async {
final gateway = FakeAboutGateway()
..unreachable = Exception('No connection');
final bloc = AboutBloc(AboutRepository(gateway))
..add(const AboutEventStarted());
addTearDown(bloc.close);
await expectLater(bloc.stream, emits(const AboutStateUnreachable()));
});
});
testWidgets('profile → settings → about shows the licences and the source', (
tester,
) async {
await pumpApp(tester, testDependencies());
await openTab(tester, 'Profile');
await tester.tap(find.byTooltip('Settings'));
await tester.pumpAndSettle();
await tester.scrollUntilVisible(
find.text('About Halkyon Learn'),
200,
// The citation preview is selectable, a scroll view of its own.
scrollable: find.byType(Scrollable).first,
);
await tester.pumpAndSettle();
await tester.tap(find.text('About Halkyon Learn'));
await tester.pumpAndSettle();
expect(
find.textContaining('GNU Affero General Public License'),
findsOneWidget,
);
expect(find.text('https://example.org/halkyon-learn'), findsOneWidget);
expect(find.text('View licenses'), findsOneWidget);
});
}