diff --git a/examples/booking_app/test/feature_home/view/goldens/dark_theme/home_page_search_golden_test.png b/examples/booking_app/test/feature_home/view/goldens/dark_theme/home_page_search_golden_test.png index c1a53d6ee..900cf2f46 100644 Binary files a/examples/booking_app/test/feature_home/view/goldens/dark_theme/home_page_search_golden_test.png and b/examples/booking_app/test/feature_home/view/goldens/dark_theme/home_page_search_golden_test.png differ diff --git a/examples/booking_app/test/feature_home/view/goldens/light_theme/home_page_search_golden_test.png b/examples/booking_app/test/feature_home/view/goldens/light_theme/home_page_search_golden_test.png index c1a53d6ee..900cf2f46 100644 Binary files a/examples/booking_app/test/feature_home/view/goldens/light_theme/home_page_search_golden_test.png and b/examples/booking_app/test/feature_home/view/goldens/light_theme/home_page_search_golden_test.png differ diff --git a/examples/booking_app/test/feature_hotel_details/view/goldens/dark_theme/hotel_details_loaded.png b/examples/booking_app/test/feature_hotel_details/view/goldens/dark_theme/hotel_details_loaded.png index c5255d2cc..c83690cb0 100644 Binary files a/examples/booking_app/test/feature_hotel_details/view/goldens/dark_theme/hotel_details_loaded.png and b/examples/booking_app/test/feature_hotel_details/view/goldens/dark_theme/hotel_details_loaded.png differ diff --git a/examples/booking_app/test/feature_hotel_details/view/goldens/dark_theme/hotel_details_loading.png b/examples/booking_app/test/feature_hotel_details/view/goldens/dark_theme/hotel_details_loading.png index b8ab4b77f..290e73208 100644 Binary files a/examples/booking_app/test/feature_hotel_details/view/goldens/dark_theme/hotel_details_loading.png and b/examples/booking_app/test/feature_hotel_details/view/goldens/dark_theme/hotel_details_loading.png differ diff --git a/examples/booking_app/test/feature_hotel_details/view/goldens/light_theme/hotel_details_loaded.png b/examples/booking_app/test/feature_hotel_details/view/goldens/light_theme/hotel_details_loaded.png index c5255d2cc..c83690cb0 100644 Binary files a/examples/booking_app/test/feature_hotel_details/view/goldens/light_theme/hotel_details_loaded.png and b/examples/booking_app/test/feature_hotel_details/view/goldens/light_theme/hotel_details_loaded.png differ diff --git a/examples/booking_app/test/feature_hotel_details/view/goldens/light_theme/hotel_details_loading.png b/examples/booking_app/test/feature_hotel_details/view/goldens/light_theme/hotel_details_loading.png index b8ab4b77f..290e73208 100644 Binary files a/examples/booking_app/test/feature_hotel_details/view/goldens/light_theme/hotel_details_loading.png and b/examples/booking_app/test/feature_hotel_details/view/goldens/light_theme/hotel_details_loading.png differ diff --git a/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_empty.png b/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_empty.png index d69f6388d..026ce72b6 100644 Binary files a/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_empty.png and b/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_empty.png differ diff --git a/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_error.png b/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_error.png index 51afdfe30..3af2f2b85 100644 Binary files a/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_error.png and b/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_error.png differ diff --git a/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_loading.png b/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_loading.png index ac75f9923..299f69cd0 100644 Binary files a/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_loading.png and b/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_loading.png differ diff --git a/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_success.png b/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_success.png index 97b94969f..e3b3bae5c 100644 Binary files a/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_success.png and b/examples/booking_app/test/feature_hotel_favorites/view/goldens/dark_theme/hotel_favorites_success.png differ diff --git a/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_empty.png b/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_empty.png index d69f6388d..026ce72b6 100644 Binary files a/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_empty.png and b/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_empty.png differ diff --git a/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_error.png b/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_error.png index 51afdfe30..3af2f2b85 100644 Binary files a/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_error.png and b/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_error.png differ diff --git a/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_loading.png b/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_loading.png index ac75f9923..299f69cd0 100644 Binary files a/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_loading.png and b/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_loading.png differ diff --git a/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_success.png b/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_success.png index 97b94969f..e3b3bae5c 100644 Binary files a/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_success.png and b/examples/booking_app/test/feature_hotel_favorites/view/goldens/light_theme/hotel_favorites_success.png differ diff --git a/examples/booking_app/test/feature_hotel_search/factory/hotel_animated_list_view_factory.dart b/examples/booking_app/test/feature_hotel_search/factory/hotel_animated_list_view_factory.dart new file mode 100644 index 000000000..db3b6658d --- /dev/null +++ b/examples/booking_app/test/feature_hotel_search/factory/hotel_animated_list_view_factory.dart @@ -0,0 +1,49 @@ +import 'package:booking_app/base/common_blocs/hotels_extra_details_bloc.dart'; +import 'package:booking_app/feature_hotel_search/blocs/hotel_search_bloc.dart'; +import 'package:booking_app/feature_hotel_search/models/capacity_filter_data.dart'; +import 'package:booking_app/feature_hotel_search/models/date_range_filter_data.dart'; +import 'package:booking_app/feature_hotel_search/ui_components/hotel_animated_list_view.dart'; +import 'package:favorites_advanced_base/core.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rx_bloc/flutter_rx_bloc.dart'; +import 'package:provider/provider.dart'; +import 'package:rx_bloc_list/rx_bloc_list.dart'; +import 'package:rxdart/rxdart.dart'; + +import '../../feature_home/mock/hotel_extra_details_mock.dart'; +import '../mock/hotel_search_mock.dart'; + +/// Change the parameters according the the needs of the test +Widget hotelAnimatedListViewFactory({ + required PaginatedList hotels, + Function(Hotel)? onHotelPressed, + String? hotelsFound, + String? queryFilter, + DateRangeFilterData? dateRangeFilterData, + CapacityFilterData? capacityFilterData, + SortBy? sortedBy, +}) { + return Scaffold( + body: MultiProvider( + providers: [ + RxBlocProvider.value( + value: hotelsExtraDetailsMockFactory(), + ), + RxBlocProvider.value( + value: hotelSearchMockFactory( + hotels: hotels, + hotelsFound: hotelsFound, + queryFilter: queryFilter, + dateRangeFilterData: dateRangeFilterData, + capacityFilterData: capacityFilterData, + sortedBy: sortedBy, + ), + ), + ], + child: HotelAnimatedListView( + hotelList: Stream.value(hotels.list).share(), + onHotelPressed: onHotelPressed, + ), + ), + ); +} diff --git a/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/dark_theme/hotel_capacity_page.png b/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/dark_theme/hotel_capacity_page.png index 9d3cbbb49..43ffe3c47 100644 Binary files a/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/dark_theme/hotel_capacity_page.png and b/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/dark_theme/hotel_capacity_page.png differ diff --git a/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/dark_theme/hotel_sort_page.png b/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/dark_theme/hotel_sort_page.png index cf1fff6ef..0f9a25d95 100644 Binary files a/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/dark_theme/hotel_sort_page.png and b/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/dark_theme/hotel_sort_page.png differ diff --git a/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/light_theme/hotel_capacity_page.png b/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/light_theme/hotel_capacity_page.png index 9d3cbbb49..43ffe3c47 100644 Binary files a/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/light_theme/hotel_capacity_page.png and b/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/light_theme/hotel_capacity_page.png differ diff --git a/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/light_theme/hotel_sort_page.png b/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/light_theme/hotel_sort_page.png index cf1fff6ef..0f9a25d95 100644 Binary files a/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/light_theme/hotel_sort_page.png and b/examples/booking_app/test/feature_hotel_search/ui_components/view/goldens/light_theme/hotel_sort_page.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_animated_list_view_empty.png b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_animated_list_view_empty.png new file mode 100644 index 000000000..13264ba01 Binary files /dev/null and b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_animated_list_view_empty.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_animated_list_view_error.png b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_animated_list_view_error.png new file mode 100644 index 000000000..04c506a86 Binary files /dev/null and b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_animated_list_view_error.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_animated_list_view_with_hotels.png b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_animated_list_view_with_hotels.png new file mode 100644 index 000000000..c402d3c70 Binary files /dev/null and b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_animated_list_view_with_hotels.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_empty.png b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_empty.png index e967348c5..efa05d13b 100644 Binary files a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_empty.png and b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_empty.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_error.png b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_error.png index decfdbeae..fdb893351 100644 Binary files a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_error.png and b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_error.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_loading.png b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_loading.png index fac731fbc..db4abda3b 100644 Binary files a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_loading.png and b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_loading.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_success.png b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_success.png index 0ebc265dc..584020416 100644 Binary files a/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_success.png and b/examples/booking_app/test/feature_hotel_search/view/goldens/dark_theme/hotel_search_success.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_animated_list_view_empty.png b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_animated_list_view_empty.png new file mode 100644 index 000000000..13264ba01 Binary files /dev/null and b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_animated_list_view_empty.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_animated_list_view_error.png b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_animated_list_view_error.png new file mode 100644 index 000000000..04c506a86 Binary files /dev/null and b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_animated_list_view_error.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_animated_list_view_with_hotels.png b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_animated_list_view_with_hotels.png new file mode 100644 index 000000000..c402d3c70 Binary files /dev/null and b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_animated_list_view_with_hotels.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_empty.png b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_empty.png index e967348c5..efa05d13b 100644 Binary files a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_empty.png and b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_empty.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_error.png b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_error.png index decfdbeae..fdb893351 100644 Binary files a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_error.png and b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_error.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_loading.png b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_loading.png index fac731fbc..db4abda3b 100644 Binary files a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_loading.png and b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_loading.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_success.png b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_success.png index 0ebc265dc..584020416 100644 Binary files a/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_success.png and b/examples/booking_app/test/feature_hotel_search/view/goldens/light_theme/hotel_search_success.png differ diff --git a/examples/booking_app/test/feature_hotel_search/view/hotel_animated_list_view_golden_test.dart b/examples/booking_app/test/feature_hotel_search/view/hotel_animated_list_view_golden_test.dart new file mode 100644 index 000000000..163a44917 --- /dev/null +++ b/examples/booking_app/test/feature_hotel_search/view/hotel_animated_list_view_golden_test.dart @@ -0,0 +1,27 @@ +import '../../helpers/golden_helper.dart'; +import '../../helpers/models/scenario.dart'; +import '../../stubs.dart'; +import '../factory/hotel_animated_list_view_factory.dart'; + +void main() { + runGoldenTests([ + generateDeviceBuilder( + scenario: Scenario(name: 'hotel_animated_list_view_empty'), + widget: hotelAnimatedListViewFactory( + hotels: Stub.paginatedListEmpty, + ), + ), + generateDeviceBuilder( + scenario: Scenario(name: 'hotel_animated_list_view_with_hotels'), + widget: hotelAnimatedListViewFactory( + hotels: Stub.paginatedListTwoHotels, + ), + ), + generateDeviceBuilder( + scenario: Scenario(name: 'hotel_animated_list_view_error'), + widget: hotelAnimatedListViewFactory( + hotels: Stub.paginatedListError, + ), + ), + ]); +}