Skip to content

Commit c23388d

Browse files
author
Prabhu Ram
committed
Merge remote-tracking branch 'mainline/2.4-develop' into feature/wishlist-graphql
2 parents 7ce741e + 8b7d949 commit c23388d

File tree

5 files changed

+21
-73
lines changed

5 files changed

+21
-73
lines changed

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

-3
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,6 @@ private function getBillingAddressComponent($paymentCode, $elements)
351351
],
352352
],
353353
'telephone' => [
354-
'validation' => [
355-
'validate-phoneStrict' => 0,
356-
],
357354
'config' => [
358355
'tooltip' => [
359356
'description' => __('For delivery questions.'),

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

-44
This file was deleted.

app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml

-3
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@
223223
</item>
224224
</item>
225225
<item name="telephone" xsi:type="array">
226-
<item name="validation" xsi:type="array">
227-
<item name="validate-phoneStrict" xsi:type="number">0</item>
228-
</item>
229226
<item name="config" xsi:type="array">
230227
<item name="tooltip" xsi:type="array">
231228
<item name="description" xsi:type="string" translate="true">For delivery questions.</item>

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<item>Bld D</item>
2020
</array>
2121
<data key="company">Magento</data>
22-
<data key="telephone">123-456-7890</data>
22+
<data key="telephone">1234568910</data>
2323
<data key="fax">1234568910</data>
2424
<data key="postcode">78729</data>
2525
<data key="city">Austin</data>
@@ -172,7 +172,7 @@
172172
<data key="city">London</data>
173173
<data key="postcode">SE1 7RW</data>
174174
<data key="country_id">GB</data>
175-
<data key="telephone">444-444-4444</data>
175+
<data key="telephone">444-44-444-44</data>
176176
</entity>
177177
<entity name="US_Address_Utah" type="address">
178178
<data key="firstname">John</data>
@@ -227,7 +227,7 @@
227227
<data key="firstname">John</data>
228228
<data key="lastname">Doe</data>
229229
<data key="company">Magento</data>
230-
<data key="telephone">888-777-7890</data>
230+
<data key="telephone">0123456789-02134567</data>
231231
<array key="street">
232232
<item>172, Westminster Bridge Rd</item>
233233
<item>7700 xyz street</item>
@@ -305,7 +305,7 @@
305305
<data key="firstname">Jane</data>
306306
<data key="lastname">Miller</data>
307307
<data key="company">Magento</data>
308-
<data key="telephone">123-456-7899</data>
308+
<data key="telephone">44 20 7123 1234</data>
309309
<array key="street">
310310
<item>1 London Bridge Street</item>
311311
</array>

dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php

+17-19
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@
2222
use Magento\Store\Model\StoreManager;
2323
use Magento\Store\Model\StoreManagerInterface;
2424
use Magento\TestFramework\Helper\Bootstrap;
25+
use Magento\TestFramework\Helper\Xpath;
2526
use Magento\TestFramework\Mail\Template\TransportBuilderMock;
2627
use Magento\TestFramework\Request;
28+
use Magento\TestFramework\TestCase\AbstractController;
2729
use Magento\Theme\Controller\Result\MessagePlugin;
2830
use PHPUnit\Framework\Constraint\StringContains;
2931

3032
/**
3133
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
3234
*/
33-
class AccountTest extends \Magento\TestFramework\TestCase\AbstractController
35+
class AccountTest extends AbstractController
3436
{
3537
/**
3638
* @var TransportBuilderMock
@@ -54,9 +56,8 @@ protected function setUp(): void
5456
*/
5557
protected function login($customerId)
5658
{
57-
/** @var \Magento\Customer\Model\Session $session */
58-
$session = Bootstrap::getObjectManager()
59-
->get(\Magento\Customer\Model\Session::class);
59+
/** @var Session $session */
60+
$session = Bootstrap::getObjectManager()->get(Session::class);
6061
$session->loginById($customerId);
6162
}
6263

@@ -148,8 +149,8 @@ public function testCreatepasswordActionWithSession()
148149
$customer->setData('confirmation', 'confirmation');
149150
$customer->save();
150151

151-
/** @var \Magento\Customer\Model\Session $customer */
152-
$session = Bootstrap::getObjectManager()->get(\Magento\Customer\Model\Session::class);
152+
/** @var Session $customer */
153+
$session = Bootstrap::getObjectManager()->get(Session::class);
153154
$session->setRpToken($token);
154155
$session->setRpCustomerId($customer->getId());
155156

@@ -404,18 +405,16 @@ public function testEditAction()
404405
$this->assertEquals(200, $this->getResponse()->getHttpResponseCode(), $body);
405406
$this->assertStringContainsString('<div class="field field-name-firstname required">', $body);
406407
// Verify the password check box is not checked
407-
$expectedString = <<<EXPECTED_HTML
408-
<input type="checkbox" name="change_password" id="change-password" data-role="change-password" value="1"
409-
title="Change&#x20;Password"
410-
class="checkbox" />
411-
EXPECTED_HTML;
412-
$this->assertStringContainsString($expectedString, $body);
408+
$checkboxXpath = '//input[@type="checkbox"][@name="change_password"][@id="change-password"][not (@checked)]' .
409+
'[@data-role="change-password"][@value="1"][@title="Change Password"][@class="checkbox"]';
410+
411+
$this->assertEquals(1, Xpath::getElementsCountForXpath($checkboxXpath, $body));
413412
}
414413

415414
/**
416415
* @magentoDataFixture Magento/Customer/_files/customer.php
417416
*/
418-
public function testChangePasswordEditAction()
417+
public function testChangePasswordEditAction(): void
419418
{
420419
$this->login(1);
421420

@@ -425,12 +424,11 @@ public function testChangePasswordEditAction()
425424
$this->assertEquals(200, $this->getResponse()->getHttpResponseCode(), $body);
426425
$this->assertStringContainsString('<div class="field field-name-firstname required">', $body);
427426
// Verify the password check box is checked
428-
$expectedString = <<<EXPECTED_HTML
429-
<input type="checkbox" name="change_password" id="change-password" data-role="change-password" value="1"
430-
title="Change&#x20;Password"
431-
checked="checked" class="checkbox" />
432-
EXPECTED_HTML;
433-
$this->assertStringContainsString($expectedString, $body);
427+
$checkboxXpath = '//input[@type="checkbox"][@name="change_password"][@id="change-password"]' .
428+
'[@data-role="change-password"][@value="1"][@title="Change Password"][@checked="checked"]' .
429+
'[@class="checkbox"]';
430+
431+
$this->assertEquals(1, Xpath::getElementsCountForXpath($checkboxXpath, $body));
434432
}
435433

436434
/**

0 commit comments

Comments
 (0)