| 1 | import 'package:cake_wallet/generated/i18n.dart'; |
| 2 | import 'package:cake_wallet/src/screens/settings/security_backup_page.dart'; |
| 3 | import 'package:flutter_test/flutter_test.dart'; |
| 4 | |
| 5 | import '../components/common_test_cases.dart'; |
| 6 | |
| 7 | class SecurityAndBackupPageRobot { |
| 8 | SecurityAndBackupPageRobot(this.tester) : commonTestCases = CommonTestCases(tester); |
| 9 | |
| 10 | final WidgetTester tester; |
| 11 | final CommonTestCases commonTestCases; |
| 12 | |
| 13 | Future<void> isSecurityAndBackupPage() async { |
| 14 | await commonTestCases.isSpecificPage<SecurityBackupPage>(); |
| 15 | await commonTestCases.takeScreenshots('security_backup_page'); |
| 16 | } |
| 17 | |
| 18 | void hasTitle() { |
| 19 | commonTestCases.hasText(S.current.security_and_backup); |
| 20 | } |
| 21 | |
| 22 | Future<void> navigateToShowKeysPage() async { |
| 23 | await tester.pumpAndSettle(Duration(milliseconds: 1000)); |
| 24 | |
| 25 | await commonTestCases.tapItemByKey('security_backup_page_show_keys_button_key'); |
| 26 | await tester.pumpAndSettle(Duration(milliseconds: 1000)); |
| 27 | } |
| 28 | } |