Skip to content

Commit 96ef2b3

Browse files
committed
ACQE-6842 | AC-3857: Verify that customer matches to a segment with conditions
2 parents f1a4675 + b07d228 commit 96ef2b3

File tree

3 files changed

+51
-7
lines changed

3 files changed

+51
-7
lines changed

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,4 +588,22 @@
588588
<data key="default_shipping">Yes</data>
589589
<requiredEntity type="region">RegionTX</requiredEntity>
590590
</entity>
591+
<entity name="US_Address_Bris" type="address">
592+
<data key="firstname">John</data>
593+
<data key="lastname">Doe</data>
594+
<data key="company">National Auto Parts</data>
595+
<array key="street">
596+
<item>3976 Thunder Road</item>
597+
</array>
598+
<data key="city">Brisbane</data>
599+
<data key="state">California</data>
600+
<data key="country_id">US</data>
601+
<data key="country">United States</data>
602+
<data key="postcode">94005</data>
603+
<data key="telephone">650-544-6365</data>
604+
<data key="vat_id">47458714</data>
605+
<data key="default_billing">Yes</data>
606+
<data key="default_shipping">Yes</data>
607+
<requiredEntity type="region">RegionCA</requiredEntity>
608+
</entity>
591609
</entities>

app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -503,20 +503,18 @@
503503
<data key="group">General</data>
504504
<requiredEntity type="address">US_Address_CA_CC</requiredEntity>
505505
</entity>
506-
<entity name="Simple_Customer_With_Multiple_Address" type="customer">
506+
<entity name="Simple_US_Customer_With_Brisbane_Address" type="customer">
507507
<data key="group_id">1</data>
508-
<data key="default_billing">false</data>
509-
<data key="default_shipping">false</data>
508+
<data key="default_billing">true</data>
509+
<data key="default_shipping">true</data>
510510
<data key="email" unique="prefix">John.Doe@example.com</data>
511511
<data key="firstname">John</data>
512512
<data key="lastname">Doe</data>
513513
<data key="fullname">John Doe</data>
514514
<data key="password">pwdTest123!</data>
515515
<data key="store_id">0</data>
516516
<data key="website_id">0</data>
517-
<requiredEntity type="address">DE_Berlin_State</requiredEntity>
518-
<requiredEntity type="address">UK_State_Address</requiredEntity>
519-
<requiredEntity type="address">US_Address_NY_Not_Default_Address</requiredEntity>
520-
<requiredEntity type="address">US_California_State</requiredEntity>
517+
<data key="group">General</data>
518+
<requiredEntity type="address">US_Address_Bris</requiredEntity>
521519
</entity>
522520
</entities>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="AdminVerifyThatCustomerMatchesToASegmentWithConditionsOrderAddressTest">
12+
<annotations>
13+
<features value="CustomerSegment"/>
14+
<stories value="Customer segment with ordered address based condition"/>
15+
<title value="Customer segment with order based condition should automatically match customer after order is placed"/>
16+
<description value="Customer segment with address based condition should automatically match customer after order is placed and also verify the customer for wrong postal code"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-3857"/>
19+
</annotations>
20+
<before>
21+
<!-- Create customer -->
22+
<createData entity="Simple_US_Customer_With_Brisbane_Address" stepKey="createCustomer"/>
23+
</before>
24+
<after>
25+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
26+
</after>
27+
</test>
28+
</tests>

0 commit comments

Comments
 (0)