Skip to content

Commit a1ccc14

Browse files
merge magento/2.4.0-develop into magento-tsg/MC-34941
2 parents fb3fe58 + e7444f3 commit a1ccc14

File tree

6 files changed

+243
-533
lines changed

6 files changed

+243
-533
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ $enableLazyLoadingWithoutBorders = (bool)$block->getVar(
1818
'enable_lazy_loading_for_images_without_borders',
1919
'Magento_Catalog'
2020
);
21+
$width = (int)$block->getWidth();
22+
$paddingBottom = $block->getRatio() * 100;
2123
?>
22-
<span class="product-image-container" id="product-image-container-<?= /* @noEscape */ $block->getProductId() ?>">
24+
<span class="product-image-container product-image-container-<?= /* @noEscape */ $block->getProductId() ?>">
2325
<span class="product-image-wrapper">
2426
<img class="<?= $escaper->escapeHtmlAttr($block->getClass()) ?>"
2527
<?php foreach ($block->getCustomAttributes() as $name => $value): ?>
@@ -36,11 +38,29 @@ $enableLazyLoadingWithoutBorders = (bool)$block->getVar(
3638
<?php endif; ?>
3739
alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>"/></span>
3840
</span>
39-
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
40-
'width:' . (int)$block->getWidth() . 'px;',
41-
'#product-image-container-' . $block->getProductId()
42-
) ?>
43-
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
44-
'padding-bottom: '. ($block->getRatio() * 100) . '%;',
45-
'#product-image-container-' . $block->getProductId() . ' span.product-image-wrapper'
46-
) ?>
41+
<?php
42+
$styles = <<<STYLE
43+
.product-image-container-{$block->getProductId()} {
44+
width: {$width}px;
45+
}
46+
.product-image-container-{$block->getProductId()} span.product-image-wrapper {
47+
padding-bottom: {$paddingBottom}%;
48+
}
49+
STYLE;
50+
//In case a script was using "style" attributes of these elements
51+
$script = <<<SCRIPT
52+
prodImageContainers = document.querySelectorAll(".product-image-container-{$block->getProductId()}");
53+
for (var i = 0; i < prodImageContainers.length; i++) {
54+
prodImageContainers[i].style.width = "{$width}px";
55+
}
56+
prodImageContainersWrappers = document.querySelectorAll(
57+
".product-image-container-{$block->getProductId()} span.product-image-wrapper"
58+
);
59+
for (var i = 0; i < prodImageContainersWrappers.length; i++) {
60+
prodImageContainersWrappers[i].style.paddingBottom = "{$paddingBottom}%";
61+
}
62+
SCRIPT;
63+
64+
?>
65+
<?= /* @noEscape */ $secureRenderer->renderTag('style', [], $styles, false) ?>
66+
<?= /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false) ?>

app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
<testCaseId value="MC-14382" />
1919
<group value="security"/>
2020
<group value="mtf_migrated"/>
21-
<!-- skip due to MQE-1964 -->
22-
<group value="skip"/>
21+
<skip>
22+
<issueId value="MQE-1964"/>
23+
</skip>
2324
</annotations>
2425
<before>
2526
<!-- Log in to Admin Panel -->

app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
<testCaseId value="MC-14384" />
1919
<group value="security"/>
2020
<group value="mtf_migrated"/>
21-
<!-- skip due to MQE-1964 -->
22-
<group value="skip"/>
21+
<skip>
22+
<issueId value="MQE-1964"/>
23+
</skip>
2324
</annotations>
2425
<before>
2526
<!-- Log in to Admin Panel -->
@@ -41,7 +42,7 @@
4142
<argument name="message" value="The password entered for the current user is invalid. Verify the password and try again." />
4243
<argument name="messageType" value="error" />
4344
</actionGroup>
44-
45+
4546
<actionGroup ref="AdminFillUserRoleFormActionGroup" stepKey="fillFieldSecondAttempt">
4647
<argument name="role" value="roleAdministrator" />
4748
<argument name="currentAdminPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}INVALID" />

app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
<description value="Change full access role for admin user to custom one with restricted permission (Sales)"/>
1919
<group value="user"/>
2020
<group value="mtf_migrated"/>
21-
<!-- skip due to MQE-1964 -->
22-
<group value="skip"/>
21+
<skip>
22+
<issueId value="MQE-1964"/>
23+
</skip>
2324
</annotations>
2425

2526
<before>

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"friendsofphp/php-cs-fixer": "~2.16.0",
8989
"lusitanian/oauth": "~0.8.10",
9090
"magento/magento-coding-standard": "*",
91-
"magento/magento2-functional-testing-framework": "dev-3.0.0-RC3",
91+
"magento/magento2-functional-testing-framework": "3.0.0-RC4",
9292
"pdepend/pdepend": "~2.7.1",
9393
"phpcompatibility/php-compatibility": "^9.3",
9494
"phpmd/phpmd": "^2.8.0",

0 commit comments

Comments
 (0)