Skip to content

Commit e7ba7af

Browse files
committed
[BUG#AC-2445] - Error: Call to a member function getCustomerName() on null - Issue fixed
1 parent d6756f9 commit e7ba7af

File tree

5 files changed

+108
-1
lines changed

5 files changed

+108
-1
lines changed

app/code/Magento/Wishlist/Block/Rss/Link.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct(
4444
\Magento\Framework\Url\EncoderInterface $urlEncoder,
4545
array $data = []
4646
) {
47-
$data['wishlistHelper'] = $this->wishlistHelper;
47+
$data['wishlistHelper'] = $wishlistHelper;
4848
parent::__construct($context, $data);
4949
$this->wishlistHelper = $wishlistHelper;
5050
$this->rssUrlBuilder = $rssUrlBuilder;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontShareCustomerWishlistWithRssFeedLinkActionGroup">
12+
<arguments>
13+
<argument name="email" type="string"/>
14+
<argument name="message" type="string"/>
15+
</arguments>
16+
17+
<click selector="{{StorefrontCustomerWishlistProductSection.productShareWishList}}" stepKey="clickMyWishListButton"/>
18+
<fillField userInput="{{email}}" selector="{{StorefrontCustomerWishlistShareSection.ProductShareWishlistEmail}}" stepKey="fillEmailsForShare"/>
19+
<fillField userInput="{{message}}" selector="{{StorefrontCustomerWishlistShareSection.ProductShareWishlistTextMessage}}" stepKey="fillShareMessage"/>
20+
<checkOption selector="{{StorefrontCustomerWishlistShareSection.ProductShareWishlistRssFeedLinkCheckbox}}" stepKey="productShareWishlistRssFeedLinkCheckbox"/>
21+
<click selector="{{StorefrontCustomerWishlistShareSection.ProductShareWishlistButton}}" stepKey="sendWishlist"/>
22+
</actionGroup>
23+
</actionGroups>

app/code/Magento/Wishlist/Test/Mftf/Data/WishlistData.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,20 @@
4545
<data key="path">wishlist/general/show_in_sidebar</data>
4646
<data key="value">0</data>
4747
</entity>
48+
<entity name="DisableRssConfig">
49+
<data key="path">rss/config/active</data>
50+
<data key="value">0</data>
51+
</entity>
52+
<entity name="DisableWishlistRssConfig">
53+
<data key="path">rss/wishlist/active</data>
54+
<data key="value">0</data>
55+
</entity>
56+
<entity name="EnableRssConfig">
57+
<data key="path">rss/config/active</data>
58+
<data key="value">1</data>
59+
</entity>
60+
<entity name="EnableWishlistRssConfig">
61+
<data key="path">rss/wishlist/active</data>
62+
<data key="value">1</data>
63+
</entity>
4864
</entities>

app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistShareSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<section name="StorefrontCustomerWishlistShareSection">
1212
<element name="ProductShareWishlistEmail" type="input" selector="#email_address"/>
1313
<element name="ProductShareWishlistTextMessage" type="input" selector="#message"/>
14+
<element name="ProductShareWishlistRssFeedLinkCheckbox" type="checkbox" selector="#rss_url"/>
1415
<element name="ProductShareWishlistButton" type="button" selector=".action.submit.primary" timeout="30"/>
1516
<element name="errorEmailMessage" type="input" selector="#email_address-error"/>
1617
</section>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontShareWishlistWithRssFeedLinkTest">
12+
<annotations>
13+
<features value="Wishlist"/>
14+
<stories value="Share wishlist with RSS feed link"/>
15+
<title value="Customer should be able to share wishlist with RSS feed link"/>
16+
<description value="Customer should be able to share wishlist with RSS feed link"/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="AC-2445"/>
19+
<group value="wishlist"/>
20+
</annotations>
21+
<before>
22+
<magentoCLI command="config:set {{EnableRssConfig.path}} {{EnableRssConfig.value}}"
23+
stepKey="enableRssConfig"/>
24+
<magentoCLI command="config:set {{EnableWishlistRssConfig.path}} {{EnableWishlistRssConfig.value}}"
25+
stepKey="enableWishlistRssConfig"/>
26+
<magentoCLI command="cache:clean config full_page block_html" stepKey="cleanCache"/>
27+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
28+
<createData entity="SimpleProduct" stepKey="createProduct">
29+
<requiredEntity createDataKey="createCategory"/>
30+
</createData>
31+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
32+
</before>
33+
<after>
34+
<magentoCLI command="config:set {{DisableRssConfig.path}} {{DisableRssConfig.value}}"
35+
stepKey="disableRssConfig"/>
36+
<magentoCLI command="config:set {{DisableWishlistRssConfig.path}} {{DisableWishlistRssConfig.value}}"
37+
stepKey="disableWishlistRssConfig"/>
38+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
39+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
40+
<!-- Customer logout -->
41+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
42+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
43+
</after>
44+
45+
<!-- Sign in as customer -->
46+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
47+
<argument name="Customer" value="$createCustomer$"/>
48+
</actionGroup>
49+
50+
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="openProductFromCategory">
51+
<argument name="category" value="$createCategory$"/>
52+
<argument name="product" value="$createProduct$"/>
53+
</actionGroup>
54+
55+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct">
56+
<argument name="productVar" value="$createProduct$"/>
57+
</actionGroup>
58+
59+
<actionGroup ref="StorefrontShareCustomerWishlistWithRssFeedLinkActionGroup" stepKey="shareWishlistWithRssFeed">
60+
<argument name="email" value="{{Wishlist.shareInfo_emails}}"/>
61+
<argument name="message" value="{{Wishlist.shareInfo_message}}"/>
62+
</actionGroup>
63+
<actionGroup ref="AssertStorefrontCustomerMessagesActionGroup" stepKey="assertSuccessMessage">
64+
<argument name="message" value="Your wish list has been shared."/>
65+
</actionGroup>
66+
</test>
67+
</tests>

0 commit comments

Comments
 (0)