mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-05 20:07:44 +00:00
28 lines
906 B
Dart
28 lines
906 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:stackwallet/pages/onboarding_view/onboarding_view.dart';
|
|
import 'package:stackwallet/widgets/custom_buttons/gradient_button.dart';
|
|
import 'package:stackwallet/widgets/custom_buttons/simple_button.dart';
|
|
|
|
class OnboardingViewBot {
|
|
final WidgetTester tester;
|
|
|
|
const OnboardingViewBot(this.tester);
|
|
|
|
Future<void> ensureVisible() async {
|
|
await tester.ensureVisible(find.byType(OnboardingView));
|
|
}
|
|
|
|
Future<void> tapCreateNewWallet() async {
|
|
final buttonFinder = find.byType(GradientButton);
|
|
await tester.ensureVisible(buttonFinder);
|
|
await tester.tap(buttonFinder);
|
|
await tester.pumpAndSettle();
|
|
}
|
|
|
|
Future<void> tapRestoreWallet() async {
|
|
final buttonFinder = find.byType(SimpleButton);
|
|
await tester.ensureVisible(buttonFinder);
|
|
await tester.tap(buttonFinder);
|
|
await tester.pumpAndSettle();
|
|
}
|
|
}
|