Skip to content

Commit

Permalink
Merge branch 'dev' into iury
Browse files Browse the repository at this point in the history
  • Loading branch information
iuryFilho committed Jan 20, 2025
2 parents ba3a886 + c23f764 commit 85bb8b3
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 2 deletions.
4 changes: 2 additions & 2 deletions healthway_app/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
export "FLUTTER_ROOT=/home/kaua/flutter"
export "FLUTTER_APPLICATION_PATH=/home/kaua/VSCode/Healthway/healthway_app"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=/Users/lemuelcavalcante/Documents/engenharia2/Healthway/healthway_app/lib/main.dart"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=/Users/lemuelcavalcante/Documents/engenharia2/Healthway/healthway_app/.dart_tool/package_config.json"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
4 changes: 4 additions & 0 deletions healthway_app/lib/geral_screens/alimentos_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,7 @@ class _AlimentosScreenState extends State<AlimentosScreen> {
);
}
}

extension on Color {
withValues({required double alpha}) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -476,3 +476,7 @@ class NutritionistDashboardScreen extends StatelessWidget {
);
}
}

extension on Color {
withValues({required double alpha}) {}
}
4 changes: 4 additions & 0 deletions healthway_app/lib/screens_nutricionist/schedule_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ class _ScheduleScreenState extends State<ScheduleScreen> {
}
}

extension on Color {
withValues({required double alpha}) {}
}

class Appointment {
final String patientName;
final String type;
Expand Down
4 changes: 4 additions & 0 deletions healthway_app/lib/screens_patient/healthScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,7 @@ class DietManagementScreen extends StatelessWidget {
);
}
}

extension on Color {
withValues({required double alpha}) {}
}
4 changes: 4 additions & 0 deletions healthway_app/lib/screens_patient/notificationScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ class NotificationScreen extends StatelessWidget {
);
}
}

extension on Color {
withValues({required double alpha}) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,7 @@ class PatientDashboardScreen extends StatelessWidget {
return peso / (alturaCm * alturaCm);
}
}

extension on Color {
withValues({required double alpha}) {}
}
4 changes: 4 additions & 0 deletions healthway_app/lib/screens_patient/patient_profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> {
return 'Obeso';
}
}

extension on Color {
withValues({required double alpha}) {}
}
4 changes: 4 additions & 0 deletions healthway_app/lib/widgets/alimento_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,7 @@ class AlimentoItem extends StatelessWidget {
);
}
}

extension on Color {
withValues({required double alpha}) {}
}
4 changes: 4 additions & 0 deletions healthway_app/lib/widgets/chat_input_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@ class _ChatInputFieldState extends State<ChatInputField> {
);
}
}

extension on Color {
withValues({required double alpha}) {}
}
4 changes: 4 additions & 0 deletions healthway_app/lib/widgets/chat_message_bubble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ class ChatMessageBubble extends StatelessWidget {
);
}
}

extension on Color {
withValues({required double alpha}) {}
}
54 changes: 54 additions & 0 deletions healthway_app/test/nutricionista_dashboard_screen_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:healthway_app/screens_nutricionist/nutritionist_dashboard_screen.dart';

void main() {
testWidgets('NutritionistDashboardScreen displays correctly', (WidgetTester tester) async {
// Build the NutritionistDashboardScreen widget.
await tester.pumpWidget(MaterialApp(home: NutritionistDashboardScreen(userData: {},)));

// Verify if the background color is correct.
final scaffold = tester.widget<Scaffold>(find.byType(Scaffold));
expect(scaffold.backgroundColor, const Color(0xFFE6F7F8));

// Verify if the AppBar widget is present.
expect(find.byType(AppBar), findsOneWidget);

// Verify if the Icon widget is present.
expect(find.byType(Icon), findsOneWidget);

// Verify if the Padding widget is present.
expect(find.byType(Padding), findsOneWidget);

// Verify if the Form widget is present.
expect(find.byType(Form), findsOneWidget);

// Verify if the TextFormField widget is present.
expect(find.byType(TextFormField), findsNWidgets(2));

// Verify if the ElevatedButton widget is present.
expect(find.byType(ElevatedButton), findsOneWidget);

// Verify if the CircularProgressIndicator widget is present.
expect(find.byType(CircularProgressIndicator), findsNothing);

// Add more specific tests for the widgets inside the Column as needed.
});

testWidgets('NutritionistDashboardScreen displays CircularProgressIndicator when loading', (WidgetTester tester) async {
// Build the NutritionistDashboardScreen widget.
await tester.pumpWidget(MaterialApp(home: NutritionistDashboardScreen(userData: {},)));

// Verify if the CircularProgressIndicator widget is present.
expect(find.byType(CircularProgressIndicator), findsNothing);

// Tap the ElevatedButton to simulate a loading state.
await tester.tap(find.byType(ElevatedButton));
await tester.pump();

// Verify if the CircularProgressIndicator widget is present.
expect(find.byType(CircularProgressIndicator), findsOneWidget);
});


}

0 comments on commit 85bb8b3

Please sign in to comment.