Skip to content

Commit c297652

Browse files
ACQE-6228:Edit data "Related Products, Up-Sells, and Cross-Sells " for Simple product if create new Update
1 parent 995a05c commit c297652

8 files changed

+64
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="ScrollToUpSellSectionAtStorefrontActionGroup">
12+
<annotations>
13+
<description>Admin scroll to upsell section on storefront preview page.</description>
14+
</annotations>
15+
<scrollTo selector="{{StorefrontProductUpSellProductsSection.upSellSection}}" stepKey="scrollToUpSellSection" />
16+
<waitForText selector="{{StorefrontProductUpSellProductsSection.upSellHeading}}" userInput="We found other products you might like!" stepKey="seeTheUpSellHeading"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/AdminAddRelatedProductsModalSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
<section name="AdminAddRelatedProductsModalSection">
1111
<element name="AddSelectedProductsButton" type="button" selector="//aside[contains(@class, 'related_modal')]//button[contains(@class, 'action-primary')]" timeout="30"/>
1212
<element name="AddUpSellProductsButton" type="button" selector="//aside[contains(@class, 'upsell_modal')]//button[contains(@class, 'action-primary')]" timeout="30"/>
13+
<element name="AddCrossSellProductsButton" type="button" selector="//aside[contains(@class, 'crosssell_modal')]//button[contains(@class, 'action-primary')]" timeout="30"/>
1314
</section>
1415
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridFilterSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@
4141
<element name="storeViewOptions" type="text" selector=".admin__data-grid-outer-wrap select[name='store_id'] > option[value='{{value}}']" parameterized="true"/>
4242
<element name="viewColumnOptionName" type="text" selector="//div[contains(@class, '_active')]//div[contains(@class, 'admin__data-grid-action-columns-menu')]//div[@class='admin__field-option']//label[text()='{{col}}']" parameterized="true"/>
4343
<element name="customAttribute" type="text" selector="input.admin__control-text[name='{{var}}']" parameterized="true"/>
44+
<element name="crossSellFilters" type="button" selector="//*[contains(@class, 'crosssell_product')]//button[text()='Filters']"/>
45+
<element name="upSellFilters" type="button" selector="//*[contains(@class, 'upsell_product')]//button[text()='Filters']"/>
4446
</section>
4547
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductRelatedUpSellCrossSellSection/AdminProductFormRelatedUpSellCrossSellSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
<element name="selectedProductSku" type="text" selector="//div[@data-index='{{section}}']//span[@data-index='sku']" parameterized="true" timeout="30"/>
2323
<element name="removeCrossSellProduct" type="button" selector="//span[text()='Cross-Sell Products']//..//..//..//span[text()='{{productName}}']//..//..//..//..//..//button[@class='action-delete']" parameterized="true"/>
2424
<element name="removeUpsellProduct" type="button" selector="//span[text()='Up-Sell Products']//..//..//..//span[text()='{{productName}}']//..//..//..//..//..//button[@class='action-delete']" parameterized="true"/>
25+
<element name="relatedUpSellCrossSellProductStagingSectionText" type="text" selector=".fieldset-wrapper.admin__fieldset-section[data-index='{{catalogStagingSection}}']"/>
2526
</section>
2627
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductRelatedProductsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<element name="relatedProductName" type="button" selector="//*[@class='block related']//a[contains(text(), '{{productName}}')]" parameterized="true"/>
1616
<element name="relatedProductCheckBoxButton" type="button" selector="//*[@class='block related']//a[contains(text(), '{{productName}}')]/parent::*/parent::*//input[@class='checkbox related']" parameterized="true"/>
1717
<element name="selectAll" type="button" selector="//div[@class='block-actions']/button"/>
18+
<element name="relatedSection" type="text" selector=".related"/>
1819
</section>
1920
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductUpSellProductsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="StorefrontProductUpSellProductsSection">
1212
<element name="upSellHeading" type="text" selector="#block-upsell-heading"/>
1313
<element name="upSellProducts" type="text" selector="div.upsell .product-item-name"/>
14+
<element name="upSellSection" type="text" selector=".upsell"/>
1415
</section>
1516
</sections>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertCrossSellProductOnShoppingCartPageActionGroup">
12+
<annotations>
13+
<description>Verify crossSell Product in shopping cart section</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string" defaultValue="{{_defaultProduct.name}}"/>
17+
</arguments>
18+
<scrollTo selector="{{CheckoutCartCrossSellSection.title}}" stepKey="scrollToCrossSellSection"/>
19+
<waitForElementVisible selector="{{CheckoutCartCrossSellSection.productRowByName(productName)}}" stepKey="seeCrossSellProductNameInMoreChoices"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontClickOnViewAndEditCartActionGroup">
12+
<annotations>
13+
<description>Click on view and edit cart on storefront</description>
14+
</annotations>
15+
<waitForElementClickable selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartButtonToBeClickable"/>
16+
<click selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="viewAndEditCart"/>
17+
<waitForPageLoad stepKey="waitForShoppingCartPageToLoad"/>
18+
</actionGroup>
19+
</actionGroups>

0 commit comments

Comments
 (0)