import "package:hash_wallet/src/screens/wallet/wallet_edit_page.dart"; import "package:flutter/material.dart"; import "package:flutter_test/flutter_test.dart"; import "../core/base_robot.dart"; class WalletEditPageRobot extends BaseRobot { WalletEditPageRobot(super.tester); @override Future isDisplayed() async { await isSpecificPage(); } Future enterName(String name) async { final input = find.byKey(const ValueKey("wallet_edit_page_name_input_key")); await pumpUntilFound(input); final field = find.descendant(of: input, matching: find.byType(EditableText)); await tester.enterText(field.first, name); await tester.pump(const Duration(milliseconds: 300)); } Future save() async { await tapByKey("wallet_edit_page_save_button_key"); } Future tapDelete() async { await tapByKey("wallet_edit_page_delete_button_key"); } Future confirmDelete() async { await tapByKey("wallet_edit_page_confirm_delete_button_key"); } Future expectNameTakenRefusal() async { await pumpUntilFound(find.byKey(const ValueKey("wallet_edit_page_name_taken_ok_button_key"))); hasType(); } Future dismissNameTakenRefusal() async { await tapByKey("wallet_edit_page_name_taken_ok_button_key"); await settle(); } }