Automated Integration Tests Flows (#1686)

* feat: Integration tests setup and tests for Disclaimer, Welcome and Setup Pin Code pages

* feat: Integration test flow from start to restoring a wallet successfully done

* test: Dashboard view test and linking to flow

* feat: Testing the Exchange flow section, selecting sending and receiving currencies

* test: Successfully create an exchange section

* feat: Implement flow up to sending section

* test: Complete Exchange flow

* fix dependency issue

* test: Final cleanups

* feat: Add CI to run automated integration tests withan android emulator

* feat: Adjust Automated integration test CI to run on ubuntu 20.04-a

* fix: Move integration test CI into PR test build CI

* ci: Add automated test ci which is a streamlined replica of pr test build ci

* ci: Re-add step to access branch name

* ci: Add KVM

* ci: Add filepath to trigger the test run from

* ci: Add required key

* ci: Add required key

* ci: Add missing secret key

* ci: Add missing secret key

* ci: Add nano secrets to workflow

* ci: Switch step to free space on runner

* ci: Remove timeout from workflow

* ci: Confirm impact that removing copy_monero_deps would have on entire workflow time

* ci: Update CI and temporarily remove cache related to emulator

* ci: Remove dynamic java version

* ci: Temporarily switch CI

* ci: Switch to 11.x jdk

* ci: Temporarily switch CI

* ci: Revert ubuntu version

* ci: Add more api levels

* ci: Add more target options

* ci: Settled on stable emulator matrix options

* ci: Add more target options

* ci: Modify flow

* ci: Streamline api levels to 28 and 29

* ci: One more trial

* ci: Switch to flutter drive

* ci: Reduce options

* ci: Remove haven from test

* ci: Check for solana in list

* ci: Adjust amounts and currencies for exchange flow

* ci: Set write response on failure to true

* ci: Split ci to funds and non funds related tests

* test: Test for Send flow scenario and minor restructuring for test folders and files

* chore: cleanup

* ci: Pause CI for now

* ci: Pause CI for now

* ci: Pause CI for now

* test: Restore wallets integration automated tests

* Fix: Add keys back to currency amount textfield widget

* fix: Switch variable name

* fix: remove automation for now

* tests: Automated tests for Create wallets flow

* tests: Further optimize common flows

* tests: Add missing await for call

* tests: Confirm Seeds Display Properly WIP

* tests: Confirm Seeds Display Correctly Automated Tests

* fix: Add missing pubspec params for bitcoin and bitcoin_cash

* feat: Automated Tests for Transaction History Flow

* fix: Add missing pubspec parameter

* feat: Automated Integration Tests for Transaction History flow

* test: Updating send page robot and also syncing branch with main

* test: Modifying tests to flow with wallet grouping implementation

* fix: Issue with transaction history test

* fix: Modifications to the PR and add automated confirmation for checking that all wallet types are restored or created correctly

* test: Attempting automation for testing

* fix: Issue from merge conflicts

* test: Remove automation of test in this PR

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
David Adegoke
2024-11-07 16:46:08 +02:00
committed by GitHub
co-authored by OmarHatem
parent 48457fdd6d
commit 0fcfd76afd
84 changed files with 2716 additions and 745 deletions
@@ -23,6 +23,7 @@ class BlockchainHeightWidget extends StatefulWidget {
this.doSingleScan = false,
this.bitcoinMempoolAPIEnabled,
required this.walletType,
this.blockHeightTextFieldKey,
}) : super(key: key);
final Function(int)? onHeightChange;
@@ -35,6 +36,7 @@ class BlockchainHeightWidget extends StatefulWidget {
final Future<bool>? bitcoinMempoolAPIEnabled;
final Function()? toggleSingleScan;
final WalletType walletType;
final Key? blockHeightTextFieldKey;
@override
State<StatefulWidget> createState() => BlockchainHeightState();
@@ -81,6 +83,7 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
child: Container(
padding: EdgeInsets.only(top: 20.0, bottom: 10.0),
child: BaseTextFormField(
key: widget.blockHeightTextFieldKey,
focusNode: widget.focusNode,
controller: restoreHeightController,
keyboardType:
@@ -15,6 +15,7 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
this.icon,
this.onClose,
this.customBorder,
super.key,
});
final VoidCallback onTap;
+9 -9
View File
@@ -2,14 +2,14 @@ import 'package:cake_wallet/themes/extensions/option_tile_theme.dart';
import 'package:flutter/material.dart';
class OptionTile extends StatelessWidget {
const OptionTile(
{required this.onPressed,
this.image,
this.icon,
required this.title,
required this.description,
super.key})
: assert(image!=null || icon!=null);
const OptionTile({
required this.onPressed,
this.image,
this.icon,
required this.title,
required this.description,
super.key,
}) : assert(image != null || icon != null);
final VoidCallback onPressed;
final Image? image;
@@ -34,7 +34,7 @@ class OptionTile extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
icon ?? image!,
icon ?? image!,
Expanded(
child: Padding(
padding: EdgeInsets.only(left: 16),
+3
View File
@@ -2,6 +2,7 @@
import 'dart:math';
import 'package:cake_wallet/entities/seed_type.dart';
import 'package:cake_wallet/src/widgets/search_bar_widget.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cw_core/transaction_priority.dart';
@@ -310,6 +311,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
itemName = item.name;
} else if (item is TransactionPriority) {
itemName = item.title;
} else if (item is MoneroSeedType) {
itemName = item.title;
} else {
itemName = '';
}
+8 -3
View File
@@ -6,12 +6,16 @@ import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:flutter/material.dart';
class SeedLanguageSelector extends StatefulWidget {
SeedLanguageSelector(
{Key? key, required this.initialSelected, this.seedType = MoneroSeedType.defaultSeedType})
: super(key: key);
SeedLanguageSelector({
required this.initialSelected,
this.seedType = MoneroSeedType.defaultSeedType,
this.buttonKey,
Key? key,
}) : super(key: key);
final String initialSelected;
final MoneroSeedType seedType;
final Key? buttonKey;
@override
SeedLanguageSelectorState createState() => SeedLanguageSelectorState(selected: initialSelected);
@@ -25,6 +29,7 @@ class SeedLanguageSelectorState extends State<SeedLanguageSelector> {
@override
Widget build(BuildContext context) {
return SelectButton(
key: widget.buttonKey,
image: null,
text:
"${seedLanguages.firstWhere((e) => e.name == selected).nameLocalized} (${S.of(context).seed_language})",
+12
View File
@@ -5,9 +5,11 @@ import 'package:flutter/material.dart';
class SettingActions {
final String Function(BuildContext) name;
final String image;
final Key key;
final void Function(BuildContext) onTap;
SettingActions._({
required this.key,
required this.name,
required this.image,
required this.onTap,
@@ -39,6 +41,7 @@ class SettingActions {
];
static SettingActions silentPaymentsSettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_silent_payment_settings_button_key'),
name: (context) => S.of(context).silent_payments_settings,
image: 'assets/images/bitcoin_menu.png',
onTap: (BuildContext context) {
@@ -48,6 +51,7 @@ class SettingActions {
);
static SettingActions litecoinMwebSettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_litecoin_mweb_settings_button_key'),
name: (context) => S.of(context).litecoin_mweb_settings,
image: 'assets/images/litecoin_menu.png',
onTap: (BuildContext context) {
@@ -57,6 +61,7 @@ class SettingActions {
);
static SettingActions connectionSettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_connection_and_sync_settings_button_key'),
name: (context) => S.of(context).connection_sync,
image: 'assets/images/nodes_menu.png',
onTap: (BuildContext context) {
@@ -66,6 +71,7 @@ class SettingActions {
);
static SettingActions walletSettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_wallet_menu_button_key'),
name: (context) => S.of(context).wallets,
image: 'assets/images/wallet_menu.png',
onTap: (BuildContext context) {
@@ -75,6 +81,7 @@ class SettingActions {
);
static SettingActions addressBookSettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_address_book_button_key'),
name: (context) => S.of(context).address_book_menu,
image: 'assets/images/open_book_menu.png',
onTap: (BuildContext context) {
@@ -84,6 +91,7 @@ class SettingActions {
);
static SettingActions securityBackupSettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_security_and_backup_button_key'),
name: (context) => S.of(context).security_and_backup,
image: 'assets/images/key_menu.png',
onTap: (BuildContext context) {
@@ -93,6 +101,7 @@ class SettingActions {
);
static SettingActions privacySettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_privacy_settings_button_key'),
name: (context) => S.of(context).privacy,
image: 'assets/images/privacy_menu.png',
onTap: (BuildContext context) {
@@ -102,6 +111,7 @@ class SettingActions {
);
static SettingActions displaySettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_display_settings_button_key'),
name: (context) => S.of(context).display_settings,
image: 'assets/images/eye_menu.png',
onTap: (BuildContext context) {
@@ -111,6 +121,7 @@ class SettingActions {
);
static SettingActions otherSettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_other_settings_button_key'),
name: (context) => S.of(context).other_settings,
image: 'assets/images/settings_menu.png',
onTap: (BuildContext context) {
@@ -120,6 +131,7 @@ class SettingActions {
);
static SettingActions supportSettingAction = SettingActions._(
key: ValueKey('dashboard_page_menu_widget_support_settings_button_key'),
name: (context) => S.of(context).settings_support,
image: 'assets/images/question_mark.png',
onTap: (BuildContext context) {
+7 -1
View File
@@ -4,7 +4,13 @@ import 'package:cake_wallet/src/widgets/standard_list_status_row.dart';
import 'package:flutter/material.dart';
class StandardListRow extends StatelessWidget {
StandardListRow({required this.title, required this.isSelected, this.onTap, this.decoration});
StandardListRow({
required this.title,
required this.isSelected,
this.onTap,
this.decoration,
super.key,
});
final String title;
final bool isSelected;