| 1 | import 'package:cake_wallet/generated/i18n.dart'; |
| 2 | import 'package:flutter_test/flutter_test.dart'; |
| 3 | |
| 4 | import '../components/common_test_cases.dart'; |
| 5 | |
| 6 | class WalletListPageRobot { |
| 7 | WalletListPageRobot(this.tester) : commonTestCases = CommonTestCases(tester); |
| 8 | |
| 9 | final WidgetTester tester; |
| 10 | late CommonTestCases commonTestCases; |
| 11 | |
| 12 | Future<void> isWalletListPage() async { |
| 13 | await commonTestCases.isSpecificPage<WalletListPageRobot>(); |
| 14 | await commonTestCases.takeScreenshots('wallet_list_page'); |
| 15 | } |
| 16 | |
| 17 | void displaysCorrectTitle() { |
| 18 | commonTestCases.hasText(S.current.wallets); |
| 19 | } |
| 20 | |
| 21 | Future<void> navigateToCreateNewWalletPage() async { |
| 22 | await commonTestCases.tapItemByKey('wallet_list_page_create_new_wallet_button_key'); |
| 23 | } |
| 24 | |
| 25 | Future<void> navigateToRestoreWalletOptionsPage() async { |
| 26 | await commonTestCases.tapItemByKey('wallet_list_page_restore_wallet_button_key'); |
| 27 | } |
| 28 | } |