mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
31 lines
847 B
Dart
31 lines
847 B
Dart
|
import 'package:cake_wallet/generated/i18n.dart';
|
||
|
import 'package:cake_wallet/src/screens/auth/auth_page.dart';
|
||
|
import 'package:flutter/widgets.dart';
|
||
|
import 'package:flutter_test/flutter_test.dart';
|
||
|
|
||
|
import '../components/common_test_cases.dart';
|
||
|
import 'pin_code_widget_robot.dart';
|
||
|
|
||
|
class AuthPageRobot extends PinCodeWidgetRobot {
|
||
|
AuthPageRobot(this.tester)
|
||
|
: commonTestCases = CommonTestCases(tester),
|
||
|
super(tester);
|
||
|
|
||
|
final WidgetTester tester;
|
||
|
late CommonTestCases commonTestCases;
|
||
|
|
||
|
bool onAuthPage() {
|
||
|
final hasPinButtons = find.byKey(ValueKey('pin_code_button_3_key'));
|
||
|
final hasPin = hasPinButtons.tryEvaluate();
|
||
|
return hasPin;
|
||
|
}
|
||
|
|
||
|
Future<void> isAuthPage() async {
|
||
|
await commonTestCases.isSpecificPage<AuthPage>();
|
||
|
}
|
||
|
|
||
|
void hasTitle() {
|
||
|
commonTestCases.hasText(S.current.setup_pin);
|
||
|
}
|
||
|
}
|