Skip to content

Commit 2a4b53b

Browse files
ENGCOM-4498: Removed extra whitespaces #21740
- Merge Pull Request #21740 from yogeshsuhagiya/magento2:2.3-develop-PR-yogesh-12 - Merged commits: 1. 28d5335 2. 8361958 3. fb67134
2 parents 855fd2d + fb67134 commit 2a4b53b

File tree

14 files changed

+147
-25
lines changed

14 files changed

+147
-25
lines changed

app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/**
8-
* Product attribute add/edit form main tab
9-
*
10-
* @author Magento Core Team <core@magentocommerce.com>
11-
*/
127
namespace Magento\Eav\Block\Adminhtml\Attribute\Edit\Main;
138

149
use Magento\Catalog\Model\ResourceModel\Eav\Attribute;
1510

11+
/**
12+
* Product attribute add/edit form main tab
13+
*/
1614
abstract class AbstractMain extends \Magento\Backend\Block\Widget\Form\Generic
1715
{
1816
/**
@@ -279,10 +277,11 @@ protected function _initFormValues()
279277
}
280278

281279
/**
282-
* Processing block html after rendering
280+
* Processing block html after rendering.
281+
*
283282
* Adding js block to the end of this block
284283
*
285-
* @param string $html
284+
* @param string $html
286285
* @return string
287286
*/
288287
protected function _afterToHtml($html)

app/code/Magento/Eav/Setup/EavSetup.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
use Magento\Eav\Model\Entity\Setup\PropertyMapperInterface;
1111
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory;
1212
use Magento\Framework\App\CacheInterface;
13-
use Magento\Framework\App\ObjectManager;
14-
use Magento\Framework\App\ResourceConnection;
1513
use Magento\Framework\Exception\LocalizedException;
1614
use Magento\Framework\Setup\ModuleDataSetupInterface;
1715

1816
/**
17+
* Base eav setup class.
18+
*
1919
* @api
2020
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
2121
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -101,7 +101,8 @@ public function __construct(
101101
}
102102

103103
/**
104-
* Gets setup model
104+
* Gets setup model.
105+
*
105106
* @deprecated
106107
* @return ModuleDataSetupInterface
107108
*/
@@ -568,6 +569,8 @@ public function addAttributeGroup($entityTypeId, $setId, $name, $sortOrder = nul
568569
}
569570

570571
/**
572+
* Convert group name to attribute group code.
573+
*
571574
* @param string $groupName
572575
* @return string
573576
* @since 100.1.0

app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/BooleanTest.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ public function addValueSortToCollectionDataProvider()
101101
'expectedJoinCondition' => [
102102
0 => [
103103
'requisites' => ['code_t1' => "table"],
104-
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123' AND code_t1.store_id='0'",
104+
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123'"
105+
. " AND code_t1.store_id='0'",
105106
],
106107
1 => [
107108
'requisites' => ['code_t2' => "table"],
108-
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123' AND code_t2.store_id='12'",
109+
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123'"
110+
. " AND code_t2.store_id='12'",
109111
],
110112
],
111113
'expectedOrder' => 'IF(code_t2.value_id > 0, code_t2.value, code_t1.value) ASC',
@@ -116,11 +118,13 @@ public function addValueSortToCollectionDataProvider()
116118
'expectedJoinCondition' => [
117119
0 => [
118120
'requisites' => ['code_t1' => "table"],
119-
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123' AND code_t1.store_id='0'",
121+
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123'"
122+
. " AND code_t1.store_id='0'",
120123
],
121124
1 => [
122125
'requisites' => ['code_t2' => "table"],
123-
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123' AND code_t2.store_id='12'",
126+
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123'"
127+
. " AND code_t2.store_id='12'",
124128
],
125129
],
126130
'expectedOrder' => 'IF(code_t2.value_id > 0, code_t2.value, code_t1.value) DESC',
@@ -131,7 +135,8 @@ public function addValueSortToCollectionDataProvider()
131135
'expectedJoinCondition' => [
132136
0 => [
133137
'requisites' => ['code_t' => "table"],
134-
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123' AND code_t.store_id='0'",
138+
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123'"
139+
. " AND code_t.store_id='0'",
135140
],
136141
],
137142
'expectedOrder' => 'code_t.value DESC',
@@ -142,7 +147,8 @@ public function addValueSortToCollectionDataProvider()
142147
'expectedJoinCondition' => [
143148
0 => [
144149
'requisites' => ['code_t' => "table"],
145-
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123' AND code_t.store_id='0'",
150+
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123'"
151+
. " AND code_t.store_id='0'",
146152
],
147153
],
148154
'expectedOrder' => 'code_t.value ASC',

app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,12 @@ public function getFields(array $context = []): array
137137
$searchCriteria = $this->searchCriteriaBuilder->create();
138138
$groups = $this->groupRepository->getList($searchCriteria)->getItems();
139139
$priceAttribute = $this->attributeAdapterProvider->getByAttributeCode('price');
140+
$ctx = isset($context['websiteId']) ? ['websiteId' => $context['websiteId']] : [];
140141
foreach ($groups as $group) {
142+
$ctx['customerGroupId'] = $group->getId();
141143
$groupPriceKey = $this->fieldNameResolver->getFieldName(
142144
$priceAttribute,
143-
['customerGroupId' => $group->getId(), 'websiteId' => $context['websiteId']]
145+
$ctx
144146
);
145147
$allAttributes[$groupPriceKey] = [
146148
'type' => $this->fieldTypeConverter->convert(FieldTypeConverterInterface::INTERNAL_DATA_TYPE_FLOAT),

app/code/Magento/Elasticsearch6/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
<type name="Magento\Search\Model\Search\PageSizeProvider">
159159
<arguments>
160160
<argument name="pageSizeBySearchEngine" xsi:type="array">
161-
<item name="elasticsearch6" xsi:type="number">2147483647</item>
161+
<item name="elasticsearch6" xsi:type="number">10000</item>
162162
</argument>
163163
</arguments>
164164
</type>

app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ protected function _prepareForm()
132132
$this->_addAttributesToForm($attributes, $fieldset);
133133

134134
$this->_form->addFieldNameSuffix('order[account]');
135-
136-
$formValues = $this->extractValuesFromAttributes($attributes);
137-
$this->_form->setValues($formValues);
135+
$this->_form->setValues($this->extractValuesFromAttributes($attributes));
138136

139137
return $this;
140138
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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="AdminChangeCustomerGroupInNewOrder">
12+
<annotations>
13+
<title value="Customer account group cannot be selected while creating a new customer in order"/>
14+
<stories value="MC-15290: Customer account group cannot be selected while creating a new customer in order"/>
15+
<description value="Customer account group cannot be selected while creating a new customer in order"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-15290"/>
18+
<useCaseId value="MC-15289"/>
19+
<group value="sales"/>
20+
</annotations>
21+
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
24+
</before>
25+
<after>
26+
<actionGroup ref="logout" stepKey="logout"/>
27+
</after>
28+
29+
<actionGroup ref="navigateToNewOrderPageNewCustomerSingleStore" stepKey="openNewOrder"/>
30+
<selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="Retailer" stepKey="selectCustomerGroup"/>
31+
<waitForPageLoad stepKey="waitForPageLoad"/>
32+
<grabValueFrom selector="{{AdminOrderFormAccountSection.group}}" stepKey="grabGroupValue"/>
33+
<assertEquals stepKey="assertValueIsStillSelected">
34+
<actualResult type="variable">$grabGroupValue</actualResult>
35+
<expectedResult type="string">3</expectedResult>
36+
</assertEquals>
37+
</test>
38+
</tests>

app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomWebsiteActionGroup.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
</arguments>
1414
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnTheStorePage"/>
1515
<click selector="{{AdminStoresGridSection.resetButton}}" stepKey="clickOnResetButton"/>
16-
<waitForPageLoad stepKey="waitForPageLoadAfterResetButtonClicked" time="10"/>
1716
<fillField userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="fillSearchWebsiteField"/>
1817
<click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton" />
19-
<waitForPageLoad stepKey="waitForPageLoadAfterSearch" time="10"/>
2018
<see userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="verifyThatCorrectWebsiteFound"/>
2119
<click selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="clickEditExistingWebsite"/>
22-
20+
<waitForPageLoad stepKey="waitForPageLoadAfterWebsiteSelected" time="30"/>
2321
<click selector="{{AdminStoresMainActionsSection.deleteButton}}" stepKey="clickDeleteWebsiteButtonOnEditStorePage"/>
2422
<selectOption userInput="No" selector="{{AdminStoresDeleteWebsiteSection.createDbBackup}}" stepKey="setCreateDbBackupToNo"/>
2523
<click selector="{{AdminStoresDeleteWebsiteSection.deleteButton}}" stepKey="clickDeleteButtonOnDeleteWebsitePage"/>
24+
<see selector="{{AdminMessagesSection.successMessage}}" userInput="You deleted the website." stepKey="checkSuccessMessage"/>
2625
</actionGroup>
2726
</actionGroups>

app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteWebsiteSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
99
<section name="AdminStoresDeleteWebsiteSection">
1010
<element name="createDbBackup" type="select" selector="#store_create_backup"/>
11-
<element name="deleteButton" type="button" selector="#delete" timeout="30"/>
11+
<element name="deleteButton" type="button" selector="#delete" timeout="120"/>
1212
</section>
1313
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9+
<module name="Magento_TestSetupDeclarationModule1"/>
10+
</config>

0 commit comments

Comments
 (0)