fix: handle null context in MarkdownHtmlWidget and improve test stability with pumpAndSettle calls

This commit is contained in:
mso7nueh
2026-01-13 13:03:58 +03:00
parent 7b425e56f1
commit c786821275
9 changed files with 22 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ void main() {
),
),
);
await tester.pumpAndSettle();
expect(find.byType(ChosenDietWidgetContent), findsOneWidget);
expect(find.text('Test Diet'), findsOneWidget);
@@ -50,6 +51,7 @@ void main() {
),
),
);
await tester.pumpAndSettle();
expect(find.byType(ChosenDietWidgetContent), findsOneWidget);
});
@@ -65,6 +67,7 @@ void main() {
),
),
);
await tester.pumpAndSettle();
expect(find.text('My Diet'), findsOneWidget);
});

View File

@@ -37,6 +37,7 @@ void main() {
planName: 'Test Plan',
planDuration: 14,
));
await tester.pumpAndSettle();
expect(find.byType(ChosenPlanWidgetContent), findsOneWidget);
expect(find.text('Test Plan'), findsOneWidget);
@@ -48,6 +49,7 @@ void main() {
planName: 'My Plan',
planDuration: 7,
));
await tester.pumpAndSettle();
expect(find.byType(ChosenPlanWidgetContent), findsOneWidget);
expect(find.textContaining('3'), findsOneWidget);
@@ -60,6 +62,7 @@ void main() {
planName: 'Long Plan',
planDuration: 30,
));
await tester.pumpAndSettle();
expect(find.byType(ChosenPlanWidgetContent), findsOneWidget);
expect(find.text('Long Plan'), findsOneWidget);