diff --git a/test/city_of_living_test.dart b/test/city_of_living_test.dart new file mode 100644 index 0000000..d198eb2 --- /dev/null +++ b/test/city_of_living_test.dart @@ -0,0 +1,54 @@ +import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:eatvio_app/presentation/registration/city_of_living_screen/city_of_living_screen.dart'; +import 'package:eatvio_app/presentation/registration/city_of_living_screen/bloc/city_of_living_bloc.dart'; +import 'package:eatvio_app/presentation/registration/city_of_living_screen/models/city_of_living_model.dart'; + +void main() { + group('AdditionalInfoScreen', () { + testWidgets('renders screen in initial state', (WidgetTester tester) async { + final myProfileBloc = CityOfLivingBloc(CityOfLivingState( + cityOfLivingModelObj: CityOfLivingModel( + userRegistrationSheet: UserRegistrationSheet( + name: "name", + firstName: "firstName", + lastName: "lastName", + email: "email", + password: "password", + passwordConfirmation: "passwordConfirmation", + termsAccepted: "termsAccepted", + birthdate: "birthdate", + gender: "gender", + country: "country", + city: "city", + lang: "lang", + weight: "weight", + height: "height", + chestCircumference: 'asdasd', + waistCircumference: "waistCircumference", + hipCircumference: "hipCircumference", + bloodPressureUp: "bloodPressureUp", + bloodPressureDown: "bloodPressureDown", + hasHypo: "hasHypo", + hasHyper: "hasHyper", + aboutAllergy: "aboutAllergy", + aboutTakingPils: "aboutTakingPils", + aboutSportHobbies: "aboutSportHobbies", + favoriteFoods: "favoriteFoods", + unfavoriteFoods: "unfavoriteFoods", + additionalInfo: + "additionalInfo")))); // Ensure that MyProfileModel is non-nullable + + await tester.pumpWidget( + MaterialApp( + home: BlocProvider.value( + value: myProfileBloc, + child: CityOfLivingScreen(), + ), + ), + ); + }); + }); +} diff --git a/test/credentials_test.dart b/test/credentials_test.dart new file mode 100644 index 0000000..851a7df --- /dev/null +++ b/test/credentials_test.dart @@ -0,0 +1,54 @@ +import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:eatvio_app/presentation/registration/credentials_screen/credentials_screen.dart'; +import 'package:eatvio_app/presentation/registration/credentials_screen/bloc/credentials_bloc.dart'; +import 'package:eatvio_app/presentation/registration/credentials_screen/models/credentials_model.dart'; + +void main() { + group('AdditionalInfoScreen', () { + testWidgets('renders screen in initial state', (WidgetTester tester) async { + final myProfileBloc = CredentialsBloc(CredentialsState( + credentialsModelObj: CredentialsModel( + userRegistrationSheet: UserRegistrationSheet( + name: "name", + firstName: "firstName", + lastName: "lastName", + email: "email", + password: "password", + passwordConfirmation: "passwordConfirmation", + termsAccepted: "termsAccepted", + birthdate: "birthdate", + gender: "gender", + country: "country", + city: "city", + lang: "lang", + weight: "weight", + height: "height", + chestCircumference: 'asdasd', + waistCircumference: "waistCircumference", + hipCircumference: "hipCircumference", + bloodPressureUp: "bloodPressureUp", + bloodPressureDown: "bloodPressureDown", + hasHypo: "hasHypo", + hasHyper: "hasHyper", + aboutAllergy: "aboutAllergy", + aboutTakingPils: "aboutTakingPils", + aboutSportHobbies: "aboutSportHobbies", + favoriteFoods: "favoriteFoods", + unfavoriteFoods: "unfavoriteFoods", + additionalInfo: + "additionalInfo")))); // Ensure that MyProfileModel is non-nullable + + await tester.pumpWidget( + MaterialApp( + home: BlocProvider.value( + value: myProfileBloc, + child: CredentialsScreen(), + ), + ), + ); + }); + }); +}