-
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.
ENGCOM-8025: Issue 25595 - multiple address virtual product error at …
…checkout fixe… #29269 - Merge Pull Request #29269 from ralbin/magento2:bugfix/issue-25595-multi-address-virtual-product-error - Merged commits: 1. 67a4be3 2. 3a1df1d 3. 603ef05 4. 78f0780 5. b566b80 6. e40b1ca 7. 090f06a 8. 54c8ebc
- Loading branch information
Showing
8 changed files
with
118 additions
and
2 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...agento/Checkout/Test/Mftf/ActionGroup/StorefrontAssertCheckoutErrorMessageActionGroup.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,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="StorefrontAssertCheckoutErrorMessageActionGroup"> | ||
<arguments> | ||
<argument name="message" type="string"/> | ||
</arguments> | ||
|
||
<waitForElementVisible selector="{{CheckoutCartMessageSection.errorMessageText(message)}}" stepKey="assertErrorMessage"/> | ||
</actionGroup> | ||
</actionGroups> |
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
18 changes: 18 additions & 0 deletions
18
...ento/Multishipping/Test/Mftf/ActionGroup/StorefrontRemoveProductOnCheckoutActionGroup.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,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="StorefrontRemoveProductOnCheckoutActionGroup"> | ||
<arguments> | ||
<argument name="itemNumber" type="string" defaultValue="1"/> | ||
</arguments> | ||
|
||
<click selector="{{MultishippingSection.removeItemButton(itemNumber)}}" stepKey="removeItem"/> | ||
</actionGroup> | ||
</actionGroups> |
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
71 changes: 71 additions & 0 deletions
71
...ode/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithWithVirtualProductTest.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,71 @@ | ||
<?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="StorefrontCheckoutWithWithVirtualProductTest"> | ||
<annotations> | ||
<features value="Multishipping"/> | ||
<stories value="Multiple Shipping"/> | ||
<title value="Check error when cart contains virtual product"/> | ||
<description value="Check error when cart contains only virtual product"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MC-36921"/> | ||
<group value="Multishipment"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleSubCategory" stepKey="createCategory"/> | ||
<createData entity="SimpleProduct" stepKey="firstProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="VirtualProduct" stepKey="virtualProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="Customer_US_UK_DE" stepKey="createCustomerWithMultipleAddresses"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> | ||
<deleteData createDataKey="firstProduct" stepKey="deleteFirstProduct"/> | ||
<deleteData createDataKey="virtualProduct" stepKey="deleteVirtualProduct"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="createCustomerWithMultipleAddresses" stepKey="deleteCustomer"/> | ||
</after> | ||
<!-- Login to the Storefront as created customer --> | ||
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> | ||
<argument name="Customer" value="$$createCustomerWithMultipleAddresses$$"/> | ||
</actionGroup> | ||
<!-- Open the simple product page --> | ||
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToFirstProductPage"> | ||
<argument name="productUrl" value="$$firstProduct.custom_attributes[url_key]$$"/> | ||
</actionGroup> | ||
<!-- Add the simple product to the Shopping Cart --> | ||
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addFirstProductToCart"> | ||
<argument name="productName" value="$$firstProduct.name$$"/> | ||
<argument name="productQty" value="1"/> | ||
</actionGroup> | ||
<!-- Open the virtual product page --> | ||
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToVirtualProductPage"> | ||
<argument name="productUrl" value="$$virtualProduct.custom_attributes[url_key]$$"/> | ||
</actionGroup> | ||
<!-- Add the virtual product to the Shopping Cart --> | ||
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addVirtualProductToCart"> | ||
<argument name="productName" value="$$virtualProduct.name$$"/> | ||
<argument name="productQty" value="1"/> | ||
</actionGroup> | ||
<!-- Go to Cart --> | ||
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/> | ||
<!-- Check Out with Multiple Addresses --> | ||
<actionGroup ref="StorefrontCheckoutWithMultipleAddressesActionGroup" stepKey="checkoutWithMultipleAddresses"/> | ||
<!-- Remove simple product from cart --> | ||
<actionGroup ref="StorefrontRemoveProductOnCheckoutActionGroup" stepKey="removeFirstProductFromCart"/> | ||
<!-- Assert error message on checkout --> | ||
<actionGroup ref="StorefrontAssertCheckoutErrorMessageActionGroup" stepKey="assertErrorMessage"> | ||
<argument name="message" value="The current cart does not match multi shipping criteria, please review or contact the store administrator"/> | ||
</actionGroup> | ||
</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
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