Page MenuHomeIn-Portal Phabricator

INP-1708 - Ignore crop/fill parameters during image resize, when they have no effect
ClosedPublic

Authored by alex on Jun 14 2017, 8:19 AM.

Details

Test Plan

Part 1 (new functionality)

  • in IDE:
    1. open /modules/custom/admin_templates/widgets/widget_list.tpl template for editing
    2. replace grid_image_td block content with <img src="<inp2:Field name='$field' format='full_url'/>" alt=""/><br />
    3. save changes
    4. open /modules/custom/units/widgets/widgets_config.php file for editing
    5. remove 'direct_links' => false from all upload field definitions
  • in Admin Console:
    1. go to CustomWidgets section
    2. add a widget with and in it upload image of 120x120 dimensions
    3. write down URL of the image
    4. in template change full_url to resize:120x120, in browser reload page
    5. confirm, that URL of image remained the same
    6. in template change full_url to resize:120x120;crop:C|C, in browser reload page
    7. confirm, that URL of image remained the same
    8. in template change full_url to resize:120x120;crop:C|C;fill:#FF0000, in browser reload page
    9. confirm, that URL of image remained the same

Part 2 (old functionality)

  • in Admin Console:
    1. go to CustomWidgets section
    2. in template change full_url to resize:100x120, in browser reload page
    3. confirm, that URL of image is changed
    4. in template change full_url to resize:100x120;crop:C|C, in browser reload page
    5. confirm, that URL of image is changed
    6. in template change full_url to resize:100x120;crop:C|C;fill:#FF0000, in browser reload page
    7. confirm, that URL of image is changed

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 created this revision.Jun 14 2017, 8:19 AM
alex added a project: Restricted Project.Jun 14 2017, 8:21 AM
alex edited the test plan for this revision. (Show Details)Jun 15 2017, 8:09 AM
This revision now requires changes to proceed.Jun 15 2017, 12:26 PM
alex added a comment.Jun 16 2017, 1:06 AM

Need to specify 'direct_links' => false was the only reason tests have failed?

erik accepted this revision.Jun 16 2017, 10:49 AM
This revision is now accepted and ready to land.Jun 16 2017, 10:49 AM
alex edited the test plan for this revision. (Show Details)Jun 16 2017, 10:59 AM
alex added a comment.Jun 16 2017, 11:03 AM

I've updated test plan, because code was fine, but test plan had some copy/paste issues.

This revision was automatically updated to reflect the committed changes.