chain-studio/test/widget_test.dart
flemming-it a7e2eb101a feat(studio): drop Modules tab, fold its content into Store detail (v0.35.0)
Modules-as-a-tab was redundant with the Store after the
"Installed" filter and the federation work landed. Two pieces
of unique content kept it alive: the per-module declared
permissions list and the on-disk module directory. Both now
live inside the Store detail sheet.

Changes:

- Sidebar nav loses the Modules entry. `_pages` no longer
  carries a `'modules'` slot. The unused `import
  'pages/modules.dart'` is dropped from main.dart. Smoke test
  updated to skip the Modules-text expectation.

- Store detail sheet (`_StoreDetailSheet`) gains two new
  sections, rendered only when the entry is installed and the
  hub returned `ModuleDetail` for it:

    Declared permissions  →  same icon-prefixed list the
                              old Modules sheet shipped
                              (`net:`, `fs.read:`, `fs.write:`,
                              `env:`, `hub:`).
    Module directory      →  selectable mono path so the
                              operator can paste it into a
                              shell.

  An async `moduleInfo` fetch fires from `initState` only when
  `widget.item.installed` is true, so the regular
  not-installed detail-sheet path takes no extra round-trip.
  Failures stay silent — the sections just hide.

- The `FaiModuleSheet` widget stays intact. Cmd+K still uses
  it as a quick-info modal for installed modules; the
  longer-form Store detail sheet covers the same data plus
  the description, screenshots, and docs that operators
  reach for in the Store.

Three new ARB keys: `storeSectionPermissions`,
`storeSectionDirectory`, `storeSectionPermissionsNone`.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-08 14:57:51 +02:00

27 lines
895 B
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);
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);
});
}