forked from eatvio/eatvio_app
refactor(tests): replace 'final' with 'const' for improved performance in various test files
This commit is contained in:
@@ -36,7 +36,7 @@ void main() {
|
||||
Widget createTestWidget(UserRegistrationSheet sheet) {
|
||||
return MaterialApp(
|
||||
theme: ThemeHelper().themeData(),
|
||||
localizationsDelegates: [
|
||||
localizationsDelegates: const [
|
||||
S.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
@@ -54,7 +54,7 @@ void main() {
|
||||
}
|
||||
|
||||
testWidgets('displays blood pressure screen', (tester) async {
|
||||
final sheet = UserRegistrationSheet(
|
||||
const sheet = UserRegistrationSheet(
|
||||
firstName: 'Test',
|
||||
lastName: 'User',
|
||||
email: 'test@example.com',
|
||||
@@ -90,7 +90,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('displays existing blood pressure values', (tester) async {
|
||||
final sheet = UserRegistrationSheet(
|
||||
const sheet = UserRegistrationSheet(
|
||||
firstName: 'Test',
|
||||
lastName: 'User',
|
||||
email: 'test@example.com',
|
||||
@@ -126,7 +126,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('displays dropdowns for hypo and hyper', (tester) async {
|
||||
final sheet = UserRegistrationSheet(
|
||||
const sheet = UserRegistrationSheet(
|
||||
firstName: 'Test',
|
||||
lastName: 'User',
|
||||
email: 'test@example.com',
|
||||
|
||||
@@ -36,7 +36,7 @@ void main() {
|
||||
Widget createTestWidget(UserRegistrationSheet sheet) {
|
||||
return MaterialApp(
|
||||
theme: ThemeHelper().themeData(),
|
||||
localizationsDelegates: [
|
||||
localizationsDelegates: const [
|
||||
S.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
@@ -54,7 +54,7 @@ void main() {
|
||||
}
|
||||
|
||||
testWidgets('displays email field', (tester) async {
|
||||
final sheet = UserRegistrationSheet(
|
||||
const sheet = UserRegistrationSheet(
|
||||
firstName: 'Test',
|
||||
lastName: 'User',
|
||||
email: '',
|
||||
@@ -90,7 +90,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('displays password fields', (tester) async {
|
||||
final sheet = UserRegistrationSheet(
|
||||
const sheet = UserRegistrationSheet(
|
||||
firstName: 'Test',
|
||||
lastName: 'User',
|
||||
email: 'test@example.com',
|
||||
@@ -126,7 +126,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('initializes with existing values', (tester) async {
|
||||
final sheet = UserRegistrationSheet(
|
||||
const sheet = UserRegistrationSheet(
|
||||
firstName: 'Test',
|
||||
lastName: 'User',
|
||||
email: 'test@example.com',
|
||||
|
||||
@@ -36,7 +36,7 @@ void main() {
|
||||
Widget createTestWidget(UserRegistrationSheet sheet) {
|
||||
return MaterialApp(
|
||||
theme: ThemeHelper().themeData(),
|
||||
localizationsDelegates: [
|
||||
localizationsDelegates: const [
|
||||
S.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
@@ -54,7 +54,7 @@ void main() {
|
||||
}
|
||||
|
||||
testWidgets('displays date of birth screen', (tester) async {
|
||||
final sheet = UserRegistrationSheet(
|
||||
const sheet = UserRegistrationSheet(
|
||||
firstName: 'Test',
|
||||
lastName: 'User',
|
||||
email: 'test@example.com',
|
||||
@@ -90,7 +90,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('displays existing birthdate when provided', (tester) async {
|
||||
final sheet = UserRegistrationSheet(
|
||||
const sheet = UserRegistrationSheet(
|
||||
firstName: 'Test',
|
||||
lastName: 'User',
|
||||
email: 'test@example.com',
|
||||
@@ -126,7 +126,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('displays calendar icon', (tester) async {
|
||||
final sheet = UserRegistrationSheet(
|
||||
const sheet = UserRegistrationSheet(
|
||||
firstName: 'Test',
|
||||
lastName: 'User',
|
||||
email: 'test@example.com',
|
||||
|
||||
Reference in New Issue
Block a user