Skip to content

Commit

Permalink
Bump dependencies + fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ashtanko committed Mar 29, 2024
1 parent 55aa5e3 commit f609e65
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 51 deletions.
54 changes: 27 additions & 27 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ publish_to: 'none'
version: 1.0.0+1

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: '>=3.0.5'
sdk: ">=3.2.0 <4.0.0"
flutter: '>=3.2.0'

dependencies:
flutter:
sdk: flutter
flutter_bloc: ^8.1.3
bloc: ^8.1.2
logger: ^1.4.0
flutter_bloc: ^8.1.5
bloc: ^8.1.4
logger: ^2.2.0
equatable: ^2.0.5
http: ^1.0.0
http: ^1.2.1
json_annotation: ^4.8.1
shared_preferences: ^2.1.2
dio: ^5.2.1+1
intl: ^0.18.0
google_fonts: ^5.1.0
shared_preferences: ^2.2.2
dio: ^5.4.2+1
intl: ^0.18.1
google_fonts: ^6.2.1
#analyzer: ^2.7.0
freezed_annotation: ^2.4.1
intl_utils: ^2.8.3
intl_utils: ^2.8.7
effective_dart: ^1.3.2
flutter_svg: ^2.0.7
flutter_svg: ^2.0.10+1
gap: ^3.0.1
# cached_network_image: ^3.2.3
path_provider: ^2.0.15
file: ^6.1.4
get_it: ^7.2.0
injectable: ^2.1.1
path_provider: ^2.1.2
file: ^7.0.0
get_it: ^7.6.7
injectable: ^2.4.1

flutter_localizations:
sdk: flutter
Expand All @@ -42,20 +42,20 @@ dev_dependencies:
sdk: flutter
integration_test:
sdk: flutter
build_runner: ^2.4.5
injectable_generator: ^2.1.6
flutter_gen_runner: ^5.3.1
json_serializable: ^6.7.0
build_runner: ^2.4.9
injectable_generator: ^2.6.1
flutter_gen_runner: ^5.4.0
json_serializable: ^6.7.1
#coverage: ^1.1.0
lint: ^2.1.2
mockito: ^5.4.2
lint: ^2.3.0
mockito: ^5.4.4
#test: ^1.17.9
bloc_test: ^9.1.3
flutter_lints: ^2.0.1
mocktail: ^0.3.0
freezed: ^2.4.1
bloc_test: ^9.1.7
flutter_lints: ^3.0.2
mocktail: ^1.0.3
freezed: ^2.4.7
#dart_code_metrics: ^5.7.5
network_image_mock: ^2.0.1
network_image_mock: ^2.1.1

flutter:
uses-material-design: true
Expand Down
30 changes: 6 additions & 24 deletions test/view/settings/settings_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,12 @@ void main() {

expect(
find.byWidgetPredicate(
(widget) =>
widget is ThemeDialogCell<AppTheme> &&
widget.title == title &&
widget.value == themeState,
(widget) => widget is ThemeDialogCell<AppTheme> && widget.title == title && widget.value == themeState,
),
findsOneWidget,
);

expect(find.widgetWithIcon(ThemeDialogCell<AppTheme>, Icons.check),
findsOneWidget);
expect(find.widgetWithIcon(ThemeDialogCell<AppTheme>, Icons.check), findsOneWidget);
}

void verifyThemeChange({
Expand Down Expand Up @@ -133,8 +129,7 @@ void main() {
expect(find.byType(ThemeDialogCell<AppTheme>), findsNWidgets(5));
});

testWidgets('render bottom sheet dialog item for system theme',
(tester) async {
testWidgets('render bottom sheet dialog item for system theme', (tester) async {
assertThemeDialogCell(
tester,
'System Theme',
Expand All @@ -143,8 +138,7 @@ void main() {
);
});

testWidgets('render bottom sheet dialog item for light theme',
(tester) async {
testWidgets('render bottom sheet dialog item for light theme', (tester) async {
assertThemeDialogCell(
tester,
'Light Theme',
Expand All @@ -153,8 +147,7 @@ void main() {
);
});

testWidgets('render bottom sheet dialog item for dark theme',
(tester) async {
testWidgets('render bottom sheet dialog item for dark theme', (tester) async {
assertThemeDialogCell(
tester,
'Dark Theme',
Expand All @@ -163,8 +156,7 @@ void main() {
);
});

testWidgets('render bottom sheet dialog item for yellow theme',
(tester) async {
testWidgets('render bottom sheet dialog item for yellow theme', (tester) async {
assertThemeDialogCell(
tester,
'Yellow Theme',
Expand Down Expand Up @@ -212,15 +204,5 @@ void main() {
newThemeState: AppTheme.yellow,
);
});

testWidgets('change to experimental theme theme', (tester) async {
verifyThemeChange(
tester: tester,
widgetTitle: 'Experimental Theme',
prevThemeState: AppTheme.light,
themeMode: ThemeMode.light,
newThemeState: AppTheme.experimental,
);
});
});
}

0 comments on commit f609e65

Please sign in to comment.