Skip to content

Commit 9374e77

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-95068' into 2.3-develop-pr39
2 parents 74fdd4d + 64efa39 commit 9374e77

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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="StorefrontGuestCheckoutDataPersistTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="MAGETWO-95068: Checkout data (shipping address etc) not persistant after cart update"/>
15+
<title value="Check that checkout data persist after cart update"/>
16+
<description value="Checkout data should be persist after updating cart"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MAGETWO-96979"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
<before>
22+
<createData entity="_defaultCategory" stepKey="createCategory"/>
23+
<createData entity="_defaultProduct" stepKey="createProduct">
24+
<requiredEntity createDataKey="createCategory"/>
25+
</createData>
26+
</before>
27+
<after>
28+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
29+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
30+
</after>
31+
32+
<!-- Add simple product to cart -->
33+
<actionGroup ref="AddSimpleProductToCart" stepKey="addProductToCart">
34+
<argument name="product" value="$$createProduct$$"/>
35+
</actionGroup>
36+
<!-- Navigate to checkout -->
37+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
38+
<!-- Fill shipping address -->
39+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
40+
<argument name="shippingMethod" value="Flat Rate"/>
41+
</actionGroup>
42+
<!-- Add simple product to cart -->
43+
<actionGroup ref="AddSimpleProductToCart" stepKey="addProductToCart1">
44+
<argument name="product" value="$$createProduct$$"/>
45+
</actionGroup>
46+
<!-- Navigate to checkout -->
47+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart1"/>
48+
<seeInField selector="{{CheckoutShippingGuestInfoSection.email}}" userInput="{{CustomerEntityOne.email}}" stepKey="assertGuestEmail"/>
49+
<seeInField selector="{{CheckoutShippingGuestInfoSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="assertGuestFirstName"/>
50+
<seeInField selector="{{CheckoutShippingGuestInfoSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="assertGuestLastName"/>
51+
<seeInField selector="{{CheckoutShippingGuestInfoSection.street}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="assertGuestStreet"/>
52+
<seeInField selector="{{CheckoutShippingGuestInfoSection.city}}" userInput="{{CustomerAddressSimple.city}}" stepKey="assertGuestCity"/>
53+
<seeInField selector="{{CheckoutShippingGuestInfoSection.region}}" userInput="{{CustomerAddressSimple.state}}" stepKey="assertGuestRegion"/>
54+
<seeInField selector="{{CheckoutShippingGuestInfoSection.postcode}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="assertGuestPostcode"/>
55+
<seeInField selector="{{CheckoutShippingGuestInfoSection.telephone}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="assertGuestTelephone"/>
56+
</test>
57+
</tests>

app/code/Magento/Customer/view/frontend/web/js/customer-data.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ define([
216216
$.cookieStorage.set(privateContentVersion, privateContent);
217217
}
218218
$.localStorage.set(privateContentVersion, privateContent);
219+
_.each(dataProvider.getFromStorage(storage.keys()), function (sectionData, sectionName) {
220+
buffer.notify(sectionName, sectionData);
221+
});
219222
this.reload([], false);
220223
isLoading = true;
221224
} else if (expiredSectionNames.length > 0) {

0 commit comments

Comments
 (0)