-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3926 from magento-pangolin/community-tests-migrat…
…ion-pr [Pangolin] Community MTF to MFTF tests migration - closes magento-commerce/magento-functional-tests-migration#648
- Loading branch information
Showing
5 changed files
with
155 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdateShoppingCartSimpleProductQtyTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?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="StorefrontUpdateShoppingCartSimpleProductQtyTest"> | ||
<annotations> | ||
<features value="Checkout"/> | ||
<title value="Check updating shopping cart while updating items qty"/> | ||
<description value="Check updating shopping cart while updating items qty"/> | ||
<testCaseId value="MC-14731" /> | ||
<group value="shoppingCart"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
<createData entity="SimpleProduct" stepKey="createProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
|
||
<!-- Add the newly created product to the shopping cart --> | ||
<actionGroup ref="AddSimpleProductToCart" stepKey="addToCartFromStorefrontProductPage"> | ||
<argument name="product" value="$$createProduct$$"/> | ||
</actionGroup> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
</after> | ||
|
||
<!-- Go to the shopping cart --> | ||
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="amOnPageShoppingCart"/> | ||
<waitForPageLoad stepKey="waitForCheckoutPageLoad1"/> | ||
|
||
<!-- Change the product QTY --> | ||
<fillField selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" userInput="{{quoteQty3Price123.qty}}" stepKey="changeCartQty"/> | ||
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="openShoppingCart"/> | ||
<waitForPageLoad stepKey="waitForCheckoutPageLoad2"/> | ||
|
||
<!-- The price and QTY values should be updated for the product --> | ||
<grabValueFrom selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" stepKey="grabProductQtyInCart"/> | ||
<see userInput="{{quoteQty3Price123.currency}}{{quoteQty3Price123.subtotal}}" selector="{{CheckoutCartProductSection.productSubtotalByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/> | ||
<assertEquals stepKey="assertProductQtyInCart"> | ||
<actualResult type="variable">grabProductQtyInCart</actualResult> | ||
<expectedResult type="string">{{quoteQty3Price123.qty}}</expectedResult> | ||
</assertEquals> | ||
|
||
<!-- Subtotal should be updated --> | ||
<see userInput="{{quoteQty3Price123.currency}}{{quoteQty3Price123.subtotal}}" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertCartSubtotal"/> | ||
|
||
<!-- Minicart product price and subtotal should be updated --> | ||
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="openMinicart"/> | ||
<grabValueFrom selector="{{StorefrontMinicartSection.itemQuantity($$createProduct.name$$)}}" stepKey="grabProductQtyInMinicart"/> | ||
<assertEquals stepKey="assertProductQtyInMinicart"> | ||
<actualResult type="variable">grabProductQtyInMinicart</actualResult> | ||
<expectedResult type="string">{{quoteQty3Price123.qty}}</expectedResult> | ||
</assertEquals> | ||
<see userInput="{{quoteQty3Price123.currency}}{{quoteQty3Price123.subtotal}}" selector="{{StorefrontMinicartSection.subtotal}}" stepKey="assertMinicartSubtotal"/> | ||
</test> | ||
</tests> |
70 changes: 70 additions & 0 deletions
70
...kout/Test/Mftf/Test/StorefrontUpdateShoppingCartSimpleWithCustomOptionsProductQtyTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?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="StorefrontUpdateShoppingCartSimpleWithCustomOptionsProductQtyTest"> | ||
<annotations> | ||
<features value="Checkout"/> | ||
<title value="Check updating shopping cart while updating qty of items with custom options"/> | ||
<description value="Check updating shopping cart while updating qty of items with custom options"/> | ||
<testCaseId value="MC-14732" /> | ||
<group value="shoppingCart"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
<createData entity="ApiSimpleProductWithCustomPrice" stepKey="createProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
|
||
<!-- Add two custom options to the product: field and textarea --> | ||
<updateData createDataKey="createProduct" entity="ProductWithTextFieldAndAreaOptions" stepKey="updateProductWithOption"/> | ||
|
||
<!-- Go to the product page, fill the custom options values and add the product to the shopping cart --> | ||
<amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnProductPage"/> | ||
<waitForPageLoad stepKey="waitForCatalogPageLoad"/> | ||
<fillField userInput="OptionField" selector="{{StorefrontProductInfoMainSection.productOptionFieldInput(ProductOptionField.title)}}" stepKey="fillProductOptionInputField"/> | ||
<fillField userInput="OptionArea" selector="{{StorefrontProductInfoMainSection.productOptionAreaInput(ProductOptionArea.title)}}" stepKey="fillProductOptionInputArea"/> | ||
<actionGroup ref="StorefrontAddToCartCustomOptionsProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> | ||
<argument name="productName" value="$createProduct.name$"/> | ||
</actionGroup> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
</after> | ||
|
||
<!-- Go to the shopping cart --> | ||
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="amOnPageShoppingCart"/> | ||
<waitForPageLoad stepKey="waitForCheckoutPageLoad"/> | ||
|
||
<!-- Change the product QTY --> | ||
<fillField selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" userInput="{{quoteQty11Subtotal1320.qty}}" stepKey="changeCartQty"/> | ||
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="updateShoppingCart"/> | ||
<waitForPageLoad stepKey="waitShoppingCartUpdated"/> | ||
|
||
<!-- The price and QTY values should be updated for the product --> | ||
<grabValueFrom selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" stepKey="grabProductQtyInCart"/> | ||
<see userInput="{{quoteQty11Subtotal1320.currency}}{{quoteQty11Subtotal1320.subtotal}}" selector="{{CheckoutCartProductSection.productSubtotalByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/> | ||
<assertEquals stepKey="assertProductQtyInCart"> | ||
<expectedResult type="string">{{quoteQty11Subtotal1320.qty}}</expectedResult> | ||
<actualResult type="variable">grabProductQtyInCart</actualResult> | ||
</assertEquals> | ||
<see userInput="{{quoteQty11Subtotal1320.currency}}{{quoteQty11Subtotal1320.subtotal}}" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertSubtotal"/> | ||
|
||
<!-- Minicart product price and subtotal should be updated --> | ||
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="openMinicart"/> | ||
<grabValueFrom selector="{{StorefrontMinicartSection.itemQuantity($$createProduct.name$$)}}" stepKey="grabProductQtyInMinicart"/> | ||
<assertEquals stepKey="assertProductQtyInMinicart"> | ||
<expectedResult type="string">{{quoteQty11Subtotal1320.qty}}</expectedResult> | ||
<actualResult type="variable">grabProductQtyInMinicart</actualResult> | ||
</assertEquals> | ||
<see userInput="{{quoteQty11Subtotal1320.currency}}{{quoteQty11Subtotal1320.subtotal}}" selector="{{StorefrontMinicartSection.subtotal}}" stepKey="assertMinicartSubtotal"/> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters