Skip to content

Commit ed3daf2

Browse files
committed
MAGETWO-90374: Automate with MFTF product tier price
1 parent dd22d9a commit ed3daf2

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,21 @@
134134
<argument name="productName" value="$$createSimpleProduct.name$$"/>
135135
</actionGroup>
136136
<actionGroup ref="StorefrontViewAndEditCartFromMiniCartActionGroup" stepKey="goToCheckoutFromMinicart"/>
137-
<seeInField userInput="10" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField10"/>
137+
<seeInField userInput="10" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField10"/>
138138
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField1"/>
139139
<assertEquals message="Shopping cart should contain subtotal $1,000" stepKey="assertSubtotalField1">
140140
<expectedResult type="string">$1,000.00</expectedResult>
141141
<actualResult type="variable">grabTextFromSubtotalField1</actualResult>
142142
</assertEquals>
143-
<fillField userInput="15" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="fillProductQuantity2"/>
143+
<fillField userInput="15" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="fillProductQuantity2"/>
144144
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="clickUpdateShoppingCartButton1"/>
145145
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear1"/>
146146
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField2"/>
147147
<assertEquals message="Shopping cart should contain subtotal $1,350" stepKey="assertSubtotalField2">
148148
<expectedResult type="string">$1,350.00</expectedResult>
149149
<actualResult type="variable">grabTextFromSubtotalField2</actualResult>
150150
</assertEquals>
151-
<fillField userInput="20" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="fillProductQuantity3"/>
151+
<fillField userInput="20" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="fillProductQuantity3"/>
152152
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="clickUpdateShoppingCartButton2"/>
153153
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/>
154154
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField3"/>
@@ -169,7 +169,7 @@
169169
<actionGroup ref="SaveProductOnProductPageOnAdmin" stepKey="saveProduct4"/>
170170
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToShoppingCartPage1"/>
171171
<waitForPageLoad time="30" stepKey="waitForShoppingCartPagePageLoad1"/>
172-
<seeInField userInput="20" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20"/>
172+
<seeInField userInput="20" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20"/>
173173
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField4"/>
174174
<assertEquals message="Shopping cart should contain subtotal $1,500" stepKey="assertSubtotalField4">
175175
<expectedResult type="string">$1,500.00</expectedResult>
@@ -196,7 +196,7 @@
196196
<actionGroup ref="ClearCacheActionGroup" stepKey="flushCache1"/>
197197
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToShoppingCartPage2"/>
198198
<waitForPageLoad time="30" stepKey="waitForShoppingCartPagePageLoad2"/>
199-
<seeInField userInput="20" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20_2"/>
199+
<seeInField userInput="20" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20_2"/>
200200
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField5"/>
201201
<assertEquals message="Shopping cart should contain subtotal $1,500" stepKey="assertSubtotalField5">
202202
<expectedResult type="string">$1,500.00</expectedResult>
@@ -210,7 +210,7 @@
210210
<actionGroup ref="ClearCacheActionGroup" stepKey="flushCache2"/>
211211
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToShoppingCartPage3"/>
212212
<waitForPageLoad time="30" stepKey="waitForShoppingCartPagePageLoad3"/>
213-
<seeInField userInput="20" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20_3"/>
213+
<seeInField userInput="20" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20_3"/>
214214
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField6"/>
215215
<assertEquals message="Shopping cart should contain subtotal $1,500" stepKey="assertSubtotalField6">
216216
<expectedResult type="string">$1,500.00</expectedResult>

app/code/Magento/Checkout/Test/Mftf/Page/CheckoutCartPage.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11-
<page name="CheckoutCartPage" url="/checkout/cart" module="Checkout" area="storefront">
11+
<page name="CheckoutCartPage" url="/checkout/cart" area="storefront" module="Magento_Checkout">
1212
<section name="CheckoutCartProductSection"/>
1313
<section name="CheckoutCartSummarySection"/>
1414
</page>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartProductSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1010
<section name="CheckoutCartProductSection">
11-
<element name="ProductQuantityByName" type="input" selector="//main//table[@id='shopping-cart-table']//tbody//tr[..//strong[contains(@class, 'product-item-name')]//a/text()='{{var1}}'][1]//td[contains(@class, 'qty')]//input[contains(@class, 'qty')]" parameterized="true"/>
11+
<element name="productQuantityByName" type="input" selector="//main//table[@id='shopping-cart-table']//tbody//tr[..//strong[contains(@class, 'product-item-name')]//a/text()='{{var1}}'][1]//td[contains(@class, 'qty')]//input[contains(@class, 'qty')]" parameterized="true"/>
1212
<element name="productSubtotalByName" type="input" selector="//main//table[@id='shopping-cart-table']//tbody//tr[..//strong[contains(@class, 'product-item-name')]//a/text()='{{var1}}'][1]//td[contains(@class, 'subtotal')]//span[@class='price']" parameterized="true"/>
1313
<element name="updateShoppingCartButton" type="button" selector="#form-validate button[type='submit'].update" timeout="30"/>
1414
</section>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1010
<section name="CheckoutCartSummarySection">
11-
<element name="subtotal" type="text" selector="//*[@id='cart-totals']//tr[@class='totals sub']//td//span[@class='price']"/>
11+
<element name="subtotal" type="text" selector="#cart-totals tr.totals.sub span.price"/>
1212
</section>
1313
</sections>

0 commit comments

Comments
 (0)