Target Feature/Component
PreparationFormCreateList component which handles the display and management of the preparation steps list, including reordering, editing, and adding new steps.
Type of Test
Please select the type of test needed:
Test Scenarios
List the specific scenarios or cases that should be covered:
- Basic Rendering: Verify that the component renders the correct number of preparation steps provided in
preparationNameState.preparationStepList.
- List Mode Toggle: Verify that
PreparationFormReorderableListDismissible renders when enableDismissible is true, and PreparationFormReorderableList renders when false.
- Adding State: Verify that the input field (
PreparationFormListField) appears only when preparationNameState.status is PreparationFormStatus.adding.
- Interaction - Creation: Verify that
onCreationRequested is called when the CreateIconButton is tapped.
- Interaction - Reordering & Editing: Verify that interacting with the list items triggers the appropriate BLoC events:
- Time changes should add
PreparationFormPreparationStepTimeChanged.
- Reordering should add
PreparationFormPreparationStepOrderChanged.
Relevant Code
lib/presentation/schedule_create/schedule_spare_and_preparing_time/preparation_form/components/preparation_form_create_list.dart
Additional Context
- This widget depends on
PreparationFormBloc and PreparationStepFormCubit.
- Tests will require wrapping the widget in a
BlocProvider with mocked instances of these BLoCs to verify event dispatching.
Target Feature/Component
PreparationFormCreateListcomponent which handles the display and management of the preparation steps list, including reordering, editing, and adding new steps.Type of Test
Please select the type of test needed:
Test Scenarios
List the specific scenarios or cases that should be covered:
preparationNameState.preparationStepList.PreparationFormReorderableListDismissiblerenders whenenableDismissibleistrue, andPreparationFormReorderableListrenders whenfalse.PreparationFormListField) appears only whenpreparationNameState.statusisPreparationFormStatus.adding.onCreationRequestedis called when theCreateIconButtonis tapped.PreparationFormPreparationStepTimeChanged.PreparationFormPreparationStepOrderChanged.Relevant Code
lib/presentation/schedule_create/schedule_spare_and_preparing_time/preparation_form/components/preparation_form_create_list.dartAdditional Context
PreparationFormBlocandPreparationStepFormCubit.BlocProviderwith mocked instances of these BLoCs to verify event dispatching.