test(registration): All tests passed! SMOKE TESTING FINISHED
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
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';
|
||||
|
||||
55
test/medicine_intake_test.dart
Normal file
55
test/medicine_intake_test.dart
Normal file
@@ -0,0 +1,55 @@
|
||||
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/medicine_intake_screen/medicine_intake_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/medicine_intake_screen/bloc/medicine_intake_bloc.dart';
|
||||
import 'package:eatvio_app/presentation/registration/medicine_intake_screen/models/medicine_intake_model.dart';
|
||||
|
||||
void main() {
|
||||
group('AdditionalInfoScreen', () {
|
||||
testWidgets('renders screen in initial state', (WidgetTester tester) async {
|
||||
final myProfileBloc = MedicineIntakeBloc(MedicineIntakeState(
|
||||
medicineIntakeModelObj: MedicineIntakeModel(
|
||||
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<MedicineIntakeBloc>.value(
|
||||
value: myProfileBloc,
|
||||
child: MedicineIntakeScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
//sports
|
||||
55
test/name_test.dart
Normal file
55
test/name_test.dart
Normal file
@@ -0,0 +1,55 @@
|
||||
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/name_screen/name_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/name_screen/bloc/name_bloc.dart';
|
||||
import 'package:eatvio_app/presentation/registration/name_screen/models/name_model.dart';
|
||||
|
||||
void main() {
|
||||
group('AdditionalInfoScreen', () {
|
||||
testWidgets('renders screen in initial state', (WidgetTester tester) async {
|
||||
final myProfileBloc = NameBloc(NameState(
|
||||
nameModelObj: NameModel(
|
||||
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<NameBloc>.value(
|
||||
value: myProfileBloc,
|
||||
child: NameScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
//sports
|
||||
55
test/weight_test.dart
Normal file
55
test/weight_test.dart
Normal file
@@ -0,0 +1,55 @@
|
||||
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/weight_screen/weight_screen.dart';
|
||||
import 'package:eatvio_app/presentation/registration/weight_screen/bloc/weight_bloc.dart';
|
||||
import 'package:eatvio_app/presentation/registration/weight_screen/models/weight_model.dart';
|
||||
|
||||
void main() {
|
||||
group('AdditionalInfoScreen', () {
|
||||
testWidgets('renders screen in initial state', (WidgetTester tester) async {
|
||||
final myProfileBloc = WeightBloc(WeightState(
|
||||
weightModelObj: WeightModel(
|
||||
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<WeightBloc>.value(
|
||||
value: myProfileBloc,
|
||||
child: WeightScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
//sports
|
||||
Reference in New Issue
Block a user