forked from eatvio/eatvio_app
fix(chat): guard diet duration and keep progress plank
- show diet duration hint and plan duration in suggestion flow - disable diet CTA on duration mismatch with grey visual state - keep progress plank visible for personal_diet_setted - center step labels under their circles
This commit is contained in:
@@ -50,13 +50,13 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'при showProgressPlank=false и proposed видны заголовок и чип, плашки нет',
|
||||
'personal_diet_setted показывает плашку и чип вместе с баннером замены',
|
||||
(tester) async {
|
||||
final progress = mapConsultationProgress(
|
||||
state: ChosenPlanStateEnum.personalDietSet,
|
||||
hasPersonalDiet: true,
|
||||
);
|
||||
expect(progress.showProgressPlank, isFalse);
|
||||
expect(progress.showProgressPlank, isTrue);
|
||||
expect(progress.dietStatus, PersonalDietStatus.proposed);
|
||||
|
||||
await tester.pumpWidget(
|
||||
@@ -71,11 +71,11 @@ void main() {
|
||||
|
||||
final s = S.of(tester.element(find.byType(ChatConsultationHeader)));
|
||||
|
||||
expect(find.text(s.more_about_order), findsOneWidget);
|
||||
expect(find.text(s.order_in_progress), findsNWidgets(2));
|
||||
expect(find.byType(PersonalDietStatusChip), findsOneWidget);
|
||||
expect(find.text(s.personal_diet_proposed), findsOneWidget);
|
||||
expect(find.byType(ConsultationProgressPlank), findsNothing);
|
||||
expect(find.byIcon(Icons.check), findsNothing);
|
||||
expect(find.byType(ConsultationProgressPlank), findsOneWidget);
|
||||
expect(find.byIcon(Icons.check), findsNWidgets(2));
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user