32 lines
858 B
Dart
32 lines
858 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'package:sxchnge_wallet/sxchnge_wallet.dart';
|
|
|
|
const testDestination = CryptoDestination(
|
|
assetId: 'demo:ethereum:native',
|
|
networkId: 'eip155:1',
|
|
address: '0x1234567890123456789012345678901234567890',
|
|
assetLabel: 'ETH',
|
|
networkLabel: 'Ethereum',
|
|
);
|
|
Future<void> seedDestination(DummyDestinationService service) async {
|
|
await service.create(
|
|
testDestination,
|
|
'Test wallet',
|
|
'test-destination-creation',
|
|
);
|
|
}
|
|
|
|
Future<void> selectPayout(WidgetTester t) async {
|
|
final button = find.byKey(const ValueKey('choose-payout-destination'));
|
|
await t.ensureVisible(button);
|
|
await t.tap(button);
|
|
await t.pumpAndSettle();
|
|
final row = find.text('Test wallet');
|
|
await t.ensureVisible(row);
|
|
await t.tap(row);
|
|
await t.pumpAndSettle();
|
|
}
|