OlhenShu / ProjectStage_Team2_May

0 stars 0 forks source link

Propose new place - Upload photos enhancement #239

Open OlhenShu opened 2 months ago

OlhenShu commented 2 months ago

As a registered user I want to be able to add photos to a proposed place and see photos of a place in place's detail information popup.

Mockups: (for reference only!)

  1. image

  2. image

Acceptance Criteria:

  1. GIVEN a registered user is successfully logged in to the system, WHEN he clicks on "Add place" button at top right corner of the screen, THEN system shall open a modal window with elements from #21 AND a. button "Upload photos"

  2. Provided user clicks on "Upload photos" button, system shall display "Upload photos" element below.

  3. The "Upload photos" element shall contain b. sub-header "Attach photos" c. message "No photos attached." - displayed when there is nothing attached by default d. button "+Add photos" e. button "Upload" (disabled when there is nothing attached by default)

  4. Provided user clicks on "+ Add photos" button, system shall open file explorer on user's device.

  5. User can choose max 5 photo files at a time.

  6. User can upload only files with image extensions (e.g. bmp, jpg, jpeg, tiff, etc.)

  7. After user attached a photo(s), the Upload element shall be as follows: b. sub-header "Attach photos" c. the attached photos with an enabled Bucket icon next to each photo c.1. The photos shall be displayed in the following pattern: file type icon, file name (with extension), file size (in format '<__> <KB/MB>') d. provided user added 5 photos - "+ Add photos" button shall be disabled e. button "Upload", enabled

  8. Provided user clicks on a bucket icon, system shall delete the corresponding photo.

  9. Provided a photo(s) is attached and user presses the Upload button, system shall: a. display the bucket icon disabled b. start uploading the attached photo c. display an upload progress bar next to corresponding photo while the upload is in progress

  10. Provided the photo(s) was uploaded successfully a. system shall display the photos in the Upload element b. system shall display a success flash message "Photo(s) uploaded successfully", which shall automatically disappear in 5 sec

  11. Max size of a photo to upload shall be 10 MB.

Assumptions and Constraints: