[wp-trac] [WordPress Trac] #37750: Cropping custom logo should preserve attachment properties
WordPress Trac
noreply at wordpress.org
Thu Mar 24 14:07:13 UTC 2022
#37750: Cropping custom logo should preserve attachment properties
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: joedolson
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.0
Component: Media | Version: 4.5
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has- | Focuses:
screenshots has-testing-info | accessibility
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):
* keywords: has-patch has-unit-tests has-screenshots => has-patch has-
unit-tests has-screenshots has-testing-info
Comment:
= Test Report
Patch tested: [https://github.com/WordPress/wordpress-develop/pull/2441 PR
2441]
Env:
- OS: macOS Big Sur
- Localhost: wp-env
- WordPress: `trunk`
- Browser: Firefox and Edge
- Plugins: none
- Theme: Twenty Twenty
== Testing Steps
1. Activate Twenty Twenty or any other non-block theme.
2. Go to Media > Library.
3. Upload at least one image. (In my case, I uploaded 4 different images
with different metadata to pre-populate the properties.)
4. For certain tests, set the attachment properties for alt test, title,
caption, and/or description.
5. Go to the Appearance > Customize > Site Identity.
6. In the Logo section, click "Select Logo".
7. Select an image.
8. Click the "Select" button. Expected behavior: Crop modal opens.
9. Select a region to crop.
10. Click the "Crop image" button.
11. Click "Publish"* and close the Customizer.
12. Go to Media > Library.
13. Click on the cropped logo image to open its properties screen. Test:
Check that the properties are properly populated. Expected behavior:
* Title:
* Is `cropped-[filename]` ''when'' the original image's title is
the filename (meaning the image did not have a title in its metadata when
uploaded or the title property wasn't manually changed in step 4).
* Is the same as the original image's title when the original title
is not the filename (meaning the image either has a title in its metadata
or the title property was manually changed in step 4).
* Alt text: matches the original image's alt text property.
* Caption: matches the original image's caption property.
* Description:
* Cropped image's URL ''when'' the original image's description
property is empty.
* Else, matches the original image's description property.
== Test Results
Scenarios:
||= Original Title =||= Original Alt =||= Original Caption =||= Original
Description =||= Cropped Correct? =||
|| filename || || || || ✅ ||
|| filename || alt || || || ✅ ||
|| filename || || caption || || ✅ ||
|| filename || || || description || ✅ ||
|| filename || alt || caption || || ✅ ||
|| filename || alt || || description || ✅ ||
|| filename || alt || caption || description || ✅ ||
|| title || || || || ✅ ||
|| title || alt || || || ✅ ||
|| title || || caption || || ✅ ||
|| title || || || description || ✅ ||
|| title || alt || caption || || ✅ ||
|| title || alt || || description || ✅ ||
|| title || alt || caption || description || ✅ ||
== Summary
- Able to reproduce the reported issue ✅
- After applying the patch and tested each of the scenarios, patch works
as expected ✅
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37750#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list