Files
pipelines/app/test/features/settings/settings_walkthrough_test.dart
T
alan 30ba70ade8 Add first-run walkthrough
Guide new users through connecting a server, configuring an agent harness, starting runs, and chatting with agents. Persist completion per device and offer the walkthrough again for empty servers or from Settings, with widget coverage and implementation notes.
2026-11-12 02:23:15 +00:00

37 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/features/settings/settings_keys.dart';
import 'package:pipelines_app/features/settings/settings_walkthrough_section.dart';
import 'package:pipelines_app/ui/theme/app_theme.dart';
void main() {
testWidgets('Settings reopens the walkthrough on the first page', (
tester,
) async {
tester.view.devicePixelRatio = 1;
tester.view.physicalSize = const Size(390, 844);
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
await tester.pumpWidget(
MaterialApp(
theme: appLightTheme(),
home: const Scaffold(body: SettingsWalkthroughSection()),
),
);
expect(find.text('Show the walkthrough'), findsOneWidget);
expect(find.text('Welcome to Pipelines'), findsNothing);
await tester.tap(find.byKey(SettingsKeys.walkthrough));
await tester.pumpAndSettle();
expect(find.text('Welcome to Pipelines'), findsOneWidget);
expect(find.text('Step 1 of 4'), findsOneWidget);
await tester.tap(find.byKey(const ValueKey<String>('walkthrough.skip')));
await tester.pumpAndSettle();
expect(find.text('Welcome to Pipelines'), findsNothing);
});
}