Skip to content

Commit 73ab300

Browse files
[Magento Community Engineering] Community Contributions - 2.4-develop-expedited-prs
- merged with '2.4-develop-fast-lane-prs' branch
2 parents 27a9951 + 809b2bc commit 73ab300

24 files changed

+267
-87
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,7 @@
180180

181181
<!--Select shipping method-->
182182
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
183-
<waitForElementVisible selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
184-
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
185-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskAfterClickNext"/>
183+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
186184
<!--Select payment method-->
187185
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/>
188186
<!-- Place Order -->
@@ -257,9 +255,7 @@
257255

258256
<!--Select shipping method-->
259257
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod2"/>
260-
<waitForElementVisible selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton2"/>
261-
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext2"/>
262-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskAfterClickNext2"/>
258+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext2"/>
263259

264260
<!--Select payment method-->
265261
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod2"/>

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@
115115
<see selector="{{CheckoutPaymentSection.ProductOptionsActiveByProductItemName($$createProduct.name$$)}}" userInput="1:00 AM" stepKey="seeProductOptionTimeInput" />
116116
<!--Select shipping method-->
117117
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
118-
<waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
119-
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
120-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskAfterClickNext"/>
118+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
121119
<!--Select payment method-->
122120
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/>
123121
<!-- Place Order -->

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@
7979
<!--Select shipping method-->
8080

8181
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
82-
<waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
83-
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
84-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskAfterClickNext"/>
82+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
8583

8684
<!-- Checkout select Check/Money Order payment -->
8785
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>

app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@
106106
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/>
107107
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToShoppingCartPage"/>
108108
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
109-
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/>
110-
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
109+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
111110
<!-- Checkout select Check/Money Order payment -->
112111
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
113112
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>

app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ private function getBillingAddressComponent($paymentCode, $elements)
351351
],
352352
],
353353
'telephone' => [
354+
'validation' => [
355+
'validate-phoneStrict' => 0,
356+
],
354357
'config' => [
355358
'tooltip' => [
356359
'description' => __('For delivery questions.'),

app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldForUKCustomerRemainOptionAfterRefreshTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@
5555
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{UK_Address.telephone}}" stepKey="enterTelephone"/>
5656
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
5757
<click selector="{{CheckoutShippingSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
58-
<waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
59-
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
58+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
6059
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
6160
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
6261

app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNewAddressTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@
7373
<waitForPageLoad stepKey="waitForAddressSaving"/>
7474

7575
<!-- Click next button to open payment section -->
76-
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
77-
<waitForPageLoad stepKey="waitForShipmentPageLoad"/>
76+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
7877

7978
<!-- Change the address -->
8079
<uncheckOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="selectPaymentSolution"/>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithoutRegionTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="navigateToCheckoutPage"/>
5151

52-
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNextButton"/>
52+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextButton"/>
5353
<see selector="{{StorefrontMessagesSection.error}}" userInput='Please specify a regionId in shipping address.' stepKey="seeErrorMessages"/>
5454
</test>
5555
</tests>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontOnePageCheckoutDataWhenChangeQtyTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@
5858

5959
<!--Select shipping method and finalize checkout-->
6060
<click selector="{{CheckoutShippingSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
61-
<waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
62-
<waitForPageLoad stepKey="waitForShippingMethodLoad"/>
63-
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
61+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
6462
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
6563
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
6664

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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="StorefrontOnePageCheckoutPhoneValidationTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Checkout validation phone field"/>
15+
<title value="Validate phone field on checkout page"/>
16+
<description value="Validate phone field on checkout page, field must not contain alphabetical symbols"/>
17+
<severity value="MAJOR" />
18+
<testCaseId value="MC-35292"/>
19+
</annotations>
20+
<before>
21+
<createData entity="_defaultCategory" stepKey="createCategory"/>
22+
<createData entity="ApiSimpleProduct" stepKey="createProduct">
23+
<requiredEntity createDataKey="createCategory"/>
24+
</createData>
25+
</before>
26+
<after>
27+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
28+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
29+
</after>
30+
31+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategoryPageOnFrontend">
32+
<argument name="category" value="$createCategory$"/>
33+
</actionGroup>
34+
35+
<actionGroup ref="StorefrontAddSimpleProductToCartActionGroup" stepKey="addToCartFromStorefrontProductPage">
36+
<argument name="product" value="$$createProduct$$"/>
37+
</actionGroup>
38+
39+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="guestGoToCheckout"/>
40+
41+
<fillField userInput="Sample text" selector="{{CheckoutShippingSection.telephone}}" stepKey="enterAlphabeticalSymbols"/>
42+
<see userInput="Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890." selector="{{CheckoutShippingSection.addressFieldValidationError}}" stepKey="checkPhoneFieldValidationIsPassed"/>
43+
</test>
44+
</tests>

0 commit comments

Comments
 (0)