diff --git a/README.md b/README.md
index a2cf536bb6520..6b2ac458eb403 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ To learn more about issue gate labels click [here](https://github.com/magento/ma
Reporting security issues
-To report security vulnerabilities in Magento software or web sites, please e-mail security@magento.com. Please do not report security issues using GitHub. Be sure to encrypt your e-mail with our encryption key if it includes sensitive information. Learn more about reporting security issues here.
+To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account there to submit and follow-up your issue. Learn more about reporting security issues here.
Stay up-to-date on the latest security news and patches for Magento by signing up for Security Alert Notifications.
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/LICENSE.txt b/app/code/Magento/AdminNotification/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/LICENSE.txt
rename to app/code/Magento/AdminNotification/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/LICENSE_AFL.txt b/app/code/Magento/AdminNotification/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/LICENSE_AFL.txt
rename to app/code/Magento/AdminNotification/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/AdminNotification/Test/Mftf/README.md b/app/code/Magento/AdminNotification/Test/Mftf/README.md
new file mode 100644
index 0000000000000..33f88ba74200a
--- /dev/null
+++ b/app/code/Magento/AdminNotification/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Admin Notification Functional Tests
+
+The Functional Test Module for **Magento Admin Notification** module.
diff --git a/app/code/Magento/AdminNotification/Test/Mftf/composer.json b/app/code/Magento/AdminNotification/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..6dcd053378c1b
--- /dev/null
+++ b/app/code/Magento/AdminNotification/Test/Mftf/composer.json
@@ -0,0 +1,20 @@
+{
+ "name": "magento/functional-test-module-admin-notification",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-backend": "100.0.0-dev",
+ "magento/functional-test-module-media-storage": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev",
+ "magento/functional-test-module-ui": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php
index 2fbfc43aa8775..f49911c3e7a93 100644
--- a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php
+++ b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php
@@ -62,6 +62,9 @@ public function testGetIdentity($expectedSum, $cacheTypes)
$this->assertEquals($expectedSum, $this->_messageModel->getIdentity());
}
+ /**
+ * @return array
+ */
public function getIdentityDataProvider()
{
$cacheTypeMock1 = $this->createPartialMock(\stdClass::class, ['getCacheType']);
@@ -95,6 +98,9 @@ public function testIsDisplayed($expected, $allowed, $cacheTypes)
$this->assertEquals($expected, $this->_messageModel->isDisplayed());
}
+ /**
+ * @return array
+ */
public function isDisplayedDataProvider()
{
$cacheTypesMock = $this->createPartialMock(\stdClass::class, ['getCacheType']);
diff --git a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php
index 2c259db868851..b490efd8e9683 100644
--- a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php
+++ b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php
@@ -72,6 +72,9 @@ public function testIsDisplayed($expectedFirstRun, $data)
$this->assertEquals($expectedFirstRun, $model->isDisplayed());
}
+ /**
+ * @return array
+ */
public function isDisplayedDataProvider()
{
return [
diff --git a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php
index 1e71570a5e30b..c6f61fee862ba 100644
--- a/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php
+++ b/app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php
@@ -76,6 +76,9 @@ public function testIsDisplayed($expectedResult, $cached, $response)
$this->assertEquals($expectedResult, $this->_messageModel->isDisplayed());
}
+ /**
+ * @return array
+ */
public function isDisplayedDataProvider()
{
return [
diff --git a/app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php b/app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php
index a92df095036f3..fda6ae9530135 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php
@@ -104,7 +104,6 @@ class AdvancedPricing extends \Magento\CatalogImportExport\Model\Export\Product
* @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer
* @param ImportProduct\StoreResolver $storeResolver
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
- * @throws \Magento\Framework\Exception\LocalizedException
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
@@ -193,6 +192,7 @@ protected function initTypeModels()
* Export process
*
* @return string
+ * @throws \Magento\Framework\Exception\LocalizedException
*/
public function export()
{
@@ -586,8 +586,8 @@ protected function getTierPrices(array $listSku, $table)
* Get Website code.
*
* @param int $websiteId
- *
* @return string
+ * @throws \Magento\Framework\Exception\LocalizedException
*/
protected function _getWebsiteCode(int $websiteId): string
{
@@ -617,8 +617,9 @@ protected function _getWebsiteCode(int $websiteId): string
*
* @param int $groupId
* @param int $allGroups
- *
* @return string
+ * @throws \Magento\Framework\Exception\LocalizedException
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
*/
protected function _getCustomerGroupById(
int $groupId,
diff --git a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php
index 4663aea7a7dfc..2e17e734b1e60 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php
@@ -8,7 +8,6 @@
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
-use Magento\Framework\App\ResourceConnection;
/**
* Class AdvancedPricing
@@ -618,6 +617,7 @@ protected function processCountNewPrices(array $tierPrices)
* Get product entity link field
*
* @return string
+ * @throws \Exception
*/
private function getProductEntityLinkField()
{
diff --git a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator.php b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator.php
index 25a9fc244fe51..d939a3f7c392e 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator.php
@@ -28,6 +28,7 @@ public function __construct($validators = [])
*
* @param array $value
* @return bool
+ * @throws \Zend_Validate_Exception
*/
public function isValid($value)
{
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/LICENSE.txt b/app/code/Magento/AdvancedPricingImportExport/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/LICENSE.txt
rename to app/code/Magento/AdvancedPricingImportExport/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/LICENSE_AFL.txt b/app/code/Magento/AdvancedPricingImportExport/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/LICENSE_AFL.txt
rename to app/code/Magento/AdvancedPricingImportExport/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Mftf/README.md b/app/code/Magento/AdvancedPricingImportExport/Test/Mftf/README.md
new file mode 100644
index 0000000000000..7b4d0f3f0b12b
--- /dev/null
+++ b/app/code/Magento/AdvancedPricingImportExport/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Advanced Pricing Import Export Functional Tests
+
+The Functional Test Module for **Magento Advanced Pricing Import Export** module.
diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Mftf/composer.json b/app/code/Magento/AdvancedPricingImportExport/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..df2817ad6a52f
--- /dev/null
+++ b/app/code/Magento/AdvancedPricingImportExport/Test/Mftf/composer.json
@@ -0,0 +1,23 @@
+{
+ "name": "magento/functional-test-module-advanced-pricing-import-export",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-catalog": "100.0.0-dev",
+ "magento/functional-test-module-catalog-import-export": "100.0.0-dev",
+ "magento/functional-test-module-catalog-inventory": "100.0.0-dev",
+ "magento/functional-test-module-customer": "100.0.0-dev",
+ "magento/functional-test-module-eav": "100.0.0-dev",
+ "magento/functional-test-module-import-export": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php
index 48b4c58918740..57ceb7f5af275 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php
@@ -151,10 +151,13 @@ protected function setUp()
]
);
$this->exportConfig = $this->createMock(\Magento\ImportExport\Model\Export\Config::class);
- $this->productFactory = $this->createPartialMock(\Magento\Catalog\Model\ResourceModel\ProductFactory::class, [
+ $this->productFactory = $this->createPartialMock(
+ \Magento\Catalog\Model\ResourceModel\ProductFactory::class,
+ [
'create',
'getTypeId',
- ]);
+ ]
+ );
$this->attrSetColFactory = $this->createPartialMock(
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory::class,
[
@@ -185,11 +188,14 @@ protected function setUp()
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver::class
);
$this->groupRepository = $this->createMock(\Magento\Customer\Api\GroupRepositoryInterface::class);
- $this->writer = $this->createPartialMock(\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class, [
- 'setHeaderCols',
- 'writeRow',
- 'getContents',
- ]);
+ $this->writer = $this->createPartialMock(
+ \Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class,
+ [
+ 'setHeaderCols',
+ 'writeRow',
+ 'getContents',
+ ]
+ );
$constructorMethods = [
'initTypeModels',
'initAttributes',
@@ -213,7 +219,7 @@ protected function setUp()
'_getCustomerGroupById',
'correctExportData'
]);
- $this->advancedPricing = $this->getMockbuilder(
+ $this->advancedPricing = $this->getMockBuilder(
\Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class
)
->setMethods($mockMethods)
@@ -347,6 +353,7 @@ protected function tearDown()
* @param $object
* @param $property
* @return mixed
+ * @throws \ReflectionException
*/
protected function getPropertyValue($object, $property)
{
@@ -362,6 +369,8 @@ protected function getPropertyValue($object, $property)
* @param $object
* @param $property
* @param $value
+ * @return mixed
+ * @throws \ReflectionException
*/
protected function setPropertyValue(&$object, $property, $value)
{
diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php
index bb64acb558320..2c930237da831 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php
@@ -181,6 +181,9 @@ public function testIsValidAddMessagesCall($value, $hasEmptyColumns, $customerGr
$this->tierPrice->isValid($value);
}
+ /**
+ * @return array
+ */
public function isValidResultFalseDataProvider()
{
return [
@@ -286,6 +289,9 @@ public function isValidResultFalseDataProvider()
];
}
+ /**
+ * @return array
+ */
public function isValidAddMessagesCallDataProvider()
{
return [
@@ -340,6 +346,7 @@ public function isValidAddMessagesCallDataProvider()
* @param object $object
* @param string $property
* @return mixed
+ * @throws \ReflectionException
*/
protected function getPropertyValue($object, $property)
{
@@ -357,6 +364,7 @@ protected function getPropertyValue($object, $property)
* @param string $property
* @param mixed $value
* @return object
+ * @throws \ReflectionException
*/
protected function setPropertyValue(&$object, $property, $value)
{
diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php
index 9a380ff75da24..b46e286e75007 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php
@@ -114,6 +114,9 @@ public function testGetAllWebsitesValue()
$this->assertEquals($expectedResult, $result);
}
+ /**
+ * @return array
+ */
public function isValidReturnDataProvider()
{
return [
diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php
index d9fce98826105..5ca534284a48d 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php
@@ -77,6 +77,9 @@ public function testInit()
$this->validator->init(null);
}
+ /**
+ * @return array
+ */
public function isValidDataProvider()
{
return [
diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php
index 6d130d93ee6a5..340e81746f029 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php
@@ -209,6 +209,10 @@ public function testGetEntityTypeCode()
* Test method validateRow against its result.
*
* @dataProvider validateRowResultDataProvider
+ * @param array $rowData
+ * @param string|null $behavior
+ * @param bool $expectedResult
+ * @throws \ReflectionException
*/
public function testValidateRowResult($rowData, $behavior, $expectedResult)
{
@@ -234,6 +238,10 @@ public function testValidateRowResult($rowData, $behavior, $expectedResult)
* Test method validateRow whether AddRowError is called.
*
* @dataProvider validateRowAddRowErrorCallDataProvider
+ * @param array $rowData
+ * @param string|null $behavior
+ * @param string $error
+ * @throws \ReflectionException
*/
public function testValidateRowAddRowErrorCall($rowData, $behavior, $error)
{
@@ -324,6 +332,13 @@ public function testSaveAdvancedPricing()
* Take into consideration different data and check relative internal calls.
*
* @dataProvider saveAndReplaceAdvancedPricesAppendBehaviourDataProvider
+ * @param array $data
+ * @param string $tierCustomerGroupId
+ * @param string $groupCustomerGroupId
+ * @param string $tierWebsiteId
+ * @param string $groupWebsiteId
+ * @param array $expectedTierPrices
+ * @throws \ReflectionException
*/
public function testSaveAndReplaceAdvancedPricesAppendBehaviourDataAndCalls(
$data,
@@ -768,6 +783,9 @@ public function testSaveProductPrices($priceData, $oldSkus, $priceIn, $callNum)
$this->invokeMethod($this->advancedPricing, 'saveProductPrices', [$priceData, 'table']);
}
+ /**
+ * @return array
+ */
public function saveProductPricesDataProvider()
{
return [
@@ -839,6 +857,9 @@ public function testDeleteProductTierPrices(
);
}
+ /**
+ * @return array
+ */
public function deleteProductTierPricesDataProvider()
{
return [
@@ -921,6 +942,9 @@ public function testProcessCountExistingPrices(
$this->invokeMethod($this->advancedPricing, 'processCountExistingPrices', [$prices, 'table']);
}
+ /**
+ * @return array
+ */
public function processCountExistingPricesDataProvider()
{
return [
@@ -947,6 +971,7 @@ public function processCountExistingPricesDataProvider()
* @param $object
* @param $property
* @return mixed
+ * @throws \ReflectionException
*/
protected function getPropertyValue($object, $property)
{
@@ -963,6 +988,8 @@ protected function getPropertyValue($object, $property)
* @param $object
* @param $property
* @param $value
+ * @return mixed
+ * @throws \ReflectionException
*/
protected function setPropertyValue(&$object, $property, $value)
{
@@ -980,8 +1007,8 @@ protected function setPropertyValue(&$object, $property, $value)
* @param object $object
* @param string $method
* @param array $args
- *
- * @return mixed the method result.
+ * @return mixed
+ * @throws \ReflectionException
*/
private function invokeMethod($object, $method, $args = [])
{
@@ -998,6 +1025,7 @@ private function invokeMethod($object, $method, $args = [])
* @param array $methods
*
* @return \PHPUnit_Framework_MockObject_MockObject
+ * @throws \ReflectionException
*/
private function getAdvancedPricingMock($methods = [])
{
diff --git a/app/code/Magento/AdvancedSearch/Block/SearchData.php b/app/code/Magento/AdvancedSearch/Block/SearchData.php
index 993731b465257..105a1c1c4fc46 100644
--- a/app/code/Magento/AdvancedSearch/Block/SearchData.php
+++ b/app/code/Magento/AdvancedSearch/Block/SearchData.php
@@ -30,7 +30,7 @@ abstract class SearchData extends Template implements SearchDataInterface
/**
* @var string
*/
- protected $_template = 'search_data.phtml';
+ protected $_template = 'Magento_AdvancedSearch::search_data.phtml';
/**
* @param Template\Context $context
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/LICENSE.txt b/app/code/Magento/AdvancedSearch/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/LICENSE.txt
rename to app/code/Magento/AdvancedSearch/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/LICENSE_AFL.txt b/app/code/Magento/AdvancedSearch/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/LICENSE_AFL.txt
rename to app/code/Magento/AdvancedSearch/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/AdvancedSearch/Test/Mftf/README.md b/app/code/Magento/AdvancedSearch/Test/Mftf/README.md
new file mode 100644
index 0000000000000..8b4af0e626eb0
--- /dev/null
+++ b/app/code/Magento/AdvancedSearch/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Advanced Search Functional Tests
+
+The Functional Test Module for **Magento Advanced Search** module.
diff --git a/app/code/Magento/AdvancedSearch/Test/Mftf/composer.json b/app/code/Magento/AdvancedSearch/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..b5582c72a039a
--- /dev/null
+++ b/app/code/Magento/AdvancedSearch/Test/Mftf/composer.json
@@ -0,0 +1,22 @@
+{
+ "name": "magento/functional-test-module-advanced-search",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-backend": "100.0.0-dev",
+ "magento/functional-test-module-catalog": "100.0.0-dev",
+ "magento/functional-test-module-catalog-search": "100.0.0-dev",
+ "magento/functional-test-module-config": "100.0.0-dev",
+ "magento/functional-test-module-customer": "100.0.0-dev",
+ "magento/functional-test-module-search": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev",
+ "php": "~7.1.3||~7.2.0"
+ },
+ "type": "magento2-test",
+ "license": [
+ "proprietary"
+ ]
+}
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/LICENSE.txt b/app/code/Magento/Amqp/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/LICENSE.txt
rename to app/code/Magento/Amqp/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/LICENSE_AFL.txt b/app/code/Magento/Amqp/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/LICENSE_AFL.txt
rename to app/code/Magento/Amqp/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/Amqp/Test/Mftf/README.md b/app/code/Magento/Amqp/Test/Mftf/README.md
new file mode 100644
index 0000000000000..12d1bbc3a4890
--- /dev/null
+++ b/app/code/Magento/Amqp/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Amqp Functional Tests
+
+The Functional Test Module for **Magento Amqp** module.
diff --git a/app/code/Magento/Amqp/Test/Mftf/composer.json b/app/code/Magento/Amqp/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..348200c5d1cb4
--- /dev/null
+++ b/app/code/Magento/Amqp/Test/Mftf/composer.json
@@ -0,0 +1,17 @@
+{
+ "name": "magento/functional-test-module-amqp",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/framework-amqp": "100.0.0-dev",
+ "magento/framework-message-queue": "100.0.0-dev",
+ "php": "~7.1.3||~7.2.0"
+ },
+ "type": "magento2-test",
+ "license": [
+ "proprietary"
+ ]
+}
diff --git a/app/code/Magento/Amqp/Test/Unit/Setup/ConfigOptionsListTest.php b/app/code/Magento/Amqp/Test/Unit/Setup/ConfigOptionsListTest.php
index 8db9ae73034a2..5b19ba055d059 100644
--- a/app/code/Magento/Amqp/Test/Unit/Setup/ConfigOptionsListTest.php
+++ b/app/code/Magento/Amqp/Test/Unit/Setup/ConfigOptionsListTest.php
@@ -163,6 +163,9 @@ public function testValidateNoOptions()
$this->assertEquals($expectedResult, $this->model->validate($options, $this->deploymentConfigMock));
}
+ /**
+ * @return array
+ */
public function getCreateConfigDataProvider()
{
return [
diff --git a/app/code/Magento/Analytics/Test/Mftf/Data/UserData.xml b/app/code/Magento/Analytics/Test/Mftf/Data/UserData.xml
new file mode 100644
index 0000000000000..8324ad5ba995a
--- /dev/null
+++ b/app/code/Magento/Analytics/Test/Mftf/Data/UserData.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ noreport
+ No
+ Report
+ noreport@example.com
+ 123123q
+ 123123q
+ en_US
+ true
+ 123123q
+
+
+ restrictedWebUser
+ restricted
+ webUser
+ restrictedWebUser@example.com
+ 123123q
+ 123123q
+ en_US
+ true
+ 123123q
+
+
diff --git a/app/code/Magento/Analytics/Test/Mftf/Data/UserRoleData.xml b/app/code/Magento/Analytics/Test/Mftf/Data/UserRoleData.xml
new file mode 100644
index 0000000000000..71d8bdcd5994b
--- /dev/null
+++ b/app/code/Magento/Analytics/Test/Mftf/Data/UserRoleData.xml
@@ -0,0 +1,171 @@
+
+
+
+
+
+ noreport
+ 123123q
+
+ - Magento_Backend::dashboard
+ - Magento_Sales::sales
+ - Magento_Sales::sales_operation
+ - Magento_Sales::sales_order
+ - Magento_Sales::actions
+ - Magento_Sales::create
+ - Magento_Sales::actions_view
+ - Magento_Sales::email
+ - Magento_Sales::reorder
+ - Magento_Sales::actions_edit
+ - Magento_Sales::cancel
+ - Magento_Sales::review_payment
+ - Magento_Sales::capture
+ - Magento_Sales::invoice
+ - Magento_Sales::creditmemo
+ - Magento_Sales::hold
+ - Magento_Sales::unhold
+ - Magento_Sales::ship
+ - Magento_Sales::comment
+ - Magento_Sales::emails
+ - Magento_Sales::sales_invoice
+ - Magento_Sales::shipment
+ - Magento_Sales::sales_creditmemo
+ - Magento_Paypal::billing_agreement
+ - Magento_Paypal::billing_agreement_actions
+ - Magento_Paypal::billing_agreement_actions_view
+ - Magento_Paypal::actions_manage
+ - Magento_Paypal::use
+ - Magento_Sales::transactions
+ - Magento_Sales::transactions_fetch
+ - Magento_Catalog::catalog
+ - Magento_Catalog::catalog_inventory
+ - Magento_Catalog::products
+ - Magento_Catalog::categories
+ - Magento_Customer::customer
+ - Magento_Customer::manage
+ - Magento_Customer::online
+ - Magento_Cart::cart
+ - Magento_Cart::manage
+ - Magento_Backend::myaccount
+ - Magento_Backend::marketing
+ - Magento_CatalogRule::promo
+ - Magento_CatalogRule::promo_catalog
+ - Magento_SalesRule::quote
+ - Magento_Backend::marketing_communications
+ - Magento_Email::template
+ - Magento_Newsletter::template
+ - Magento_Newsletter::queue
+ - Magento_Newsletter::subscriber
+ - Magento_Backend::marketing_seo
+ - Magento_Search::search
+ - Magento_Search::synonyms
+ - Magento_UrlRewrite::urlrewrite
+ - Magento_Sitemap::sitemap
+ - Magento_Backend::marketing_user_content
+ - Magento_Review::reviews_all
+ - Magento_Review::pending
+ - Magento_Backend::content
+ - Magento_Backend::content_elements
+ - Magento_Cms::page
+ - Magento_Cms::save
+ - Magento_Cms::page_delete
+ - Magento_Cms::block
+ - Magento_Widget::widget_instance
+ - Magento_Cms::media_gallery
+ - Magento_Backend::design
+ - Magento_Theme::theme
+ - Magento_Backend::schedule
+ - Magento_Backend::content_translation
+ - Magento_Backend::stores
+ - Magento_Backend::stores_settings
+ - Magento_Backend::store
+ - Magento_Config::config
+ - Magento_Payment::payment
+ - Magento_Cms::config_cms
+ - Magento_GoogleAnalytics::google
+ - Magento_Downloadable::downloadable
+ - Magento_Contact::contact
+ - Magento_CatalogInventory::cataloginventory
+ - Magento_Payment::payment_services
+ - Magento_Newsletter::newsletter
+ - Magento_Catalog::config_catalog
+ - Magento_CatalogSearch::config_catalog_search
+ - Magento_Shipping::config_shipping
+ - Magento_Shipping::shipping_policy
+ - Magento_Shipping::carriers
+ - Magento_Multishipping::config_multishipping
+ - Magento_Config::config_general
+ - Magento_Config::web
+ - Magento_Config::config_design
+ - Magento_Paypal::paypal
+ - Magento_Customer::config_customer
+ - Magento_Tax::config_tax
+ - Magento_Checkout::checkout
+ - Magento_Persistent::persistent
+ - Magento_Sales::config_sales
+ - Magento_Sales::sales_email
+ - Magento_Sales::sales_pdf
+ - Magento_Reports::reports
+ - Magento_Sitemap::config_sitemap
+ - Magento_Wishlist::config_wishlist
+ - Magento_Config::config_system
+ - Magento_SalesRule::config_promo
+ - Magento_Config::advanced
+ - Magento_Config::config_admin
+ - Magento_Config::trans_email
+ - Magento_Config::dev
+ - Magento_Config::currency
+ - Magento_Rss::rss
+ - Magento_Config::sendfriend
+ - Magento_NewRelicReporting::config_newrelicreporting
+ - Magento_CheckoutAgreements::checkoutagreement
+ - Magento_Sales::order_statuses
+ - Magento_Tax::manage_tax
+ - Magento_CurrencySymbol::system_currency
+ - Magento_CurrencySymbol::currency_rates
+ - Magento_CurrencySymbol::symbols
+ - Magento_Backend::stores_attributes
+ - Magento_Catalog::attributes_attributes
+ - Magento_Catalog::update_attributes
+ - Magento_Catalog::sets
+ - Magento_Review::ratings
+ - Magento_Swatches::iframe
+ - Magento_Backend::stores_other_settings
+ - Magento_Customer::group
+ - Magento_Backend::system
+ - Magento_Backend::convert
+ - Magento_ImportExport::import
+ - Magento_ImportExport::export
+ - Magento_TaxImportExport::import_export
+ - Magento_ImportExport::history
+ - Magento_Backend::extensions
+ - Magento_Backend::local
+ - Magento_Backend::custom
+ - Magento_Backend::tools
+ - Magento_Backend::cache
+ - Magento_Backend::setup_wizard
+ - Magento_Backup::backup
+ - Magento_Backup::rollback
+ - Magento_Indexer::index
+ - Magento_Indexer::changeMode
+ - Magento_User::acl
+ - Magento_User::acl_users
+ - Magento_User::locks
+ - Magento_User::acl_roles
+ - Magento_Backend::system_other_settings
+ - Magento_AdminNotification::adminnotification
+ - Magento_AdminNotification::show_toolbar
+ - Magento_AdminNotification::show_list
+ - Magento_AdminNotification::mark_as_read
+ - Magento_AdminNotification::adminnotification_remove
+ - Magento_Variable::variable
+ - Magento_EncryptionKey::crypt_key
+ - Magento_Backend::global_search
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/LICENSE.txt b/app/code/Magento/Analytics/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/LICENSE.txt
rename to app/code/Magento/Analytics/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/LICENSE_AFL.txt b/app/code/Magento/Analytics/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/LICENSE_AFL.txt
rename to app/code/Magento/Analytics/Test/Mftf/LICENSE_AFL.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Metadata/user-meta.xml b/app/code/Magento/Analytics/Test/Mftf/Metadata/user-meta.xml
similarity index 81%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Metadata/user-meta.xml
rename to app/code/Magento/Analytics/Test/Mftf/Metadata/user-meta.xml
index 7d62c37d914e5..06186d2d10402 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Metadata/user-meta.xml
+++ b/app/code/Magento/Analytics/Test/Mftf/Metadata/user-meta.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/x-www-form-urlencoded
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Metadata/user_role-meta.xml b/app/code/Magento/Analytics/Test/Mftf/Metadata/user_role-meta.xml
similarity index 77%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Metadata/user_role-meta.xml
rename to app/code/Magento/Analytics/Test/Mftf/Metadata/user_role-meta.xml
index 66c4ebab1aeed..f52468807928e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Metadata/user_role-meta.xml
+++ b/app/code/Magento/Analytics/Test/Mftf/Metadata/user_role-meta.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/x-www-form-urlencoded
diff --git a/app/code/Magento/Analytics/Test/Mftf/README.md b/app/code/Magento/Analytics/Test/Mftf/README.md
new file mode 100644
index 0000000000000..cdeb48941e6a4
--- /dev/null
+++ b/app/code/Magento/Analytics/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Analytics Functional Tests
+
+The Functional Test Module for **Magento Analytics** module.
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationBlankIndustryTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml
similarity index 89%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationBlankIndustryTest.xml
rename to app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml
index a266cdff269ab..8649eac484d94 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationBlankIndustryTest.xml
+++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationEnableDisableAnalyticsTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml
similarity index 94%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationEnableDisableAnalyticsTest.xml
rename to app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml
index 8e371d24cbe4a..8b0714cd2ef65 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationEnableDisableAnalyticsTest.xml
+++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml
@@ -6,7 +6,7 @@
*/
-->
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationIndustryTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml
similarity index 89%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationIndustryTest.xml
rename to app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml
index 7a5c67095a50c..6b38bccf33dd5 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationIndustryTest.xml
+++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationPermissionTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationPermissionTest.xml
similarity index 95%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationPermissionTest.xml
rename to app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationPermissionTest.xml
index b28f269f9b9a6..501dba3dba23b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationPermissionTest.xml
+++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationPermissionTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationTimeToSendDataTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml
similarity index 88%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationTimeToSendDataTest.xml
rename to app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml
index ad3593e1828eb..fc1ff7d18b51e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationTimeToSendDataTest.xml
+++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
@@ -23,6 +23,7 @@
+
diff --git a/app/code/Magento/Analytics/Test/Mftf/composer.json b/app/code/Magento/Analytics/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..cc288fbbb130d
--- /dev/null
+++ b/app/code/Magento/Analytics/Test/Mftf/composer.json
@@ -0,0 +1,20 @@
+{
+ "name": "magento/functional-test-module-analytics",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/functional-test-module-backend": "100.0.0-dev",
+ "magento/functional-test-module-config": "100.0.0-dev",
+ "magento/functional-test-module-integration": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev",
+ "magento/magento2-functional-testing-framework": "2.2.0"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php
index cbf06264096ac..407e323aeaae6 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php
@@ -65,11 +65,11 @@ public function testRender()
->method('getLabel')
->willReturn('Comment label');
$html = $this->additionalComment->render($this->abstractElementMock);
- $this->assertRegexp(
+ $this->assertRegExp(
"/New comment/",
$html
);
- $this->assertRegexp(
+ $this->assertRegExp(
"/Comment label/",
$html
);
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
index 462b3c909a7fd..d567d65882350 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
@@ -87,7 +87,7 @@ public function testRender()
$this->localeResolver->expects($this->once())
->method('getLocale')
->willReturn('en_US');
- $this->assertRegexp(
+ $this->assertRegExp(
"/Eastern Standard Time \(America\/New_York\)/",
$this->collectionTimeLabel->render($this->abstractElementMock)
);
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
index d643bc05cc615..78ff581f3de9d 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
@@ -74,7 +74,7 @@ public function testRender()
$this->abstractElementMock->expects($this->any())
->method('getComment')
->willReturn('Subscription status: Enabled');
- $this->assertRegexp(
+ $this->assertRegExp(
"/Subscription status: Enabled/",
$this->subscriptionStatusLabel->render($this->abstractElementMock)
);
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
index abce48c36c86a..6a0cecc781062 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
@@ -65,7 +65,7 @@ public function testRender()
->method('getHint')
->willReturn('New hint');
$html = $this->vertical->render($this->abstractElementMock);
- $this->assertRegexp(
+ $this->assertRegExp(
"/New comment/",
$html
);
diff --git a/app/code/Magento/Analytics/Test/Unit/Model/Connector/Http/JsonConverterTest.php b/app/code/Magento/Analytics/Test/Unit/Model/Connector/Http/JsonConverterTest.php
index 5ad8eebfc7ad3..251f0d1474083 100644
--- a/app/code/Magento/Analytics/Test/Unit/Model/Connector/Http/JsonConverterTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Model/Connector/Http/JsonConverterTest.php
@@ -55,6 +55,9 @@ public function testConvertBody($unserializedResult, $expected)
$this->assertEquals($expected, $this->converter->fromBody('body'));
}
+ /**
+ * @return array
+ */
public function convertBodyDataProvider()
{
return [
diff --git a/app/code/Magento/Analytics/Test/Unit/ReportXml/DB/ReportValidatorTest.php b/app/code/Magento/Analytics/Test/Unit/ReportXml/DB/ReportValidatorTest.php
index d7dcf50620550..ac141fae4be66 100644
--- a/app/code/Magento/Analytics/Test/Unit/ReportXml/DB/ReportValidatorTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/ReportXml/DB/ReportValidatorTest.php
@@ -79,9 +79,9 @@ protected function setUp()
* @dataProvider errorDataProvider
* @param string $reportName
* @param array $result
- * @param \PHPUnit_Framework_MockObject_Stub $queryReturnStub
+ * @param \PHPUnit\Framework\MockObject\Stub $queryReturnStub
*/
- public function testValidate($reportName, $result, \PHPUnit_Framework_MockObject_Stub $queryReturnStub)
+ public function testValidate($reportName, $result, \PHPUnit\Framework\MockObject\Stub $queryReturnStub)
{
$connectionName = 'testConnection';
$this->queryFactoryMock->expects($this->once())
diff --git a/app/code/Magento/AsynchronousOperations/Test/Mftf/README.md b/app/code/Magento/AsynchronousOperations/Test/Mftf/README.md
new file mode 100644
index 0000000000000..2f73e44149f2c
--- /dev/null
+++ b/app/code/Magento/AsynchronousOperations/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Asynchronous Operations Functional Tests
+
+The Functional Test Module for **Magento Asynchronous Operations** module.
diff --git a/app/code/Magento/AsynchronousOperations/Test/Mftf/composer.json b/app/code/Magento/AsynchronousOperations/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..baadc0d0d914a
--- /dev/null
+++ b/app/code/Magento/AsynchronousOperations/Test/Mftf/composer.json
@@ -0,0 +1,24 @@
+{
+ "name": "magento/functional-test-module-asynchronous-operations",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/framework-bulk": "100.0.0-dev",
+ "magento/functional-test-module-authorization": "100.0.0-dev",
+ "magento/functional-test-module-backend": "100.0.0-dev",
+ "magento/functional-test-module-ui": "100.0.0-dev",
+ "magento/functional-test-module-user": "100.0.0-dev",
+ "php": "~7.1.3||~7.2.0"
+ },
+ "suggest": {
+ "magento/functional-test-module-admin-notification": "100.0.0-dev",
+ "magento/functional-test-module-logging": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "proprietary"
+ ]
+}
diff --git a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/BulkStatusTest.php b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/BulkStatusTest.php
index 7a2f7941f9c04..a5a75736d2441 100644
--- a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/BulkStatusTest.php
+++ b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/BulkStatusTest.php
@@ -174,6 +174,9 @@ public function testGetOperationsCountByBulkIdAndStatus()
$this->assertEquals($size, $this->model->getOperationsCountByBulkIdAndStatus($bulkUuid, $status));
}
+ /**
+ * @return array
+ */
public function getFailedOperationsByBulkIdDataProvider()
{
return [
diff --git a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/Entity/BulkSummaryMapperTest.php b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/Entity/BulkSummaryMapperTest.php
index 725eae3c01ea3..9543911c037d8 100644
--- a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/Entity/BulkSummaryMapperTest.php
+++ b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/Entity/BulkSummaryMapperTest.php
@@ -95,6 +95,9 @@ public function testEntityToDatabase($identifier, $result)
$this->assertEquals($result, $this->model->entityToDatabase($entityType, $data));
}
+ /**
+ * @return array
+ */
public function entityToDatabaseDataProvider()
{
return [
diff --git a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/ResourceModel/System/Message/Collection/Synchronized/PluginTest.php b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/ResourceModel/System/Message/Collection/Synchronized/PluginTest.php
index 68864d12e7672..6a51258b34afc 100644
--- a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/ResourceModel/System/Message/Collection/Synchronized/PluginTest.php
+++ b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/ResourceModel/System/Message/Collection/Synchronized/PluginTest.php
@@ -153,6 +153,9 @@ public function testAfterTo($operationDetails)
$this->assertEquals(2, $result2['totalRecords']);
}
+ /**
+ * @return array
+ */
public function afterToDataProvider()
{
return [
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/LICENSE.txt b/app/code/Magento/Authorization/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/LICENSE.txt
rename to app/code/Magento/Authorization/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/LICENSE_AFL.txt b/app/code/Magento/Authorization/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/LICENSE_AFL.txt
rename to app/code/Magento/Authorization/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/Authorization/Test/Mftf/README.md b/app/code/Magento/Authorization/Test/Mftf/README.md
new file mode 100644
index 0000000000000..1d44ab2e73052
--- /dev/null
+++ b/app/code/Magento/Authorization/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Authorization Functional Tests
+
+The Functional Test Module for **Magento Authorization** module.
diff --git a/app/code/Magento/Authorization/Test/Mftf/composer.json b/app/code/Magento/Authorization/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..fddc5acb034ed
--- /dev/null
+++ b/app/code/Magento/Authorization/Test/Mftf/composer.json
@@ -0,0 +1,17 @@
+{
+ "name": "magento/functional-test-module-authorization",
+ "description": "Authorization module provides access to Magento ACL functionality.",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-backend": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php b/app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php
index c214cfc832597..cd51c0f9bc4b8 100644
--- a/app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php
+++ b/app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php
@@ -78,6 +78,9 @@ public function testGetAllowedResourcesByUser()
);
}
+ /**
+ * @return AclRetriever
+ */
protected function createAclRetriever()
{
$this->roleMock = $this->createPartialMock(\Magento\Authorization\Model\Role::class, ['getId', '__wakeup']);
diff --git a/app/code/Magento/Authorizenet/Model/Directpost.php b/app/code/Magento/Authorizenet/Model/Directpost.php
index 5476fd05a0fed..d5c11ab54cd94 100644
--- a/app/code/Magento/Authorizenet/Model/Directpost.php
+++ b/app/code/Magento/Authorizenet/Model/Directpost.php
@@ -814,10 +814,14 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
{
try {
$response = $this->getResponse();
- if ($voidPayment && $response->getXTransId() && strtoupper($response->getXType())
- == self::REQUEST_TYPE_AUTH_ONLY
+ if ($voidPayment
+ && $response->getXTransId()
+ && strtoupper($response->getXType()) == self::REQUEST_TYPE_AUTH_ONLY
) {
- $order->getPayment()->setTransactionId(null)->setParentTransactionId($response->getXTransId())->void();
+ $order->getPayment()
+ ->setTransactionId(null)
+ ->setParentTransactionId($response->getXTransId())
+ ->void($response);
}
$order->registerCancellation($message)->save();
} catch (\Exception $e) {
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/LICENSE.txt b/app/code/Magento/Authorizenet/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/LICENSE.txt
rename to app/code/Magento/Authorizenet/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/LICENSE_AFL.txt b/app/code/Magento/Authorizenet/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/LICENSE_AFL.txt
rename to app/code/Magento/Authorizenet/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/Authorizenet/Test/Mftf/README.md b/app/code/Magento/Authorizenet/Test/Mftf/README.md
new file mode 100644
index 0000000000000..9391126a85c94
--- /dev/null
+++ b/app/code/Magento/Authorizenet/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Authorizenet Functional Tests
+
+The Functional Test Module for **Magento Authorizenet** module.
diff --git a/app/code/Magento/Authorizenet/Test/Mftf/composer.json b/app/code/Magento/Authorizenet/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..b02806a0ae3f3
--- /dev/null
+++ b/app/code/Magento/Authorizenet/Test/Mftf/composer.json
@@ -0,0 +1,25 @@
+{
+ "name": "magento/functional-test-module-authorizenet",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-backend": "100.0.0-dev",
+ "magento/functional-test-module-catalog": "100.0.0-dev",
+ "magento/functional-test-module-checkout": "100.0.0-dev",
+ "magento/functional-test-module-payment": "100.0.0-dev",
+ "magento/functional-test-module-quote": "100.0.0-dev",
+ "magento/functional-test-module-sales": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev"
+ },
+ "suggest": {
+ "magento/functional-test-module-config": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "proprietary"
+ ]
+}
diff --git a/app/code/Magento/Authorizenet/Test/Unit/Model/Directpost/ResponseTest.php b/app/code/Magento/Authorizenet/Test/Unit/Model/Directpost/ResponseTest.php
index 6e5d55e52675e..15c7eecb09a69 100644
--- a/app/code/Magento/Authorizenet/Test/Unit/Model/Directpost/ResponseTest.php
+++ b/app/code/Magento/Authorizenet/Test/Unit/Model/Directpost/ResponseTest.php
@@ -37,6 +37,9 @@ public function testGenerateHash($merchantMd5, $merchantApiLogin, $amount, $amou
);
}
+ /**
+ * @return array
+ */
public function generateHashDataProvider()
{
return [
@@ -57,6 +60,13 @@ public function generateHashDataProvider()
];
}
+ /**
+ * @param $merchantMd5
+ * @param $merchantApiLogin
+ * @param $amount
+ * @param $transactionId
+ * @return string
+ */
protected function generateHash($merchantMd5, $merchantApiLogin, $amount, $transactionId)
{
return strtoupper(md5($merchantMd5 . $merchantApiLogin . $transactionId . $amount));
diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
index 723deab1e9f7e..eff49c3b75ab2 100644
--- a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
+++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
@@ -124,14 +124,18 @@ protected function _toHtml()
if (!$this->_depends) {
return '';
}
- return '';
+
+ $params = $this->_getDependsJson();
+
+ if ($this->_configOptions) {
+ $params .= ', ' . $this->_jsonEncoder->encode($this->_configOptions);
+ }
+
+ return "";
}
/**
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
index 88d1560026cbd..1d8d658267020 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
@@ -26,7 +26,6 @@ public function getValue($index = null)
{
if ($index) {
if ($data = $this->getData('value', 'orig_' . $index)) {
- // date('Y-m-d', strtotime($data));
return $data;
}
return null;
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
index 3fa60faad45c8..185b1116b8f67 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
@@ -277,13 +277,13 @@ public function getGridIdsJson()
}
/** @var \Magento\Framework\Data\Collection $allIdsCollection */
$allIdsCollection = clone $this->getParentBlock()->getCollection();
-
+
if ($this->getMassactionIdField()) {
$massActionIdField = $this->getMassactionIdField();
} else {
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
}
-
+
$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
if (!empty($gridIds)) {
return join(",", $gridIds);
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php
index d59d3858179e0..8e0fce2b16cc9 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php
@@ -274,13 +274,13 @@ public function getGridIdsJson()
/** @var \Magento\Framework\Data\Collection $allIdsCollection */
$allIdsCollection = clone $this->getParentBlock()->getCollection();
-
+
if ($this->getMassactionIdField()) {
$massActionIdField = $this->getMassactionIdField();
} else {
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
}
-
+
$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
if (!empty($gridIds)) {
diff --git a/app/code/Magento/Backend/Block/Widget/Tabs.php b/app/code/Magento/Backend/Block/Widget/Tabs.php
index 7f146e19e8c6e..333904e398cf5 100644
--- a/app/code/Magento/Backend/Block/Widget/Tabs.php
+++ b/app/code/Magento/Backend/Block/Widget/Tabs.php
@@ -117,6 +117,7 @@ public function addTab($tabId, $tab)
if (empty($tabId)) {
throw new \Exception(__('Please correct the tab configuration and try again. Tab Id should be not empty'));
}
+
if (is_array($tab)) {
$this->_tabs[$tabId] = new \Magento\Framework\DataObject($tab);
} elseif ($tab instanceof \Magento\Framework\DataObject) {
@@ -126,6 +127,7 @@ public function addTab($tabId, $tab)
}
} elseif (is_string($tab)) {
$this->_addTabByName($tab, $tabId);
+
if (!$this->_tabs[$tabId] instanceof TabInterface) {
unset($this->_tabs[$tabId]);
return $this;
@@ -133,6 +135,7 @@ public function addTab($tabId, $tab)
} else {
throw new \Exception(__('Please correct the tab configuration and try again.'));
}
+
if ($this->_tabs[$tabId]->getUrl() === null) {
$this->_tabs[$tabId]->setUrl('#');
}
@@ -143,10 +146,7 @@ public function addTab($tabId, $tab)
$this->_tabs[$tabId]->setId($tabId);
$this->_tabs[$tabId]->setTabId($tabId);
-
- if ($this->_activeTab === null) {
- $this->_activeTab = $tabId;
- }
+
if (true === $this->_tabs[$tabId]->getActive()) {
$this->setActiveTab($tabId);
}
@@ -235,33 +235,108 @@ protected function _setActiveTab($tabId)
*/
protected function _beforeToHtml()
{
+ $this->_tabs = $this->reorderTabs();
+
if ($activeTab = $this->getRequest()->getParam('active_tab')) {
$this->setActiveTab($activeTab);
} elseif ($activeTabId = $this->_authSession->getActiveTabId()) {
$this->_setActiveTab($activeTabId);
}
- $_new = [];
+ if ($this->_activeTab === null && !empty($this->_tabs)) {
+ /** @var TabInterface $tab */
+ $this->_activeTab = (reset($this->_tabs))->getId();
+ }
+
+ $this->assign('tabs', $this->_tabs);
+ return parent::_beforeToHtml();
+ }
+
+ /**
+ * Reorder the tabs.
+ *
+ * @return array
+ */
+ private function reorderTabs()
+ {
+ $orderByIdentity = [];
+ $orderByPosition = [];
+ $position = 100;
+
+ /**
+ * Set the initial positions for each tab.
+ *
+ * @var string $key
+ * @var TabInterface $tab
+ */
foreach ($this->_tabs as $key => $tab) {
- foreach ($this->_tabs as $k => $t) {
- if ($t->getAfter() == $key) {
- $_new[$key] = $tab;
- $_new[$k] = $t;
- } else {
- if (!$tab->getAfter() || !in_array($tab->getAfter(), array_keys($this->_tabs))) {
- $_new[$key] = $tab;
- }
- }
- }
+ $tab->setPosition($position);
+
+ $orderByIdentity[$key] = $tab;
+ $orderByPosition[$position] = $tab;
+
+ $position += 100;
}
- $this->_tabs = $_new;
- unset($_new);
+ return $this->applyTabsCorrectOrder($orderByPosition, $orderByIdentity);
+ }
- $this->assign('tabs', $this->_tabs);
- return parent::_beforeToHtml();
+ /**
+ * @param array $orderByPosition
+ * @param array $orderByIdentity
+ *
+ * @return array
+ */
+ private function applyTabsCorrectOrder(array $orderByPosition, array $orderByIdentity)
+ {
+ $positionFactor = 1;
+
+ /**
+ * Rearrange the positions by using the after tag for each tab.
+ *
+ * @var integer $position
+ * @var TabInterface $tab
+ */
+ foreach ($orderByPosition as $position => $tab) {
+ if (!$tab->getAfter() || !in_array($tab->getAfter(), array_keys($orderByIdentity))) {
+ $positionFactor = 1;
+ continue;
+ }
+
+ $grandPosition = $orderByIdentity[$tab->getAfter()]->getPosition();
+ $newPosition = $grandPosition + $positionFactor;
+
+ unset($orderByPosition[$position]);
+ $orderByPosition[$newPosition] = $tab;
+ $tab->setPosition($newPosition);
+
+ $positionFactor++;
+ }
+
+ return $this->finalTabsSortOrder($orderByPosition);
}
+ /**
+ * Apply the last sort order to tabs.
+ *
+ * @param array $orderByPosition
+ *
+ * @return array
+ */
+ private function finalTabsSortOrder(array $orderByPosition)
+ {
+ ksort($orderByPosition);
+
+ $ordered = [];
+
+ /** @var TabInterface $tab */
+ foreach ($orderByPosition as $tab) {
+ $ordered[$tab->getId()] = $tab;
+ }
+
+ return $ordered;
+ }
+
/**
* @return string
*/
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/LoginActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginActionGroup.xml
similarity index 77%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/LoginActionGroup.xml
rename to app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginActionGroup.xml
index 4367214edbc1b..bcff329d79dad 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/LoginActionGroup.xml
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/LoginAsAdminActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml
similarity index 81%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/LoginAsAdminActionGroup.xml
rename to app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml
index 2f7ce506acb1d..8a24ab2a2f185 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/LoginAsAdminActionGroup.xml
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/LogoutActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/LogoutActionGroup.xml
new file mode 100644
index 0000000000000..cdaf231e9dda0
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/LogoutActionGroup.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/SecondaryGridActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/SecondaryGridActionGroup.xml
similarity index 86%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/SecondaryGridActionGroup.xml
rename to app/code/Magento/Backend/Test/Mftf/ActionGroup/SecondaryGridActionGroup.xml
index 7c2c1c3c5702b..9fe5f54f1db3c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/SecondaryGridActionGroup.xml
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/SecondaryGridActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/SortByIdDescendingActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/SortByIdDescendingActionGroup.xml
similarity index 86%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/SortByIdDescendingActionGroup.xml
rename to app/code/Magento/Backend/Test/Mftf/ActionGroup/SortByIdDescendingActionGroup.xml
index 5c130df74b66c..b7b63c5d9a62e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/SortByIdDescendingActionGroup.xml
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/SortByIdDescendingActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/app/code/Magento/Backend/Test/Mftf/Data/BackenedData.xml b/app/code/Magento/Backend/Test/Mftf/Data/BackenedData.xml
new file mode 100644
index 0000000000000..286685315a7bc
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Data/BackenedData.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ data
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/LICENSE.txt b/app/code/Magento/Backend/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/LICENSE.txt
rename to app/code/Magento/Backend/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/LICENSE_AFL.txt b/app/code/Magento/Backend/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/LICENSE_AFL.txt
rename to app/code/Magento/Backend/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/Backend/Test/Mftf/Page/AdminConfigurationStoresPage.xml b/app/code/Magento/Backend/Test/Mftf/Page/AdminConfigurationStoresPage.xml
new file mode 100644
index 0000000000000..a53938d534644
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Page/AdminConfigurationStoresPage.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Page/AdminLoginPage.xml b/app/code/Magento/Backend/Test/Mftf/Page/AdminLoginPage.xml
new file mode 100644
index 0000000000000..ca0797f7ded26
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Page/AdminLoginPage.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Page/AdminLogoutPage.xml b/app/code/Magento/Backend/Test/Mftf/Page/AdminLogoutPage.xml
new file mode 100644
index 0000000000000..75ef114ec64b6
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Page/AdminLogoutPage.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/README.md b/app/code/Magento/Backend/Test/Mftf/README.md
new file mode 100644
index 0000000000000..ed8a3a3bc2c49
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Backend Functional Tests
+
+The Functional Test Module for **Magento Backend** module.
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminConfirmationModalSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminConfirmationModalSection.xml
similarity index 77%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminConfirmationModalSection.xml
rename to app/code/Magento/Backend/Test/Mftf/Section/AdminConfirmationModalSection.xml
index f7b2f246b55be..dc512e66528ac 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminConfirmationModalSection.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminConfirmationModalSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminGridTableSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminGridTableSection.xml
new file mode 100644
index 0000000000000..3e8f8a8f2e412
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminGridTableSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminHeaderSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminHeaderSection.xml
new file mode 100644
index 0000000000000..92b06878ab87f
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminHeaderSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminLoginFormSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminLoginFormSection.xml
new file mode 100644
index 0000000000000..b65a969e334c4
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminLoginFormSection.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml
new file mode 100644
index 0000000000000..f8d259cc8e490
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml
new file mode 100644
index 0000000000000..ff5e02397cbff
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminSecondaryGridSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminSecondaryGridSection.xml
new file mode 100644
index 0000000000000..ea84ce7ea0c4f
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminSecondaryGridSection.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Test/AdminLoginTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml
similarity index 87%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Test/AdminLoginTest.xml
rename to app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml
index 3d0f6d5dfcea9..99d0f6654738a 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Test/AdminLoginTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/app/code/Magento/Backend/Test/Mftf/composer.json b/app/code/Magento/Backend/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..adc3900cfe054
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/composer.json
@@ -0,0 +1,35 @@
+{
+ "name": "magento/functional-test-module-backend",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-backup": "100.0.0-dev",
+ "magento/functional-test-module-catalog": "100.0.0-dev",
+ "magento/functional-test-module-config": "100.0.0-dev",
+ "magento/functional-test-module-customer": "100.0.0-dev",
+ "magento/functional-test-module-developer": "100.0.0-dev",
+ "magento/functional-test-module-directory": "100.0.0-dev",
+ "magento/functional-test-module-eav": "100.0.0-dev",
+ "magento/functional-test-module-quote": "100.0.0-dev",
+ "magento/functional-test-module-reports": "100.0.0-dev",
+ "magento/functional-test-module-require-js": "100.0.0-dev",
+ "magento/functional-test-module-sales": "100.0.0-dev",
+ "magento/functional-test-module-security": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev",
+ "magento/functional-test-module-translation": "100.0.0-dev",
+ "magento/functional-test-module-ui": "100.0.0-dev",
+ "magento/functional-test-module-user": "100.0.0-dev"
+ },
+ "suggest": {
+ "magento/functional-test-module-theme": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php
index 7e4c426de9452..88b994a6b93b7 100644
--- a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php
+++ b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php
@@ -146,6 +146,9 @@ public function testProcessNotLoggedInUser($isIFrameParam, $isAjaxParam, $isForw
$this->assertEquals($expectedResult, $this->plugin->aroundDispatch($subject, $proceed, $request));
}
+ /**
+ * @return array
+ */
public function processNotLoggedInUserDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/MassactionKeyTest.php b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/MassactionKeyTest.php
index 2f808eaf2d1b8..d793a80cdeacf 100644
--- a/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/MassactionKeyTest.php
+++ b/app/code/Magento/Backend/Test/Unit/App/Action/Plugin/MassactionKeyTest.php
@@ -74,6 +74,9 @@ public function testBeforeDispatchWhenMassactionPrepareKeyRequestExists($postDat
$this->plugin->beforeDispatch($this->subjectMock, $this->requestMock);
}
+ /**
+ * @return array
+ */
public function beforeDispatchDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/App/Action/Stub/ActionStub.php b/app/code/Magento/Backend/Test/Unit/App/Action/Stub/ActionStub.php
index 4eff6218961af..2d60bef3f3e8c 100644
--- a/app/code/Magento/Backend/Test/Unit/App/Action/Stub/ActionStub.php
+++ b/app/code/Magento/Backend/Test/Unit/App/Action/Stub/ActionStub.php
@@ -8,6 +8,9 @@
class ActionStub extends \Magento\Backend\App\Action
{
+ /**
+ * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void
+ */
public function execute()
{
// Empty method stub for test
diff --git a/app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php b/app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php
index bc7dce6f20bac..642c6283decae 100644
--- a/app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php
+++ b/app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php
@@ -118,6 +118,9 @@ public function testIsHostBackend($url, $host, $useCustomAdminUrl, $customAdminU
$this->assertEquals($this->model->isHostBackend(), $expectedValue);
}
+ /**
+ * @return array
+ */
public function hostsDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/App/ConfigTest.php b/app/code/Magento/Backend/Test/Unit/App/ConfigTest.php
index 114c57867badf..53640a81e722f 100644
--- a/app/code/Magento/Backend/Test/Unit/App/ConfigTest.php
+++ b/app/code/Magento/Backend/Test/Unit/App/ConfigTest.php
@@ -70,6 +70,9 @@ public function testIsSetFlag($configPath, $configValue, $expectedResult)
$this->assertEquals($expectedResult, $this->model->isSetFlag($configPath));
}
+ /**
+ * @return array
+ */
public function isSetFlagDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Block/AnchorRendererTest.php b/app/code/Magento/Backend/Test/Unit/Block/AnchorRendererTest.php
index f52f4ab337712..eccb08e788a95 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/AnchorRendererTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/AnchorRendererTest.php
@@ -141,6 +141,9 @@ public function testRenderAnchorLevelIsNotOne($hasTarget)
);
}
+ /**
+ * @return array
+ */
public function targetDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Cache/AdditionalTest.php b/app/code/Magento/Backend/Test/Unit/Block/Cache/AdditionalTest.php
index d68a1e4a920b2..915b3fe21eaa8 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Cache/AdditionalTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Cache/AdditionalTest.php
@@ -88,6 +88,9 @@ public function testIsInProductionMode($mode, $expected)
$this->assertEquals($expected, $this->additionalBlock->isInProductionMode());
}
+ /**
+ * @return array
+ */
public function isInProductionModeDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Block/MenuItemCheckerTest.php b/app/code/Magento/Backend/Test/Unit/Block/MenuItemCheckerTest.php
index a79050faeb84a..aca719b2e65e9 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/MenuItemCheckerTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/MenuItemCheckerTest.php
@@ -74,6 +74,9 @@ public function testIsItemActiveLevelNotZero()
);
}
+ /**
+ * @return array
+ */
public function dataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/ButtonTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/ButtonTest.php
index bcf5d1adbc12b..e64d1a97af4ae 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Widget/ButtonTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/ButtonTest.php
@@ -61,6 +61,9 @@ public function testGetAttributesHtml($data, $expect)
$this->assertRegExp($expect, $attributes);
}
+ /**
+ * @return array
+ */
public function getAttributesHtmlDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php
index 35e21d7d194aa..81f104dbb636b 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php
@@ -54,6 +54,9 @@ public function testRender(array $rowData, $expectedResult)
$this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\DataObject($rowData)));
}
+ /**
+ * @return array
+ */
public function renderDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/RadioTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/RadioTest.php
index 67ead0ddd8f35..6f838634c6bed 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/RadioTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Renderer/RadioTest.php
@@ -63,6 +63,9 @@ public function testRender(array $rowData, $expectedResult)
$this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\DataObject($rowData)));
}
+ /**
+ * @return array
+ */
public function renderDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php
index c5c56fd75fbe7..2e6bed4783e7f 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php
@@ -86,6 +86,9 @@ public function testGetSortable($value)
$this->assertFalse($this->_block->getSortable());
}
+ /**
+ * @return array
+ */
public function getSortableDataProvider()
{
return ['zero' => ['0'], 'false' => [false], 'null' => [null]];
@@ -374,6 +377,9 @@ public function testColumnIsGrouped($groupedData, $expected)
$this->assertEquals($expected, $block->isGrouped());
}
+ /**
+ * @return array
+ */
public function columnGroupedDataProvider()
{
return [[[], false], [['grouped' => 0], false], [['grouped' => 1], true]];
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Massaction/ExtendedTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Massaction/ExtendedTest.php
index 4525de1fee542..f81928c4540ba 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Massaction/ExtendedTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Massaction/ExtendedTest.php
@@ -152,6 +152,9 @@ public function testGetGridIdsJsonWithUseSelectAll(array $items, $result)
$this->assertEquals($result, $this->_block->getGridIdsJson());
}
+ /**
+ * @return array
+ */
public function dataProviderGetGridIdsJsonWithUseSelectAll()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/MassactionTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/MassactionTest.php
index 29ce448a04ecb..e8143b5f6b43a 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/MassactionTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/MassactionTest.php
@@ -243,6 +243,9 @@ public function testSelected($param, $expectedJson, $expected)
$this->assertEquals($expected, $this->_block->getSelected());
}
+ /**
+ * @return array
+ */
public function selectedDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/TabTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/TabTest.php
index 1670233324f8e..ad7c6fa99afd2 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Widget/TabTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/TabTest.php
@@ -34,6 +34,9 @@ public function testGetters($method, $field, $value, $expected)
$this->assertEquals($expected, $object->{$method}());
}
+ /**
+ * @return array
+ */
public function dataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Helper/DataTest.php b/app/code/Magento/Backend/Test/Unit/Helper/DataTest.php
index b7a33ab883b69..50c3a8571b48f 100644
--- a/app/code/Magento/Backend/Test/Unit/Helper/DataTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Helper/DataTest.php
@@ -60,6 +60,9 @@ public function testPrepareFilterStringValues(array $inputString, array $expecte
$this->assertEquals($expected, $actual);
}
+ /**
+ * @return array
+ */
public function getPrepareFilterStringValuesDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php b/app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php
index 391deac5a1f4e..f1a4bc355b08e 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php
@@ -120,6 +120,9 @@ public function testRefreshAcl($isUserPassedViaParams)
$this->assertSame($aclMock, $this->session->getAcl());
}
+ /**
+ * @return array
+ */
public function refreshAclDataProvider()
{
return [
@@ -234,6 +237,9 @@ public function testIsAllowed($isUserDefined, $isAclDefined, $isAllowed, $expect
$this->assertEquals($expectedResult, $this->session->isAllowed('resource'));
}
+ /**
+ * @return array
+ */
public function isAllowedDataProvider()
{
return [
@@ -254,6 +260,9 @@ public function testFirstPageAfterLogin($isFirstPageAfterLogin)
$this->assertEquals($isFirstPageAfterLogin, $this->session->isFirstPageAfterLogin());
}
+ /**
+ * @return array
+ */
public function firstPageAfterLoginDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php b/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php
index a2e827c4a9938..cce83c33a2aaa 100755
--- a/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php
@@ -29,6 +29,9 @@ public function testBeforeSave($value, $errorMessage = null)
$this->assertEquals($model, $object);
}
+ /**
+ * @return array
+ */
public function adminSessionLifetimeDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php b/app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php
index bb1de1b10d5d4..260a38a481b3c 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/Menu/ConfigTest.php
@@ -140,6 +140,9 @@ public function testGetMenuExceptionLogged($expectedException)
$this->model->getMenu();
}
+ /**
+ * @return array
+ */
public function getMenuExceptionLoggedDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Model/Menu/Item/ValidatorTest.php b/app/code/Magento/Backend/Test/Unit/Model/Menu/Item/ValidatorTest.php
index 3c1f1e43900be..dec85f4b98e3d 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/Menu/Item/ValidatorTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/Menu/Item/ValidatorTest.php
@@ -79,6 +79,9 @@ public function testValidateWithMissingRequiredParamThrowsException($requiredPar
}
}
+ /**
+ * @return array
+ */
public function requiredParamsProvider()
{
return [['id'], ['title'], ['resource']];
@@ -102,6 +105,9 @@ public function testValidateWithNonValidPrimitivesThrowsException($param, $inval
}
}
+ /**
+ * @return array
+ */
public function invalidParamsProvider()
{
return [
diff --git a/app/code/Magento/Backend/Test/Unit/Model/MenuBuilderTest.php b/app/code/Magento/Backend/Test/Unit/Model/MenuBuilderTest.php
index 23d1ed5da1425..5d026a2b1fc32 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/MenuBuilderTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/MenuBuilderTest.php
@@ -35,6 +35,9 @@ public function testAfterGetResult($isPub, $times)
);
}
+ /**
+ * @return array
+ */
public function afterGetResultDataProvider()
{
return [[true, 1], [false, 0],];
diff --git a/app/code/Magento/Backend/Test/Unit/Model/Session/AdminConfigTest.php b/app/code/Magento/Backend/Test/Unit/Model/Session/AdminConfigTest.php
index 49fcdf4fc8770..00ae8c2f44a69 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/Session/AdminConfigTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/Session/AdminConfigTest.php
@@ -136,6 +136,9 @@ public function testSetSessionSettingsByConstructor($secureRequest)
$this->assertSame($secureRequest, $adminConfig->getCookieSecure());
}
+ /**
+ * @return array
+ */
public function requestSecureDataProvider()
{
return [[true], [false]];
diff --git a/app/code/Magento/Backend/Test/Unit/Model/Widget/Grid/ParserTest.php b/app/code/Magento/Backend/Test/Unit/Model/Widget/Grid/ParserTest.php
index 569c5ffc16c9c..98f1965477b2c 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/Widget/Grid/ParserTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/Widget/Grid/ParserTest.php
@@ -58,6 +58,9 @@ public function testIsOperation($operation, $expected)
$this->assertEquals($expected, $this->_model->isOperation($operation));
}
+ /**
+ * @return array
+ */
public function isOperationDataProvider()
{
return [
diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml
index 86a2f3b772d2a..be1b836d64802 100644
--- a/app/code/Magento/Backend/etc/adminhtml/system.xml
+++ b/app/code/Magento/Backend/etc/adminhtml/system.xml
@@ -432,7 +432,7 @@
Magento\Config\Model\Config\Source\Yesno
Magento\Config\Model\Config\Backend\Store
- Warning! When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).]]>
+ Warning! When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).]]>
diff --git a/app/code/Magento/Backend/i18n/en_US.csv b/app/code/Magento/Backend/i18n/en_US.csv
index f9f44f547e25b..bfedd56b14313 100644
--- a/app/code/Magento/Backend/i18n/en_US.csv
+++ b/app/code/Magento/Backend/i18n/en_US.csv
@@ -405,9 +405,9 @@ Web,Web
"Url Options","Url Options"
"Add Store Code to Urls","Add Store Code to Urls"
"
- Warning! When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).
+ Warning! When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
","
- Warning! When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).
+ Warning! When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
"
"Auto-redirect to Base URL","Auto-redirect to Base URL"
"Search Engine Optimization","Search Engine Optimization"
@@ -447,7 +447,7 @@ Tags,Tags
"404 Error
Page not found.
","404 Error
Page not found.
"
"Community Edition","Community Edition"
"Default Theme","Default Theme"
-"If no value is specified, the system default is used. The system default may be modified by third party extensions.","If no value is specified, the system default is used. The system default may be modified by third party extensions."
+"If no value is specified, the system default is used. The system default may be modified by third-party extensions.","If no value is specified, the system default is used. The system default may be modified by third-party extensions."
"Applied Theme","Applied Theme"
"Design Rule","Design Rule"
"User Agent Rules","User Agent Rules"
diff --git a/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml b/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml
index 19a4ab1388006..79c987383299f 100644
--- a/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml
+++ b/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml
@@ -12,7 +12,7 @@
- If no value is specified, the system default is used. The system default may be modified by third party extensions.
+ If no value is specified, the system default is used. The system default may be modified by third-party extensions.
text
theme_theme_id
@@ -92,7 +92,7 @@
-
+
-
- false
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/LICENSE.txt b/app/code/Magento/Backup/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/LICENSE.txt
rename to app/code/Magento/Backup/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/LICENSE_AFL.txt b/app/code/Magento/Backup/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/LICENSE_AFL.txt
rename to app/code/Magento/Backup/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/Backup/Test/Mftf/README.md b/app/code/Magento/Backup/Test/Mftf/README.md
new file mode 100644
index 0000000000000..6951acdf41400
--- /dev/null
+++ b/app/code/Magento/Backup/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Backup Functional Tests
+
+The Functional Test Module for **Magento Backup** module.
diff --git a/app/code/Magento/Backup/Test/Mftf/composer.json b/app/code/Magento/Backup/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..d7a6c804ab5b3
--- /dev/null
+++ b/app/code/Magento/Backup/Test/Mftf/composer.json
@@ -0,0 +1,19 @@
+{
+ "name": "magento/functional-test-module-backup",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-backend": "100.0.0-dev",
+ "magento/functional-test-module-cron": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php b/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php
index e89e604867baa..32abeac4c8ffb 100644
--- a/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php
+++ b/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php
@@ -85,7 +85,7 @@ public function handle(array $handlingSubject, array $response)
private function getCreditCardType($type)
{
$replaced = str_replace(' ', '-', strtolower($type));
- $mapper = $this->config->getCctypesMapper();
+ $mapper = $this->config->getCcTypesMapper();
return $mapper[$replaced];
}
diff --git a/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php b/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php
index 7c307185b4c22..8880f9c1b1a3e 100644
--- a/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php
+++ b/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php
@@ -157,7 +157,7 @@ private function convertDetailsToJSON($details)
private function getCreditCardType($type)
{
$replaced = str_replace(' ', '-', strtolower($type));
- $mapper = $this->config->getCctypesMapper();
+ $mapper = $this->config->getCcTypesMapper();
return $mapper[$replaced];
}
diff --git a/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php b/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
index fe30e790de07c..928769498a035 100644
--- a/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
+++ b/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
@@ -70,7 +70,7 @@ public function getConfig()
self::CODE => [
'isActive' => $this->config->isActive($storeId),
'clientToken' => $this->getClientToken(),
- 'ccTypesMapper' => $this->config->getCctypesMapper(),
+ 'ccTypesMapper' => $this->config->getCcTypesMapper(),
'sdkUrl' => $this->config->getSdkUrl(),
'countrySpecificCardTypes' => $this->config->getCountrySpecificCardTypeConfig($storeId),
'availableCardTypes' => $this->config->getAvailableCardTypes($storeId),
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/Data/BraintreeData.xml b/app/code/Magento/Braintree/Test/Mftf/Data/BraintreeData.xml
similarity index 92%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/Data/BraintreeData.xml
rename to app/code/Magento/Braintree/Test/Mftf/Data/BraintreeData.xml
index d5904edd94e9a..6e669a1b8bf4b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/Data/BraintreeData.xml
+++ b/app/code/Magento/Braintree/Test/Mftf/Data/BraintreeData.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
SampleTitle
SamplePaymentAction
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/LICENSE.txt b/app/code/Magento/Braintree/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/LICENSE.txt
rename to app/code/Magento/Braintree/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/LICENSE_AFL.txt b/app/code/Magento/Braintree/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/LICENSE_AFL.txt
rename to app/code/Magento/Braintree/Test/Mftf/LICENSE_AFL.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/Metadata/braintree_config-meta.xml b/app/code/Magento/Braintree/Test/Mftf/Metadata/braintree_config-meta.xml
similarity index 91%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/Metadata/braintree_config-meta.xml
rename to app/code/Magento/Braintree/Test/Mftf/Metadata/braintree_config-meta.xml
index dc3e8e6c5dac1..e4d02a58b5bf4 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/Metadata/braintree_config-meta.xml
+++ b/app/code/Magento/Braintree/Test/Mftf/Metadata/braintree_config-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
-
+
Magento\Config\Block\System\Config\Form\Fieldset
@@ -125,7 +125,7 @@
payment/braintree/sort_order
-
+
Magento\Config\Block\System\Config\Form\Fieldset
@@ -146,7 +146,7 @@
payment/braintree/countrycreditcard
-
+
Magento\Config\Block\System\Config\Form\Fieldset
@@ -215,7 +215,7 @@
payment/braintree_paypal/skip_order_review
-
+
Magento\Config\Block\System\Config\Form\Fieldset
@@ -239,7 +239,7 @@
payment/braintree/verify_specific_countries
-
+
getProductId() == $optionProduct->getId()) {
- foreach ($options as &$option) {
- if ($option->getCode() == 'selection_qty_' . $selection->getSelectionId()) {
+ foreach ($options as $quoteItemOption) {
+ if ($quoteItemOption->getCode() == 'selection_qty_' . $selection->getSelectionId()) {
if ($optionUpdateFlag) {
- $option->setValue(intval($option->getValue()));
+ $quoteItemOption->setValue(intval($quoteItemOption->getValue()));
} else {
- $option->setValue($value);
+ $quoteItemOption->setValue($value);
}
}
}
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/AdminBundleProductActionGroup.xml b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/AdminBundleProductActionGroup.xml
similarity index 93%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/AdminBundleProductActionGroup.xml
rename to app/code/Magento/Bundle/Test/Mftf/ActionGroup/AdminBundleProductActionGroup.xml
index 241bd19e1b607..a5e62fca9483c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/AdminBundleProductActionGroup.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/AdminBundleProductActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/AdminClearFiltersActionGroup.xml b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/AdminClearFiltersActionGroup.xml
similarity index 75%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/AdminClearFiltersActionGroup.xml
rename to app/code/Magento/Bundle/Test/Mftf/ActionGroup/AdminClearFiltersActionGroup.xml
index cac724588937a..f3e5eff3834e3 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/AdminClearFiltersActionGroup.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/AdminClearFiltersActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/BundleProductFilterActionGroup.xml b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/BundleProductFilterActionGroup.xml
similarity index 78%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/BundleProductFilterActionGroup.xml
rename to app/code/Magento/Bundle/Test/Mftf/ActionGroup/BundleProductFilterActionGroup.xml
index cb0e9558976f5..8ab7af1d0318e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/BundleProductFilterActionGroup.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/BundleProductFilterActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/app/code/Magento/Bundle/Test/Mftf/ActionGroup/CreateBundleProductActionGroup.xml b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/CreateBundleProductActionGroup.xml
new file mode 100644
index 0000000000000..af8fc1459d9e3
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/CreateBundleProductActionGroup.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/EnableDisableProductActionGroup.xml b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/EnableDisableProductActionGroup.xml
similarity index 90%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/EnableDisableProductActionGroup.xml
rename to app/code/Magento/Bundle/Test/Mftf/ActionGroup/EnableDisableProductActionGroup.xml
index cdd13185cd0e3..2ae9748c773e8 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/EnableDisableProductActionGroup.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/EnableDisableProductActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml
new file mode 100644
index 0000000000000..48697d43ec824
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/BundleLinkData.xml b/app/code/Magento/Bundle/Test/Mftf/Data/BundleLinkData.xml
similarity index 76%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/BundleLinkData.xml
rename to app/code/Magento/Bundle/Test/Mftf/Data/BundleLinkData.xml
index 65add76a12af3..1cc0ce147ae0e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/BundleLinkData.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Data/BundleLinkData.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/BundleOptionData.xml b/app/code/Magento/Bundle/Test/Mftf/Data/BundleOptionData.xml
similarity index 76%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/BundleOptionData.xml
rename to app/code/Magento/Bundle/Test/Mftf/Data/BundleOptionData.xml
index 02f70ec15cab8..80d9307255e59 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/BundleOptionData.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Data/BundleOptionData.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
bundle-option-dropdown
true
diff --git a/app/code/Magento/Bundle/Test/Mftf/Data/CustomAttributeData.xml b/app/code/Magento/Bundle/Test/Mftf/Data/CustomAttributeData.xml
new file mode 100644
index 0000000000000..65ac763460151
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Data/CustomAttributeData.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ price_type
+ 0
+
+
+ price_type
+ 1
+
+
+ price_view
+ 1
+
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml
new file mode 100644
index 0000000000000..80ffe13ff3fe4
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+ BundleProduct
+ BundleProduct
+ BundleProduct2
+ bundleproduct
+ bundleproduct2
+ bundle
+ 4
+ BundleOption
+ checkbox
+ 10
+ 1
+ bundleproduct
+ bundleproduct2
+ 10
+ 20
+ 4
+ bundle
+ 10
+ 10
+ $10.00
+ Default
+
+
+ Api Bundle Product
+ api-bundle-product
+ bundle
+ 4
+ 4
+ 1
+ api-bundle-product
+ EavStockItem
+ ApiProductDescription
+ ApiProductShortDescription
+ CustomAttributeDynamicPrice
+ CustomAttributePriceView
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/LICENSE.txt b/app/code/Magento/Bundle/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/LICENSE.txt
rename to app/code/Magento/Bundle/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/LICENSE_AFL.txt b/app/code/Magento/Bundle/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/LICENSE_AFL.txt
rename to app/code/Magento/Bundle/Test/Mftf/LICENSE_AFL.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Metadata/bundle_link-meta.xml b/app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_link-meta.xml
similarity index 81%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Metadata/bundle_link-meta.xml
rename to app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_link-meta.xml
index be881a7e98d65..435cf59c6cbfd 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Metadata/bundle_link-meta.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_link-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Metadata/bundle_option-meta.xml b/app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_option-meta.xml
similarity index 78%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Metadata/bundle_option-meta.xml
rename to app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_option-meta.xml
index 991c01ec4c6f0..c912ea5eac41a 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Metadata/bundle_option-meta.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_option-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
diff --git a/app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_options-meta.xml b/app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_options-meta.xml
new file mode 100644
index 0000000000000..12cba3fc179fe
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Metadata/bundle_options-meta.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ application/json
+
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Page/AdminCatalogProductPage.xml b/app/code/Magento/Bundle/Test/Mftf/Page/AdminCatalogProductPage.xml
new file mode 100644
index 0000000000000..cb97521499e23
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Page/AdminCatalogProductPage.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Page/AdminProductCreatePage.xml b/app/code/Magento/Bundle/Test/Mftf/Page/AdminProductCreatePage.xml
new file mode 100644
index 0000000000000..f0048e2fc95d4
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Page/AdminProductCreatePage.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/README.md b/app/code/Magento/Bundle/Test/Mftf/README.md
new file mode 100644
index 0000000000000..8e8da0c15fa56
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Bundle Functional Tests
+
+The Functional Test Module for **Magento Bundle** module.
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/AdminProductFormBundleSection.xml b/app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml
similarity index 80%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/AdminProductFormBundleSection.xml
rename to app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml
index 6bc65d2d18491..0d0edbf857515 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/AdminProductFormBundleSection.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
@@ -21,6 +21,7 @@
+
@@ -60,5 +61,12 @@
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/BundleStorefrontSection.xml b/app/code/Magento/Bundle/Test/Mftf/Section/BundleStorefrontSection.xml
similarity index 85%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/BundleStorefrontSection.xml
rename to app/code/Magento/Bundle/Test/Mftf/Section/BundleStorefrontSection.xml
index b7ca65b28c9bb..9f4e6e04ac351 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/BundleStorefrontSection.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Section/BundleStorefrontSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml b/app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml
new file mode 100644
index 0000000000000..b462fcd11cfe7
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductActionSection.xml b/app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductActionSection.xml
new file mode 100644
index 0000000000000..abc9bc6dab540
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductActionSection.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAddBundleItemsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml
similarity index 98%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAddBundleItemsTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml
index c46f052db59ac..d94e196ea5ad1 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAddBundleItemsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAddDefaultImageBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddDefaultImageBundleProductTest.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAddDefaultImageBundleProductTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminAddDefaultImageBundleProductTest.xml
index 6a145b98a1816..e1f90790b30a9 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAddDefaultImageBundleProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddDefaultImageBundleProductTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAttributeSetSelectionTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAttributeSetSelectionTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml
index abf8ed3a8bc87..795982eb4b939 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAttributeSetSelectionTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminDeleteABundleProduct.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProduct.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminDeleteABundleProduct.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProduct.xml
index 5c2244e85a061..3f88a9f277105 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminDeleteABundleProduct.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProduct.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminFilterProductListByBundleProduct.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProduct.xml
similarity index 95%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminFilterProductListByBundleProduct.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProduct.xml
index ad4e90a050a40..9faf9e69bc873 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminFilterProductListByBundleProduct.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProduct.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminMassDeleteBundleProducts.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminMassDeleteBundleProducts.xml
similarity index 98%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminMassDeleteBundleProducts.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminMassDeleteBundleProducts.xml
index ca692e5d9374d..708580b3c9940 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminMassDeleteBundleProducts.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminMassDeleteBundleProducts.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminProductBundleCreationTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminProductBundleCreationTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml
index 2641919e204fa..5e7a098790724 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminProductBundleCreationTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminRemoveDefaultImageBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminRemoveDefaultImageBundleProductTest.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminRemoveDefaultImageBundleProductTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminRemoveDefaultImageBundleProductTest.xml
index 6c3be47a1cb7a..9ce345cde681c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminRemoveDefaultImageBundleProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminRemoveDefaultImageBundleProductTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/BundleProductFixedPricingTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/BundleProductFixedPricingTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml
index 0df2619ab6db2..a579460906d0e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/BundleProductFixedPricingTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/EnableDisableBundleProductStatusTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml
similarity index 87%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/EnableDisableBundleProductStatusTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml
index 5588d30619c48..e1434e22489ce 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/EnableDisableBundleProductStatusTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
@@ -75,11 +75,16 @@
-
+
+
+
+
+
+
-
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/EndToEndB2CAdminTest.xml
new file mode 100644
index 0000000000000..9402d1d48012f
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/EndToEndB2CAdminTest.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/MassEnableDisableBundleProductsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml
similarity index 98%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/MassEnableDisableBundleProductsTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml
index 2754cbcccab7c..27d95cfb5cfa5 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/MassEnableDisableBundleProductsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/NewBundleProductSelectionTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/NewBundleProductSelectionTest.xml
similarity index 88%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/NewBundleProductSelectionTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/NewBundleProductSelectionTest.xml
index cb19b9f996d56..8a0a1ceaf52c7 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/NewBundleProductSelectionTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/NewBundleProductSelectionTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/StorefrontAdminEditDataTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdminEditDataTest.xml
similarity index 97%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/StorefrontAdminEditDataTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdminEditDataTest.xml
index 2bdb2c3e5ab17..c0d659f1665a8 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/StorefrontAdminEditDataTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdminEditDataTest.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleCartTest.xml
new file mode 100644
index 0000000000000..655081df61073
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleCartTest.xml
@@ -0,0 +1,231 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGrid.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGrid.xml
new file mode 100644
index 0000000000000..577079965cabb
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGrid.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/StorefrontEditBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/StorefrontEditBundleProductTest.xml
rename to app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml
index 1944f82cf3181..a50a73c7f6bb4 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/StorefrontEditBundleProductTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml
@@ -1,124 +1,124 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/composer.json b/app/code/Magento/Bundle/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..1e379d1bacd44
--- /dev/null
+++ b/app/code/Magento/Bundle/Test/Mftf/composer.json
@@ -0,0 +1,36 @@
+{
+ "name": "magento/functional-test-module-bundle",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-backend": "100.0.0-dev",
+ "magento/functional-test-module-catalog": "100.0.0-dev",
+ "magento/functional-test-module-catalog-inventory": "100.0.0-dev",
+ "magento/functional-test-module-catalog-rule": "100.0.0-dev",
+ "magento/functional-test-module-checkout": "100.0.0-dev",
+ "magento/functional-test-module-config": "100.0.0-dev",
+ "magento/functional-test-module-customer": "100.0.0-dev",
+ "magento/functional-test-module-eav": "100.0.0-dev",
+ "magento/functional-test-module-gift-message": "100.0.0-dev",
+ "magento/functional-test-module-media-storage": "100.0.0-dev",
+ "magento/functional-test-module-quote": "100.0.0-dev",
+ "magento/functional-test-module-sales": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev",
+ "magento/functional-test-module-tax": "100.0.0-dev",
+ "magento/functional-test-module-ui": "100.0.0-dev"
+ },
+ "suggest": {
+ "magento/functional-test-module-webapi": "100.0.0-dev",
+ "magento/functional-test-module-bundle-sample-data": "100.0.0-dev",
+ "magento/functional-test-module-sales-rule": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php
index 414b460a1b81d..473fbbd035b00 100644
--- a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php
@@ -46,6 +46,9 @@ public function testGetChildrenEmptyItems($class, $method, $returnClass)
$this->assertSame(null, $this->model->getChildren($item));
}
+ /**
+ * @return array
+ */
public function getChildrenEmptyItemsDataProvider()
{
return [
@@ -97,6 +100,9 @@ public function testGetChildren($parentItem)
$this->assertSame([2 => $this->orderItem], $this->model->getChildren($item));
}
+ /**
+ * @return array
+ */
public function getChildrenDataProvider()
{
return [
@@ -116,6 +122,9 @@ public function testIsShipmentSeparatelyWithoutItem($productOptions, $result)
$this->assertSame($result, $this->model->isShipmentSeparately());
}
+ /**
+ * @return array
+ */
public function isShipmentSeparatelyWithoutItemDataProvider()
{
return [
@@ -145,6 +154,9 @@ public function testIsShipmentSeparatelyWithItem($productOptions, $result, $pare
$this->assertSame($result, $this->model->isShipmentSeparately($this->orderItem));
}
+ /**
+ * @return array
+ */
public function isShipmentSeparatelyWithItemDataProvider()
{
return [
@@ -166,6 +178,9 @@ public function testIsChildCalculatedWithoutItem($productOptions, $result)
$this->assertSame($result, $this->model->isChildCalculated());
}
+ /**
+ * @return array
+ */
public function isChildCalculatedWithoutItemDataProvider()
{
return [
@@ -195,6 +210,9 @@ public function testIsChildCalculatedWithItem($productOptions, $result, $parentI
$this->assertSame($result, $this->model->isChildCalculated($this->orderItem));
}
+ /**
+ * @return array
+ */
public function isChildCalculatedWithItemDataProvider()
{
return [
@@ -257,6 +275,9 @@ public function testCanShowPriceInfo($parentItem, $productOptions, $result)
$this->assertSame($result, $this->model->canShowPriceInfo($this->orderItem));
}
+ /**
+ * @return array
+ */
public function canShowPriceInfoDataProvider()
{
return [
diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/View/Items/RendererTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/View/Items/RendererTest.php
index 95dcb48f84be1..5d8cabdd8c1b9 100644
--- a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/View/Items/RendererTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/View/Items/RendererTest.php
@@ -41,6 +41,9 @@ public function testIsShipmentSeparatelyWithoutItem($productOptions, $result)
$this->assertSame($result, $this->model->isShipmentSeparately());
}
+ /**
+ * @return array
+ */
public function isShipmentSeparatelyWithoutItemDataProvider()
{
return [
@@ -70,6 +73,9 @@ public function testIsShipmentSeparatelyWithItem($productOptions, $result, $pare
$this->assertSame($result, $this->model->isShipmentSeparately($this->orderItem));
}
+ /**
+ * @return array
+ */
public function isShipmentSeparatelyWithItemDataProvider()
{
return [
@@ -91,6 +97,9 @@ public function testIsChildCalculatedWithoutItem($productOptions, $result)
$this->assertSame($result, $this->model->isChildCalculated());
}
+ /**
+ * @return array
+ */
public function isChildCalculatedWithoutItemDataProvider()
{
return [
@@ -120,6 +129,9 @@ public function testIsChildCalculatedWithItem($productOptions, $result, $parentI
$this->assertSame($result, $this->model->isChildCalculated($this->orderItem));
}
+ /**
+ * @return array
+ */
public function isChildCalculatedWithItemDataProvider()
{
return [
@@ -151,6 +163,9 @@ public function testGetSelectionAttributesWithBundle()
$this->assertEquals($unserializedResult, $this->model->getSelectionAttributes($this->orderItem));
}
+ /**
+ * @return array
+ */
public function getSelectionAttributesDataProvider()
{
return [
@@ -184,6 +199,9 @@ public function testCanShowPriceInfo($parentItem, $productOptions, $result)
$this->assertSame($result, $this->model->canShowPriceInfo($this->orderItem));
}
+ /**
+ * @return array
+ */
public function canShowPriceInfoDataProvider()
{
return [
diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Catalog/Product/View/Type/BundleTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Catalog/Product/View/Type/BundleTest.php
index ec250756d5b2b..c252e5f99612f 100644
--- a/app/code/Magento/Bundle/Test/Unit/Block/Catalog/Product/View/Type/BundleTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Block/Catalog/Product/View/Type/BundleTest.php
@@ -330,6 +330,10 @@ private function updateBundleBlock($options, $priceInfo, $priceType)
->will($this->returnArgument(0));
}
+ /**
+ * @param $price
+ * @return \PHPUnit_Framework_MockObject_MockObject
+ */
private function getPriceInfoMock($price)
{
$priceInfoMock = $this->getMockBuilder(\Magento\Framework\Pricing\PriceInfo\Base::class)
@@ -354,6 +358,10 @@ private function getPriceInfoMock($price)
return $priceInfoMock;
}
+ /**
+ * @param $prices
+ * @return \PHPUnit_Framework_MockObject_MockObject
+ */
private function getPriceMock($prices)
{
$methods = [];
diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Sales/Order/Items/RendererTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Sales/Order/Items/RendererTest.php
index d79afdddfb7ae..2f5dcef391063 100644
--- a/app/code/Magento/Bundle/Test/Unit/Block/Sales/Order/Items/RendererTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Block/Sales/Order/Items/RendererTest.php
@@ -47,6 +47,9 @@ public function testGetChildrenEmptyItems($class, $method, $returnClass)
$this->assertSame(null, $this->model->getChildren($item));
}
+ /**
+ * @return array
+ */
public function getChildrenEmptyItemsDataProvider()
{
return [
@@ -96,6 +99,9 @@ public function testGetChildren($parentItem)
$this->assertSame([2 => $this->orderItem], $this->model->getChildren($item));
}
+ /**
+ * @return array
+ */
public function getChildrenDataProvider()
{
return [
@@ -115,6 +121,9 @@ public function testIsShipmentSeparatelyWithoutItem($productOptions, $result)
$this->assertSame($result, $this->model->isShipmentSeparately());
}
+ /**
+ * @return array
+ */
public function isShipmentSeparatelyWithoutItemDataProvider()
{
return [
@@ -144,6 +153,9 @@ public function testIsShipmentSeparatelyWithItem($productOptions, $result, $pare
$this->assertSame($result, $this->model->isShipmentSeparately($this->orderItem));
}
+ /**
+ * @return array
+ */
public function isShipmentSeparatelyWithItemDataProvider()
{
return [
@@ -165,6 +177,9 @@ public function testIsChildCalculatedWithoutItem($productOptions, $result)
$this->assertSame($result, $this->model->isChildCalculated());
}
+ /**
+ * @return array
+ */
public function isChildCalculatedWithoutItemDataProvider()
{
return [
@@ -194,6 +209,9 @@ public function testIsChildCalculatedWithItem($productOptions, $result, $parentI
$this->assertSame($result, $this->model->isChildCalculated($this->orderItem));
}
+ /**
+ * @return array
+ */
public function isChildCalculatedWithItemDataProvider()
{
return [
@@ -238,6 +256,9 @@ public function testCanShowPriceInfo($parentItem, $productOptions, $result)
$this->assertSame($result, $this->model->canShowPriceInfo($this->orderItem));
}
+ /**
+ * @return array
+ */
public function canShowPriceInfoDataProvider()
{
return [
diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php b/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php
index ecce34363819e..3e9aeaed5c5b4 100644
--- a/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/AbstractItemsTest.php
@@ -49,6 +49,9 @@ public function testGetChildrenEmptyItems($class, $method, $returnClass)
$this->assertSame(null, $this->model->getChildren($item));
}
+ /**
+ * @return array
+ */
public function getChildrenEmptyItemsDataProvider()
{
return [
@@ -97,6 +100,9 @@ public function testGetChildren($parentItem)
$this->assertSame([2 => $this->orderItem], $this->model->getChildren($item));
}
+ /**
+ * @return array
+ */
public function getChildrenDataProvider()
{
return [
@@ -116,6 +122,9 @@ public function testIsShipmentSeparatelyWithoutItem($productOptions, $result)
$this->assertSame($result, $this->model->isShipmentSeparately());
}
+ /**
+ * @return array
+ */
public function isShipmentSeparatelyWithoutItemDataProvider()
{
return [
@@ -146,6 +155,9 @@ public function testIsShipmentSeparatelyWithItem($productOptions, $result, $pare
$this->assertSame($result, $this->model->isShipmentSeparately($this->orderItem));
}
+ /**
+ * @return array
+ */
public function isShipmentSeparatelyWithItemDataProvider()
{
return [
@@ -167,6 +179,9 @@ public function testIsChildCalculatedWithoutItem($productOptions, $result)
$this->assertSame($result, $this->model->isChildCalculated());
}
+ /**
+ * @return array
+ */
public function isChildCalculatedWithoutItemDataProvider()
{
return [
@@ -197,6 +212,9 @@ public function testIsChildCalculatedWithItem($productOptions, $result, $parentI
$this->assertSame($result, $this->model->isChildCalculated($this->orderItem));
}
+ /**
+ * @return array
+ */
public function isChildCalculatedWithItemDataProvider()
{
return [
@@ -217,6 +235,9 @@ public function testGetBundleOptions($productOptions, $result)
$this->assertSame($result, $this->model->getBundleOptions());
}
+ /**
+ * @return array
+ */
public function getBundleOptionsDataProvider()
{
return [
@@ -277,6 +298,9 @@ public function testCanShowPriceInfo($parentItem, $productOptions, $result)
$this->assertSame($result, $this->model->canShowPriceInfo($this->orderItem));
}
+ /**
+ * @return array
+ */
public function canShowPriceInfoDataProvider()
{
return [
diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/CalculatorTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/CalculatorTest.php
index 845d735e0d801..423155661f1ef 100644
--- a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/CalculatorTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/CalculatorTest.php
@@ -585,6 +585,9 @@ public function testGetOptionsAmount($searchMin, $useRegularPrice)
$this->assertEquals($expectedResult, $result, 'Incorrect result');
}
+ /**
+ * @return array
+ */
public function getOptionsAmountDataProvider()
{
return [
diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php
index d43b0575aea91..d35619bb043a0 100644
--- a/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php
@@ -103,6 +103,9 @@ protected function setUp()
$this->setupSelectionPrice();
}
+ /**
+ * @param bool $useRegularPrice
+ */
protected function setupSelectionPrice($useRegularPrice = false)
{
$this->selectionPrice = new \Magento\Bundle\Pricing\Price\BundleSelectionPrice(
@@ -336,6 +339,9 @@ public function testFixedPriceWithMultipleQty($useRegularPrice)
$this->assertEquals($expectedPrice, $selectionPrice->getValue());
}
+ /**
+ * @return array
+ */
public function useRegularPriceDataProvider()
{
return [
diff --git a/app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/BundleDataProviderTest.php b/app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/BundleDataProviderTest.php
index 7b4d42568f686..1c3cf33cbf73b 100644
--- a/app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/BundleDataProviderTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/BundleDataProviderTest.php
@@ -76,6 +76,9 @@ protected function setUp()
->getMock();
}
+ /**
+ * @return object
+ */
protected function getModel()
{
return $this->objectManager->getObject(BundleDataProvider::class, [
diff --git a/app/code/Magento/BundleGraphQl/Test/Mftf/README.md b/app/code/Magento/BundleGraphQl/Test/Mftf/README.md
new file mode 100644
index 0000000000000..6c7176cbb77f9
--- /dev/null
+++ b/app/code/Magento/BundleGraphQl/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Bundle Graph Ql Functional Tests
+
+The Functional Test Module for **Magento Bundle Graph Ql** module.
diff --git a/app/code/Magento/BundleGraphQl/Test/Mftf/composer.json b/app/code/Magento/BundleGraphQl/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..33dffdc85a364
--- /dev/null
+++ b/app/code/Magento/BundleGraphQl/Test/Mftf/composer.json
@@ -0,0 +1,20 @@
+{
+ "name": "magento/functional-test-module-bundle-graph-ql",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/functional-test-module-catalog": "100.0.0-dev",
+ "magento/functional-test-module-bundle": "100.0.0-dev",
+ "magento/functional-test-module-catalog-graph-ql": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev",
+ "magento/magento2-functional-testing-framework": "2.2.0"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/LICENSE.txt b/app/code/Magento/BundleImportExport/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/LICENSE.txt
rename to app/code/Magento/BundleImportExport/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/LICENSE_AFL.txt b/app/code/Magento/BundleImportExport/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/LICENSE_AFL.txt
rename to app/code/Magento/BundleImportExport/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/BundleImportExport/Test/Mftf/README.md b/app/code/Magento/BundleImportExport/Test/Mftf/README.md
new file mode 100644
index 0000000000000..e4c6855132d05
--- /dev/null
+++ b/app/code/Magento/BundleImportExport/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Bundle Import Export Functional Tests
+
+The Functional Test Module for **Magento Bundle Import Export** module.
diff --git a/app/code/Magento/BundleImportExport/Test/Mftf/composer.json b/app/code/Magento/BundleImportExport/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..2210ef5248159
--- /dev/null
+++ b/app/code/Magento/BundleImportExport/Test/Mftf/composer.json
@@ -0,0 +1,22 @@
+{
+ "name": "magento/functional-test-module-bundle-import-export",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-bundle": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev",
+ "magento/functional-test-module-catalog": "100.0.0-dev",
+ "magento/functional-test-module-catalog-import-export": "100.0.0-dev",
+ "magento/functional-test-module-eav": "100.0.0-dev",
+ "magento/functional-test-module-import-export": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/LICENSE.txt b/app/code/Magento/CacheInvalidate/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/LICENSE.txt
rename to app/code/Magento/CacheInvalidate/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/LICENSE_AFL.txt b/app/code/Magento/CacheInvalidate/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/LICENSE_AFL.txt
rename to app/code/Magento/CacheInvalidate/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/CacheInvalidate/Test/Mftf/README.md b/app/code/Magento/CacheInvalidate/Test/Mftf/README.md
new file mode 100644
index 0000000000000..403a6f15d089d
--- /dev/null
+++ b/app/code/Magento/CacheInvalidate/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Cache Invalidate Functional Tests
+
+The Functional Test Module for **Magento Cache Invalidate** module.
diff --git a/app/code/Magento/CacheInvalidate/Test/Mftf/composer.json b/app/code/Magento/CacheInvalidate/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..0a6ffcf2f4661
--- /dev/null
+++ b/app/code/Magento/CacheInvalidate/Test/Mftf/composer.json
@@ -0,0 +1,17 @@
+{
+ "name": "magento/functional-test-module-cache-invalidate",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-page-cache": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php
index 013ec3a467104..c66e27ea41025 100644
--- a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php
+++ b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php
@@ -84,6 +84,9 @@ public function testSendPurgeRequest($hosts)
$this->assertTrue($this->model->sendPurgeRequest('tags'));
}
+ /**
+ * @return array
+ */
public function sendPurgeRequestDataProvider()
{
return [
diff --git a/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php b/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php
index c0a091ca2d0d9..027c9a9085b47 100644
--- a/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php
+++ b/app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php
@@ -13,7 +13,7 @@ class DefaultCaptcha extends \Magento\Framework\View\Element\Template
/**
* @var string
*/
- protected $_template = 'default.phtml';
+ protected $_template = 'Magento_Captcha::default.phtml';
/**
* @var string
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/LICENSE.txt b/app/code/Magento/Captcha/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/LICENSE.txt
rename to app/code/Magento/Captcha/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/LICENSE_AFL.txt b/app/code/Magento/Captcha/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/LICENSE_AFL.txt
rename to app/code/Magento/Captcha/Test/Mftf/LICENSE_AFL.txt
diff --git a/app/code/Magento/Captcha/Test/Mftf/README.md b/app/code/Magento/Captcha/Test/Mftf/README.md
new file mode 100644
index 0000000000000..48be768712f2f
--- /dev/null
+++ b/app/code/Magento/Captcha/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Captcha Functional Tests
+
+The Functional Test Module for **Magento Captcha** module.
diff --git a/app/code/Magento/Captcha/Test/Mftf/composer.json b/app/code/Magento/Captcha/Test/Mftf/composer.json
new file mode 100644
index 0000000000000..95c3aa5f76078
--- /dev/null
+++ b/app/code/Magento/Captcha/Test/Mftf/composer.json
@@ -0,0 +1,20 @@
+{
+ "name": "magento/functional-test-module-captcha",
+ "description": "N/A",
+ "config": {
+ "sort-packages": true
+ },
+ "require": {
+ "php": "~7.1.3||~7.2.0",
+ "magento/magento2-functional-testing-framework": "2.2.0",
+ "magento/functional-test-module-backend": "100.0.0-dev",
+ "magento/functional-test-module-checkout": "100.0.0-dev",
+ "magento/functional-test-module-customer": "100.0.0-dev",
+ "magento/functional-test-module-store": "100.0.0-dev"
+ },
+ "type": "magento2-test",
+ "license": [
+ "OSL-3.0",
+ "AFL-3.0"
+ ]
+}
diff --git a/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php b/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php
index 429c13e802a87..0500b29f787c2 100644
--- a/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php
+++ b/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php
@@ -354,6 +354,9 @@ public function testIsShownToLoggedInUser($expectedResult, $formId)
$this->assertEquals($expectedResult, $captcha->isShownToLoggedInUser());
}
+ /**
+ * @return array
+ */
public function isShownToLoggedInUserDataProvider()
{
return [
diff --git a/app/code/Magento/Captcha/Test/Unit/Observer/CheckGuestCheckoutObserverTest.php b/app/code/Magento/Captcha/Test/Unit/Observer/CheckGuestCheckoutObserverTest.php
new file mode 100644
index 0000000000000..d3f29fae8a592
--- /dev/null
+++ b/app/code/Magento/Captcha/Test/Unit/Observer/CheckGuestCheckoutObserverTest.php
@@ -0,0 +1,211 @@
+createMock(Onepage::class);
+ $captchaHelperMock = $this->createMock(CaptchaDataHelper::class);
+ $this->objectManager = new ObjectManager($this);
+ $this->actionFlagMock = $this->createMock(ActionFlag::class);
+ $this->captchaStringResolverMock = $this->createMock(CaptchaStringResolver::class);
+ $this->captchaModelMock = $this->createMock(CaptchaModel::class);
+ $this->quoteModelMock = $this->createMock(Quote::class);
+ $this->controllerMock = $this->createMock(Action::class);
+ $this->requestMock = $this->createMock(Http::class);
+ $this->responseMock = $this->createMock(HttpResponse::class);
+ $this->observer = new Observer(['controller_action' => $this->controllerMock]);
+ $this->jsonHelperMock = $this->createMock(JsonHelper::class);
+
+ $this->checkGuestCheckoutObserver = $this->objectManager->getObject(
+ CheckGuestCheckoutObserver::class,
+ [
+ 'helper' => $captchaHelperMock,
+ 'actionFlag' => $this->actionFlagMock,
+ 'captchaStringResolver' => $this->captchaStringResolverMock,
+ 'typeOnepage' => $onepageModelTypeMock,
+ 'jsonHelper' => $this->jsonHelperMock
+ ]
+ );
+
+ $captchaHelperMock->expects($this->once())
+ ->method('getCaptcha')
+ ->with(self::FORM_ID)
+ ->willReturn($this->captchaModelMock);
+ $onepageModelTypeMock->expects($this->once())
+ ->method('getQuote')
+ ->willReturn($this->quoteModelMock);
+ }
+
+ public function testCheckGuestCheckoutForRegister()
+ {
+ $this->quoteModelMock->expects($this->once())
+ ->method('getCheckoutMethod')
+ ->willReturn(Onepage::METHOD_REGISTER);
+ $this->captchaModelMock->expects($this->never())
+ ->method('isRequired');
+
+ $this->checkGuestCheckoutObserver->execute($this->observer);
+ }
+
+ public function testCheckGuestCheckoutWithNoCaptchaRequired()
+ {
+ $this->quoteModelMock->expects($this->once())
+ ->method('getCheckoutMethod')
+ ->willReturn(Onepage::METHOD_GUEST);
+ $this->captchaModelMock->expects($this->once())
+ ->method('isRequired')
+ ->willReturn(false);
+ $this->captchaModelMock->expects($this->never())
+ ->method('isCorrect');
+
+ $this->checkGuestCheckoutObserver->execute($this->observer);
+ }
+
+ public function testCheckGuestCheckoutWithIncorrectCaptcha()
+ {
+ $captchaValue = 'some_word';
+ $encodedJsonValue = '{}';
+
+ $this->quoteModelMock->expects($this->once())
+ ->method('getCheckoutMethod')
+ ->willReturn(Onepage::METHOD_GUEST);
+ $this->captchaModelMock->expects($this->once())
+ ->method('isRequired')
+ ->willReturn(true);
+ $this->controllerMock->expects($this->once())
+ ->method('getRequest')
+ ->willReturn($this->requestMock);
+ $this->controllerMock->expects($this->once())
+ ->method('getResponse')
+ ->willReturn($this->responseMock);
+ $this->controllerMock->expects($this->once())
+ ->method('getResponse')
+ ->willReturn($this->responseMock);
+ $this->captchaStringResolverMock->expects($this->once())
+ ->method('resolve')
+ ->with($this->requestMock, self::FORM_ID)
+ ->willReturn($captchaValue);
+ $this->captchaModelMock->expects($this->once())
+ ->method('isCorrect')
+ ->with($captchaValue)
+ ->willReturn(false);
+ $this->actionFlagMock->expects($this->once())
+ ->method('set')
+ ->with('', Action::FLAG_NO_DISPATCH, true);
+ $this->jsonHelperMock->expects($this->once())
+ ->method('jsonEncode')
+ ->willReturn($encodedJsonValue);
+ $this->responseMock->expects($this->once())
+ ->method('representJson')
+ ->with($encodedJsonValue);
+
+ $this->checkGuestCheckoutObserver->execute($this->observer);
+ }
+
+ public function testCheckGuestCheckoutWithCorrectCaptcha()
+ {
+ $this->quoteModelMock->expects($this->once())
+ ->method('getCheckoutMethod')
+ ->willReturn(Onepage::METHOD_GUEST);
+ $this->captchaModelMock->expects($this->once())
+ ->method('isRequired')
+ ->willReturn(true);
+ $this->controllerMock->expects($this->once())
+ ->method('getRequest')
+ ->willReturn($this->requestMock);
+ $this->captchaStringResolverMock->expects($this->once())
+ ->method('resolve')
+ ->with($this->requestMock, self::FORM_ID)
+ ->willReturn('some_word');
+ $this->captchaModelMock->expects($this->once())
+ ->method('isCorrect')
+ ->with('some_word')
+ ->willReturn(true);
+ $this->actionFlagMock->expects($this->never())
+ ->method('set');
+
+ $this->checkGuestCheckoutObserver->execute($this->observer);
+ }
+}
diff --git a/app/code/Magento/Catalog/Api/ProductAttributeOptionManagementInterface.php b/app/code/Magento/Catalog/Api/ProductAttributeOptionManagementInterface.php
index 07b7d591c3fd7..3f255d93f96b0 100644
--- a/app/code/Magento/Catalog/Api/ProductAttributeOptionManagementInterface.php
+++ b/app/code/Magento/Catalog/Api/ProductAttributeOptionManagementInterface.php
@@ -29,7 +29,7 @@ public function getItems($attributeCode);
* @param \Magento\Eav\Api\Data\AttributeOptionInterface $option
* @throws \Magento\Framework\Exception\StateException
* @throws \Magento\Framework\Exception\InputException
- * @return bool
+ * @return string
*/
public function add($attributeCode, $option);
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/AssignProducts.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/AssignProducts.php
index 69618f04eb2af..c718563d7576e 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/AssignProducts.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/AssignProducts.php
@@ -13,7 +13,7 @@ class AssignProducts extends \Magento\Backend\Block\Template
*
* @var string
*/
- protected $_template = 'catalog/category/edit/assign_products.phtml';
+ protected $_template = 'Magento_Catalog::catalog/category/edit/assign_products.phtml';
/**
* @var \Magento\Catalog\Block\Adminhtml\Category\Tab\Product
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
index 34da5bb1d4ca1..a67f55235b6df 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
@@ -27,7 +27,7 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory
/**
* @var string
*/
- protected $_template = 'catalog/category/tree.phtml';
+ protected $_template = 'Magento_Catalog::catalog/category/tree.phtml';
/**
* @var \Magento\Backend\Model\Auth\Session
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php
index b5330ab66af71..9c83d4aea61c7 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php
@@ -24,7 +24,7 @@ class Chooser extends \Magento\Catalog\Block\Adminhtml\Category\Tree
*
* @var string
*/
- protected $_template = 'catalog/category/widget/tree.phtml';
+ protected $_template = 'Magento_Catalog::catalog/category/widget/tree.phtml';
/**
* @return void
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php
index 6760b44c22ee1..1b188de40710f 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php
@@ -22,7 +22,7 @@ class Main extends \Magento\Backend\Block\Template
/**
* @var string
*/
- protected $_template = 'catalog/product/attribute/set/main.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/attribute/set/main.phtml';
/**
* Core registry
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php
index f5e3f94418687..cb0a739b56e4e 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php
@@ -14,5 +14,5 @@ class Attribute extends \Magento\Backend\Block\Template
/**
* @var string
*/
- protected $_template = 'catalog/product/attribute/set/main/tree/attribute.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/attribute/set/main/tree/attribute.phtml';
}
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Group.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Group.php
index cf8de44c3d9df..93c2dcc76263c 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Group.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Group.php
@@ -14,5 +14,5 @@ class Group extends \Magento\Backend\Block\Template
/**
* @var string
*/
- protected $_template = 'catalog/product/attribute/set/main/tree/group.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/attribute/set/main/tree/group.phtml';
}
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Add.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Add.php
index 329afa968307c..f69e58985bfc5 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Add.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Add.php
@@ -18,7 +18,7 @@ class Add extends \Magento\Backend\Block\Template
/**
* @var string
*/
- protected $_template = 'catalog/product/attribute/set/toolbar/add.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/attribute/set/toolbar/add.phtml';
/**
* @return AbstractBlock
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php
index f707c5c340b68..e29ab26065dc3 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php
@@ -20,7 +20,7 @@ class Main extends \Magento\Backend\Block\Template
/**
* @var string
*/
- protected $_template = 'catalog/product/attribute/set/toolbar/main.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/attribute/set/toolbar/main.phtml';
/**
* @return $this
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Configure.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Configure.php
index 9270c1ac38ba3..98280d8d31237 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Configure.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Configure.php
@@ -22,7 +22,7 @@ class Configure extends \Magento\Backend\Block\Widget
/**
* @var string
*/
- protected $_template = 'catalog/product/composite/configure.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/composite/configure.phtml';
/**
* Core registry
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
index c18106fe567d0..285caa974fd17 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
@@ -17,7 +17,7 @@ class Edit extends \Magento\Backend\Block\Widget
/**
* @var string
*/
- protected $_template = 'catalog/product/edit.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/edit.phtml';
/**
* Core registry
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php
index 62b9341a95414..be9c84ee5edd1 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php
@@ -16,7 +16,7 @@ class Alerts extends \Magento\Backend\Block\Widget\Tab
/**
* @var string
*/
- protected $_template = 'catalog/product/tab/alert.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/tab/alert.phtml';
/**
* @return $this
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Inventory.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Inventory.php
index e52c1d3aa4985..20e12889cae0d 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Inventory.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Inventory.php
@@ -15,7 +15,7 @@ class Inventory extends \Magento\Backend\Block\Widget
/**
* @var string
*/
- protected $_template = 'catalog/product/tab/inventory.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/tab/inventory.phtml';
/**
* @var \Magento\Framework\Module\Manager
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options.php
index a7a919e53f56e..2c79f5a6fa718 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options.php
@@ -16,7 +16,7 @@ class Options extends Widget
/**
* @var string
*/
- protected $_template = 'catalog/product/edit/options.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/edit/options.phtml';
/**
* @return Widget
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
index f3460dfa28c29..49caddd1a1018 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
@@ -36,7 +36,7 @@ class Option extends Widget
/**
* @var string
*/
- protected $_template = 'catalog/product/edit/options/option.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/edit/options/option.phtml';
/**
* Core registry
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Date.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Date.php
index babfc1b072bd2..a0bbc4ad033de 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Date.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Date.php
@@ -16,5 +16,5 @@ class Date extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Typ
/**
* @var string
*/
- protected $_template = 'catalog/product/edit/options/type/date.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/edit/options/type/date.phtml';
}
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/File.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/File.php
index 322aa02f97731..d3d5f08fa9eae 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/File.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/File.php
@@ -16,5 +16,5 @@ class File extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Typ
/**
* @var string
*/
- protected $_template = 'catalog/product/edit/options/type/file.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/edit/options/type/file.phtml';
}
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php
index 24de84958ef4a..f6ab5134ae6bd 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php
@@ -16,7 +16,7 @@ class Select extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\T
/**
* @var string
*/
- protected $_template = 'catalog/product/edit/options/type/select.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/edit/options/type/select.phtml';
/**
* Class constructor
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Text.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Text.php
index 7241128fac3b4..e6f78dc3ed169 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Text.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Text.php
@@ -16,5 +16,5 @@ class Text extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Typ
/**
* @var string
*/
- protected $_template = 'catalog/product/edit/options/type/text.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/edit/options/type/text.phtml';
}
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php
index a80ddd8c122a1..7cb1c2c9e4263 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php
@@ -13,7 +13,7 @@ class Tier extends Group\AbstractGroup
/**
* @var string
*/
- protected $_template = 'catalog/product/edit/price/tier.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/edit/price/tier.phtml';
/**
* Retrieve list of initial customer groups
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Websites.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Websites.php
index 6a3347b44512f..6189a97dbe761 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Websites.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Websites.php
@@ -21,7 +21,7 @@ class Websites extends \Magento\Backend\Block\Store\Switcher
/**
* @var string
*/
- protected $_template = 'catalog/product/edit/websites.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/edit/websites.phtml';
/**
* Core registry
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php
index 5188bf365e5e9..8d51f78ff5b68 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php
@@ -23,7 +23,7 @@ class Content extends \Magento\Backend\Block\Widget
/**
* @var string
*/
- protected $_template = 'catalog/product/helper/gallery.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/helper/gallery.phtml';
/**
* @var \Magento\Catalog\Model\Product\Media\Config
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser/Container.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser/Container.php
index 19c1574d6e9a5..b8967f1f30e55 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser/Container.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser/Container.php
@@ -18,5 +18,5 @@ class Container extends Template
/**
* @var string
*/
- protected $_template = 'catalog/product/widget/chooser/container.phtml';
+ protected $_template = 'Magento_Catalog::catalog/product/widget/chooser/container.phtml';
}
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php b/app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php
index 9d13d89d54b80..a9ec80c5f0232 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php
@@ -13,7 +13,7 @@ class Link extends \Magento\Framework\View\Element\Template
/**
* @var string
*/
- protected $_template = 'rss/grid/link.phtml';
+ protected $_template = 'Magento_Catalog::rss/grid/link.phtml';
/**
* @var \Magento\Framework\App\Rss\UrlBuilderInterface
diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
index 39dec984a19cc..0b8d2d6c89e72 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
@@ -83,7 +83,7 @@ class Toolbar extends \Magento\Framework\View\Element\Template
/**
* @var string
*/
- protected $_template = 'product/list/toolbar.phtml';
+ protected $_template = 'Magento_Catalog::product/list/toolbar.phtml';
/**
* Catalog config
diff --git a/app/code/Magento/Catalog/Block/Product/View/Additional.php b/app/code/Magento/Catalog/Block/Product/View/Additional.php
index 37c82c2bc84c8..66527985e41fd 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Additional.php
+++ b/app/code/Magento/Catalog/Block/Product/View/Additional.php
@@ -25,7 +25,7 @@ class Additional extends \Magento\Framework\View\Element\Template
/**
* @var string
*/
- protected $_template = 'product/view/additional.phtml';
+ protected $_template = 'Magento_Catalog::product/view/additional.phtml';
/**
* @return array
diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php
index d582005f653ef..181211a0fc4a2 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php
+++ b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php
@@ -105,9 +105,11 @@ public function getOption()
}
/**
+ * Retrieve formatted price
+ *
* @return string
*/
- public function getFormatedPrice()
+ public function getFormattedPrice()
{
if ($option = $this->getOption()) {
return $this->_formatPrice(
@@ -120,6 +122,17 @@ public function getFormatedPrice()
return '';
}
+ /**
+ * @return string
+ *
+ * @deprecated
+ * @see getFormattedPrice()
+ */
+ public function getFormatedPrice()
+ {
+ return $this->getFormattedPrice();
+ }
+
/**
* Return formated price
*
diff --git a/app/code/Magento/Catalog/Block/Product/View/Price.php b/app/code/Magento/Catalog/Block/Product/View/Price.php
index c38625247b533..37598dfb1a8da 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Price.php
+++ b/app/code/Magento/Catalog/Block/Product/View/Price.php
@@ -9,6 +9,8 @@
*/
namespace Magento\Catalog\Block\Product\View;
+use Magento\Catalog\Model\Product;
+
class Price extends \Magento\Framework\View\Element\Template
{
/**
@@ -37,7 +39,8 @@ public function __construct(
*/
public function getPrice()
{
+ /** @var Product $product */
$product = $this->_coreRegistry->registry('product');
- return $product->getFormatedPrice();
+ return $product->getFormattedPrice();
}
}
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category/RefreshPath.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category/RefreshPath.php
index 962cd52d39338..9384397b67f93 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/RefreshPath.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/RefreshPath.php
@@ -38,7 +38,11 @@ public function execute()
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
$resultJson = $this->resultJsonFactory->create();
- return $resultJson->setData(['id' => $categoryId, 'path' => $category->getPath()]);
+ return $resultJson->setData([
+ 'id' => $categoryId,
+ 'path' => $category->getPath(),
+ 'parentId' => $category->getParentId(),
+ ]);
}
}
}
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php
index bcc7d468fd0f4..cc03ab870739b 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php
@@ -139,6 +139,9 @@ public function execute()
$parentId = isset($categoryPostData['parent']) ? $categoryPostData['parent'] : null;
if ($categoryPostData) {
$category->addData($categoryPostData);
+ if ($parentId) {
+ $category->setParentId($parentId);
+ }
if ($isNewCategory) {
$parentCategory = $this->getParentCategory($parentId, $storeId);
$category->setPath($parentCategory->getPath());
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php
index 00a836309e58e..dfddcf7e92b97 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php
@@ -6,6 +6,11 @@
*/
namespace Magento\Catalog\Controller\Adminhtml\Product\Set;
+use Magento\Framework\App\ObjectManager;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Set
{
/**
@@ -17,22 +22,49 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Set
* @var \Magento\Framework\Controller\Result\JsonFactory
*/
protected $resultJsonFactory;
-
+
+ /*
+ * @var \Magento\Eav\Model\Entity\Attribute\SetFactory
+ */
+ private $attributeSetFactory;
+
+ /*
+ * @var \Magento\Framework\Filter\FilterManager
+ */
+ private $filterManager;
+
+ /*
+ * @var \Magento\Framework\Json\Helper\Data
+ */
+ private $jsonHelper;
+
/**
* @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Framework\Registry $coreRegistry
* @param \Magento\Framework\View\LayoutFactory $layoutFactory
* @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
+ * @param \Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory
+ * @param \Magento\Framework\Filter\FilterManager $filterManager
+ * @param \Magento\Framework\Json\Helper\Data $jsonHelper
*/
public function __construct(
\Magento\Backend\App\Action\Context $context,
\Magento\Framework\Registry $coreRegistry,
\Magento\Framework\View\LayoutFactory $layoutFactory,
- \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
+ \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
+ \Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory = null,
+ \Magento\Framework\Filter\FilterManager $filterManager = null,
+ \Magento\Framework\Json\Helper\Data $jsonHelper = null
) {
parent::__construct($context, $coreRegistry);
$this->layoutFactory = $layoutFactory;
$this->resultJsonFactory = $resultJsonFactory;
+ $this->attributeSetFactory = $attributeSetFactory ?: ObjectManager::getInstance()
+ ->get(\Magento\Eav\Model\Entity\Attribute\SetFactory::class);
+ $this->filterManager = $filterManager ?: ObjectManager::getInstance()
+ ->get(\Magento\Framework\Filter\FilterManager::class);
+ $this->jsonHelper = $jsonHelper ?: ObjectManager::getInstance()
+ ->get(\Magento\Framework\Json\Helper\Data::class);
}
/**
@@ -65,16 +97,12 @@ public function execute()
$isNewSet = $this->getRequest()->getParam('gotoEdit', false) == '1';
/* @var $model \Magento\Eav\Model\Entity\Attribute\Set */
- $model = $this->_objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
- ->setEntityTypeId($entityTypeId);
-
- /** @var $filterManager \Magento\Framework\Filter\FilterManager */
- $filterManager = $this->_objectManager->get(\Magento\Framework\Filter\FilterManager::class);
+ $model = $this->attributeSetFactory->create()->setEntityTypeId($entityTypeId);
try {
if ($isNewSet) {
//filter html tags
- $name = $filterManager->stripTags($this->getRequest()->getParam('attribute_set_name'));
+ $name = $this->filterManager->stripTags($this->getRequest()->getParam('attribute_set_name'));
$model->setAttributeSetName(trim($name));
} else {
if ($attributeSetId) {
@@ -85,11 +113,10 @@ public function execute()
__('This attribute set no longer exists.')
);
}
- $data = $this->_objectManager->get(\Magento\Framework\Json\Helper\Data::class)
- ->jsonDecode($this->getRequest()->getPost('data'));
+ $data = $this->jsonHelper->jsonDecode($this->getRequest()->getPost('data'));
//filter html tags
- $data['attribute_set_name'] = $filterManager->stripTags($data['attribute_set_name']);
+ $data['attribute_set_name'] = $this->filterManager->stripTags($data['attribute_set_name']);
$model->organizeData($data);
}
diff --git a/app/code/Magento/Catalog/Model/ImageUploader.php b/app/code/Magento/Catalog/Model/ImageUploader.php
index 6aa76ca8c1e43..ce92a2c1d958d 100644
--- a/app/code/Magento/Catalog/Model/ImageUploader.php
+++ b/app/code/Magento/Catalog/Model/ImageUploader.php
@@ -64,6 +64,18 @@ class ImageUploader
*/
protected $allowedExtensions;
+ /**
+ * List of allowed image mime types
+ *
+ * @var array
+ */
+ private $allowedMimeTypes = [
+ 'image/jpg',
+ 'image/jpeg',
+ 'image/gif',
+ 'image/png',
+ ];
+
/**
* ImageUploader constructor
*
@@ -227,7 +239,9 @@ public function saveFileToTmpDir($fileId)
$uploader = $this->uploaderFactory->create(['fileId' => $fileId]);
$uploader->setAllowedExtensions($this->getAllowedExtensions());
$uploader->setAllowRenameFiles(true);
-
+ if (!$uploader->checkMimeType($this->allowedMimeTypes)) {
+ throw new \Magento\Framework\Exception\LocalizedException(__('File validation failed.'));
+ }
$result = $uploader->save($this->mediaDirectory->getAbsolutePath($baseTmpPath));
unset($result['path']);
diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php
index f514e5c68769e..90af9bee270bd 100644
--- a/app/code/Magento/Catalog/Model/Product.php
+++ b/app/code/Magento/Catalog/Model/Product.php
@@ -1124,11 +1124,24 @@ public function getTierPrice($qty = null)
/**
* Get formatted by currency product price
*
- * @return array || double
+ * @return array|double
+ */
+ public function getFormattedPrice()
+ {
+ return $this->getPriceModel()->getFormattedPrice($this);
+ }
+
+ /**
+ * Get formatted by currency product price
+ *
+ * @return array|double
+ *
+ * @deprecated
+ * @see getFormattedPrice()
*/
public function getFormatedPrice()
{
- return $this->getPriceModel()->getFormatedPrice($this);
+ return $this->getFormattedPrice();
}
/**
diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php b/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php
index 53083d7168b45..8ad8dcb4812e4 100644
--- a/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php
+++ b/app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php
@@ -32,6 +32,9 @@ protected function processDeletedImages($product, array &$images)
foreach ($images as &$image) {
if (!empty($image['removed'])) {
if (!empty($image['value_id']) && !isset($picturesInOtherStores[$image['file']])) {
+ if (preg_match('/\.\.(\\\|\/)/', $image['file'])) {
+ continue;
+ }
$recordsToDelete[] = $image['value_id'];
$catalogPath = $this->mediaConfig->getBaseMediaPath();
$isFile = $this->mediaDirectory->isFile($catalogPath . $image['file']);
diff --git a/app/code/Magento/Catalog/Model/Product/Option.php b/app/code/Magento/Catalog/Model/Product/Option.php
index 39595cdaa60ad..acfc454883e1d 100644
--- a/app/code/Magento/Catalog/Model/Product/Option.php
+++ b/app/code/Magento/Catalog/Model/Product/Option.php
@@ -8,6 +8,7 @@
use Magento\Catalog\Api\Data\ProductCustomOptionInterface;
use Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface;
+use Magento\Catalog\Api\Data\ProductCustomOptionValuesInterfaceFactory;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\ResourceModel\Product\Option\Value\Collection;
@@ -102,6 +103,11 @@ class Option extends AbstractExtensibleModel implements ProductCustomOptionInter
*/
private $metadataPool;
+ /**
+ * @var ProductCustomOptionValuesInterfaceFactory
+ */
+ private $customOptionValuesFactory;
+
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
@@ -114,6 +120,7 @@ class Option extends AbstractExtensibleModel implements ProductCustomOptionInter
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
+ * @param ProductCustomOptionValuesInterfaceFactory|null $customOptionValuesFactory
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
@@ -127,12 +134,16 @@ public function __construct(
Option\Validator\Pool $validatorPool,
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
- array $data = []
+ array $data = [],
+ ProductCustomOptionValuesInterfaceFactory $customOptionValuesFactory = null
) {
$this->productOptionValue = $productOptionValue;
$this->optionTypeFactory = $optionFactory;
$this->validatorPool = $validatorPool;
$this->string = $string;
+ $this->customOptionValuesFactory = $customOptionValuesFactory ?:
+ \Magento\Framework\App\ObjectManager::getInstance()->get(ProductCustomOptionValuesInterfaceFactory::class);
+
parent::__construct(
$context,
$registry,
@@ -390,20 +401,21 @@ public function beforeSave()
*/
public function afterSave()
{
- $this->getValueInstance()->unsetValues();
$values = $this->getValues() ?: $this->getData('values');
if (is_array($values)) {
foreach ($values as $value) {
- if ($value instanceof \Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface) {
+ if ($value instanceof ProductCustomOptionValuesInterface) {
$data = $value->getData();
} else {
$data = $value;
}
- $this->getValueInstance()->addValue($data);
- }
- $this->getValueInstance()->setOption($this)->saveValues();
- } elseif ($this->getGroupByType($this->getType()) == self::OPTION_GROUP_SELECT) {
+ $this->customOptionValuesFactory->create()
+ ->addValue($data)
+ ->setOption($this)
+ ->saveValues();
+ }
+ } elseif ($this->getGroupByType($this->getType()) === self::OPTION_GROUP_SELECT) {
throw new LocalizedException(__('Select type options required values rows.'));
}
@@ -804,7 +816,7 @@ public function setImageSizeY($imageSizeY)
}
/**
- * @param \Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface[] $values
+ * @param ProductCustomOptionValuesInterface[] $values
* @return $this
*/
public function setValues(array $values = null)
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/Text.php b/app/code/Magento/Catalog/Model/Product/Option/Type/Text.php
index fd0eae188fea9..9ffe75e513bce 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/Text.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/Text.php
@@ -84,7 +84,7 @@ public function validateUserValue($values)
*/
public function prepareForCart()
{
- if ($this->getIsValid() && strlen($this->getUserValue()) > 0) {
+ if ($this->getIsValid() && ($this->getUserValue() !== '')) {
return $this->getUserValue();
} else {
return null;
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Value.php b/app/code/Magento/Catalog/Model/Product/Option/Value.php
index fb7759b210bd9..ebbc060c99edf 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Value.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Value.php
@@ -76,6 +76,7 @@ class Value extends AbstractModel implements \Magento\Catalog\Api\Data\ProductCu
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
+ * @param CustomOptionPriceCalculator|null $customOptionPriceCalculator
*/
public function __construct(
\Magento\Framework\Model\Context $context,
@@ -89,6 +90,7 @@ public function __construct(
$this->_valueCollectionFactory = $valueCollectionFactory;
$this->customOptionPriceCalculator = $customOptionPriceCalculator
?? \Magento\Framework\App\ObjectManager::getInstance()->get(CustomOptionPriceCalculator::class);
+
parent::__construct(
$context,
$registry,
@@ -201,19 +203,15 @@ public function getProduct()
*/
public function saveValues()
{
+ $option = $this->getOption();
+
foreach ($this->getValues() as $value) {
$this->isDeleted(false);
- $this->setData(
- $value
- )->setData(
- 'option_id',
- $this->getOption()->getId()
- )->setData(
- 'store_id',
- $this->getOption()->getStoreId()
- );
-
- if ($this->getData('is_delete') == '1') {
+ $this->setData($value)
+ ->setData('option_id', $option->getId())
+ ->setData('store_id', $option->getStoreId());
+
+ if ((bool) $this->getData('is_delete') === true) {
if ($this->getId()) {
$this->deleteValues($this->getId());
$this->delete();
@@ -222,7 +220,7 @@ public function saveValues()
$this->save();
}
}
- //eof foreach()
+
return $this;
}
diff --git a/app/code/Magento/Catalog/Model/Product/Type/Price.php b/app/code/Magento/Catalog/Model/Product/Type/Price.php
index 7eaedf77eb859..f6caa299d66d7 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/Price.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/Price.php
@@ -474,14 +474,15 @@ public function getTierPriceCount($product)
*
* @param float $qty
* @param Product $product
+ *
* @return array|float
*/
- public function getFormatedTierPrice($qty, $product)
+ public function getFormattedTierPrice($qty, $product)
{
$price = $product->getTierPrice($qty);
if (is_array($price)) {
foreach (array_keys($price) as $index) {
- $price[$index]['formated_price'] = $this->priceCurrency->convertAndFormat(
+ $price[$index]['formatted_price'] = $this->priceCurrency->convertAndFormat(
$price[$index]['website_price']
);
}
@@ -492,15 +493,45 @@ public function getFormatedTierPrice($qty, $product)
return $price;
}
+ /**
+ * Get formatted by currency tier price
+ *
+ * @param float $qty
+ * @param Product $product
+ *
+ * @return array|float
+ *
+ * @deprecated
+ * @see getFormattedTierPrice()
+ */
+ public function getFormatedTierPrice($qty, $product)
+ {
+ return $this->getFormattedTierPrice($qty, $product);
+ }
+
+ /**
+ * Get formatted by currency product price
+ *
+ * @param Product $product
+ * @return array|float
+ */
+ public function getFormattedPrice($product)
+ {
+ return $this->priceCurrency->format($product->getFinalPrice());
+ }
+
/**
* Get formatted by currency product price
*
* @param Product $product
* @return array || float
+ *
+ * @deprecated
+ * @see getFormattedPrice()
*/
public function getFormatedPrice($product)
{
- return $this->priceCurrency->format($product->getFinalPrice());
+ return $this->getFormattedPrice($product);
}
/**
diff --git a/app/code/Magento/Catalog/Pricing/Price/ConfiguredRegularPrice.php b/app/code/Magento/Catalog/Pricing/Price/ConfiguredRegularPrice.php
index bcb6638b9cd25..83d59718400bd 100644
--- a/app/code/Magento/Catalog/Pricing/Price/ConfiguredRegularPrice.php
+++ b/app/code/Magento/Catalog/Pricing/Price/ConfiguredRegularPrice.php
@@ -63,7 +63,7 @@ public function setItem(ItemInterface $item) : ConfiguredRegularPrice
return $this;
}
-
+
/**
* Price value of product with configured options.
*
@@ -73,7 +73,7 @@ public function getValue()
{
$basePrice = parent::getValue();
- return $this->item
+ return $this->item && $basePrice !== false
? $basePrice + $this->configuredOptions->getItemOptionsValue($basePrice, $this->item)
: $basePrice;
}
diff --git a/app/code/Magento/Catalog/Pricing/Price/RegularPrice.php b/app/code/Magento/Catalog/Pricing/Price/RegularPrice.php
index 609255d852da3..1397ceb6bf71c 100644
--- a/app/code/Magento/Catalog/Pricing/Price/RegularPrice.php
+++ b/app/code/Magento/Catalog/Pricing/Price/RegularPrice.php
@@ -22,14 +22,14 @@ class RegularPrice extends AbstractPrice implements BasePriceProviderInterface
/**
* Get price value
*
- * @return float|bool
+ * @return float
*/
public function getValue()
{
if ($this->value === null) {
$price = $this->product->getPrice();
$priceInCurrentCurrency = $this->priceCurrency->convertAndRound($price);
- $this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : false;
+ $this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : 0;
}
return $this->value;
}
diff --git a/app/code/Magento/Catalog/Setup/Patch/Data/UpgradeWebsiteAttributes.php b/app/code/Magento/Catalog/Setup/Patch/Data/UpgradeWebsiteAttributes.php
index f9d6abbc37493..a190bde2c6775 100644
--- a/app/code/Magento/Catalog/Setup/Patch/Data/UpgradeWebsiteAttributes.php
+++ b/app/code/Magento/Catalog/Setup/Patch/Data/UpgradeWebsiteAttributes.php
@@ -156,6 +156,21 @@ private function processAttributeValues(array $attributeValueItems, $tableName)
*/
private function fetchAttributeValues($tableName)
{
+ //filter store groups which have more than 1 store
+ $multipleStoresInWebsite = array_values(
+ array_reduce(
+ array_filter($this->getGroupedStoreViews(), function ($storeViews) {
+ return is_array($storeViews) && count($storeViews) > 1;
+ }),
+ 'array_merge',
+ []
+ )
+ );
+
+ if (count($multipleStoresInWebsite) < 1) {
+ return [];
+ }
+
$connection = $this->moduleDataSetup->getConnection();
$batchSelectIterator = $this->batchQueryGenerator->generate(
'value_id',
@@ -184,9 +199,10 @@ private function fetchAttributeValues($tableName)
self::ATTRIBUTE_WEBSITE
)
->where(
- 'cpei.store_id <> ?',
- self::GLOBAL_STORE_VIEW_ID
- )
+ 'cpei.store_id IN (?)',
+ $multipleStoresInWebsite
+ ),
+ 1000
);
foreach ($batchSelectIterator as $select) {
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AddProductToCartActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddProductToCartActionGroup.xml
similarity index 80%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AddProductToCartActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddProductToCartActionGroup.xml
index 9380c3052a5f5..44c960dc37641 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AddProductToCartActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddProductToCartActionGroup.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminCategoryActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml
similarity index 98%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminCategoryActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml
index 1125a776bbdbd..7c04e9bd83d56 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminCategoryActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminCreateRootCategoryActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateRootCategoryActionGroup.xml
similarity index 88%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminCreateRootCategoryActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateRootCategoryActionGroup.xml
index b29a03b6d1819..e7d9a63484bc6 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminCreateRootCategoryActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateRootCategoryActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml
similarity index 98%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml
index 3ef8b961a81af..f64812fd5bf49 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
@@ -157,7 +157,7 @@
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductAttributeActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeActionGroup.xml
similarity index 78%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductAttributeActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeActionGroup.xml
index d3d6f13386856..3f4ee180fc65f 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductAttributeActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductAttributeSetActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeSetActionGroup.xml
similarity index 91%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductAttributeSetActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeSetActionGroup.xml
index 19e5bed0913a3..33f4ccac2b98f 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductAttributeSetActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeSetActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductGridActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml
similarity index 98%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductGridActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml
index 5f2c45b829780..9d6af144b8f22 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AdminProductGridActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AssertProductInStorefrontCategoryPageActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertProductInStorefrontCategoryPageActionGroup.xml
similarity index 79%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AssertProductInStorefrontCategoryPageActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertProductInStorefrontCategoryPageActionGroup.xml
index cfaf91e4788a8..4eca49dc28b57 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AssertProductInStorefrontCategoryPageActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertProductInStorefrontCategoryPageActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AssertProductInStorefrontProductPageActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertProductInStorefrontProductPageActionGroup.xml
similarity index 92%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AssertProductInStorefrontProductPageActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertProductInStorefrontProductPageActionGroup.xml
index 3d4195d92f2c7..59c874b8481d3 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/AssertProductInStorefrontProductPageActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertProductInStorefrontProductPageActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/CheckItemInLayeredNavigationActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/CheckItemInLayeredNavigationActionGroup.xml
similarity index 76%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/CheckItemInLayeredNavigationActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/CheckItemInLayeredNavigationActionGroup.xml
index 48a6c635c9d8d..304f38e227960 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/CheckItemInLayeredNavigationActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/CheckItemInLayeredNavigationActionGroup.xml
@@ -6,7 +6,7 @@
*/
-->
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/CustomOptionsActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/CustomOptionsActionGroup.xml
new file mode 100644
index 0000000000000..6b47479d41cb7
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/CustomOptionsActionGroup.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/MoveCategoryActionGroup.xml
similarity index 85%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/MoveCategoryActionGroup.xml
index 9a082efa75db6..ae9dc0557a9bd 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/MoveCategoryActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/OpenEditProductOnBackendActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/OpenEditProductOnBackendActionGroup.xml
similarity index 77%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/OpenEditProductOnBackendActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/OpenEditProductOnBackendActionGroup.xml
index 0dfa28275f796..07fba7cc6be06 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/OpenEditProductOnBackendActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/OpenEditProductOnBackendActionGroup.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/OpenProductFromCategoryPageActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/OpenProductFromCategoryPageActionGroup.xml
similarity index 80%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/OpenProductFromCategoryPageActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/OpenProductFromCategoryPageActionGroup.xml
index c76153f7be768..e8794ab895c6b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/OpenProductFromCategoryPageActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/OpenProductFromCategoryPageActionGroup.xml
@@ -5,7 +5,7 @@
* See COPYING.txt for license details.
-->
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/RestoreLayoutSettingActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/RestoreLayoutSettingActionGroup.xml
new file mode 100644
index 0000000000000..53acfe2b4372d
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/RestoreLayoutSettingActionGroup.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/SearchAndMultiselectActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SearchAndMultiselectActionGroup.xml
similarity index 83%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/SearchAndMultiselectActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/SearchAndMultiselectActionGroup.xml
index 784c40808f63b..943fe803232e6 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/SearchAndMultiselectActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SearchAndMultiselectActionGroup.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/SearchForProductOnBackendActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SearchForProductOnBackendActionGroup.xml
similarity index 84%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/SearchForProductOnBackendActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/SearchForProductOnBackendActionGroup.xml
index a0416802498f4..5fbc9c5d7fcad 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/SearchForProductOnBackendActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SearchForProductOnBackendActionGroup.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontAddToCartCustomOptionsProductPageActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAddToCartCustomOptionsProductPageActionGroup.xml
similarity index 78%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontAddToCartCustomOptionsProductPageActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAddToCartCustomOptionsProductPageActionGroup.xml
index 9cf32a9103fa8..105a5c58788de 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontAddToCartCustomOptionsProductPageActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAddToCartCustomOptionsProductPageActionGroup.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCategoryActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCategoryActionGroup.xml
new file mode 100644
index 0000000000000..25f059c84f4ef
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCategoryActionGroup.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCompareActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCompareActionGroup.xml
new file mode 100644
index 0000000000000..7af1cacfb3da8
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCompareActionGroup.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontProductActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontProductActionGroup.xml
new file mode 100644
index 0000000000000..eb672cd162e82
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontProductActionGroup.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductPageActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontProductPageActionGroup.xml
similarity index 95%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductPageActionGroup.xml
rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontProductPageActionGroup.xml
index f763b0c3d2768..d688a1dc2844e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductPageActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontProductPageActionGroup.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml
similarity index 89%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml
rename to app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml
index 9ce257942b30d..42351741d9fa8 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
simpleCategory
simplecategory
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ConstData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ConstData.xml
new file mode 100644
index 0000000000000..8ae57f9239902
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ConstData.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ 1
+ 2
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml
new file mode 100644
index 0000000000000..e93138fecfd47
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml
@@ -0,0 +1,38 @@
+
+
+
+
+ url_key
+ category
+
+
+ url_key
+ product
+
+
+ category_ids
+
+
+
+
+
+
+
+ description
+ API Product Description
+
+
+ short_description
+ API Product Short Description
+
+
+ news_from_date
+ 2018-05-17 00:00:00
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/FrontendLabelData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/FrontendLabelData.xml
new file mode 100644
index 0000000000000..2423383bc19f7
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/FrontendLabelData.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ 0
+ attribute
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ImageContentData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ImageContentData.xml
similarity index 98%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ImageContentData.xml
rename to app/code/Magento/Catalog/Test/Mftf/Data/ImageContentData.xml
index 79842ccb47e31..c674a8fc144ce 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ImageContentData.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ImageContentData.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAGAAYAMBIgACEQEDEQH/xACXAAEBAAMBAQEBAAAAAAAAAAAABgMEBQgCAQcQAAEDAQUFBgQDCQAAAAAAAAABAgMEBQYRFpESMTZV0QchcnOzwhMUIkEygaE1QlFSYXGCsbIBAAEFAQAAAAAAAAAAAAAAAAACAwQGBwERAAECAwMLBAMBAAAAAAAAAAEAAgMEERMhkRQxMzRBUVJTcXKxBRJhoSKBwUL/2gAMAwEAAhEDEQA/AP7+AYKysp7Po5aurlbFBEmL3u3NQ6ASaBdArcFnBN5/urzqn0d0Gf7q86p9HdCRkUzy3YFOWEXhOCpATef7q86p9HdBn+6vOqfR3QMimeW7AosIvCcFSAm8/wB1edU+jugz/dXnVPo7oGRTPLdgUWEXhOCpATef7q86p9HdBn+6vOqfR3QMimeW7AosIvCcFSA1bPtGktWiZWUM7Z6d6qjZG7lwXBf1Q2iO5paaOFCmyCDQoTd/uBLX8n3IUhN3+4EtfyfchIk9Zh9w8pyBpW9QvN4Bwbcsujis+pq2Q4Tq5HbW0u9XJj3Y4fc0ibjPgQjEY0GgJNTS4brj/FaIz3Q2FwFafNP4V3gc1aWz7FY+rjhVrsNjBrlcrsV3Iir/ABPxtqzRyM+boJKeJ7kakm2jkRV3Yom4TlbYf4xrnfFSBuqaCn7ouWwbc+4/FT90XTBz57RlbVvpqWjdUSRoiyfWjUbju71MUlqSyWdVPjpnsqIUVJI3ORFZ3fix+4OnoLSRU3V2HZnANKEjcEGOwVG74OxdUGjZM1RNQROqIlYuw3Zcr9pXpgn1f0xN4kQYgiww8bU4xwe0OG1eg+y7gCg8cvqOLEjuy7gCg8cvqOLEzT1HXIvcfKq0zpn9ShN3+4EtfyfchSE3f7gS1/J9yCJPWYfcPKTA0reoXm85l4P2HUf4/wDSHTPmSOOZiskY17F3tcmKKaXMwjGgvhj/AECMQrTFZ72ObvC5lvxq+gjeivRsUzXvVn4kb34qmpozxWc+NjVtWtqPiOREjbMj1Vf7YFHvMMdLTxP244ImP/maxEUhzMhaxC8UvABrXZuoR9pmLL+9xddfvXNrfkVtJyPqJaOpRiL8VHbKPT8+5THFVS1FnWnE+VKhsUbmsmamG3i1e78jsSwQzoiTRRyIm5HtRf8AZ9MjZGxGMY1rU/damCHTJPMQuDgAa5q31G0VpdnrnuRYO9xNaA1+/r9rUsmeGazqdscrHuZExHo1cVauH30U3THFBDBtfBijj2t+w1Ex0MhMgMcyG1r843J+GC1oDs69B9l3AFB45fUcWJHdl3AFB45fUcWJm3qOuRe4+VV5nTP6lCbv9wJa/k+5CkJu/wBwJa/k+5BEnrMPuHlJgaVvULzeADUlbUAAIQAAhAACF6D7LuAKDxy+o4sSO7LuAKDxy+o4sTMPUdci9x8qqTOmf1KE3f7gS1/J9yFITd/uBLX8n3IIk9Zh9w8pMDSt6hebwAakragABCAAEIAAQvQfZdwBQeOX1HFiR3ZdwBQeOX1HFiZh6jrkXuPlVSZ0z+pQwVlHT2hRy0lXE2WCVMHsduchnBEBINQmQaXhTeQLq8lp9XdRkC6vJafV3UpASMtmeY7Epy3i8RxU3kC6vJafV3UZAuryWn1d1KQBlszzHYlFvF4jipvIF1eS0+ruoyBdXktPq7qUgDLZnmOxKLeLxHFTeQLq8lp9XdRkC6vJafV3UpAGWzPMdiUW8XiOK1bPs6ksqiZR0MDYKdiqrY27kxXFf1U2gCO5xcauNSmySTUr/9k=
image/jpeg
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml
similarity index 78%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeData.xml
rename to app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml
index ab0eac4960dc6..f67370dcff296 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeData.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
attribute
textarea
@@ -94,4 +94,25 @@
true
ProductAttributeFrontendLabel
+
+ attribute
+ multiselect
+ global
+ false
+ false
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ ProductAttributeFrontendLabel
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeMediaGalleryEntryData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeMediaGalleryEntryData.xml
similarity index 85%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeMediaGalleryEntryData.xml
rename to app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeMediaGalleryEntryData.xml
index 5dee0651064a3..60b38812e4ced 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeMediaGalleryEntryData.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeMediaGalleryEntryData.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
image
Test Image
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeOptionData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeOptionData.xml
new file mode 100644
index 0000000000000..15c2dc8bbebca
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeOptionData.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+ option1
+ false
+ 0
+ Option1Store0
+ Option1Store1
+
+
+
+ option2
+ true
+ 1
+ Option2Store0
+ Option2Store1
+
+
+
+ option3
+ false
+ 2
+ Option3Store0
+ Option3Store1
+
+
+
+ option4
+ false
+ 3
+ Option4Store0
+ Option4Store1
+
+
+
+ option5
+ false
+ 4
+ Option5Store0
+ Option5Store1
+
+
+
+ option6
+ false
+ 5
+ Option6Store0
+ Option6Store1
+
+
+
+
+
+
+ customOption
+ false
+ 0
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeSetData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeSetData.xml
new file mode 100644
index 0000000000000..68c0a54ff88fc
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeSetData.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ 4
+ 7
+ 0
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
new file mode 100644
index 0000000000000..46ad529e5e89e
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
@@ -0,0 +1,383 @@
+
+
+
+
+
+ testSku
+ simple
+ 4
+ 4
+ testProductName
+ 123.00
+ testurlkey
+ 1
+ 100
+ EavStockItem
+ CustomAttributeCategoryIds
+
+
+ api-simple-product
+ simple
+ 4
+ 4
+ Api Simple Product
+ 123.00
+ api-simple-product
+ 1
+ 100
+ EavStockItem
+ CustomAttributeCategoryIds
+
+
+ ApiProductDescription
+ ApiProductShortDescription
+
+
+ Updated Api Simple Product
+ api-simple-product
+
+
+ SimpleProduct
+ simple
+ 4
+ SimpleProduct
+ 123.00
+ 4
+ 1
+ 1000
+ simpleproduct
+ 1
+ EavStockItem
+ CustomAttributeCategoryIds
+
+
+ SimpleProduct
+ simple
+ 4
+ SimpleProduct
+ 123.00
+ 4
+ 1
+ 1000
+ EavStockItem
+
+
+ simple
+ simple
+ 4
+ simple
+ 123.00
+ 4
+ 1
+ 1000
+ simple
+ EavStockItem
+ CustomAttributeCategoryIds
+
+
+ testSku
+ simple
+ 4
+ 4
+ OutOfStockProduct
+ 123.00
+ testurlkey
+ 1
+ 0
+ CustomAttributeCategoryIds
+
+
+ 321.00
+
+
+ SimpleOne
+ simple
+ 4
+ SimpleProduct
+ 1.23
+ 4
+ 1
+ EavStockItem
+ CustomAttributeProductAttribute
+
+
+ api-simple-product
+ simple
+ 4
+ 4
+ Api Simple Product
+ 123.00
+ api-simple-product
+ 1
+ 100
+ EavStockItem
+ CustomAttributeProductAttribute
+
+
+ api-simple-product
+ simple
+ 4
+ 1
+ Api Simple Product
+ 123.00
+ api-simple-product
+ 1
+ 100
+ EavStockItem
+ CustomAttributeProductAttribute
+
+
+ api-simple-product-two
+ simple
+ 4
+ 4
+ Api Simple Product Two
+ 234.00
+ api-simple-product-two
+ 1
+ 100
+ EavStockItem
+ CustomAttributeProductAttribute
+
+
+ api-simple-product-two
+ simple
+ 4
+ 1
+ Api Simple Product Two
+ 234.00
+ api-simple-product-two
+ 1
+ 100
+ EavStockItem
+ CustomAttributeProductAttribute
+
+
+ virtualproduct
+ virtual
+ 4
+ VirtualProduct
+ 99.99
+ 250
+ 0
+ 1
+ EavStockItem
+
+
+ SimpleTwo
+ simple
+ 4
+ SimpleProduct
+ 1.23
+ 4
+ 1
+ EavStockItem
+ CustomAttributeProductUrlKey
+
+
+ Image1
+ 1.00
+ Upload File
+ Yes
+ magento-logo.png
+ magento-logo
+
+
+ MagentoLogo
+ 1.00
+ Upload File
+ Yes
+ magento-logo.png
+ magento-logo
+ png
+
+
+ 霁产品
+ simple
+ 4
+ 4
+ 霁产品
+ 123.00
+ testurlkey
+ 1
+ 100
+ EavStockItem
+ CustomAttributeCategoryIds
+
+
+ virtualProduct
+ virtual
+ 4
+ 4
+ virtualProduct
+ 12.34
+ virtualproduct
+ 1
+ 100
+ 0
+ EavStockItem
+ CustomAttributeCategoryIds
+
+
+ testProductWithDescriptionSku
+ simple
+ 4
+ 4
+ testProductWithDescriptionName
+ 123.00
+ testproductwithdescriptionurlkey
+ 1
+ 100
+ EavStockItem
+ CustomAttributeCategoryIds
+ ApiProductDescription
+ ApiProductShortDescription
+
+
+ api-simple-product
+ simple
+ 4
+ 4
+ Api Simple Product
+ 123.00
+ api-simple-product
+ 1
+ 100
+ EavStockItem
+ ApiProductDescription
+ ApiProductShortDescription
+
+
+ testSku
+ simple
+ 4
+ 4
+ testproductname
+ 123.00
+ testurlkey
+ 1
+ 100
+ EavStockItem
+ CustomAttributeCategoryIds
+
+
+
+ magento.jpg
+ ProductOptionField
+ ProductOptionArea
+ ProductOptionFile
+ ProductOptionDropDown
+ ProductOptionRadiobutton
+ ProductOptionCheckbox
+ ProductOptionMultiSelect
+ ProductOptionDate
+ ProductOptionDateTime
+ ProductOptionTime
+
+
+ api-virtual-product
+ virtual
+ 4
+ 4
+ Api Virtual Product
+ 123.00
+ api-virtual-product
+ 1
+ 100
+ EavStockItem
+ ApiProductDescription
+ ApiProductShortDescription
+
+
+ SimpleProduct
+ simple
+ 4
+ SimpleProduct
+ 125.00
+ 4
+ 1
+ 1000
+ simpleproduct
+ 1
+ EavStockItem
+ ApiProductNewsFromDate
+
+
+ Double Quote"
+ doubleQuote
+ simple
+ 4
+ 10.00
+ 4
+ 1
+ 1000
+ 1
+ EavStockItem
+
+
+
+
+
+
+
+
+
+
+
+ api-simple-product
+ simple
+ 4
+ 4
+ Api Simple Product
+ 1.00
+
+
+ api-simple-product
+ simple
+ 4
+ 4
+ Api Simple Product
+ 100.00
+
+
+ api-simple-product
+ simple
+ 4
+ 4
+ Api Simple Product
+ 10.00
+ api-simple-product
+ 1
+ EavStock10
+ CustomAttributeCategoryIds
+
+
+ api-simple-product
+ simple
+ 4
+ 4
+ Api Simple Product
+ 100.00
+ api-simple-product
+ 1
+ EavStock100
+ CustomAttributeCategoryIds
+
+
+ api-simple-product
+ simple
+ 4
+ 4
+ Api Simple Product
+ 100.00
+ api-simple-product
+ 1
+ EavStock100
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductExtensionAttributeData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductExtensionAttributeData.xml
new file mode 100644
index 0000000000000..88ff2bbace47a
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductExtensionAttributeData.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+ Qty_1000
+
+
+ Qty_100
+
+
+ Qty_10
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductGridData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductGridData.xml
new file mode 100644
index 0000000000000..b123800a6cc84
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductGridData.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ 10
+ 100
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductOptionData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionData.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductOptionData.xml
rename to app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionData.xml
index 2abc557d44d96..95905eb90d926 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductOptionData.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionData.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
OptionField
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductOptionValueData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionValueData.xml
similarity index 90%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductOptionValueData.xml
rename to app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionValueData.xml
index 615f6aaa705bf..815f8cf16809b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductOptionValueData.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionValueData.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
OptionValueDropDown1
1
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/StockItemData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/StockItemData.xml
new file mode 100644
index 0000000000000..4fae51de86c45
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/StockItemData.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ 1000
+ true
+
+
+ 100
+ true
+
+
+ 10
+ true
+
+
+ 99
+ true
+
+
+ 101
+ true
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/StoreLabelData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/StoreLabelData.xml
new file mode 100644
index 0000000000000..a703e56beda01
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/StoreLabelData.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+ 0
+ option1
+
+
+ 1
+ option1
+
+
+ 0
+ option2
+
+
+ 1
+ option2
+
+
+ 0
+ option3
+
+
+ 1
+ option3
+
+
+ 0
+ option4
+
+
+ 1
+ option4
+
+
+ 0
+ option5
+
+
+ 1
+ option5
+
+
+ 0
+ option6
+
+
+ 1
+ option6
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/LICENSE.txt b/app/code/Magento/Catalog/Test/Mftf/LICENSE.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/LICENSE.txt
rename to app/code/Magento/Catalog/Test/Mftf/LICENSE.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/LICENSE_AFL.txt b/app/code/Magento/Catalog/Test/Mftf/LICENSE_AFL.txt
similarity index 100%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/LICENSE_AFL.txt
rename to app/code/Magento/Catalog/Test/Mftf/LICENSE_AFL.txt
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/category-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/category-meta.xml
similarity index 92%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/category-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/category-meta.xml
index 2699499a49900..0880315db5d6b 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/category-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/category-meta.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/custom_attribute-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/custom_attribute-meta.xml
similarity index 80%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/custom_attribute-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/custom_attribute-meta.xml
index e245a3b8bf8b9..aed9b7a979836 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/custom_attribute-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/custom_attribute-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
string
string
diff --git a/app/code/Magento/Catalog/Test/Mftf/Metadata/empty_extension_attribute-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/empty_extension_attribute-meta.xml
new file mode 100644
index 0000000000000..d8410593cb5b4
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/empty_extension_attribute-meta.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Metadata/frontend_label-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/frontend_label-meta.xml
new file mode 100644
index 0000000000000..d0bcbd3e5db97
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/frontend_label-meta.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ integer
+ string
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product-meta.xml
similarity index 97%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product-meta.xml
index b04b4bb98c854..212de2b39d363 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute-meta.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute-meta.xml
index bb09a0c86e50c..93396352ba506 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_media_gallery_entry-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_media_gallery_entry-meta.xml
similarity index 91%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_media_gallery_entry-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_media_gallery_entry-meta.xml
index 1697941013156..8033e8c33a349 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_media_gallery_entry-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_media_gallery_entry-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_option-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_option-meta.xml
similarity index 86%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_option-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_option-meta.xml
index 1b4f5d1a5254c..176afa8d58d7c 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_option-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_option-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_set-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_set-meta.xml
similarity index 87%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_set-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_set-meta.xml
index 7b5e96d707573..eef82b07aaf4f 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_attribute_set-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_attribute_set-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
integer
diff --git a/app/code/Magento/Catalog/Test/Mftf/Metadata/product_extension_attribute-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_extension_attribute-meta.xml
new file mode 100644
index 0000000000000..8d0d1e66c81e3
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_extension_attribute-meta.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ stock_item
+
+
+ stock_item
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_link-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_link-meta.xml
similarity index 85%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_link-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product_link-meta.xml
index 899dc3a7f4a8c..5e631b2ea3a28 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_link-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_link-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
string
string
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_link_extension_attribute-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_link_extension_attribute-meta.xml
similarity index 76%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_link_extension_attribute-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product_link_extension_attribute-meta.xml
index 03527349541dc..07ea02f5b7aee 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_link_extension_attribute-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_link_extension_attribute-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
integer
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_links-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_links-meta.xml
similarity index 78%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_links-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product_links-meta.xml
index 34e8d0fca6833..56b3ee25ef735 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_links-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_links-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
application/json
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_option-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_option-meta.xml
similarity index 89%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_option-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product_option-meta.xml
index 730caf69113d6..adc5a33507af6 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_option-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_option-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
string
integer
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_option_value-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_option_value-meta.xml
similarity index 82%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_option_value-meta.xml
rename to app/code/Magento/Catalog/Test/Mftf/Metadata/product_option_value-meta.xml
index 47c5195b19172..f4273f5796830 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_option_value-meta.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/product_option_value-meta.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
string
integer
diff --git a/app/code/Magento/Catalog/Test/Mftf/Metadata/stock_item-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/stock_item-meta.xml
new file mode 100644
index 0000000000000..e7e79d69055c6
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/stock_item-meta.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ integer
+ boolean
+
+
+ integer
+ boolean
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Metadata/store_label-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/store_label-meta.xml
new file mode 100644
index 0000000000000..abb9b003dc59e
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/store_label-meta.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ integer
+ string
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Metadata/validation_rule-meta.xml b/app/code/Magento/Catalog/Test/Mftf/Metadata/validation_rule-meta.xml
new file mode 100644
index 0000000000000..c568e52b2ab3c
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Metadata/validation_rule-meta.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ string
+ string
+
+
+ string
+ string
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryEditPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml
similarity index 82%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryEditPage.xml
rename to app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml
index 95e80238d4af6..cfefa8cb2c4bc 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryEditPage.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryPage.xml
similarity index 81%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml
rename to app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryPage.xml
index 7d0e7f4f99e42..7cabe0e18f0b6 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryPage.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeFormPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeFormPage.xml
new file mode 100644
index 0000000000000..b04aff5f161da
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeFormPage.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeGridPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeGridPage.xml
new file mode 100644
index 0000000000000..a5de7453d9c23
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeGridPage.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeSetEditPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeSetEditPage.xml
new file mode 100644
index 0000000000000..4034f2ab075d4
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeSetEditPage.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeSetGridPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeSetGridPage.xml
new file mode 100644
index 0000000000000..0d879768eb494
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributeSetGridPage.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributesEditPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributesEditPage.xml
new file mode 100644
index 0000000000000..4918041d2cd88
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductAttributesEditPage.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductCreatePage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductCreatePage.xml
new file mode 100644
index 0000000000000..35fa00efcfe8e
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductCreatePage.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductEditPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductEditPage.xml
new file mode 100644
index 0000000000000..9312d4dfcfbe9
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductEditPage.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductIndexPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductIndexPage.xml
similarity index 76%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductIndexPage.xml
rename to app/code/Magento/Catalog/Test/Mftf/Page/AdminProductIndexPage.xml
index 492cb0c95407a..66cd691176268 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductIndexPage.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminProductIndexPage.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/ProductCatalogPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/ProductCatalogPage.xml
new file mode 100644
index 0000000000000..742b46fcaf7ed
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/ProductCatalogPage.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/StorefrontCategoryPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/StorefrontCategoryPage.xml
new file mode 100644
index 0000000000000..c5b9fe869558e
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/StorefrontCategoryPage.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/StorefrontProductComparePage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/StorefrontProductComparePage.xml
new file mode 100644
index 0000000000000..f0599a021d4c4
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/StorefrontProductComparePage.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/StorefrontProductPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/StorefrontProductPage.xml
similarity index 77%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/StorefrontProductPage.xml
rename to app/code/Magento/Catalog/Test/Mftf/Page/StorefrontProductPage.xml
index d6e135e9af24f..8fd59585938be 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/StorefrontProductPage.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Page/StorefrontProductPage.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/README.md b/app/code/Magento/Catalog/Test/Mftf/README.md
new file mode 100644
index 0000000000000..e7a95609c394b
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/README.md
@@ -0,0 +1,3 @@
+# Catalog Functional Tests
+
+The Functional Test Module for **Magento Catalog** module.
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminAddProductsToOptionPanelSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminAddProductsToOptionPanelSection.xml
new file mode 100644
index 0000000000000..4541ad25af231
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminAddProductsToOptionPanelSection.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryBasicFieldSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryBasicFieldSection.xml
similarity index 96%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryBasicFieldSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryBasicFieldSection.xml
index 7de2390e5348a..3ed3763da19d6 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryBasicFieldSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryBasicFieldSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryContentSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryContentSection.xml
similarity index 82%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryContentSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryContentSection.xml
index d0e129e1bb441..59537274f23c9 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryContentSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryContentSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryMainActionsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMainActionsSection.xml
similarity index 81%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryMainActionsSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMainActionsSection.xml
index e726e5bfb7c63..60a6d852bf6ef 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryMainActionsSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMainActionsSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMessagesSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMessagesSection.xml
new file mode 100644
index 0000000000000..1214cfd2eb224
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMessagesSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryModalSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryModalSection.xml
similarity index 76%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryModalSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryModalSection.xml
index d36256bf75d81..03b9d76778555 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryModalSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryModalSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryProductsGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml
similarity index 84%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryProductsGridSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml
index e5370c60ef570..540a97fd04e36 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryProductsGridSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml
new file mode 100644
index 0000000000000..dc254bdf15982
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySEOSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySEOSection.xml
similarity index 83%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySEOSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySEOSection.xml
index 0e01660d5fce9..35852abe3505e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySEOSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySEOSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarActionSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarActionSection.xml
new file mode 100644
index 0000000000000..e53a9989d661c
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarActionSection.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml
similarity index 85%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml
index 5e080bbb7fdba..524fac78bc1c1 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryWarningMessagesPopupSection.xml
similarity index 76%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryWarningMessagesPopupSection.xml
index b95f0d8bd2141..82b3b76df3d2e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryWarningMessagesPopupSection.xml
@@ -6,7 +6,7 @@
*/
-->
-
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCreateProductAttributeSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection.xml
similarity index 95%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCreateProductAttributeSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection.xml
index 362a039e34122..e1eef15e9d476 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCreateProductAttributeSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminEditProductAttributesSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminEditProductAttributesSection.xml
similarity index 83%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminEditProductAttributesSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminEditProductAttributesSection.xml
index bb0343c3a85c0..703e9e7ec70ac 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminEditProductAttributesSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminEditProductAttributesSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml
similarity index 82%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeGridSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml
index f1347643cbd9d..820e03a0f5e98 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeGridSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetActionSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetActionSection.xml
new file mode 100644
index 0000000000000..4c309584d4d56
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetActionSection.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetEditSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetEditSection.xml
similarity index 89%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetEditSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetEditSection.xml
index 9a69761ee1550..a2193bcafbb01 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetEditSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetEditSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetGridSection.xml
similarity index 80%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetGridSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetGridSection.xml
index 0df7cbc65d6c5..08724222a3885 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetGridSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetGridSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetSection.xml
similarity index 89%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetSection.xml
index 2c99945b0989e..9e320d9e8b08d 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeSetSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductCategoryCreationSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductCategoryCreationSection.xml
similarity index 83%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductCategoryCreationSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductCategoryCreationSection.xml
index a4566115099ef..81290bf281a56 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductCategoryCreationSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductCategoryCreationSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductContentSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductContentSection.xml
new file mode 100644
index 0000000000000..b73c630d6d963
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductContentSection.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductCustomizableOptionsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductCustomizableOptionsSection.xml
similarity index 83%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductCustomizableOptionsSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductCustomizableOptionsSection.xml
index cb80dade856a7..d991580d58124 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductCustomizableOptionsSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductCustomizableOptionsSection.xml
@@ -7,10 +7,10 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
-
+
@@ -20,7 +20,6 @@
-
@@ -38,5 +37,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFiltersSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFiltersSection.xml
similarity index 93%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFiltersSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFiltersSection.xml
index 2ad371f7c51bc..4c6c1020e190d 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFiltersSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFiltersSection.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormActionSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormActionSection.xml
new file mode 100644
index 0000000000000..a314f9cd0ddfd
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormActionSection.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormChangeStoreSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormChangeStoreSection.xml
new file mode 100644
index 0000000000000..8c9e92d912bf3
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormChangeStoreSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection.xml
similarity index 98%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection.xml
index 7c1c578d96997..dd297bf301fa0 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridActionSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridActionSection.xml
new file mode 100644
index 0000000000000..4ce9580405a97
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridActionSection.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridConfirmActionSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridConfirmActionSection.xml
similarity index 77%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridConfirmActionSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridConfirmActionSection.xml
index c9ea9993c7bd3..d8567df81b6b3 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridConfirmActionSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridConfirmActionSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridFilterSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridFilterSection.xml
similarity index 94%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridFilterSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridFilterSection.xml
index b0b8d90c8625e..4683576bf9516 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridFilterSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridFilterSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridPaginationSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridPaginationSection.xml
similarity index 87%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridPaginationSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridPaginationSection.xml
index a60791b3e23db..9ef89e1260fa4 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridPaginationSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridPaginationSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml
similarity index 89%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml
index 36cbd2ddde6ab..de3c2b731a3d5 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml
@@ -6,7 +6,7 @@
*/
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridTableHeaderSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridTableHeaderSection.xml
new file mode 100644
index 0000000000000..fc6ccea20d3c2
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridTableHeaderSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml
new file mode 100644
index 0000000000000..ce10b1e52aeb0
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductMessagesSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductMessagesSection.xml
new file mode 100644
index 0000000000000..5f2e6bd6cf721
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductMessagesSection.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductModalSlideGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductModalSlideGridSection.xml
new file mode 100644
index 0000000000000..bef213e6cdae0
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductModalSlideGridSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductRelatedUpSellCrossSellSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductRelatedUpSellCrossSellSection.xml
similarity index 80%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductRelatedUpSellCrossSellSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminProductRelatedUpSellCrossSellSection.xml
index 225bedb6fd2e6..636a7b5c85e8d 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductRelatedUpSellCrossSellSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductRelatedUpSellCrossSellSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductSEOSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductSEOSection.xml
new file mode 100644
index 0000000000000..1d49d05363612
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductSEOSection.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminUpdateAttributesSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminUpdateAttributesSection.xml
similarity index 93%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminUpdateAttributesSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/AdminUpdateAttributesSection.xml
index 7ef8d7706ba20..3048f0e3f5669 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminUpdateAttributesSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminUpdateAttributesSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryFilterSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryFilterSection.xml
new file mode 100644
index 0000000000000..631cb36e16817
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryFilterSection.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategoryMainSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryMainSection.xml
similarity index 78%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategoryMainSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryMainSection.xml
index 45a85386fe726..2a6003d837b2e 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategoryMainSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryMainSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml
new file mode 100644
index 0000000000000..4892e25818e2c
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategorySidebarSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection.xml
similarity index 79%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategorySidebarSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection.xml
index 406e9f5abd434..9cd35f65c297a 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategorySidebarSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection.xml
@@ -6,7 +6,7 @@
*/
-->
-
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryTopToolbarSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryTopToolbarSection.xml
new file mode 100644
index 0000000000000..2b44bf1db7efd
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryTopToolbarSection.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontComparisonSidebarSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontComparisonSidebarSection.xml
similarity index 81%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontComparisonSidebarSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/StorefrontComparisonSidebarSection.xml
index 615d37f75cd48..0fdda3eaae952 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontComparisonSidebarSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontComparisonSidebarSection.xml
@@ -7,7 +7,7 @@
-->
+ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontFooterSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontFooterSection.xml
new file mode 100644
index 0000000000000..cf956004ae498
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontFooterSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontHeaderSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontHeaderSection.xml
new file mode 100644
index 0000000000000..6b0130eefc39b
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontHeaderSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontMessagesSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontMessagesSection.xml
new file mode 100644
index 0000000000000..1a9406b9975e6
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontMessagesSection.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontNavigationSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontNavigationSection.xml
similarity index 77%
rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontNavigationSection.xml
rename to app/code/Magento/Catalog/Test/Mftf/Section/StorefrontNavigationSection.xml
index 285640ec6a30a..ad575b640bd20 100644
--- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontNavigationSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontNavigationSection.xml
@@ -6,7 +6,7 @@
*/
-->
-
+