| Current Path : /home/rtorresani/www/vendor/magento/module-checkout/Test/Mftf/Test/ |
| Current File : //home/rtorresani/www/vendor/magento/module-checkout/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml |
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="EndToEndB2CLoggedInUserTest">
<!-- Step 3: User adds products to cart -->
<comment userInput="Start of adding products to cart" stepKey="startOfAddingProductsToCart" after="endOfBrowsingCatalog"/>
<!-- Add Simple Product 1 to cart -->
<comment userInput="Add Simple Product 1 to cart" stepKey="commentAddSimpleProduct1ToCart" after="startOfAddingProductsToCart" />
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory" after="commentAddSimpleProduct1ToCart"/>
<waitForLoadingMaskToDisappear stepKey="waitForCartCategoryloaded" after="cartClickCategory"/>
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="waitForCartCategoryloaded">
<argument name="category" value="$$createCategory$$"/>
<argument name="productCount" value="3"/>
</actionGroup>
<actionGroup ref="StorefrontCheckCategorySimpleProductActionGroup" stepKey="cartAssertSimpleProduct1" after="cartAssertCategory">
<argument name="product" value="$$createSimpleProduct1$$"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct1ImageSrc" after="cartAssertSimpleProduct1"/>
<assertNotRegExp stepKey="cartAssertSimpleProduct1ImageNotDefault" after="cartGrabSimpleProduct1ImageSrc">
<actualResult type="const">$cartGrabSimpleProduct1ImageSrc</actualResult>
<expectedResult type="const">'/placeholder\/small_image\.jpg/'</expectedResult>
</assertNotRegExp>
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickSimpleProduct1" after="cartAssertSimpleProduct1ImageNotDefault"/>
<waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loaded" after="cartClickSimpleProduct1"/>
<actionGroup ref="StorefrontCheckSimpleProductActionGroup" stepKey="cartAssertProduct1Page" after="waitForCartSimpleProduct1loaded">
<argument name="product" value="$$createSimpleProduct1$$"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabSimpleProduct1PageImageSrc" after="cartAssertProduct1Page"/>
<assertNotRegExp stepKey="cartAssertSimpleProduct1PageImageNotDefault" after="cartGrabSimpleProduct1PageImageSrc">
<actualResult type="const">$cartGrabSimpleProduct1PageImageSrc</actualResult>
<expectedResult type="const">'/placeholder\/image\.jpg/'</expectedResult>
</assertNotRegExp>
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddProduct1ToCart" after="cartAssertSimpleProduct1PageImageNotDefault">
<argument name="product" value="$$createSimpleProduct1$$"/>
<argument name="productCount" value="1"/>
</actionGroup>
<!-- Add Simple Product 2 to cart -->
<comment userInput="Add Simple Product 2 to cart" stepKey="commentAddSimpleProduct2ToCart" after="cartAddProduct1ToCart" />
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory1" after="commentAddSimpleProduct2ToCart"/>
<waitForLoadingMaskToDisappear stepKey="waitForCartCategory1loaded" after="cartClickCategory1"/>
<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="waitForCartCategory1loaded">
<argument name="category" value="$$createCategory$$"/>
<argument name="productCount" value="3"/>
</actionGroup>
<actionGroup ref="StorefrontCheckCategorySimpleProductActionGroup" stepKey="cartAssertSimpleProduct2" after="cartAssertCategory1ForSimpleProduct2">
<argument name="product" value="$$createSimpleProduct2$$"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct2ImageSrc" after="cartAssertSimpleProduct2"/>
<assertNotRegExp stepKey="cartAssertSimpleProduct2ImageNotDefault" after="cartGrabSimpleProduct2ImageSrc">
<actualResult type="const">$cartGrabSimpleProduct2ImageSrc</actualResult>
<expectedResult type="const">'/placeholder\/small_image\.jpg/'</expectedResult>
</assertNotRegExp>
<actionGroup ref="StorefrontAddCategoryProductToCartActionGroup" stepKey="cartAddProduct2ToCart" after="cartAssertSimpleProduct2ImageNotDefault">
<argument name="product" value="$$createSimpleProduct2$$"/>
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
<argument name="productCount" value="CONST.two"/>
</actionGroup>
<!-- Check products in minicart -->
<!-- Check simple product 1 in minicart -->
<comment userInput="Check simple product 1 in minicart" stepKey="commentCheckSimpleProduct1InMinicart" after="cartAddProduct2ToCart"/>
<actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct1" after="commentCheckSimpleProduct1InMinicart">
<argument name="product" value="$$createSimpleProduct1$$"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1ImageSrc" after="cartOpenMinicartAndCheckSimpleProduct1"/>
<assertNotRegExp stepKey="cartMinicartAssertSimpleProduct1ImageNotDefault" after="cartMinicartGrabSimpleProduct1ImageSrc">
<actualResult type="const">$cartMinicartGrabSimpleProduct1ImageSrc</actualResult>
<expectedResult type="const">'/placeholder\/thumbnail\.jpg/'</expectedResult>
</assertNotRegExp>
<click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartMinicartClickSimpleProduct1" after="cartMinicartAssertSimpleProduct1ImageNotDefault"/>
<waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct1loaded" after="cartMinicartClickSimpleProduct1"/>
<actionGroup ref="StorefrontCheckSimpleProductActionGroup" stepKey="cartAssertMinicartProduct1Page" after="waitForMinicartSimpleProduct1loaded">
<argument name="product" value="$$createSimpleProduct1$$"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1PageImageSrc" after="cartAssertMinicartProduct1Page"/>
<assertNotRegExp stepKey="cartMinicartAssertSimpleProduct1PageImageNotDefault" after="cartMinicartGrabSimpleProduct1PageImageSrc">
<actualResult type="const">$cartMinicartGrabSimpleProduct1PageImageSrc</actualResult>
<expectedResult type="const">'/placeholder\/image\.jpg/'</expectedResult>
</assertNotRegExp>
<actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct2" after="cartMinicartAssertSimpleProduct1PageImageNotDefault">
<argument name="product" value="$$createSimpleProduct2$$"/>
</actionGroup>
<!-- Check simple product2 in minicart -->
<comment userInput="Check simple product 2 in minicart" stepKey="commentCheckSimpleProduct2InMinicart" after="cartOpenMinicartAndCheckSimpleProduct2"/>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2ImageSrc" after="commentCheckSimpleProduct2InMinicart"/>
<assertNotRegExp stepKey="cartMinicartAssertSimpleProduct2ImageNotDefault" after="cartMinicartGrabSimpleProduct2ImageSrc">
<actualResult type="const">$cartMinicartGrabSimpleProduct2ImageSrc</actualResult>
<expectedResult type="const">'/placeholder\/thumbnail\.jpg/'</expectedResult>
</assertNotRegExp>
<click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartMinicartClickSimpleProduct2" after="cartMinicartAssertSimpleProduct2ImageNotDefault"/>
<waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct2loaded" after="cartMinicartClickSimpleProduct2"/>
<actionGroup ref="StorefrontCheckSimpleProductActionGroup" stepKey="cartAssertMinicartProduct2Page" after="waitForMinicartSimpleProduct2loaded">
<argument name="product" value="$$createSimpleProduct2$$"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2PageImageSrc" after="cartAssertMinicartProduct2Page"/>
<assertNotRegExp stepKey="cartMinicartAssertSimpleProduct2PageImageNotDefault" after="cartMinicartGrabSimpleProduct2PageImageSrc">
<actualResult type="const">$cartMinicartGrabSimpleProduct2PageImageSrc</actualResult>
<expectedResult type="const">'/placeholder\/image\.jpg/'</expectedResult>
</assertNotRegExp>
<!-- Check products in cart -->
<comment userInput="Check cart information" stepKey="commentCheckCartInformation" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" />
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart" after="commentCheckCartInformation"/>
<actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCart" after="cartOpenCart">
<argument name="subtotal" value="480.00"/>
<argument name="shipping" value="15.00"/>
<argument name="shippingMethod" value="Flat Rate - Fixed"/>
<argument name="total" value="495.00"/>
</actionGroup>
<!-- Check simple product 1 in cart -->
<comment userInput="Check simple product 1 in cart" stepKey="commentCheckSimpleProduct1InCart" after="cartAssertCart"/>
<actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct1" after="commentCheckSimpleProduct1InCart">
<argument name="product" value="$$createSimpleProduct1$$"/>
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
<argument name="productQuantity" value="CONST.one"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct1ImageSrc" after="cartAssertCartSimpleProduct1"/>
<assertNotRegExp stepKey="cartCartAssertSimpleProduct1ImageNotDefault" after="cartCartGrabSimpleProduct1ImageSrc">
<actualResult type="const">$cartCartGrabSimpleProduct1ImageSrc</actualResult>
<expectedResult type="const">'/placeholder\/small_image\.jpg/'</expectedResult>
</assertNotRegExp>
<click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickCartSimpleProduct1" after="cartCartAssertSimpleProduct1ImageNotDefault"/>
<waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loadedAgain" after="cartClickCartSimpleProduct1"/>
<actionGroup ref="StorefrontCheckSimpleProductActionGroup" stepKey="cartAssertCartProduct1Page" after="waitForCartSimpleProduct1loadedAgain">
<argument name="product" value="$$createSimpleProduct1$$"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc1" after="cartAssertCartProduct1Page"/>
<assertNotRegExp stepKey="cartCartAssertSimpleProduct2PageImageNotDefault1" after="cartCartGrabSimpleProduct2PageImageSrc1">
<actualResult type="const">$cartCartGrabSimpleProduct2PageImageSrc1</actualResult>
<expectedResult type="const">'/placeholder\/image\.jpg/'</expectedResult>
</assertNotRegExp>
<!-- Check simple product 2 in cart -->
<comment userInput="Check simple product 2 in cart" stepKey="commentCheckSimpleProduct2InCart" after="cartCartAssertSimpleProduct2PageImageNotDefault1"/>
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart1" after="commentCheckSimpleProduct2InCart"/>
<actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct2" after="cartOpenCart1">
<argument name="product" value="$$createSimpleProduct2$$"/>
<!-- @TODO: Change to scalar value after MQE-498 is implemented -->
<argument name="productQuantity" value="CONST.one"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct2ImageSrc" after="cartAssertCartSimpleProduct2"/>
<assertNotRegExp stepKey="cartCartAssertSimpleProduct2ImageNotDefault" after="cartCartGrabSimpleProduct2ImageSrc">
<actualResult type="const">$cartCartGrabSimpleProduct2ImageSrc</actualResult>
<expectedResult type="const">'/placeholder\/small_image\.jpg/'</expectedResult>
</assertNotRegExp>
<click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartClickCartSimpleProduct2" after="cartCartAssertSimpleProduct2ImageNotDefault"/>
<waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct2loaded" after="cartClickCartSimpleProduct2"/>
<actionGroup ref="StorefrontCheckSimpleProductActionGroup" stepKey="cartAssertCartProduct2Page" after="waitForCartSimpleProduct2loaded">
<argument name="product" value="$$createSimpleProduct2$$"/>
</actionGroup>
<!-- @TODO: Move Image check to action group after MQE-697 is fixed -->
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc2" after="cartAssertCartProduct2Page"/>
<assertNotRegExp stepKey="cartCartAssertSimpleProduct2PageImageNotDefault2" after="cartCartGrabSimpleProduct2PageImageSrc2">
<actualResult type="const">$cartCartGrabSimpleProduct2PageImageSrc2</actualResult>
<expectedResult type="const">'/placeholder\/image\.jpg/'</expectedResult>
</assertNotRegExp>
<comment userInput="End of adding products to cart" stepKey="endOfAddingProductsToCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" />
<!-- Step 7: Check out -->
<comment userInput="Start of checking out" stepKey="startOfCheckingOut" after="endOfUsingCouponCode" />
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" after="startOfCheckingOut"/>
<actionGroup ref="LoggedInUserCheckoutFillingShippingSectionActionGroup" stepKey="checkoutFillingShippingSection" after="goToCheckoutFromMinicart">
<argument name="customerVar" value="CustomerEntityOne" />
<argument name="customerAddressVar" value="CustomerAddressSimple" />
</actionGroup>
<!-- Check order summary in checkout -->
<comment userInput="Check order summary in checkout" stepKey="commentCheckOrderSummaryInCheckout" after="checkoutFillingShippingSection" />
<actionGroup ref="CheckOrderSummaryInCheckoutActionGroup" stepKey="checkoutCheckOrderSummary" after="commentCheckOrderSummaryInCheckout">
<argument name="subtotal" value="480.00"/>
<argument name="shippingTotal" value="15.00"/>
<argument name="shippingMethod" value="Flat Rate - Fixed"/>
<argument name="total" value="495.00"/>
</actionGroup>
<!-- Check ship to information in checkout -->
<comment userInput="Check ship to information in checkout" stepKey="commentCheckShipToInformationInCheckout" after="checkoutCheckOrderSummary" />
<actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="checkoutCheckShipToInformation" after="commentCheckShipToInformationInCheckout">
<argument name="customerVar" value="CustomerEntityOne" />
<argument name="customerAddressVar" value="CustomerAddressSimple" />
</actionGroup>
<!-- Check shipping method in checkout -->
<comment userInput="Check shipping method in checkout" stepKey="commentCheckShippingMethodInCheckout" after="checkoutCheckShipToInformation" />
<actionGroup ref="CheckShippingMethodInCheckoutActionGroup" stepKey="checkoutCheckShippingMethod" after="commentCheckShippingMethodInCheckout">
<argument name="shippingMethod" value="E2EB2CQuote.shippingMethod" />
</actionGroup>
<!-- Verify Simple Product 1 is in checkout cart items -->
<comment userInput="Verify Simple Product 1 is in checkout cart items" stepKey="commentVerifySimpleProduct1IsInCheckoutCartItems" after="checkoutCheckShippingMethod" />
<actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="checkoutCheckSimpleProduct1InCartItems" after="commentVerifySimpleProduct1IsInCheckoutCartItems">
<argument name="productVar" value="$$createSimpleProduct1$$"/>
</actionGroup>
<!-- Verify Simple Product 2 is in checkout cart items -->
<comment userInput="Verify Simple Product 2 is in checkout cart items" stepKey="commentVerifySimpleProduct2IsInCheckoutCartItems" after="checkoutCheckSimpleProduct1InCartItems" />
<actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="checkoutCheckSimpleProduct2InCartItems" after="commentVerifySimpleProduct2IsInCheckoutCartItems">
<argument name="productVar" value="$$createSimpleProduct2$$"/>
</actionGroup>
<comment userInput="Place order with check money order payment" stepKey="commentPlaceOrderWithCheckMoneyOrderPayment" after="checkoutCheckSimpleProduct2InCartItems" />
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrderPayment" after="commentPlaceOrderWithCheckMoneyOrderPayment"/>
<actionGroup ref="CheckBillingAddressInCheckoutActionGroup" stepKey="seeBillingAddress" after="selectCheckMoneyOrderPayment">
<argument name="customerVar" value="CustomerEntityOne" />
<argument name="customerAddressVar" value="CustomerAddressSimple" />
</actionGroup>
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeorder" after="seeBillingAddress">
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage" />
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" />
</actionGroup>
<comment userInput="End of checking out" stepKey="endOfCheckingOut" after="placeorder" />
</test>
</tests>