chain-studio/test/widget_test.dart
flemming-it 3a7d0e74ad feat(studio): Welcome page — Phase A scaffolding (v0.37.0)
First slice of the new sidebar destination outlined in
docs/landing-page-design.md. Static content only — embedded
docs (Phase B) and the live getting-started checklist
(Phase C) follow.

Phase A:

- New `WelcomePage` at `lib/pages/welcome.dart`, registered
  as sidebar slot 0 above Doctor. Default selectedIndex stays
  0, so a fresh launch lands on Welcome.
- Hero card: gradient backdrop matching the Today-Hero in the
  store, F∆I Platform headline, subtitle taken from CLAUDE.md
  ("deterministic workflow engine for AI-assisted document
  processing in regulated environments").
- Three-pillar row "Hub / Module / Flow" — operator-readable
  prose, not architecture-doc dense. Stacks to a column under
  640 dp window width so card text never gets cropped.
- Trust-posture deck — "Sandbox by default", "Tamper-evident
  audit log", "Air-gap ready". Same content that used to
  rotate as carousel slides in the store; reading them as a
  single deck with full prose works better than rotating
  through fragments.
- AppBar follows the same `titleSpacing: FaiSpace.xl`
  alignment as the Store so the title sits flush with the
  body padding.
- 13 new ARB keys for the page content (EN + DE).

Smoke test now expects "Welcome" in the navigation rail; the
existing `Doctor / Store / Flows / Audit / Approvals`
expectations stay unchanged.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-09 00:17:54 +02:00

30 lines
1 KiB
Dart

// Smoke test: app boots and shows every navigation destination.
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fai_studio/data/hub.dart';
import 'package:fai_studio/main.dart';
void main() {
testWidgets('Studio shell shows every navigation destination',
(tester) async {
await tester.pumpWidget(
const StudioApp(
initialThemeMode: ThemeModeValue.system,
initialLocale: Locale('en'),
),
);
expect(find.text('F∆I Studio'), findsOneWidget);
// Welcome tab added in v0.37.0 — first surface a new
// operator sees.
expect(find.text('Welcome'), findsWidgets);
expect(find.text('Doctor'), findsWidgets);
// Modules tab dropped in v0.35.0 — info now lives inside
// the Store detail sheet.
expect(find.text('Store'), findsOneWidget);
expect(find.text('Flows'), findsOneWidget);
expect(find.text('Audit'), findsOneWidget);
expect(find.text('Approvals'), findsOneWidget);
});
}