-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
26825 add all image roles for first product entity #27170
26825 add all image roles for first product entity #27170
Conversation
Hi @sergiy-v. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
@@ -61,6 +61,10 @@ public function create($sku, ProductAttributeMediaGalleryEntryInterface $entry) | |||
$existingMediaGalleryEntries = $product->getMediaGalleryEntries(); | |||
$existingEntryIds = []; | |||
if ($existingMediaGalleryEntries == null) { | |||
// set all media types if not specified | |||
if ($entry->getTypes() == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use the strict types comparison (===
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I uses loose comparison here in order to handle few cases for $entry->getTypes()
: NULL, [] in the same way like on line 63.
Please clarify in case the extra changes needed here, thanks.
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminCheckImageRolesSelectedActionGroup"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you, please, split this action group into two separate action groups? Like the following example:
AdminOpenProductImagesSectionActionGroup
AssertAdminProductImageRolesSelectedActionGroup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I splitted the logic, thank you for suggestions.
…age roles for first product entity
6e6a0be
to
960732a
Compare
Hi @rogyar, thank you for the review. |
✔️ QA Passed |
@magento run Functional Tests EE |
Hi @sergiy-v, thank you for your contribution! |
Description
Added improvements to GalleryManagement 'create' method to set all image roles for first product entity.
Fixed Issues (if relevant)
#26825
Manual testing scenarios
See #26825 issue description for details.
Contribution checklist