Skip to content

Commit

Permalink
Merge pull request #6669 from magento-tsg/2.4-develop-pr131
Browse files Browse the repository at this point in the history
[Arrows] Fixes for 2.4 (pr131) (2.4-develop)
  • Loading branch information
zakdma committed Mar 8, 2021
2 parents c364929 + bc4abf6 commit 6a63aac
Show file tree
Hide file tree
Showing 29 changed files with 515 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<title value="Guest customer should be able to advance search Bundle product with product description"/>
<description value="Guest customer should be able to advance search Bundle product with product description"/>
<severity value="MAJOR"/>
<testCaseId value="MC-242"/>
<group value="Bundle"/>
<testCaseId value="MC-25427"/>
<group value="bundle"/>
<group value="SearchEngineElasticsearch"/>
</annotations>
<before>
Expand All @@ -43,9 +43,9 @@
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
</after>
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
<see userInput="$product.name$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
<comment userInput="BIC workaround" stepKey="seeSimple1ProductName"/>
<comment userInput="BIC workaround" stepKey="seeSimple2ProductName"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<title value="Guest customer should be able to advance search Bundle product with product price"/>
<description value="Guest customer should be able to advance search Bundle product with product price"/>
<severity value="MAJOR"/>
<testCaseId value="MC-251"/>
<group value="Bundle"/>
<testCaseId value="MC-25435"/>
<group value="bundle"/>
<group value="SearchEngineElasticsearch"/>
</annotations>
<before>
Expand Down Expand Up @@ -52,9 +52,9 @@
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
</after>
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
<see userInput="$product.name$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
<comment userInput="BIC workaround" stepKey="seeSimple1ProductName"/>
<comment userInput="BIC workaround" stepKey="seeSimple2ProductName"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<title value="Guest customer should be able to advance search Bundle product with product short description"/>
<description value="Guest customer should be able to advance search Bundle product with product short description"/>
<severity value="MAJOR"/>
<testCaseId value="MC-250"/>
<group value="Bundle"/>
<testCaseId value="MC-25434"/>
<group value="bundle"/>
<group value="SearchEngineElasticsearch"/>
</annotations>
<before>
Expand All @@ -43,9 +43,9 @@
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
</after>
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
<see userInput="$product.name$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
<comment userInput="BIC workaround" stepKey="seeSimple1ProductName"/>
<comment userInput="BIC workaround" stepKey="seeSimple2ProductName"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<title value="Guest customer should be able to advance search Bundle product with product name"/>
<description value="Guest customer should be able to advance search Bundle product with product name"/>
<severity value="MAJOR"/>
<testCaseId value="MC-139"/>
<group value="Bundle"/>
<testCaseId value="MC-25342"/>
<group value="bundle"/>
<group value="SearchEngineElasticsearch"/>
</annotations>
<before>
Expand All @@ -43,9 +43,9 @@
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
</after>
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
<see userInput="$product.name$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
<comment userInput="BIC workaround" stepKey="seeSimple1ProductName"/>
<comment userInput="BIC workaround" stepKey="seeSimple2ProductName"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<element name="ProductPriceByName" type="text" selector="//*[@id='product-comparison']//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/>
<element name="ProductImageByName" type="text" selector="//*[@id='product-comparison']//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]]//img[@class='product-image-photo']" parameterized="true"/>
<element name="ProductAttributeByCodeAndProductName" type="text" selector="//*[@id='product-comparison']//tr[.//th[./span[contains(text(), '{{var1}}')]]]//td[count(//*[@id='product-comparison']//tr//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var2}}')]]/preceding-sibling::td)+1]/div" parameterized="true"/>
<element name="ProductAddToCartButton" type="button" selector=".product-item-photo[title='{{productName}}'] ~ .product-item-actions button[type='submit']" parameterized="true" timeout="30"/>
<element name="removeFirstItem" type="button" selector="table.table-comparison a.delete"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<title value="Admin should be able to mass update product attributes in store view scope"/>
<description value="Admin should be able to mass update product attributes in store view scope"/>
<severity value="AVERAGE"/>
<testCaseId value="MC-128"/>
<group value="Catalog"/>
<testCaseId value="MC-25333"/>
<group value="catalog"/>
<group value="Product Attributes"/>
<group value="SearchEngineElasticsearch"/>
</annotations>
Expand Down Expand Up @@ -51,35 +51,43 @@
<actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchStoreViewActionGroup"/>
<!-- Update attribute -->
<click selector="{{AdminEditProductAttributesSection.ChangeAttributeDescriptionToggle}}" stepKey="toggleToChangeDescription"/>
<fillField selector="{{AdminEditProductAttributesSection.AttributeDescription}}" userInput="Updated $$createProductOne.custom_attributes[description]$$" stepKey="fillAttributeDescriptionField"/>
<fillField selector="{{AdminEditProductAttributesSection.AttributeDescription}}" userInput="Updated $createProductOne.custom_attributes[description]$" stepKey="fillAttributeDescriptionField"/>
<click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/>
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpateSuccessMsg"/>

<!-- Start message queue for product attribute consumer -->
<actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
<argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
<argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
</actionGroup>

<!-- Assert on storefront default view with partial word of product name -->
<actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefault"/>
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey="searchByNameDefault">
<argument name="name" value="$$createProductOne.name$$"/>
<argument name="description" value="$$createProductOne.custom_attributes[description]$$"/>
<argument name="name" value="$createProductOne.name$"/>
<argument name="description" value="$createProductOne.custom_attributes[description]$"/>
</actionGroup>
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault"/>
<see userInput="2 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInDefault"/>
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInDefault"/>

<!-- Assert on storefront custom view with partial word of product name -->
<actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupCustom"/>
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="StorefrontSwitchStoreViewActionGroup"/>
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey="searchByNameCustom">
<argument name="name" value="$$createProductOne.name$$"/>
<argument name="description" value="Updated $$createProductOne.custom_attributes[description]$$"/>
<argument name="name" value="$createProductTwo.name$"/>
<argument name="description" value="Updated $createProductOne.custom_attributes[description]$"/>
</actionGroup>
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultCustom"/>
<see userInput="2 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInCustom"/>
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInCustom"/>

<!-- Assert Storefront default view with exact product name -->
<actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefault1"/>
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToDefaultStoreView">
<argument name="storeView" value="_defaultStore"/>
</actionGroup>
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey="searchByNameDefault1">
<argument name="name" value="$$createProductThree.name$$"/>
<argument name="description" value="$$createProductThree.custom_attributes[description]$$"/>
<argument name="name" value="$createProductThree.name$"/>
<argument name="description" value="$createProductThree.custom_attributes[description]$"/>
</actionGroup>
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault1"/>
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInDefault1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
action="<?= $block->escapeUrl($this->helper(Magento\Catalog\Helper\Product\Compare::class)->getAddToCartUrl($item)) ?>"
method="post">
<?= $block->getBlockHtml('formkey') ?>
<button type="submit" class="action tocart primary">
<button type="submit" class="action tocart primary" disabled>
<span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
</button>
</form>
Expand Down Expand Up @@ -144,15 +144,13 @@
</tbody>
</table>
</div>
<?php if (!$block->isRedirectToCartEnabled()) :?>
<script type="text/x-magento-init">
{
"[data-role=tocart-form]": {
"catalogAddToCart": {}
}
<script type="text/x-magento-init">
{
"[data-role=tocart-form]": {
"catalogAddToCart": {}
}
</script>
<?php endif; ?>
}
</script>
<?php else :?>
<div class="message info empty"><div><?= $block->escapeHtml(__('You have no items to compare.')) ?></div></div>
<?php endif; ?>
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,13 @@ $_helper = $block->getData('outputHelper');
</ol>
</div>
<?= $block->getToolbarHtml() ?>
<?php if (!$block->isRedirectToCartEnabled()): ?>
<script type="text/x-magento-init">
{
"[data-role=tocart-form], .form.map.checkout": {
"catalogAddToCart": {
"product_sku": "<?= $escaper->escapeJs($_product->getSku()) ?>"
}
<script type="text/x-magento-init">
{
"[data-role=tocart-form], .form.map.checkout": {
"catalogAddToCart": {
"product_sku": "<?= $escaper->escapeJs($_product->getSku()) ?>"
}
}
</script>
<?php endif; ?>
}
</script>
<?php endif; ?>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
id="<?= /* @noEscape */ $_fileName ?>"
class="product-custom-option<?= $_option->getIsRequire() ? ' required' : '' ?>"
<?= $_fileExists ? 'disabled="disabled"' : '' ?> />
<input type="hidden" name="<?= /* @noEscape */ $_fieldNameAction ?>"
<input type="hidden" class="product-custom-option" name="<?= /* @noEscape */ $_fieldNameAction ?>"
value="<?= /* @noEscape */ $_fieldValueAction ?>" />
<?php if ($_option->getFileExtension()):?>
<p class="note">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ private function generateAdvancedSearchRequest()
[
'field' => $attribute->getAttributeCode(),
'boost' => $attribute->getSearchWeight() ?: 1,
'matchCondition' => 'match_phrase_prefix',
],
],
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<waitForLoadingMaskToDisappear stepKey="waitForSearchProductsloaded" after="searchClickAdvancedSearchSubmitButton"/>
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="searchCheckAdvancedSearchResult" after="waitForSearchProductsloaded"/>
<!-- Results returned will be different with ES vs MySQL -->
<see userInput="4" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productCount}} span" stepKey="searchAdvancedAssertProductCount" after="searchCheckAdvancedSearchResult"/>
<see userInput="1" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productCount}} span" stepKey="searchAdvancedAssertProductCount" after="searchCheckAdvancedSearchResult"/>
<actionGroup ref="StorefrontCheckCategorySimpleProductActionGroup" stepKey="searchAssertSimpleProduct1" after="searchAdvancedAssertProductCount">
<argument name="product" value="$$createSimpleProduct1$$"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontAdvancedSearchByPartialNameTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest">
<annotations>
<features value="CatalogSearch"/>
<stories value="Use Advanced Search"/>
<title value="Search product in advanced search by partial name"/>
<description value="Search product in advanced search by partial name"/>
<testCaseId value="MAGETWO-24729"/>
<severity value="CRITICAL"/>
<testCaseId value="MC-40416"/>
<group value="searchFrontend"/>
<group value="mtf_migrated"/>
<group value="SearchEngineElasticsearch"/>
<skip>
<issueId value="MC-34217"/>
</skip>
</annotations>
<actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search">
<argument name="productName" value="abc"/>
Expand Down
Loading

0 comments on commit 6a63aac

Please sign in to comment.