Skip to content

[Test]: PreparationFormCreateList Component #333

@jjoonleo

Description

@jjoonleo

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:

  • Unit Test
  • Widget Test
  • Integration Test
  • Golden Test

Test Scenarios
List the specific scenarios or cases that should be covered:

  1. Basic Rendering: Verify that the component renders the correct number of preparation steps provided in preparationNameState.preparationStepList.
  2. List Mode Toggle: Verify that PreparationFormReorderableListDismissible renders when enableDismissible is true, and PreparationFormReorderableList renders when false.
  3. Adding State: Verify that the input field (PreparationFormListField) appears only when preparationNameState.status is PreparationFormStatus.adding.
  4. Interaction - Creation: Verify that onCreationRequested is called when the CreateIconButton is tapped.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions