Skip to content

Commit 23ecf93

Browse files
committed
MC-17387: Fatal error appears when adding bundle product to Cart from Wish list page
- Added automated test script
1 parent 7429610 commit 23ecf93

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminAddBundleProductToCartFromWishListPageTest">
11+
<annotations>
12+
<features value="Catalog"/>
13+
<title value="Add bundle product to Cart from Wish list page"/>
14+
<description value="Add bundle product to Cart from Wish list page"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="MC-17782"/>
17+
<useCaseId value="MC-17387"/>
18+
<group value="catalog"/>
19+
</annotations>
20+
<before>
21+
<!-- Login as Admin -->
22+
<comment userInput="Login as Admin" stepKey="commentLoginAsAdmin"/>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
<!-- Create customer on Storefront and bundle product -->
25+
<comment userInput="Create customer on Storefront and bundle product" stepKey="commentCreateData"/>
26+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
27+
<createData entity="CustomerEntityOne" stepKey="createCustomerViaTheStorefront"/>
28+
<createData entity="_defaultProduct" stepKey="createSimpleProduct1">
29+
<requiredEntity createDataKey="createCategory"/>
30+
</createData>
31+
<createData entity="_defaultProduct" stepKey="createSimpleProduct2">
32+
<requiredEntity createDataKey="createCategory"/>
33+
</createData>
34+
<createData entity="ApiBundleProductPriceViewRange" stepKey="createProduct">
35+
<requiredEntity createDataKey="createCategory"/>
36+
</createData>
37+
<!-- Create Attribute -->
38+
<comment userInput="Create Attribute" stepKey="commentCreateAttribute"/>
39+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
40+
<requiredEntity createDataKey="createProduct"/>
41+
</createData>
42+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
43+
<requiredEntity createDataKey="createProduct"/>
44+
<requiredEntity createDataKey="bundleOption"/>
45+
<requiredEntity createDataKey="createSimpleProduct1"/>
46+
</createData>
47+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
48+
<requiredEntity createDataKey="createProduct"/>
49+
<requiredEntity createDataKey="bundleOption"/>
50+
<requiredEntity createDataKey="createSimpleProduct2"/>
51+
</createData>
52+
<amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="goToProductEditPage"/>
53+
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
54+
</before>
55+
<after>
56+
<!-- Delete created data -->
57+
<comment userInput="Delete created data" stepKey="commentDeleteCreatedData"/>
58+
<deleteData createDataKey="createCustomerViaTheStorefront" stepKey="deleteCustomerViaTheStorefront"/>
59+
<deleteData createDataKey="createProduct" stepKey="deleteProduct" />
60+
<!-- Log out -->
61+
<comment userInput="Log out" stepKey="commentLogOut"/>
62+
<actionGroup ref="logout" stepKey="logout"/>
63+
</after>
64+
<!-- Login to the Storefront as created customer -->
65+
<comment userInput="Login to the Storefront as created customer" stepKey="commentLoginAsCustomer"/>
66+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer">
67+
<argument name="Customer" value="$$createCustomerViaTheStorefront$$"/>
68+
</actionGroup>
69+
<!-- Add product to Wish List -->
70+
<comment userInput="Add product to Wish List" stepKey="commentAddProductToWishList"/>
71+
<amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnBundleProductPage"/>
72+
<waitForPageLoad stepKey="waitForProductPage"/>
73+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct">
74+
<argument name="productVar" value="$$createProduct$$"/>
75+
</actionGroup>
76+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName($$createProduct.name$$)}}" stepKey="moveMouseOverProduct" />
77+
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName($$createProduct.name$$)}}" stepKey="clickAddToCart" />
78+
<waitForPageLoad stepKey="waitForProductBundlePage"/>
79+
<!-- See error message -->
80+
<comment userInput="See error message" stepKey="commentSeeErrorMessage"/>
81+
<see userInput=" Please specify product option(s)." stepKey="seeErrorMessage"/>
82+
</test>
83+
</tests>

0 commit comments

Comments
 (0)