diff --git a/test/widget_tests/custom_buttons/app_bar_icon_button_test.dart b/test/widget_tests/custom_buttons/app_bar_icon_button_test.dart index 756547206..36179deaf 100644 --- a/test/widget_tests/custom_buttons/app_bar_icon_button_test.dart +++ b/test/widget_tests/custom_buttons/app_bar_icon_button_test.dart @@ -1,11 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:stackwallet/utilities/theme/color_theme.dart'; -import 'package:stackwallet/utilities/theme/stack_theme.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; void main() { - StackTheme.instance.setTheme(ThemeType.light); testWidgets("AppBarIconButton test", (tester) async { int buttonPressedCount = 0; final button = AppBarIconButton( @@ -22,6 +21,11 @@ void main() { await tester.pumpWidget( MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), home: Material( child: button, ), diff --git a/test/widget_tests/custom_buttons/draggable_switch_button_test.dart b/test/widget_tests/custom_buttons/draggable_switch_button_test.dart index def9296f4..d8366a1f0 100644 --- a/test/widget_tests/custom_buttons/draggable_switch_button_test.dart +++ b/test/widget_tests/custom_buttons/draggable_switch_button_test.dart @@ -1,11 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:stackwallet/utilities/theme/color_theme.dart'; -import 'package:stackwallet/utilities/theme/stack_theme.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/widgets/custom_buttons/draggable_switch_button.dart'; void main() { - StackTheme.instance.setTheme(ThemeType.light); testWidgets("DraggableSwitchButton tapped", (tester) async { bool? isButtonOn = false; final button = DraggableSwitchButton( @@ -18,6 +17,11 @@ void main() { await tester.pumpWidget( MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), home: button, ), ); @@ -40,6 +44,11 @@ void main() { await tester.pumpWidget( MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), home: SizedBox( width: 200, height: 60, @@ -67,6 +76,11 @@ void main() { await tester.pumpWidget( MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), home: SizedBox( width: 200, height: 60, diff --git a/test/widget_tests/custom_pin_put_test.dart b/test/widget_tests/custom_pin_put_test.dart index 6d30bd323..d3a449865 100644 --- a/test/widget_tests/custom_pin_put_test.dart +++ b/test/widget_tests/custom_pin_put_test.dart @@ -1,20 +1,24 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:stackwallet/utilities/theme/color_theme.dart'; -import 'package:stackwallet/utilities/theme/stack_theme.dart'; +import 'package:stackwallet/utilities/theme/light_colors.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'; void main() { - StackTheme.instance.setTheme(ThemeType.light); group("CustomPinPut tests", () { testWidgets("CustomPinPut with 4 fields builds correctly", (tester) async { const pinPut = CustomPinPut(fieldsCount: 4); await tester.pumpWidget( - const MaterialApp( - home: Material( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: const Material( child: pinPut, ), ), @@ -37,6 +41,11 @@ void main() { await tester.pumpWidget( MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), home: Material( child: pinPut, ), @@ -74,6 +83,11 @@ void main() { await tester.pumpWidget( MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), home: Material( child: pinPut, ), @@ -100,6 +114,11 @@ void main() { await tester.pumpWidget( MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), home: Material( child: pinPut, ), @@ -126,6 +145,11 @@ void main() { await tester.pumpWidget( MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), home: Material( child: pinPut, ), @@ -152,6 +176,11 @@ void main() { await tester.pumpWidget( MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), home: Material( child: keyboard, ),