Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 942196b

Browse files
Merge branch 'MAGETWO-90280' of github.com:magento-trigger/magento2ce into MAGETWO-90280
2 parents bc2f6f5 + 260b44d commit 942196b

30 files changed

+181
-209
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.3.0
2+
=============
3+
To get detailed information about changes in Magento 2.3.0, see the [Release Notes](https://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html)
4+
15
2.1.0
26
=============
37
To get detailed information about changes in Magento 2.1.0, please visit [Magento Community Edition (CE) Release Notes](http://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")

app/code/Magento/Backup/Test/Mftf/Test/AdminCreateAndDeleteBackupsTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-94176"/>
1919
<group value="backup"/>
20-
<group value="skip"/>
20+
<skip>
21+
<issueId value="MQE-1187"/>
22+
<issueId value="DEVOPS-3512"/>
23+
</skip>
2124
</annotations>
2225

2326
<!--Login to admin area-->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
<element name="Height" type="input" selector=".mce-textbox.mce-abs-layout-item.mce-first" />
118118
<element name="UploadImage" type="file" selector=".fileupload" />
119119
<element name="OkBtn" type="button" selector="//span[text()='Ok']"/>
120-
<element name="InsertFile" type="text" selector="#insert_files"/>
120+
<element name="InsertFile" type="text" selector="#insert_files" timeout="30"/>
121121
<element name="CreateFolder" type="button" selector="#new_folder" />
122122
<element name="DeleteSelectedBtn" type="text" selector="#delete_files"/>
123123
<element name="CancelBtn" type="button" selector="#cancel" />

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,25 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MC-194"/>
1919
<group value="Catalog"/>
20-
<skip>
21-
<issueId value="MAGETWO-92780"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<createData entity="productDropDownAttribute" stepKey="attribute"/>
26-
2723
<createData entity="productAttributeOption1" stepKey="option1">
2824
<requiredEntity createDataKey="attribute"/>
2925
</createData>
3026
<createData entity="productAttributeOption2" stepKey="option2">
3127
<requiredEntity createDataKey="attribute"/>
3228
</createData>
33-
3429
<createData entity="AddToDefaultSet" stepKey="addToDefaultSet">
3530
<requiredEntity createDataKey="attribute"/>
3631
</createData>
37-
3832
<createData entity="ApiProductWithDescription" stepKey="product"/>
39-
4033
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
4134
</before>
4235
<after>
4336
<deleteData createDataKey="attribute" stepKey="deleteAttribute"/>
4437
<actionGroup ref="logout" stepKey="logout"/>
4538
</after>
46-
4739
<!-- Assert attribute presence in storefront product additional information -->
4840
<amOnPage url="/$$product.custom_attributes[url_key]$$.html" stepKey="onProductPage1"/>
4941
<waitForPageLoad stepKey="wait1"/>
@@ -64,6 +56,8 @@
6456
<see userInput="$$attribute.attribute_code$$" selector="{{AdminProductAttributeSetEditSection.unassignedAttributesTree}}" stepKey="seeAttributeInUnassigned"/>
6557
<!-- Save attribute set -->
6658
<actionGroup ref="SaveAttributeSet" stepKey="SaveAttributeSet"/>
59+
<!-- Clear cache -->
60+
<actionGroup ref="ClearPageCacheActionGroup" stepKey="clearPageCacheActionGroup"/>
6761
<!-- Go to create new product page -->
6862
<amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToNewProduct"/>
6963
<waitForPageLoad stepKey="wait2"/>
@@ -72,8 +66,7 @@
7266
<!-- Assert removed attribute not presence in storefront product additional information -->
7367
<amOnPage url="/$$product.custom_attributes[url_key]$$.html" stepKey="onProductPage2"/>
7468
<waitForPageLoad stepKey="wait3"/>
75-
<actionGroup ref="checkAttributeNotInMoreInformationTab" stepKey="checkAttributeNotInMoreInformationTab">
76-
<argument name="attributeLabel" value="$$attribute.attribute[frontend_labels][0][label]$$"/>
77-
</actionGroup>
69+
<dontSeeElement selector="{{StorefrontProductMoreInformationSection.moreInformation}}" stepKey="dontSeeProductAttribute"/>
70+
<dontSee userInput="$$attribute.attribute[frontend_labels][0][label]$$" selector="{{StorefrontProductMoreInformationSection.moreInformationTextArea}}" stepKey="dontSeeAttributeLabel"/>
7871
</test>
7972
</tests>

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<group value="product"/>
1919
<testCaseId value="MAGETWO-92384"/>
20-
<group value="skip"/>
21-
<skip>
22-
<issueId value="MAGETWO-93261"/>
23-
</skip>
2420
</annotations>
2521
<before>
2622
<createData entity="_defaultCategory" stepKey="createCategory"/>

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
<description value="Admin should be able to see the full title of the selected custom option value in the order"/>
1818
<severity value="MAJOR"/>
1919
<testCaseId value="MC-3043"/>
20-
<group value="skip"/>
21-
<!-- Skip due to MQE-1128 -->
22-
<skip>
23-
<issueId value="MQE-1128"/>
24-
</skip>
2520
</annotations>
2621
<before>
2722
<!--Create Simple Product with Custom Options-->
@@ -106,6 +101,6 @@
106101
</assertEquals>
107102
<moveMouseOver selector="{{AdminOrderItemsOrderedSection.productNameOptions}} dd" stepKey="hoverProduct"/>
108103
<waitForElementVisible selector="{{AdminOrderItemsOrderedSection.productNameOptions}} dd:nth-child(2)" stepKey="waitForCustomOptionValueFullName"/>
109-
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionValueDropdownLongTitle1.title}}" stepKey="seeAdminOrderProductOptionValueDropdown1"/>
104+
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="Optisfvdklvfnkljvnfdklpvnfdjklfdvnjkvfdkjnvfdjkfvndj111 11Optisfvdklvfnkljvnfdklpvnfdjklfdvnjkvfdkjnvfdjkfvndj11111" stepKey="seeAdminOrderProductOptionValueDropdown1"/>
110105
</test>
111106
</tests>

app/code/Magento/Cms/Block/Widget/Block.php

Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\Cms\Block\Widget;
710

11+
use Magento\Framework\DataObject\IdentityInterface;
12+
use Magento\Framework\Exception\NoSuchEntityException;
13+
use Magento\Cms\Model\Block as CmsBlock;
14+
use Magento\Widget\Block\BlockInterface;
15+
816
/**
917
* Cms Static Block Widget
1018
*
11-
* @author Magento Core Team <[email protected]>
19+
* @author Magento Core Team <[email protected]>
1220
*/
13-
class Block extends \Magento\Framework\View\Element\Template implements \Magento\Widget\Block\BlockInterface
21+
class Block extends \Magento\Framework\View\Element\Template implements BlockInterface, IdentityInterface
1422
{
1523
/**
1624
* @var \Magento\Cms\Model\Template\FilterProvider
@@ -31,6 +39,11 @@ class Block extends \Magento\Framework\View\Element\Template implements \Magento
3139
*/
3240
protected $_blockFactory;
3341

42+
/**
43+
* @var CmsBlock
44+
*/
45+
private $block;
46+
3447
/**
3548
* @param \Magento\Framework\View\Element\Template\Context $context
3649
* @param \Magento\Cms\Model\Template\FilterProvider $filterProvider
@@ -49,8 +62,9 @@ public function __construct(
4962
}
5063

5164
/**
52-
* Prepare block text and determine whether block output enabled or not
53-
* Prevent blocks recursion if needed
65+
* Prepare block text and determine whether block output enabled or not.
66+
*
67+
* Prevent blocks recursion if needed.
5468
*
5569
* @return $this
5670
*/
@@ -65,19 +79,63 @@ protected function _beforeToHtml()
6579
}
6680
self::$_widgetUsageMap[$blockHash] = true;
6781

68-
if ($blockId) {
69-
$storeId = $this->_storeManager->getStore()->getId();
70-
/** @var \Magento\Cms\Model\Block $block */
71-
$block = $this->_blockFactory->create();
72-
$block->setStoreId($storeId)->load($blockId);
73-
if ($block->isActive()) {
82+
$block = $this->getBlock();
83+
84+
if ($block && $block->isActive()) {
85+
try {
86+
$storeId = $this->_storeManager->getStore()->getId();
7487
$this->setText(
7588
$this->_filterProvider->getBlockFilter()->setStoreId($storeId)->filter($block->getContent())
7689
);
90+
} catch (NoSuchEntityException $e) {
7791
}
7892
}
79-
8093
unset(self::$_widgetUsageMap[$blockHash]);
8194
return $this;
8295
}
96+
97+
/**
98+
* Get identities of the Cms Block
99+
*
100+
* @return array
101+
*/
102+
public function getIdentities()
103+
{
104+
$block = $this->getBlock();
105+
106+
if ($block) {
107+
return $block->getIdentities();
108+
}
109+
110+
return [];
111+
}
112+
113+
/**
114+
* Get block
115+
*
116+
* @return CmsBlock|null
117+
*/
118+
private function getBlock(): ?CmsBlock
119+
{
120+
if ($this->block) {
121+
return $this->block;
122+
}
123+
124+
$blockId = $this->getData('block_id');
125+
126+
if ($blockId) {
127+
try {
128+
$storeId = $this->_storeManager->getStore()->getId();
129+
/** @var \Magento\Cms\Model\Block $block */
130+
$block = $this->_blockFactory->create();
131+
$block->setStoreId($storeId)->load($blockId);
132+
$this->block = $block;
133+
134+
return $block;
135+
} catch (NoSuchEntityException $e) {
136+
}
137+
}
138+
139+
return null;
140+
}
83141
}

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
<description value="Admin should be able to create a CMS page with widget type: Recently Compared Products"/>
1818
<severity value="CRITICAL"/>
1919
<testCaseId value="MAGETWO-83792"/>
20-
<!--Skip test due to MC-1284-->
21-
<group value="skip"/>
2220
</annotations>
2321
<!--Main test-->
2422
<before>

app/code/Magento/Developer/Console/Command/GeneratePatchCommand.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Developer\Console\Command;
89

@@ -25,7 +26,7 @@ class GeneratePatchCommand extends Command
2526
/**
2627
* Command arguments and options
2728
*/
28-
const COMMAND_NAME = 'dev:generate:patch';
29+
const COMMAND_NAME = 'setup:db-declaration:generate-patch';
2930
const MODULE_NAME = 'module';
3031
const INPUT_KEY_IS_REVERTABLE = 'revertable';
3132
const INPUT_KEY_PATCH_TYPE = 'type';
@@ -47,7 +48,9 @@ public function __construct(ComponentRegistrar $componentRegistrar)
4748
}
4849

4950
/**
50-
* {@inheritdoc}
51+
* Configure command
52+
*
53+
* @inheritdoc
5154
* @throws InvalidArgumentException
5255
*/
5356
protected function configure()
@@ -89,16 +92,16 @@ protected function configure()
8992
*
9093
* @return string
9194
*/
92-
private function getPatchTemplate()
95+
private function getPatchTemplate() : string
9396
{
9497
return file_get_contents(__DIR__ . '/patch_template.php.dist');
9598
}
9699

97100
/**
98-
* {@inheritdoc}
101+
* @inheritdoc
99102
* @throws \InvalidArgumentException
100103
*/
101-
protected function execute(InputInterface $input, OutputInterface $output)
104+
protected function execute(InputInterface $input, OutputInterface $output) : int
102105
{
103106
$moduleName = $input->getArgument(self::MODULE_NAME);
104107
$patchName = $input->getArgument(self::INPUT_KEY_PATCH_NAME);

app/code/Magento/Developer/Console/Command/TablesWhitelistGenerateCommand.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Developer\Console\Command;
79

810
use Magento\Framework\Component\ComponentRegistrar;
@@ -18,6 +20,7 @@
1820

1921
/**
2022
* Command that allows to generate whitelist, that will be used, when declaration data is installed.
23+
*
2124
* If whitelist already exists, new values will be added to existing whitelist.
2225
*/
2326
class TablesWhitelistGenerateCommand extends Command
@@ -72,7 +75,7 @@ public function __construct(
7275
*/
7376
protected function configure()
7477
{
75-
$this->setName('declaration:generate:whitelist')
78+
$this->setName('setup:db-declaration:generate-whitelist')
7679
->setDescription(
7780
'Generate whitelist of tables and columns that are allowed to be edited by declaration installer'
7881
)
@@ -125,7 +128,7 @@ private function persistModule($moduleName)
125128
/**
126129
* @inheritdoc
127130
*/
128-
protected function execute(InputInterface $input, OutputInterface $output)
131+
protected function execute(InputInterface $input, OutputInterface $output) : int
129132
{
130133
$moduleName = $input->getOption(self::MODULE_NAME_KEY);
131134

@@ -146,13 +149,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
146149
}
147150

148151
/**
149-
* As for whitelist we do not need any specific attributes like nullable or indexType,
150-
* we need to choose only names.
152+
* Filter attribute names
153+
*
154+
* As for whitelist we do not need any specific attributes like nullable or indexType, we need to choose only names.
151155
*
152156
* @param array $content
153157
* @return array
154158
*/
155-
private function filterAttributeNames(array $content)
159+
private function filterAttributeNames(array $content) : array
156160
{
157161
$names = [];
158162
$types = ['column', 'index', 'constraint'];

app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicesFiltersSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminInvoicesFiltersSection">
1212
<element name="orderNum" type="input" selector="input[name='order_increment_id']"/>
13+
<element name="applyFilters" type="button" selector="button[data-action='grid-filter-apply']" timeout="30"/>
1314
</section>
1415
</sections>

app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@
7878
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Processing" stepKey="seeOrderStatus"/>
7979
<amOnPage url="{{AdminInvoicesPage.url}}" stepKey="goToInvoices"/>
8080
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask6" />
81+
<actionGroup ref="resetProductGridToDefaultView" stepKey="resetGridInitial"/>
8182
<click selector="{{AdminInvoicesGridSection.filter}}" stepKey="clickFilters"/>
8283
<fillField selector="{{AdminInvoicesFiltersSection.orderNum}}" userInput="{$grabOrderNumber}" stepKey="searchOrderNum2"/>
84+
<click selector="{{AdminInvoicesFiltersSection.applyFilters}}" stepKey="clickApplyFilters"/>
8385
<click selector="{{AdminInvoicesGridSection.firstRow}}" stepKey="clickInvoice2"/>
8486
<see selector="{{AdminInvoiceDetailsInformationSection.orderStatus}}" userInput="Processing" stepKey="seeOrderStatus2"/>
8587
</test>

0 commit comments

Comments
 (0)