2024-09-22 02:46:51 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'package:integration_test/integration_test.dart';
|
|
|
|
|
|
|
|
import '../components/common_test_constants.dart';
|
|
|
|
import '../components/common_test_flows.dart';
|
|
|
|
import '../robots/dashboard_page_robot.dart';
|
|
|
|
import '../robots/send_page_robot.dart';
|
2024-11-07 14:46:08 +00:00
|
|
|
import 'package:cake_wallet/.secrets.g.dart' as secrets;
|
2024-09-22 02:46:51 +00:00
|
|
|
|
|
|
|
void main() {
|
|
|
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
|
|
|
|
|
|
SendPageRobot sendPageRobot;
|
|
|
|
CommonTestFlows commonTestFlows;
|
|
|
|
DashboardPageRobot dashboardPageRobot;
|
|
|
|
|
2024-11-07 14:46:08 +00:00
|
|
|
testWidgets('Send flow', (tester) async {
|
|
|
|
commonTestFlows = CommonTestFlows(tester);
|
|
|
|
sendPageRobot = SendPageRobot(tester: tester);
|
|
|
|
dashboardPageRobot = DashboardPageRobot(tester);
|
2024-09-22 02:46:51 +00:00
|
|
|
|
2024-11-07 14:46:08 +00:00
|
|
|
await commonTestFlows.startAppFlow(ValueKey('send_test_app_key'));
|
|
|
|
await commonTestFlows.welcomePageToRestoreWalletThroughSeedsFlow(
|
|
|
|
CommonTestConstants.testWalletType,
|
|
|
|
secrets.solanaTestWalletSeeds,
|
|
|
|
CommonTestConstants.pin,
|
|
|
|
);
|
|
|
|
await dashboardPageRobot.navigateToSendPage();
|
2024-09-22 02:46:51 +00:00
|
|
|
|
2024-11-07 14:46:08 +00:00
|
|
|
await sendPageRobot.enterReceiveAddress(CommonTestConstants.testWalletAddress);
|
|
|
|
await sendPageRobot.selectReceiveCurrency(CommonTestConstants.testReceiveCurrency);
|
|
|
|
await sendPageRobot.enterAmount(CommonTestConstants.sendTestAmount);
|
|
|
|
await sendPageRobot.selectTransactionPriority();
|
2024-09-22 02:46:51 +00:00
|
|
|
|
2024-11-07 14:46:08 +00:00
|
|
|
await sendPageRobot.onSendButtonPressed();
|
2024-09-22 02:46:51 +00:00
|
|
|
|
2024-11-07 14:46:08 +00:00
|
|
|
await sendPageRobot.handleSendResult();
|
2024-09-22 02:46:51 +00:00
|
|
|
|
2024-11-07 14:46:08 +00:00
|
|
|
await sendPageRobot.onSendButtonOnConfirmSendingDialogPressed();
|
2024-09-22 02:46:51 +00:00
|
|
|
|
2024-11-07 14:46:08 +00:00
|
|
|
await sendPageRobot.onSentDialogPopUp();
|
2024-09-22 02:46:51 +00:00
|
|
|
});
|
|
|
|
}
|