Page MenuHomeIn-Portal Phabricator

INP-1695 - Automatically generate value for missing "upload_dir" field option
ClosedPublic

Authored by alex on Apr 30 2017, 4:01 AM.

Details

Test Plan

Part 1 (kUploadFormatter with "upload_dir")

  • in Admin Console:
    1. go to CustomWidgets section
    2. delete existing records in grid (if any)
    3. add new record
  • in IDE:
    1. confirm, that image was uploaded somewhere (path is dynamic) under /system/user_files folder sub-folders
  • in Admin Console:
    1. confirm, that in grid image for created record is displayed
    2. open created record for editing
    3. confirm, that image preview is displayed
    4. click on image preview
    5. confirm, that large image version (in original size) is displayed

Part 2 (kUploadFormatter without "upload_dir")

  • in IDE:
    • open /modules/custom/units/widgets/widgets_config.php file for editing
    • for Image field remove (or comment-out) the upload_dir field option
  • in Admin Console:
    1. go to CustomWidgets section
    2. delete existing records in grid (if any)
    3. add new record
  • in IDE:
    1. confirm, that image was uploaded somewhere (path is dynamic) under /system/widgets folder sub-folders
  • in Admin Console:
    1. confirm, that in grid image for created record is displayed
    2. open created record for editing
    3. confirm, that image preview is displayed
    4. click on image preview
    5. confirm, that large image version (in original size) is displayed

Part 3 (kPictureFormatter with "upload_dir")

  • in Admin Console:
    1. go to E-commerceManufacturers section
    2. delete existing records in grid (if any)
    3. add new record
  • in IDE:
    1. confirm, that image was uploaded under /system/images/manufacturers folder
  • in Admin Console:
    1. open created record for editing
    2. confirm, that image preview is displayed
    3. click on image preview
    4. confirm, that large image version (in original size) is displayed

Part 4 (kPictureFormatter without "upload_dir")

  • in IDE:
    • open /modules/in-commerce/units/manufacturers/manufacturers_config.php file for editing
    • for Logo field remove (or comment-out) the upload_dir field option and add 'include_path' => 1 option
  • in Admin Console:
    1. go to E-commerceManufacturers section
    2. delete existing records in grid (if any)
    3. add new record
  • in IDE:
    1. confirm, that image was uploaded under /system/images folder
  • in Admin Console:
    1. open created record for editing
    2. confirm, that image preview is displayed
    3. click on image preview
    4. confirm, that large image version (in original size) is displayed

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex updated this revision to Diff 734.Apr 30 2017, 4:01 AM
alex retitled this revision from to INP-1695 - Automatically generate value for missing "upload_dir" field option.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1695.
alex edited the test plan for this revision. (Show Details)May 2 2017, 8:12 AM
alex edited edge metadata.
alex edited the test plan for this revision. (Show Details)
erik requested changes to this revision.May 16 2017, 6:18 AM
erik edited edge metadata.

Test failed in the Part 4 "confirm, that image preview is displayed". Image preview not displayed. Image uploaded in the /system/images/pending/ folder, and with "/system/images/pending/{image file name}" value in DB.

This revision now requires changes to proceed.May 16 2017, 6:18 AM
alex requested a review of this revision.May 18 2017, 2:12 AM
alex edited the test plan for this revision. (Show Details)
alex edited edge metadata.
alex edited edge metadata.

Test plan updated to compensate for the found error. Turns out that include_path field option is mandatory, when kPictureFormatter is used without upload_dir option.

erik accepted this revision.May 18 2017, 5:48 AM
erik edited edge metadata.
This revision is now accepted and ready to land.May 18 2017, 5:48 AM
This revision was automatically updated to reflect the committed changes.
alex added a child revision: Restricted Differential Revision.Jul 16 2017, 1:53 PM