Files
swiftcontrol/test/onboarding_models_test.dart
Jonas Bark 035ed9a9da feat(onboarding): overview-style animated buttons on the contour, toasts top-right
Press-a-button-to-continue is gone: presses now flash the matching button
on the controller contour via the same AnimatedButtonWidget the home
screen uses (keymap-aware), and the footer is a plain Continue. Toasts
default to top-right so 'Connecting to…' popups can never cover footer
actions on desktop.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 09:59:21 +02:00

20 lines
947 B
Dart

import 'package:bike_control/pages/onboarding/onboarding_models.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('next advances linearly', () {
expect(onboardingNextStep(OnboardingStep.app, appIsSelfHosted: false), OnboardingStep.where);
expect(onboardingNextStep(OnboardingStep.connection, appIsSelfHosted: false), OnboardingStep.done);
});
test('self-hosted app (BikeControl) skips the where step in both directions', () {
expect(onboardingNextStep(OnboardingStep.app, appIsSelfHosted: true), OnboardingStep.controller);
expect(onboardingPreviousStep(OnboardingStep.controller, appIsSelfHosted: true), OnboardingStep.app);
});
test('done does not advance, app does not go back', () {
expect(onboardingNextStep(OnboardingStep.done, appIsSelfHosted: false), OnboardingStep.done);
expect(onboardingPreviousStep(OnboardingStep.app, appIsSelfHosted: false), OnboardingStep.app);
});
}