reclaim/app/test/widget_test.dart
flemming-it c6400302dd feat(brand): BrandWordmark renders ∆I in petrol, lifts the logo
Adds a dedicated BrandWordmark widget that splits 'Recl∆Im'
into three TextSpans and tints the middle ∆I in the petrol
signal colour. The fai_web universe uses this same accent rule
for the F∆I and Ch∆In glyphs — Recl∆Im now follows it, so
the brand stays visually coherent across every F∆I surface.

Where it lands:

  - Landing page: large DeltaMark (96 px) and BrandWordmark
    (56 px) sit on a single row, the wordmark to the right of
    the mark. The two together carry the brand identity that
    a viewer sees first when opening the app.
  - NavigationRail leading: the muted 'Recl∆Im' Text line is
    replaced with the petrol-accented BrandWordmark (18 px),
    keeping the vendor tag 'F∆I' as a small muted line under it.

widget_test.dart adapts: the literal 'Recl∆Im'-find no longer
matches because the wordmark is now three text spans, so the
test checks for BrandWordmark by type — equivalent assertion,
robust to glyph-level splits.

Signed-off-by: flemming-it <sf@flemming.it>
2026-06-18 15:06:13 +02:00

45 lines
1.4 KiB
Dart

// Smoke tests — boot the app, navigate to the shell, verify
// each rail destination renders without throwing.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:reclaim_app/main.dart';
import 'package:reclaim_app/widgets/brand_wordmark.dart';
void main() {
// Generous surface so NavigationRail + Heatmap fit without
// overflow warnings.
const surfaceSize = Size(1400, 900);
setUp(() {
TestWidgetsFlutterBinding.ensureInitialized();
});
testWidgets('Landing renders brand mark + CTA',
(WidgetTester tester) async {
await tester.binding.setSurfaceSize(surfaceSize);
await tester.pumpWidget(const ReclaimApp());
await tester.pump();
expect(find.byType(BrandWordmark), findsWidgets);
expect(
find.widgetWithText(FilledButton, 'App öffnen (Demo-Modus)'),
findsOneWidget,
);
await tester.pumpWidget(const SizedBox.shrink());
});
testWidgets('Tapping CTA reaches the shell and shows the heatmap',
(WidgetTester tester) async {
await tester.binding.setSurfaceSize(surfaceSize);
await tester.pumpWidget(const ReclaimApp());
await tester.pump();
await tester.tap(
find.widgetWithText(FilledButton, 'App öffnen (Demo-Modus)'),
);
await tester.pump();
await tester.pump(const Duration(milliseconds: 600));
expect(find.text('Heatmap'), findsWidgets);
await tester.pumpWidget(const SizedBox.shrink());
});
}