mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-11-29 09:11:17 +01:00
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>
20 lines
947 B
Dart
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);
|
|
});
|
|
}
|