Skip to content

Commit ae696ce

Browse files
committed
Merge branch '2.3-develop-issue-638' of https://github.com/eduard13/magento-functional-tests-migration into community-tests-migration-pr
2 parents eaafea1 + 4944b3e commit ae696ce

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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="ValidateEmailOnCheckoutTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<title value="Guest Checkout"/>
15+
<description value="Email validation for Guest on checkout flow"/>
16+
<stories value="Email validation for Guest on checkout flow"/>
17+
<group value="shoppingCart"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
<before>
21+
<createData entity="SimpleTwo" stepKey="createSimpleProduct"/>
22+
</before>
23+
24+
<!--Go to product page-->
25+
<amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage"/>
26+
<waitForPageLoad stepKey="waitForCatalogPageLoad"/>
27+
28+
<!--Add Product to Shopping Cart-->
29+
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage">
30+
<argument name="productName" value="$$createSimpleProduct.name$$"/>
31+
</actionGroup>
32+
33+
<!--Go to Checkout-->
34+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
35+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask1"/>
36+
37+
<!--Fill in the form fields for 1st variation, and check the validation message-->
38+
<fillField selector="{{CheckoutShippingSection.email}}" userInput="johndoe" stepKey="setCustomerEmailVariation1"/>
39+
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="John" stepKey="SetCustomerFirstNameVariation1"/>
40+
<waitForPageLoad stepKey="waitforFormValidation1"/>
41+
<see userInput="Please enter a valid email address (Ex: johndoe@domain.com)." stepKey="seeTheErrorMessageIsDisplayed1"/>
42+
43+
<!--Fill in the form fields for 2nd variation, and check the validation message-->
44+
<fillField selector="{{CheckoutShippingSection.email}}" userInput="johndoe#example.com" stepKey="setCustomerEmailVariation2"/>
45+
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="John" stepKey="SetCustomerFirstNameVariation2"/>
46+
<waitForPageLoad stepKey="waitForFormValidation2"/>
47+
<see userInput="Please enter a valid email address (Ex: johndoe@domain.com)." stepKey="seeTheErrorMessageIsDisplayed2"/>
48+
49+
<!--Fill in the form fields for 3rd variation, and check the validation message-->
50+
<fillField selector="{{CheckoutShippingSection.email}}" userInput="johndoe@example.c" stepKey="setCustomerEmailVariation3"/>
51+
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="John" stepKey="SetCustomerFirstNameVariation3"/>
52+
<waitForPageLoad stepKey="waitForFormValidation3"/>
53+
<see userInput="Please enter a valid email address (Ex: johndoe@domain.com)." stepKey="seeTheErrorMessageIsDisplayed3"/>
54+
55+
<after>
56+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
57+
</after>
58+
</test>
59+
</tests>

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/ValidateEmailOnCheckoutTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@
1010
<variation name="ValidateEmailOnCheckoutTestVariation1">
1111
<data name="customer/data/email" xsi:type="string">johndoe</data>
1212
<data name="customer/data/firstname" xsi:type="string">John</data>
13+
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
1314
<constraint name="Magento\Checkout\Test\Constraint\AssertEmailErrorValidationMessage" />
1415
<constraint name="Magento\Checkout\Test\Constraint\AssertEmailToolTips" />
1516
</variation>
1617
<variation name="ValidateEmailOnCheckoutTestVariation2">
1718
<data name="customer/data/email" xsi:type="string">johndoe#example.com</data>
1819
<data name="customer/data/firstname" xsi:type="string">John</data>
20+
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
1921
<constraint name="Magento\Checkout\Test\Constraint\AssertEmailErrorValidationMessage" />
2022
</variation>
2123
<variation name="ValidateEmailOnCheckoutTestVariation3">
2224
<data name="customer/data/email" xsi:type="string">johndoe@example.c</data>
2325
<data name="customer/data/firstname" xsi:type="string">John</data>
26+
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
2427
<constraint name="Magento\Checkout\Test\Constraint\AssertEmailErrorValidationMessage" />
2528
</variation>
2629
</testCase>

0 commit comments

Comments
 (0)