Skip to content
Open
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminDeleteTierPriceActionGroup">
<annotations>
<description>Deletes Tier price (first one if there are >1)</description>
</annotations>

<click selector="{{AdminProductFormAdvancedPricingSection.customerGroupPriceDeleteButtonFull}}" userInput=".product_form_product_form_advanced_pricing_modal" stepKey="deleteFirstRowOfCustomerGroupPrice"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminProductFormAdvancedPricingUpdateTierPriceActionGroup" extends="AdminProductFormAdvancedPricingAddTierPriceActionGroup">
<annotations>
<description>Update the latest tier price on Advanced Pricing dialog on the Admin Product creation/edit page.</description>
</annotations>
<arguments>
<argument name="website" type="string" defaultValue="All Websites [USD]"/>
<argument name="customerGroup" type="string" defaultValue="ALL GROUPS"/>
<argument name="quantity" type="string" defaultValue="1"/>
<argument name="priceType" type="string" defaultValue="Fixed"/>
<argument name="amount" type="string" defaultValue="10"/>
</arguments>

<remove keyForRemoval="waitForGroupPriceAddButtonAppears"/>
<remove keyForRemoval="clickCustomerGroupPriceAddButton"/>

</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontAssertBuyXForYEachAndSaveZMessageOnPDPActionGroup">
<annotations>
<description>Asserts the "Buy X for Y each and save Z" message on PDP</description>
</annotations>
<arguments>
<argument name="priceIndex" type="string" defaultValue="1"/>
<argument name="X" type="string" defaultValue=""/>
<argument name="Y" type="string" defaultValue=""/>
<argument name="Z" type="string" defaultValue=""/>
</arguments>

<seeElement selector="{{StorefrontProductInfoMainSection.productTierPriceByForTextLabel(priceIndex, X)}}" stepKey="assertBuyX"/>
<seeElement selector="{{StorefrontProductInfoMainSection.productTierPriceAmount(priceIndex, Y)}}" stepKey="assertForY"/>
<seeElement selector="{{StorefrontProductInfoMainSection.productTierPriceSavePercentageAmount(priceIndex, Z)}}" stepKey="assertSaveZ"/>

</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontAssertCartSubtotalActionGroup">
<annotations>
<description>Asserts Cart Subtotal matches expected Value</description>
</annotations>
<arguments>
<argument name="expectedSubtotal" type="string"/>
</arguments>
<grabTextFrom selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="grabCartSubtotal"/>
<assertEquals message="Shopping cart summary section should contain {{expectedSubtotal}}" stepKey="assertSubtotal">
<expectedResult type="string">{{expectedSubtotal}}</expectedResult>
<actualResult type="variable">grabCartSubtotal</actualResult>
</assertEquals>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontAssertMiniCartSubtotalActionGroup">
<annotations>
<description>Asserts MiniCart Subtotal matches expected value</description>
</annotations>
<arguments>
<argument name="expectedSubtotal" type="string"/>
</arguments>

<grabTextFrom selector="{{StorefrontMinicartSection.miniCartSubtotalField}}" stepKey="grabTextFromMiniCartSubtotalField"/>
<assertEquals message="Mini shopping cart should contain subtotal {{expectedSubtotal}}" stepKey="assertSubtotal">
<expectedResult type="string">{{expectedSubtotal}}</expectedResult>
<actualResult type="variable">grabTextFromMiniCartSubtotalField</actualResult>
</assertEquals>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontAssertPriceOnPLPActionGroup">
<annotations>
<description>Asserts product price on PLP</description>
</annotations>
<arguments>
<argument name="price" type="string"/>
</arguments>

<seeElement selector="{{StorefrontCategoryProductSection.productPriceFinal(price)}}" stepKey="assertProductPrice"/>

</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontAssertProductSubtotalInTheCartActionGroup">
<annotations>
<description>Asserts Product Subtotal in the Cart matches expected Value</description>
</annotations>
<arguments>
<argument name="expectedSubtotal" type="string"/>
</arguments>
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabSubtotal"/>
<assertEquals message="Shopping cart should contain subtotal for product {{expectedSubtotal}}" stepKey="assertSubtotal">
<expectedResult type="string">{{expectedSubtotal}}</expectedResult>
<actualResult type="variable">grabSubtotal</actualResult>
</assertEquals>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontAssertXAsLowAsYMessageOnPLPActionGroup">
<annotations>
<description>Asserts the "X as low as Y" message on PLP</description>
</annotations>
<arguments>
<argument name="X" type="string"/>
<argument name="Y" type="string"/>
</arguments>

<seeElement selector="{{StorefrontCategoryProductSection.productPriceFinal(X)}}" stepKey="assertZ"/>
<seeElement selector="{{StorefrontCategoryProductSection.productPriceLabel('As low as')}}" stepKey="assertTextLabel"/>
<seeElement selector="{{StorefrontCategoryProductSection.productPriceLinkAfterLabel('As low as', Y)}}" stepKey="assertY"/>

</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontAssertXRegularPriceYMessageOnPLPActionGroup">
<annotations>
<description>Asserts the "X Regular Price Y" message on PLP</description>
</annotations>
<arguments>
<argument name="X" type="string"/>
<argument name="Y" type="string"/>
</arguments>

<seeElement selector="{{StorefrontCategoryProductSection.productPriceFinal(X)}}" stepKey="assertX"/>
<seeElement selector="{{StorefrontCategoryProductSection.productPriceOld(Y)}}" stepKey="assertY"/>
<seeElement selector="{{StorefrontCategoryProductSection.productPriceLabel('Regular Price')}}" stepKey="assertTextLabel"/>

</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<element name="customerGroupPriceAddButton" type="button" selector="[data-action='add_new_row']" timeout="30"/>
<element name="addCustomerGroupPrice" type="button" selector="//span[text()='Add']/ancestor::button" timeout="30"/>
<element name="customerGroupPriceDeleteButton" type="button" selector="[data-action='remove_row']" timeout="30"/>
<element name="customerGroupPriceDeleteButtonFull" type="button" selector="(//tr//button[@data-action='remove_row'])" timeout="30"/>
<element name="advancedPricingCloseButton" type="button" selector=".product_form_product_form_advanced_pricing_modal button.action-close" timeout="30"/>
<element name="productTierPriceWebsiteSelect" type="select" selector="[name='product[tier_price][{{var1}}][website_id]']" parameterized="true"/>
<element name="productTierPriceCustGroupSelect" type="select" selector="[name='product[tier_price][{{var1}}][cust_group]']" parameterized="true"/>
Expand Down
Loading