Skip to content

Commit

Permalink
MAGETWO-90374: Automate with MFTF product tier price
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriyprime committed Jul 9, 2018
1 parent dd22d9a commit ed3daf2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,21 @@
<argument name="productName" value="$$createSimpleProduct.name$$"/>
</actionGroup>
<actionGroup ref="StorefrontViewAndEditCartFromMiniCartActionGroup" stepKey="goToCheckoutFromMinicart"/>
<seeInField userInput="10" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField10"/>
<seeInField userInput="10" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField10"/>
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField1"/>
<assertEquals message="Shopping cart should contain subtotal $1,000" stepKey="assertSubtotalField1">
<expectedResult type="string">$1,000.00</expectedResult>
<actualResult type="variable">grabTextFromSubtotalField1</actualResult>
</assertEquals>
<fillField userInput="15" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="fillProductQuantity2"/>
<fillField userInput="15" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="fillProductQuantity2"/>
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="clickUpdateShoppingCartButton1"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear1"/>
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField2"/>
<assertEquals message="Shopping cart should contain subtotal $1,350" stepKey="assertSubtotalField2">
<expectedResult type="string">$1,350.00</expectedResult>
<actualResult type="variable">grabTextFromSubtotalField2</actualResult>
</assertEquals>
<fillField userInput="20" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="fillProductQuantity3"/>
<fillField userInput="20" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="fillProductQuantity3"/>
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="clickUpdateShoppingCartButton2"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/>
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField3"/>
Expand All @@ -169,7 +169,7 @@
<actionGroup ref="SaveProductOnProductPageOnAdmin" stepKey="saveProduct4"/>
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToShoppingCartPage1"/>
<waitForPageLoad time="30" stepKey="waitForShoppingCartPagePageLoad1"/>
<seeInField userInput="20" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20"/>
<seeInField userInput="20" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20"/>
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField4"/>
<assertEquals message="Shopping cart should contain subtotal $1,500" stepKey="assertSubtotalField4">
<expectedResult type="string">$1,500.00</expectedResult>
Expand All @@ -196,7 +196,7 @@
<actionGroup ref="ClearCacheActionGroup" stepKey="flushCache1"/>
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToShoppingCartPage2"/>
<waitForPageLoad time="30" stepKey="waitForShoppingCartPagePageLoad2"/>
<seeInField userInput="20" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20_2"/>
<seeInField userInput="20" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20_2"/>
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField5"/>
<assertEquals message="Shopping cart should contain subtotal $1,500" stepKey="assertSubtotalField5">
<expectedResult type="string">$1,500.00</expectedResult>
Expand All @@ -210,7 +210,7 @@
<actionGroup ref="ClearCacheActionGroup" stepKey="flushCache2"/>
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToShoppingCartPage3"/>
<waitForPageLoad time="30" stepKey="waitForShoppingCartPagePageLoad3"/>
<seeInField userInput="20" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20_3"/>
<seeInField userInput="20" selector="{{CheckoutCartProductSection.productQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20_3"/>
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField6"/>
<assertEquals message="Shopping cart should contain subtotal $1,500" stepKey="assertSubtotalField6">
<expectedResult type="string">$1,500.00</expectedResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<pages 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/PageObject.xsd">
<page name="CheckoutCartPage" url="/checkout/cart" module="Checkout" area="storefront">
<page name="CheckoutCartPage" url="/checkout/cart" area="storefront" module="Magento_Checkout">
<section name="CheckoutCartProductSection"/>
<section name="CheckoutCartSummarySection"/>
</page>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<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">
<section name="CheckoutCartProductSection">
<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"/>
<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"/>
<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"/>
<element name="updateShoppingCartButton" type="button" selector="#form-validate button[type='submit'].update" timeout="30"/>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

<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">
<section name="CheckoutCartSummarySection">
<element name="subtotal" type="text" selector="//*[@id='cart-totals']//tr[@class='totals sub']//td//span[@class='price']"/>
<element name="subtotal" type="text" selector="#cart-totals tr.totals.sub span.price"/>
</section>
</sections>

0 comments on commit ed3daf2

Please sign in to comment.