import 'package:flutter_test/flutter_test.dart'; import 'package:stackwallet/widgets/address_book_card.dart'; class AddressBookCardBot { final WidgetTester tester; const AddressBookCardBot(this.tester); Future ensureVisible() async { await tester.ensureVisible(find.byType(AddressBookCard)); } Future toggleExpandCard() async { await tester.tap(find.byType(AddressBookCard)); await tester.pumpAndSettle(); } Future tapDetails() async { await tester.tap(find.byWidgetPredicate( (widget) => widget is SubButton && widget.label == "DETAILS")); await tester.pumpAndSettle(); } Future tapCopy() async { await tester.tap(find.byWidgetPredicate( (widget) => widget is SubButton && widget.label == "COPY")); await tester.pumpAndSettle(); } Future tapSend() async { await tester.tap(find.byWidgetPredicate( (widget) => widget is SubButton && widget.label == "SEND FIRO")); await tester.pumpAndSettle(); } }