Skip to content

Commit b948cad

Browse files
author
Nikita Chubukov
committed
Merge branch '2.3-develop' into MC-17332
2 parents 4e1d46c + c3f29ce commit b948cad

File tree

60 files changed

+920
-176
lines changed

Some content is hidden

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

60 files changed

+920
-176
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="ChangedCookieDomainForMainWebsiteConfigData">
12+
<data key="path">web/cookie/cookie_domain</data>
13+
<data key="scope">website</data>
14+
<data key="scope_code">base</data>
15+
<data key="value">testDomain.com</data>
16+
</entity>
17+
<entity name="EmptyCookieDomainForMainWebsiteConfigData">
18+
<data key="path">web/cookie/cookie_domain</data>
19+
<data key="scope">website</data>
20+
<data key="scope_code">base</data>
21+
<data key="value">''</data>
22+
</entity>
23+
</entities>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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="AdminLoginAfterChangeCookieDomainTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Login on the Admin Backend"/>
15+
<title value="Admin user can login after changing cookie domain on main website scope without changing cookie domain on default scope"/>
16+
<description value="Admin user can login after changing cookie domain on main website scope without changing cookie domain on default scope"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-17847"/>
19+
<useCaseId value="MC-17275"/>
20+
<group value="backend"/>
21+
</annotations>
22+
<before>
23+
<magentoCLI command="config:set {{ChangedCookieDomainForMainWebsiteConfigData.path}} --scope={{ChangedCookieDomainForMainWebsiteConfigData.scope}} --scope-code={{ChangedCookieDomainForMainWebsiteConfigData.scope_code}} {{ChangedCookieDomainForMainWebsiteConfigData.value}}" stepKey="changeDomainForMainWebsiteBeforeTestRun"/>
24+
<magentoCLI command="cache:flush config" stepKey="flushCacheBeforeTestRun"/>
25+
</before>
26+
<after>
27+
<magentoCLI command="config:set {{EmptyCookieDomainForMainWebsiteConfigData.path}} --scope={{EmptyCookieDomainForMainWebsiteConfigData.scope}} --scope-code={{EmptyCookieDomainForMainWebsiteConfigData.scope_code}} {{EmptyCookieDomainForMainWebsiteConfigData.value}}" stepKey="changeDomainForMainWebsiteAfterTestComplete"/>
28+
<magentoCLI command="cache:flush config" stepKey="flushCacheAfterTestComplete"/>
29+
</after>
30+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
31+
<actionGroup ref="AssertAdminDashboardPageIsVisibleActionGroup" stepKey="seeDashboardPage"/>
32+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
33+
</test>
34+
</tests>

app/code/Magento/Backend/etc/adminhtml/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<arguments>
8787
<argument name="lifetimePath" xsi:type="const">Magento\Backend\Model\Auth\Session::XML_PATH_SESSION_LIFETIME</argument>
8888
<argument name="sessionName" xsi:type="const">Magento\Backend\Model\Session\AdminConfig::SESSION_NAME_ADMIN</argument>
89+
<argument name="scopeType" xsi:type="const">Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT</argument>
8990
</arguments>
9091
</type>
9192
<type name="Magento\Framework\View\Result\PageFactory">

app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ if ($isField) {
5353

5454
<?php if (!$element->getNoContainer()) : ?>
5555
<fieldset class="<?= $block->escapeHtmlAttr($cssClass) ?>" id="<?= $block->escapeHtmlAttr($id) ?>">
56+
<?php if (strlen($element->getBeforeElementHtml())) : ?>
57+
<?= $element->getBeforeElementHtml() ?>
58+
<?php endif ?>
5659
<?php if ($element->getLegend() && !$isWrapped) : ?>
5760
<legend class="<?= /* @noEscape */ $isField ? 'label admin__field-label' : 'admin__legend legend' ?>">
5861
<span><?= $block->escapeHtml($element->getLegend()) ?></span>

app/code/Magento/Catalog/Model/Product/Visibility.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function __construct(
5555
/**
5656
* Retrieve visible in catalog ids array
5757
*
58-
* @return string[]
58+
* @return int[]
5959
*/
6060
public function getVisibleInCatalogIds()
6161
{
@@ -65,7 +65,7 @@ public function getVisibleInCatalogIds()
6565
/**
6666
* Retrieve visible in search ids array
6767
*
68-
* @return string[]
68+
* @return int[]
6969
*/
7070
public function getVisibleInSearchIds()
7171
{
@@ -75,7 +75,7 @@ public function getVisibleInSearchIds()
7575
/**
7676
* Retrieve visible in site ids array
7777
*
78-
* @return string[]
78+
* @return int[]
7979
*/
8080
public function getVisibleInSiteIds()
8181
{
@@ -86,6 +86,7 @@ public function getVisibleInSiteIds()
8686
* Retrieve option array
8787
*
8888
* @return array
89+
* phpcs:disable Magento2.Functions.StaticFunction
8990
*/
9091
public static function getOptionArray()
9192
{
@@ -134,6 +135,7 @@ public static function getOptionText($optionId)
134135
$options = self::getOptionArray();
135136
return isset($options[$optionId]) ? $options[$optionId] : null;
136137
}
138+
//phpcs:enable Magento2.Functions.StaticFunction
137139

138140
/**
139141
* Retrieve flat column definition
@@ -251,7 +253,7 @@ public function addValueSortToCollection($collection, $dir = 'asc')
251253
}
252254

253255
/**
254-
* {@inheritdoc}
256+
* @inheritdoc
255257
*/
256258
public function toOptionArray()
257259
{

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<element name="sectionHeader" type="button" selector="div[data-index='websites']" timeout="30"/>
8080
<element name="sectionHeaderOpened" type="button" selector="[data-index='websites']._show" timeout="30"/>
8181
<element name="website" type="checkbox" selector="//label[contains(text(), '{{var1}}')]/parent::div//input[@type='checkbox']" parameterized="true"/>
82+
<element name="websiteChecked" type="checkbox" selector="//label[contains(text(), '{{var1}}')]/parent::div//input[@type='checkbox'][@value='1']" parameterized="true"/>
8283
</section>
8384
<section name="ProductDesignSection">
8485
<element name="DesignTab" type="button" selector="//strong[@class='admin__collapsible-title']//span[text()='Design']"/>

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Websites.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,9 @@ protected function getFieldsForFieldset()
175175
$label = __('Websites');
176176

177177
$defaultWebsiteId = $this->websiteRepository->getDefault()->getId();
178-
$isOnlyOneWebsiteAvailable = count($websitesList) === 1;
179178
foreach ($websitesList as $website) {
180179
$isChecked = in_array($website['id'], $websiteIds)
181-
|| ($defaultWebsiteId == $website['id'] && $isNewProduct)
182-
|| $isOnlyOneWebsiteAvailable;
180+
|| ($defaultWebsiteId == $website['id'] && $isNewProduct);
183181
$children[$website['id']] = [
184182
'arguments' => [
185183
'data' => [

app/code/Magento/CatalogSearch/Ui/DataProvider/Product/AddFulltextFilterToCollection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66
namespace Magento\CatalogSearch\Ui\DataProvider\Product;
77

8-
use Magento\Framework\Data\Collection;
98
use Magento\CatalogSearch\Model\ResourceModel\Search\Collection as SearchCollection;
9+
use Magento\Framework\Data\Collection;
1010
use Magento\Ui\DataProvider\AddFilterToCollectionInterface;
1111

1212
/**
@@ -30,14 +30,14 @@ public function __construct(SearchCollection $searchCollection)
3030
}
3131

3232
/**
33-
* {@inheritdoc}
33+
* @inheritdoc
3434
*
3535
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3636
*/
3737
public function addFilter(Collection $collection, $field, $condition = null)
3838
{
3939
/** @var $collection \Magento\Catalog\Model\ResourceModel\Product\Collection */
40-
if (isset($condition['fulltext']) && !empty($condition['fulltext'])) {
40+
if (isset($condition['fulltext']) && (string)$condition['fulltext'] !== '') {
4141
$this->searchCollection->addBackendSearchFilter($condition['fulltext']);
4242
$productIds = $this->searchCollection->load()->getAllIds();
4343
$collection->addIdFilter($productIds);

app/code/Magento/Cms/view/adminhtml/ui_component/cms_block_form.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@
123123
<rule name="required-entry" xsi:type="boolean">true</rule>
124124
</validation>
125125
<dataType>int</dataType>
126+
<tooltip>
127+
<link>https://docs.magento.com/m2/ce/user_guide/configuration/scope.html</link>
128+
<description>What is this?</description>
129+
</tooltip>
126130
<label translate="true">Store View</label>
127131
<dataScope>store_id</dataScope>
128132
</settings>

app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@
207207
<rule name="required-entry" xsi:type="boolean">true</rule>
208208
</validation>
209209
<dataType>int</dataType>
210+
<tooltip>
211+
<link>https://docs.magento.com/m2/ce/user_guide/configuration/scope.html</link>
212+
<description>What is this?</description>
213+
</tooltip>
210214
<label translate="true">Store View</label>
211215
<dataScope>store_id</dataScope>
212216
</settings>

0 commit comments

Comments
 (0)