WIP update tests

This commit is contained in:
julian-CStack 2023-05-08 11:59:00 -06:00
parent 11268d980c
commit 5edb8c68f0
31 changed files with 388 additions and 102 deletions

View file

@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/models/notification_model.dart';
import 'package:stackwallet/notifications/notification_card.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
void main() {
@ -30,7 +30,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/models/send_view_auto_fill_data.dart';
import 'package:stackwallet/pages/send_view/send_view.dart';
import 'package:stackwallet/providers/providers.dart';
@ -13,9 +14,9 @@ import 'package:stackwallet/services/locale_service.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/prefs.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'send_view_test.mocks.dart';
@ -72,7 +73,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
@ -138,7 +142,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),

View file

@ -7,11 +7,12 @@ import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:stackwallet/models/contact.dart';
import 'package:stackwallet/models/contact_address_entry.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/pages/address_book_views/subviews/contact_popup.dart';
import 'package:stackwallet/providers/global/address_book_service_provider.dart';
import 'package:stackwallet/services/address_book_service.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/address_book_card.dart';
@ -26,6 +27,7 @@ class MockedFunctions extends Mock {
void main() {
testWidgets('test returns Contact Address Entry', (widgetTester) async {
final service = MockAddressBookService();
final applicationThemesDirectoryPath = "";
when(service.getContactById("default")).thenAnswer(
(realInvocation) => Contact(
@ -51,7 +53,11 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath:
applicationThemesDirectoryPath,
),
),
],
),

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/animated_text.dart';
@ -23,7 +24,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: const Material(

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
@ -23,7 +24,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/custom_buttons/draggable_switch_button.dart';
@ -19,7 +20,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: button,
@ -46,7 +52,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: SizedBox(
@ -78,7 +89,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: SizedBox(

View file

@ -1,9 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/widgets/custom_buttons/favorite_toggle.dart';
void main() {
@ -17,7 +18,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),

View file

@ -1,7 +1,8 @@
import 'package:event_bus/event_bus.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/custom_loading_overlay.dart';
@ -12,7 +13,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/custom_pin_put/custom_pin_put.dart';
import 'package:stackwallet/widgets/custom_pin_put/pin_keyboard.dart';
@ -19,7 +20,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: const Material(
@ -52,7 +58,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -98,7 +109,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -131,7 +147,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -164,7 +185,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -196,7 +222,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -233,7 +264,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: const Material(
@ -266,7 +302,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -312,7 +353,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -345,7 +391,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -378,7 +429,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -410,7 +466,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/desktop/custom_text_button.dart';
void main() {
@ -13,7 +13,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
@ -14,7 +15,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockingjay/mockingjay.dart' as mockingjay;
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
@ -19,7 +20,12 @@ void main() {
child: MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: mockingjay.MockNavigatorProvider(

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
@ -13,7 +14,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
@ -11,7 +12,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -31,7 +37,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(
@ -53,7 +64,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -3,7 +3,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockingjay/mockingjay.dart' as mockingjay;
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/emoji_select_sheet.dart';
@ -15,7 +16,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: const Material(
@ -39,7 +45,12 @@ void main() {
child: MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: mockingjay.MockNavigatorProvider(

View file

@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/icon_widgets/addressbook_icon.dart';
@ -16,7 +17,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -5,6 +5,7 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:stackwallet/models/balance.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart';
import 'package:stackwallet/services/coins/coin_service.dart';
@ -13,10 +14,10 @@ import 'package:stackwallet/services/locale_service.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/listenable_list.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/managed_favorite.dart';
@ -72,7 +73,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
@ -141,7 +145,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
@ -209,7 +216,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),

View file

@ -4,11 +4,12 @@ import 'package:flutter_svg/svg.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/models/node_model.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/node_card.dart';
@ -54,7 +55,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
@ -112,7 +116,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
@ -171,7 +178,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),

View file

@ -1,18 +1,19 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:mockingjay/mockingjay.dart' as mockingjay;
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/models/node_model.dart';
import 'package:mockingjay/mockingjay.dart' as mockingjay;
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/prefs.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/widgets/node_options_sheet.dart';
import 'package:tuple/tuple.dart';
@ -60,7 +61,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
@ -129,7 +133,12 @@ void main() {
child: MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: mockingjay.MockNavigatorProvider(
@ -192,7 +201,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),

View file

@ -1,26 +1,30 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/progress_bar.dart';
void main() {
testWidgets("Widget build", (widgetTester) async {
final theme = StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
);
await widgetTester.pumpWidget(
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(theme),
],
),
home: Material(
child: ProgressBar(
width: 20,
height: 10,
fillColor:
StackColors.fromStackColorTheme(LightColors()).accentColorRed,
backgroundColor: StackColors.fromStackColorTheme(LightColors())
.accentColorYellow,
fillColor: StackColors.fromStackColorTheme(theme).accentColorRed,
backgroundColor:
StackColors.fromStackColorTheme(theme).accentColorYellow,
percent: 30),
),
),

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/shake/shake.dart';
@ -10,7 +11,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -1,10 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:mockingjay/mockingjay.dart' as mockingjay;
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:mockingjay/mockingjay.dart' as mockingjay;
void main() {
testWidgets("test StackDialogBase", (widgetTester) async {
@ -12,7 +13,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: const Material(
@ -29,7 +35,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: const Material(
@ -60,7 +71,12 @@ void main() {
child: MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: mockingjay.MockNavigatorProvider(

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/table_view/table_view_cell.dart';
@ -11,7 +12,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: const Material(

View file

@ -4,6 +4,7 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:stackwallet/models/balance.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/coin_wallets_table.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart';
@ -11,9 +12,9 @@ import 'package:stackwallet/services/coins/coin_service.dart';
import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/table_view/table_view_cell.dart';
import 'package:stackwallet/widgets/table_view/table_view_row.dart';
@ -67,7 +68,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/table_view/table_view.dart';
import 'package:stackwallet/widgets/table_view/table_view_cell.dart';
@ -12,7 +13,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: Material(

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
@ -11,7 +12,12 @@ void main() {
MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: const Material(

View file

@ -1,8 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/models/exchange/response_objects/trade.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/trade_card.dart';
@ -39,7 +40,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),

View file

@ -8,6 +8,7 @@ import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:stackwallet/models/isar/models/blockchain_data/address.dart';
import 'package:stackwallet/models/isar/models/blockchain_data/transaction.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/services/coins/coin_service.dart';
@ -17,10 +18,10 @@ import 'package:stackwallet/services/locale_service.dart';
import 'package:stackwallet/services/notes_service.dart';
import 'package:stackwallet/services/price_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/prefs.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/transaction_card.dart';
@ -105,7 +106,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
@ -210,7 +214,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
@ -314,7 +321,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
@ -415,7 +425,12 @@ void main() {
child: MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: mockingjay.MockNavigatorProvider(

View file

@ -5,15 +5,16 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart' as mockito;
import 'package:stackwallet/models/balance.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart';
import 'package:stackwallet/services/coins/coin_service.dart';
import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/locale_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/wallet_card.dart';
@ -62,7 +63,12 @@ void main() {
child: MaterialApp(
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(LightColors()),
StackColors.fromStackColorTheme(
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),
home: const Material(

View file

@ -4,6 +4,7 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:stackwallet/models/balance.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart';
import 'package:stackwallet/services/coins/coin_service.dart';
@ -11,9 +12,9 @@ import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/wallet_info_row/sub_widgets/wallet_info_row_balance.dart';
@ -61,7 +62,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),

View file

@ -4,6 +4,7 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:stackwallet/models/balance.dart';
import 'package:stackwallet/models/isar/sw_theme.dart';
import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart';
import 'package:stackwallet/services/coins/coin_service.dart';
@ -11,9 +12,9 @@ import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/themes/defaults/dark.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/wallet_info_row/sub_widgets/wallet_info_row_balance.dart';
import 'package:stackwallet/widgets/wallet_info_row/wallet_info_row.dart';
@ -60,7 +61,10 @@ void main() {
theme: ThemeData(
extensions: [
StackColors.fromStackColorTheme(
LightColors(),
StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: "",
),
),
],
),