Skip to content

Commit 548cdbf

Browse files
[Magento Community Engineering] Community Contributions - 2.4-develop
- merged latest code from mainline branch
2 parents 8ccb2c6 + ae5cf1e commit 548cdbf

File tree

45 files changed

+634
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+634
-165
lines changed

app/code/Magento/Captcha/Test/Unit/Model/Customer/Plugin/AjaxLoginTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class AjaxLoginTest extends TestCase
6363
/**
6464
* @var array
6565
*/
66-
protected $formIds;
66+
protected $formIds = ['user_login'];
6767

6868
/**
6969
* @var AjaxLogin
@@ -97,7 +97,6 @@ protected function setUp(): void
9797
->method('getCaptcha')
9898
->willReturn($this->captchaMock);
9999

100-
$this->formIds = ['user_login'];
101100
$this->serializerMock = $this->createMock(Json::class);
102101

103102
$this->model = new AjaxLogin(
@@ -194,7 +193,10 @@ public function testAroundExecuteCaptchaIsNotRequired($username, $requestContent
194193

195194
$this->captchaMock->expects($this->once())->method('isRequired')->with($username)
196195
->willReturn(false);
197-
$this->captchaMock->expects($this->never())->method('logAttempt')->with($username);
196+
$expectLogAttempt = $requestContent['captcha_form_id'] ?? false;
197+
$this->captchaMock
198+
->expects($expectLogAttempt ? $this->once() : $this->never())
199+
->method('logAttempt')->with($username);
198200
$this->captchaMock->expects($this->never())->method('isCorrect');
199201

200202
$closure = function () {

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

0 commit comments

Comments
 (0)