Skip to content

fix(upload): improve bulk upload inline validation and update tests

Laxman Reddy requested to merge refactor/contentinput-test-split into develop

Description:

Implemented and updated validation behavior for bulk image uploads along with related test case improvements.

Changes made:

  • Split and updated related test cases for better maintainability.
  • Added test coverage for bulk upload validation flow.
  • Added live inline validation for bulk upload title and description fields.
  • Validation behavior now matches the single upload experience.
  • Error messages appear only after user interaction.
  • Title validation:
    • Shows error when input is less than 8 characters.
    • Removes error immediately after valid input.
  • Description validation:
    • Shows error when input is less than 32 characters.
    • Removes error immediately after valid input.
  • Added per-file validation handling for each bulk uploaded item.
  • Prevented invalid bulk uploads from being submitted.
  • Fixed async cleanup issue in MediaGridItem to prevent unhandled Vitest errors.
  • Added proper cleanup handling to avoid state updates after component unmount.
  • Verified all tests, lint checks, and build are passing successfully.

Type of Change:

  • Bug Fix
    • Testing
    • Feature Development
    • Documentation

Testing:

  • Tested on desktop
    • Tested on mobile
    • Tested in different browsers

Screenshots (if applicable):

Added screenshots for:

  • Bulk upload validation errors

  • Valid state after correct input

  • Updated upload flow UI

    image.png

  • image.png

Link to code walkthrough:

Added walkthrough/demo recording explaining the implemented changes and test updates.

Checklist:

  • Code follows project style guidelines
    • Self-review completed
    • No console errors
    • TypeScript types are correct

Merge request reports

Loading