Skip to content

Commit

Permalink
Merge pull request #8237 from magento-gl/Hammer_247_beta1_scope_17042023
Browse files Browse the repository at this point in the history
Hammer 247 beta1 scope 17042023
  • Loading branch information
okolesnyk authored May 11, 2023
2 parents 21a3692 + 5765d64 commit 9d751c5
Show file tree
Hide file tree
Showing 22 changed files with 798 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* See COPYING.txt for license details.
*/
use Magento\Bundle\ViewModel\ValidateQuantity;

// phpcs:disable Generic.Files.LineLength.TooLong
?>
<?php /* @var $block \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Radio */ ?>
<?php $_option = $block->getOption(); ?>
Expand Down Expand Up @@ -49,8 +51,7 @@ $viewModel = $block->getData('validateQuantityViewModel');
<div class="field choice">
<input type="radio"
class="radio product bundle option change-container-classname"
id="bundle-option-<?= $block->escapeHtmlAttr($_option->getId()) ?>
-<?= $block->escapeHtmlAttr($_selection->getSelectionId()) ?>"
id="bundle-option-<?= $block->escapeHtmlAttr($_option->getId()) ?>-<?= $block->escapeHtmlAttr($_selection->getSelectionId()) ?>"
<?php if ($_option->getRequired()) {
echo 'data-validate="{\'validate-one-required-by-name\':true}"';
} ?>
Expand All @@ -61,8 +62,7 @@ $viewModel = $block->getData('validateQuantityViewModel');
value="<?= $block->escapeHtmlAttr($_selection->getSelectionId()) ?>"
data-errors-message-box="#validation-message-box-radio"/>
<label class="label"
for="bundle-option-<?= $block->escapeHtmlAttr($_option->getId()) ?>
-<?= $block->escapeHtmlAttr($_selection->getSelectionId()) ?>">
for="bundle-option-<?= $block->escapeHtmlAttr($_option->getId()) ?>-<?= $block->escapeHtmlAttr($_selection->getSelectionId()) ?>">
<span><?= /* @noEscape */ $block->getSelectionTitlePrice($_selection) ?></span>
<br/>
<?= /* @noEscape */ $block->getTierPriceRenderer()->renderTierPrice($_selection) ?>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontProductImageSlideTest">
<annotations>
<features value="Catalog"/>
<stories value="Product Image"/>
<title value="Product image should be visible and slide left or right on frontend in mobile"/>
<description value="Product image should be visible and slide left or right on frontend in mobile"/>
<group value="Catalog"/>
<severity value="AVERAGE"/>
<testCaseId value="AC-8441"/>
</annotations>
<before>
<resizeWindow width="800" height="700" stepKey="resizeWindowToMobileView"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/>
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteProduct">
<argument name="sku" value="{{SimpleProduct.sku}}"/>
</actionGroup>
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/>
</after>

<!--Create product-->
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="openNewProductPage"/>
<actionGroup ref="FillMainProductFormActionGroup" stepKey="fillSimpleProductMain">
<argument name="product" value="SimpleProduct"/>
</actionGroup>

<!-- Add image to product -->
<actionGroup ref="AddProductImageActionGroup" stepKey="addImageForSimpleProduct">
<argument name="image" value="TestImageWithDotInFilename"/>
</actionGroup>
<actionGroup ref="AddProductImageActionGroup" stepKey="addImageForSimpleProduct2">
<argument name="image" value="TestImageWithDotInFilename"/>
</actionGroup>
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct"/>

<!-- Assert product in storefront product page -->
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageActionGroup" stepKey="assertProductInStorefrontProductPage">
<argument name="product" value="SimpleProduct"/>
</actionGroup>

<click selector="{{StorefrontProductMediaSection.fotoramaImageThumbnail('2')}}" stepKey="clickForFullScreenImage1"/>
<wait stepKey="waitForImageScroll" time="2"/>
<waitForElementVisible selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="waitPrevButton"/>
<seeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="seePrevButton"/>
</test>
</tests>
Loading

0 comments on commit 9d751c5

Please sign in to comment.