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"> diff --git a/app/code/Magento/Braintree/Test/Mftf/README.md b/app/code/Magento/Braintree/Test/Mftf/README.md new file mode 100644 index 0000000000000..6ee177a9cdcd2 --- /dev/null +++ b/app/code/Magento/Braintree/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Braintree Functional Tests + +The Functional Test Module for **Magento Braintree** module. diff --git a/app/code/Magento/Braintree/Test/Mftf/composer.json b/app/code/Magento/Braintree/Test/Mftf/composer.json new file mode 100644 index 0000000000000..2f827424cb7f1 --- /dev/null +++ b/app/code/Magento/Braintree/Test/Mftf/composer.json @@ -0,0 +1,33 @@ +{ + "name": "magento/functional-test-module-braintree", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0", + "magento/magento-composer-installer": "100.0.0-dev", + "magento/functional-test-module-catalog": "100.0.0-dev", + "magento/functional-test-module-backend": "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-directory": "100.0.0-dev", + "magento/functional-test-module-instant-purchase": "100.0.0-dev", + "magento/functional-test-module-payment": "100.0.0-dev", + "magento/functional-test-module-paypal": "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-ui": "100.0.0-dev", + "magento/functional-test-module-vault": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-checkout-agreements": "100.0.0-dev", + "magento/functional-test-module-theme": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "proprietary" + ] +} diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php index 7b9d59a5bc482..36ea3aea465dd 100644 --- a/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php +++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php @@ -142,7 +142,7 @@ public function testGetCcTypesMapper($value, $expected) static::assertEquals( $expected, - $this->model->getCctypesMapper() + $this->model->getCcTypesMapper() ); } diff --git a/app/code/Magento/Braintree/composer.json b/app/code/Magento/Braintree/composer.json index 5854a717513ba..8fb98dce72c92 100644 --- a/app/code/Magento/Braintree/composer.json +++ b/app/code/Magento/Braintree/composer.json @@ -6,7 +6,7 @@ }, "require": { "php": "~7.1.3||~7.2.0", - "braintree/braintree_php": "3.28.0", + "braintree/braintree_php": "3.34.0", "magento/framework": "*", "magento/magento-composer-installer": "*", "magento/module-catalog": "*", diff --git a/app/code/Magento/Braintree/etc/adminhtml/system.xml b/app/code/Magento/Braintree/etc/adminhtml/system.xml index f46da366b64a3..c49402070f0fd 100644 --- a/app/code/Magento/Braintree/etc/adminhtml/system.xml +++ b/app/code/Magento/Braintree/etc/adminhtml/system.xml @@ -44,7 +44,7 @@ http://docs.magento.com/m2/ce/user_guide/payment/braintree.html Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Hint - + 1 Magento\Config\Block\System\Config\Form\Fieldset @@ -77,7 +77,7 @@ Magento\Config\Model\Config\Backend\Encrypted - + 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 @@ + + + + + + + + + + <description value="Customer should not be able to add a Bundle Product to the cart without selecting options"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-233"/> + <group value="Bundle"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="login"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> + </before> + <after> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="logout"/> + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> + </after> + + <!-- Start creating a bundle product --> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductList"/> + <waitForPageLoad stepKey="waitForProductList"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateProduct"> + <argument name="product" value="BundleProduct"/> + </actionGroup> + <actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillNameAndSku"> + <argument name="product" value="BundleProduct"/> + </actionGroup> + + <!-- Add Option One, a "Drop-down" type option --> + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addBundleOptionWithTwoProducts1"> + <argument name="x" value="0"/> + <argument name="n" value="1"/> + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> + <argument name="optionTitle" value="Option One"/> + <argument name="inputType" value="select"/> + </actionGroup> + + <!-- Add Option Two, a "Radio Buttons" type option --> + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addBundleOptionWithTwoProducts2"> + <argument name="x" value="1"/> + <argument name="n" value="2"/> + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> + <argument name="optionTitle" value="Option Two"/> + <argument name="inputType" value="radio"/> + </actionGroup> + + <!-- Add Option Three, a "Checkbox" type option --> + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addBundleOptionWithTwoProducts3"> + <argument name="x" value="2"/> + <argument name="n" value="3"/> + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> + <argument name="optionTitle" value="Option Three"/> + <argument name="inputType" value="checkbox"/> + </actionGroup> + + <!-- Add Option Four, a "Multi Select" type option --> + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addBundleOptionWithTwoProducts4"> + <argument name="x" value="3"/> + <argument name="n" value="4"/> + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> + <argument name="optionTitle" value="Option Four"/> + <argument name="inputType" value="multi"/> + </actionGroup> + + <!-- Save product and go to storefront --> + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> + <amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/> + <waitForPageLoad stepKey="waitForStorefront"/> + <click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomize"/> + + <!-- See validation errors for all 4 options --> + <click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart1"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('1')}}" userInput="This is a required field." stepKey="error1"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('2')}}" userInput="Please select one of the options." stepKey="error2"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('3')}}" userInput="Please select one of the options." stepKey="error3"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('4')}}" userInput="This is a required field." stepKey="error4"/> + + <!-- Fill option 1, see validation errors for 3 other options --> + <selectOption selector="select.bundle-option-select" userInput="$$simpleProduct1.name$$ +$123.00" stepKey="selectOption1"/> + <click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart2"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('1')}}" userInput="This is a required field." stepKey="error5"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('2')}}" userInput="Please select one of the options." stepKey="error6"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('3')}}" userInput="Please select one of the options." stepKey="error7"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('4')}}" userInput="This is a required field." stepKey="error8"/> + + <!-- Fill option 2, see validation errors for 2 other options --> + <click selector="input[type='radio']:nth-of-type(1)" stepKey="selectOption2"/> + <click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart3"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('1')}}" userInput="This is a required field." stepKey="error9"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('2')}}" userInput="Please select one of the options." stepKey="error10"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('3')}}" userInput="Please select one of the options." stepKey="error11"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('4')}}" userInput="This is a required field." stepKey="error12"/> + + <!-- Fill option 3, see validation errors for 1 other options --> + <checkOption selector="input[type='checkbox']:nth-of-type(1)" stepKey="selectOption3"/> + <click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart4"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('1')}}" userInput="This is a required field." stepKey="error13"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('2')}}" userInput="Please select one of the options." stepKey="error14"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('3')}}" userInput="Please select one of the options." stepKey="error15"/> + <see selector="{{StorefrontBundledSection.nthOptionDiv('4')}}" userInput="This is a required field." stepKey="error16"/> + + <!-- Fill option 4, dont see any validation errors --> + <selectOption selector="select[multiple='multiple']" userInput="$$simpleProduct1.name$$ +$123.00" stepKey="selectOption4"/> + <click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart5"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('1')}}" userInput="This is a required field." stepKey="error17"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('2')}}" userInput="Please select one of the options." stepKey="error18"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('3')}}" userInput="Please select one of the options." stepKey="error19"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('4')}}" userInput="This is a required field." stepKey="error20"/> + </test> + + <test name="StorefrontBundleAddToCartSuccessTest"> + <annotations> + <features value="Bundle"/> + <stories value="Bundle product details page"/> + <title value="Customer should be able to add the bundle product to the cart"/> + <description value="Customer should be able to add the bundle product to the cart"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-232"/> + <group value="Bundle"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="login"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> + </before> + <after> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="logout"/> + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> + </after> + + <!-- Start creating a bundle product --> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductList"/> + <waitForPageLoad stepKey="waitForProductList"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateProduct"> + <argument name="product" value="BundleProduct"/> + </actionGroup> + <actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillNameAndSku"> + <argument name="product" value="BundleProduct"/> + </actionGroup> + + <!-- Add Option One, a "Drop-down" type option --> + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addBundleOptionWithTwoProducts1"> + <argument name="x" value="0"/> + <argument name="n" value="1"/> + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> + <argument name="optionTitle" value="Option One"/> + <argument name="inputType" value="select"/> + </actionGroup> + + <!-- Add Option Two, a "Radio Buttons" type option --> + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addBundleOptionWithTwoProducts2"> + <argument name="x" value="1"/> + <argument name="n" value="2"/> + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> + <argument name="optionTitle" value="Option Two"/> + <argument name="inputType" value="radio"/> + </actionGroup> + + <!-- Add Option Three, a "Checkbox" type option --> + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addBundleOptionWithTwoProducts3"> + <argument name="x" value="2"/> + <argument name="n" value="3"/> + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> + <argument name="optionTitle" value="Option Three"/> + <argument name="inputType" value="checkbox"/> + </actionGroup> + + <!-- Add Option Four, a "Multi Select" type option --> + <actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addBundleOptionWithTwoProducts4"> + <argument name="x" value="3"/> + <argument name="n" value="4"/> + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> + <argument name="optionTitle" value="Option Four"/> + <argument name="inputType" value="multi"/> + </actionGroup> + + <!-- Save product and go to storefront --> + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> + <amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/> + <waitForPageLoad stepKey="waitForStorefront"/> + <click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomize"/> + + <!-- Select all applicable options --> + <selectOption selector="select.bundle-option-select" userInput="$$simpleProduct1.name$$ +$123.00" stepKey="selectOption1"/> + <click selector="input[type='radio']:nth-of-type(1)" stepKey="selectOption2"/> + <checkOption selector="input[type='checkbox']:nth-of-type(1)" stepKey="selectOption3"/> + <selectOption selector="select[multiple='multiple']" userInput="$$simpleProduct1.name$$ +$123.00" stepKey="selectOption4"/> + + <!-- Customize and add the bundle product to our cart --> + <click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart1"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('1')}}" userInput="This is a required field." stepKey="validForm1"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('2')}}" userInput="Please select one of the options." stepKey="validForm2"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('3')}}" userInput="Please select one of the options." stepKey="validForm3"/> + <dontSee selector="{{StorefrontBundledSection.nthOptionDiv('4')}}" userInput="This is a required field." stepKey="validForm4"/> + <see selector="{{StorefrontMessagesSection.success}}" userInput="You added {{BundleProduct.name}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/> + + <!-- Verify cart contents --> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/> + <waitForPageLoad stepKey="waitForCart"/> + <see selector="{{StorefrontBundledSection.nthItemOptionsTitle('1')}}" userInput="Option One" stepKey="seeOption1"/> + <see selector="{{StorefrontBundledSection.nthItemOptionsTitle('2')}}" userInput="Option Two" stepKey="seeOption2"/> + <see selector="{{StorefrontBundledSection.nthItemOptionsTitle('3')}}" userInput="Option Three" stepKey="seeOption3"/> + <see selector="{{StorefrontBundledSection.nthItemOptionsTitle('4')}}" userInput="Option Four" stepKey="seeOption4"/> + <see selector="{{StorefrontBundledSection.nthItemOptionsValue('1')}}" userInput="50 x $$simpleProduct1.name$$ $123.00" stepKey="seeOptionValue1"/> + <see selector="{{StorefrontBundledSection.nthItemOptionsValue('2')}}" userInput="50 x $$simpleProduct1.name$$ $123.00" stepKey="seeOptionValue2"/> + <see selector="{{StorefrontBundledSection.nthItemOptionsValue('3')}}" userInput="50 x $$simpleProduct1.name$$ $123.00" stepKey="seeOptionValue3"/> + <see selector="{{StorefrontBundledSection.nthItemOptionsValue('4')}}" userInput="50 x $$simpleProduct1.name$$ $123.00" stepKey="seeOptionValue4"/> + </test> +</tests> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="StorefrontBundleProductShownInCategoryListAndGrid"> + <annotations> + <features value="Bundle"/> + <stories value="Bundle products list on Storefront"/> + <title value="Customer should be able to see bundle products in the category products list and grid views"/> + <description value="Customer should be able to see bundle products in the category products list and grid views"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-226"/> + <group value="Bundle"/> + </annotations> + <before> + <!--Admin login--> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct3"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct4"/> + </before> + <after> + <!--Logging out--> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> + <deleteData createDataKey="simpleProduct3" stepKey="deleteSimpleProduct3"/> + <deleteData createDataKey="simpleProduct4" stepKey="deleteSimpleProduct4"/> + </after> + <!--Make category--> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="goToCategoryPage"/> + <waitForPageLoad stepKey="waitForCategoryPageLoad"/> + <actionGroup ref="CreateCategory" stepKey="createASubcategory"> + <argument name="categoryEntity" value="SimpleSubCategory"/> + </actionGroup> + + <!--Go to bundle product creation page--> + <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" /> + <waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/> + + <!--Categories--> + <click selector="{{AdminProductFormBundleSection.categoriesDropDown}}" stepKey="dropDownCategories"/> + <fillField selector="{{AdminProductFormBundleSection.searchForCategory}}" userInput="{{SimpleSubCategory.name}}" stepKey="searchForCategory"/> + <click selector="{{AdminProductFormBundleSection.selectCategory}}" stepKey="selectCategory"/> + <click selector="{{AdminProductFormBundleSection.categoriesLabel}}" stepKey="clickOnCategoriesLabelToCloseOptions"/> + + <!--Create bundle product--> + <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/> + <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/> + <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/> + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/> + <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/> + <waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/> + <click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/> + <actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions"> + <argument name="product" value="$$simpleProduct1$$"/> + </actionGroup> + <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/> + <actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions2"> + <argument name="product" value="$$simpleProduct2$$"/> + </actionGroup> + <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/> + <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/> + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/> + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/> + <actionGroup ref="AncillaryPrepBundleProduct" stepKey="createBundledProductForTwoSimpleProducts"/> + + <!--Save the product--> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/> + <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/> + + <!--Go to category page--> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePage"/> + <waitForPageLoad stepKey="waitForHomePageToload"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="cartClickCategory"/> + + <!--Check in grid view--> + <seeInTitle userInput="{{SimpleSubCategory.name}}" stepKey="assertCategoryNameInTitle"/> + <see userInput="{{SimpleSubCategory.name}}" selector="{{StorefrontCategoryMainSection.CategoryTitle}}" stepKey="assertCategoryName"/> + <see userInput="1" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="assertProductCount"/> + <seeElement selector="{{StorefrontCategoryProductSection.listedProduct('1')}}" stepKey="assertBundleProductPresence"/> + <see userInput="{{BundleProduct.name}}" selector="{{StorefrontCategoryProductSection.ProductTitleByNumber('1')}}" stepKey="checkTitle"/> + <see userInput="$1,230.00" selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" stepKey="checkPrice"/> + + <!--Check in list view--> + <click selector="{{StorefrontCategoryProductSection.categoryListView}}" stepKey="switchToListView"/> + <seeInTitle userInput="{{SimpleSubCategory.name}}" stepKey="assertCategoryNameInTitleAgain"/> + <see userInput="{{SimpleSubCategory.name}}" selector="{{StorefrontCategoryMainSection.CategoryTitle}}" stepKey="assertCategoryNamAgain"/> + <see userInput="1" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="assertProductCountAgain"/> + <seeElement selector="{{StorefrontCategoryProductSection.listedProduct('1')}}" stepKey="assertBundleProductPresenceAgain"/> + <see userInput="{{BundleProduct.name}}" selector="{{StorefrontCategoryProductSection.ProductTitleByNumber('1')}}" stepKey="checkTitleAgain"/> + <see userInput="$1,230.00" selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" stepKey="checkPriceAgain"/> + </test> +</tests> 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 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="StorefrontEditBundleProductTest"> - <annotations> - <features value="Bundle"/> - <stories value="Bundle products list on Storefront"/> - <title value="Customer should be able to change chosen options for Bundle Product when clicking Edit button in Shopping Cart page"/> - <description value="Customer should be able to change chosen options for Bundle Product when clicking Edit button in Shopping Cart page"/> - <severity value="MAJOR"/> - <testCaseId value="MC-290"/> - <group value="Bundle"/> - </annotations> - <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> - <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> - </before> - <after> - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> - <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> - </after> - - <!-- Create a bundle product --> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle"/> - <waitForPageLoad stepKey="waitForProductPageLoadBundle"/> - <actionGroup ref="goToCreateProductPage" stepKey="goToCreateBundleProduct"> - <argument name="product" value="BundleProduct"/> - </actionGroup> - - <actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillBundleProductNameAndSku"> - <argument name="product" value="BundleProduct"/> - </actionGroup> - - <!-- Add two bundle items --> - <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/> - <scrollTo stepKey="scrollToBundleItems" selector="{{AdminProductFormBundleSection.bundledItems}}"/> - <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/> - <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/> - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/> - <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/> - <waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/> - <click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/> - <waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/> - <actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions"> - <argument name="product" value="$$simpleProduct1$$"/> - </actionGroup> - <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/> - <actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions2"> - <argument name="product" value="$$simpleProduct2$$"/> - </actionGroup> - <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/> - <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/> - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/> - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/> - - <click stepKey="saveProductBundle" selector="{{AdminProductFormActionSection.saveButton}}"/> - <see stepKey="assertSuccess" selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."/> - - <!-- Go to the storefront bundled product page --> - <amOnPage url="/{{BundleProduct.urlKey}}.html" stepKey="visitStoreFrontBundle"/> - <waitForPageLoad stepKey="waitForStorefront"/> - <click stepKey="customizeAndAddToCart" selector="{{StorefrontBundledSection.addToCart}}"/> - <waitForPageLoad stepKey="waitCustomizableOptionsPopUp"/> - - <!-- add two products to the shopping cart, each with one different option --> - <click stepKey="selectFirstBundleOption" selector="{{StorefrontBundledSection.nthBundledOption('1','1')}}"/> - <waitForPageLoad stepKey="waitForPriceUpdate"/> - <see stepKey="seeSinglePrice" selector="{{StorefrontBundledSection.configuredPrice}}" userInput="1,230.00"/> - <click stepKey="addFirstItemToCart" selector="{{StorefrontBundledSection.addToCartConfigured}}"/> - <waitForPageLoad stepKey="waitForElementAdded"/> - - <click stepKey="unselectFirstBundleOption" selector="{{StorefrontBundledSection.nthBundledOption('1','1')}}"/> - <click stepKey="selectSecondBundleOption" selector="{{StorefrontBundledSection.nthBundledOption('1','2')}}"/> - <waitForPageLoad stepKey="waitForPriceUpdate2"/> - <see stepKey="seeSinglePrice2" selector="{{StorefrontBundledSection.configuredPrice}}" userInput="1,230.00"/> - <click stepKey="addSecondItemToCart" selector="{{StorefrontBundledSection.addToCartConfigured}}"/> - <waitForPageLoad stepKey="waitForElementAdded2"/> - - <!-- Go to the shopping cart page and edit the first product --> - <amOnPage url="/checkout/cart/" stepKey="onPageShoppingCart"/> - <waitForPageLoad stepKey="waitForCartPageLoad"/> - <waitForElementVisible stepKey="waitForInfoDropdown" selector="{{CheckoutCartSummarySection.total}}"/> - <waitForPageLoad stepKey="waitForCartPageLoad3"/> - <grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalBefore"/> - <click stepKey="clickEdit" selector="{{CheckoutCartProductSection.nthEditButton('1')}}"/> - <waitForPageLoad stepKey="waitForStorefront2"/> - - <!-- Choose both of the options on the storefront --> - <click stepKey="selectFirstBundleOption2" selector="{{StorefrontBundledSection.nthBundledOption('1','1')}}"/> - <click stepKey="selectSecondBundleOption2" selector="{{StorefrontBundledSection.nthBundledOption('1','2')}}"/> - - <waitForPageLoad stepKey="waitForPriceUpdate3"/> - <see stepKey="seeDoublePrice" selector="{{StorefrontBundledSection.configuredPrice}}" userInput="2,460.00"/> - - <click stepKey="addFirstItemToCart2" selector="{{StorefrontBundledSection.updateCart}}"/> - <waitForPageLoad stepKey="waitForElementAdded3"/> - - <!-- Go to the shopping cart page --> - <amOnPage url="/checkout/cart/" stepKey="onPageShoppingCart2"/> - <waitForPageLoad stepKey="waitForCartPageLoad2"/> - - <!-- Assert that the options are both there and the proce no longer matches --> - <see stepKey="assertBothOptions" selector="{{CheckoutCartProductSection.nthItemOption('2')}}" userInput="$$simpleProduct1.sku$$"/> - <see stepKey="assertBothOptions2" selector="{{CheckoutCartProductSection.nthItemOption('2')}}" userInput="$$simpleProduct2.sku$$"/> - <waitForElementVisible stepKey="waitForInfoDropdown2" selector="{{CheckoutCartSummarySection.total}}"/> - <waitForPageLoad stepKey="waitForCartPageLoad4"/> - <grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalAfter"/> - <assertNotEquals expected="{$grabTotalBefore}" expectedType="string" actual="{$grabTotalAfter}" actualType="string" stepKey="assertNotEquals"/> - - <!-- Delete the bundled product --> - <actionGroup stepKey="deleteBundle" ref="deleteProductUsingProductGrid"> - <argument name="product" value="BundleProduct"/> - </actionGroup> - </test> -</tests> +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="StorefrontEditBundleProductTest"> + <annotations> + <features value="Bundle"/> + <stories value="Bundle products list on Storefront"/> + <title value="Customer should be able to change chosen options for Bundle Product when clicking Edit button in Shopping Cart page"/> + <description value="Customer should be able to change chosen options for Bundle Product when clicking Edit button in Shopping Cart page"/> + <severity value="MAJOR"/> + <testCaseId value="MC-290"/> + <group value="Bundle"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> + </before> + <after> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> + </after> + + <!-- Create a bundle product --> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle"/> + <waitForPageLoad stepKey="waitForProductPageLoadBundle"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateBundleProduct"> + <argument name="product" value="BundleProduct"/> + </actionGroup> + + <actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillBundleProductNameAndSku"> + <argument name="product" value="BundleProduct"/> + </actionGroup> + + <!-- Add two bundle items --> + <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/> + <scrollTo stepKey="scrollToBundleItems" selector="{{AdminProductFormBundleSection.bundledItems}}"/> + <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/> + <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/> + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/> + <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/> + <waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/> + <click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/> + <waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/> + <actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions"> + <argument name="product" value="$$simpleProduct1$$"/> + </actionGroup> + <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/> + <actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions2"> + <argument name="product" value="$$simpleProduct2$$"/> + </actionGroup> + <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/> + <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/> + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/> + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/> + + <click stepKey="saveProductBundle" selector="{{AdminProductFormActionSection.saveButton}}"/> + <see stepKey="assertSuccess" selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."/> + + <!-- Go to the storefront bundled product page --> + <amOnPage url="/{{BundleProduct.urlKey}}.html" stepKey="visitStoreFrontBundle"/> + <waitForPageLoad stepKey="waitForStorefront"/> + <click stepKey="customizeAndAddToCart" selector="{{StorefrontBundledSection.addToCart}}"/> + <waitForPageLoad stepKey="waitCustomizableOptionsPopUp"/> + + <!-- add two products to the shopping cart, each with one different option --> + <click stepKey="selectFirstBundleOption" selector="{{StorefrontBundledSection.nthBundledOption('1','1')}}"/> + <waitForPageLoad stepKey="waitForPriceUpdate"/> + <see stepKey="seeSinglePrice" selector="{{StorefrontBundledSection.configuredPrice}}" userInput="1,230.00"/> + <click stepKey="addFirstItemToCart" selector="{{StorefrontBundledSection.addToCartConfigured}}"/> + <waitForPageLoad stepKey="waitForElementAdded"/> + + <click stepKey="unselectFirstBundleOption" selector="{{StorefrontBundledSection.nthBundledOption('1','1')}}"/> + <click stepKey="selectSecondBundleOption" selector="{{StorefrontBundledSection.nthBundledOption('1','2')}}"/> + <waitForPageLoad stepKey="waitForPriceUpdate2"/> + <see stepKey="seeSinglePrice2" selector="{{StorefrontBundledSection.configuredPrice}}" userInput="1,230.00"/> + <click stepKey="addSecondItemToCart" selector="{{StorefrontBundledSection.addToCartConfigured}}"/> + <waitForPageLoad stepKey="waitForElementAdded2"/> + + <!-- Go to the shopping cart page and edit the first product --> + <amOnPage url="/checkout/cart/" stepKey="onPageShoppingCart"/> + <waitForPageLoad stepKey="waitForCartPageLoad"/> + <waitForElementVisible stepKey="waitForInfoDropdown" selector="{{CheckoutCartSummarySection.total}}"/> + <waitForPageLoad stepKey="waitForCartPageLoad3"/> + <grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalBefore"/> + <click stepKey="clickEdit" selector="{{CheckoutCartProductSection.nthEditButton('1')}}"/> + <waitForPageLoad stepKey="waitForStorefront2"/> + + <!-- Choose both of the options on the storefront --> + <click stepKey="selectFirstBundleOption2" selector="{{StorefrontBundledSection.nthBundledOption('1','1')}}"/> + <click stepKey="selectSecondBundleOption2" selector="{{StorefrontBundledSection.nthBundledOption('1','2')}}"/> + + <waitForPageLoad stepKey="waitForPriceUpdate3"/> + <see stepKey="seeDoublePrice" selector="{{StorefrontBundledSection.configuredPrice}}" userInput="2,460.00"/> + + <click stepKey="addFirstItemToCart2" selector="{{StorefrontBundledSection.updateCart}}"/> + <waitForPageLoad stepKey="waitForElementAdded3"/> + + <!-- Go to the shopping cart page --> + <amOnPage url="/checkout/cart/" stepKey="onPageShoppingCart2"/> + <waitForPageLoad stepKey="waitForCartPageLoad2"/> + + <!-- Assert that the options are both there and the proce no longer matches --> + <see stepKey="assertBothOptions" selector="{{CheckoutCartProductSection.nthItemOption('2')}}" userInput="$$simpleProduct1.sku$$"/> + <see stepKey="assertBothOptions2" selector="{{CheckoutCartProductSection.nthItemOption('2')}}" userInput="$$simpleProduct2.sku$$"/> + <waitForElementVisible stepKey="waitForInfoDropdown2" selector="{{CheckoutCartSummarySection.total}}"/> + <waitForPageLoad stepKey="waitForCartPageLoad4"/> + <grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalAfter"/> + <assertNotEquals expected="{$grabTotalBefore}" expectedType="string" actual="{$grabTotalAfter}" actualType="string" stepKey="assertNotEquals"/> + + <!-- Delete the bundled product --> + <actionGroup stepKey="deleteBundle" ref="deleteProductUsingProductGrid"> + <argument name="product" value="BundleProduct"/> + </actionGroup> + </test> +</tests> 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 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Captcha\Test\Unit\Observer; + +use Magento\Captcha\Model\DefaultModel as CaptchaModel; +use Magento\Captcha\Observer\CheckGuestCheckoutObserver; +use Magento\Captcha\Helper\Data as CaptchaDataHelper; +use Magento\Framework\App\Action\Action; +use Magento\Framework\App\ActionFlag; +use Magento\Captcha\Observer\CaptchaStringResolver; +use Magento\Checkout\Model\Type\Onepage; +use Magento\Framework\App\Request\Http; +use Magento\Framework\App\Response\Http as HttpResponse; +use Magento\Framework\Event\Observer; +use Magento\Framework\Json\Helper\Data as JsonHelper; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Quote\Model\Quote; + +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class CheckGuestCheckoutObserverTest extends \PHPUnit\Framework\TestCase +{ + const FORM_ID = 'guest_checkout'; + + /** + * @var CheckGuestCheckoutObserver + */ + private $checkGuestCheckoutObserver; + + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var Observer + */ + private $observer; + + /** + * @var HttpResponse|\PHPUnit_Framework_MockObject_MockObject + */ + private $responseMock; + + /** + * @var HttpResponse|\PHPUnit_Framework_MockObject_MockObject + */ + private $requestMock; + + /** + * @var ActionFlag|\PHPUnit_Framework_MockObject_MockObject + */ + private $actionFlagMock; + + /** + * @var CaptchaStringResolver|\PHPUnit_Framework_MockObject_MockObject + */ + private $captchaStringResolverMock; + + /** + * @var JsonHelper|\PHPUnit_Framework_MockObject_MockObject + */ + private $jsonHelperMock; + + /** + * @var CaptchaModel|\PHPUnit_Framework_MockObject_MockObject + */ + private $captchaModelMock; + + /** + * @var Quote|\PHPUnit_Framework_MockObject_MockObject + */ + private $quoteModelMock; + + /** + * @var Action|\PHPUnit_Framework_MockObject_MockObject + */ + private $controllerMock; + + protected function setUp() + { + $onepageModelTypeMock = $this->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 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AddSimpleProductToCart"> <arguments> <argument name="product" defaultValue="product"/> 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 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Create a new category--> <actionGroup name="CreateCategory"> <arguments> 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 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Create a new root category--> <actionGroup name="AdminCreateRootCategory"> <arguments> 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 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Navigate to create product page from product grid page--> <actionGroup name="goToCreateProductPage"> <arguments> @@ -157,7 +157,7 @@ <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/> <fillField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/> - <click selector="{{AdminProductCustomizableOptionsSection.customezableOptions}}" stepKey="openCustomOptionsSection"/> + <click selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="openCustomOptionsSection"/> <click selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" stepKey="clickAddOption"/> <fillField userInput="option1" selector="{{AdminProductCustomizableOptionsSection.optionTitleInput}}" stepKey="fillOptionTitle"/> <click selector="{{AdminProductCustomizableOptionsSection.optionTypeOpenDropDown}}" stepKey="openTypeDropDown"/> 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 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="navigateToCreatedProductAttribute"> <arguments> <argument name="ProductAttribute"/> 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 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AssignAttributeToGroup"> <arguments> <argument name="group" type="string"/> 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 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Reset the product grid to the default view--> <actionGroup name="resetProductGridToDefaultView"> <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> 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 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AssertProductInStorefrontCategoryPage"> <arguments> <argument name="category"/> 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 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AssertProductInStorefrontProductPage"> <arguments> <argument name="product"/> 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 @@ */ --> -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="CheckItemInLayeredNavigationActionGroup"> <arguments> <argument name="itemType"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="CreateCustomRadioOptions"> + <!-- ActionGroup will add a single custom option to a product --> + <!-- You must already be on the product creation page --> + <arguments> + <argument name="customOptionName"/> + <argument name="productOption"/> + <argument name="productOption2"/> + </arguments> + + <click stepKey="clickAddOptions" selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}"/> + <waitForPageLoad stepKey="waitForAddProductPageLoad"/> + + <!-- Fill in the option and select the type of radio (once) --> + <fillField stepKey="fillInOptionTitle" selector="{{AdminProductCustomizableOptionsSection.lastOptionTitle}}" userInput="{{customOptionName}}"/> + <click stepKey="clickOptionTypeParent" selector="{{AdminProductCustomizableOptionsSection.lastOptionTypeParent}}"/> + <waitForPageLoad stepKey="waitForDropdownOpen"/> + <click stepKey="clickOptionType" selector="{{AdminProductCustomizableOptionsSection.optionType('Radio Buttons')}}"/> + + <!-- Add three radio options based on the parameter --> + <click stepKey="clickAddValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/> + + <fillField stepKey="fillInValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{productOption.title}}"/> + <fillField stepKey="fillInValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{productOption.price}}"/> + + <click stepKey="clickAddValue2" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/> + + <fillField stepKey="fillInValueTitle2" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{productOption2.title}}"/> + <fillField stepKey="fillInValuePrice2" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{productOption2.price}}"/> + </actionGroup> + + <!--Add a custom option of type "file" to a product--> + <actionGroup name="AddProductCustomOptionFile"> + <arguments> + <argument name="option" defaultValue="ProductOptionFile"/> + </arguments> + <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSection"/> + <click selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" stepKey="clickAddOption"/> + <waitForElementVisible selector="{{AdminProductCustomizableOptionsSection.lastOptionTitle}}" stepKey="waitForOption"/> + <fillField selector="{{AdminProductCustomizableOptionsSection.lastOptionTitle}}" userInput="{{option.title}}" stepKey="fillTitle"/> + <click selector="{{AdminProductCustomizableOptionsSection.lastOptionTypeParent}}" stepKey="openTypeSelect"/> + <click selector="{{AdminProductCustomizableOptionsSection.optionType('File')}}" stepKey="selectTypeFile"/> + <waitForElementVisible selector="{{AdminProductCustomizableOptionsSection.optionPrice}}" stepKey="waitForElements"/> + <fillField selector="{{AdminProductCustomizableOptionsSection.optionPrice}}" userInput="{{option.price}}" stepKey="fillPrice"/> + <selectOption selector="{{AdminProductCustomizableOptionsSection.optionPriceType}}" userInput="{{option.price_type}}" stepKey="selectPriceType"/> + <fillField selector="{{AdminProductCustomizableOptionsSection.optionFileExtensions}}" userInput="{{option.file_extension}}" stepKey="fillCompatibleExtensions"/> + </actionGroup> + +</actionGroups> 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 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="MoveCategoryActionGroup"> <arguments> <argument name="childCategory"/> 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 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="OpenEditProductOnBackendActionGroup"> <arguments> <argument name="product" defaultValue="product"/> 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. --> -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="OpenProductFromCategoryPageActionGroup"> <arguments> <argument name="category"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="RestoreLayoutSetting"> + <selectOption selector="{{DefaultLayoutsSection.categoryLayout}}" userInput="No layout updates" stepKey="selectNoLayoutUpdates1" after="expandDefaultLayouts"/> + <selectOption selector="{{DefaultLayoutsSection.productLayout}}" userInput="No layout updates" stepKey="selectNoLayoutUpdates2" before="clickSaveConfig"/> + </actionGroup> +</actionGroups> 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 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="searchAndMultiSelectActionGroup"> <arguments> <argument name="dropDownSelector" /> 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 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="SearchForProductOnBackendActionGroup"> <arguments> <argument name="product" defaultValue="product"/> 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 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Click Add to Cart button in storefront product page--> <actionGroup name="StorefrontAddToCartCustomOptionsProductPageActionGroup"> <arguments> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!-- Go to storefront category product page by given parameters --> + <actionGroup name="GoToStorefrontCategoryPageByParameters"> + <arguments> + <argument name="category" type="string"/> + <argument name="mode" type="string"/> + <argument name="numOfProductsPerPage" type="string"/> + <argument name="sortBy" type="string" defaultValue="position"/> + </arguments> + <!-- Go to storefront category page --> + <amOnPage url="{{StorefrontCategoryPage.url(category)}}?product_list_limit={{numOfProductsPerPage}}&product_list_mode={{mode}}&product_list_order={{sortBy}}" stepKey="onCategoryPage"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + </actionGroup> + + <!-- Check the category page --> + <actionGroup name="StorefrontCheckCategoryActionGroup"> + <arguments> + <argument name="category"/> + <argument name="productCount" type="string"/> + </arguments> + <seeInCurrentUrl url="/{{category.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> + <seeInTitle userInput="{{category.name}}" stepKey="assertCategoryNameInTitle"/> + <see userInput="{{category.name}}" selector="{{StorefrontCategoryMainSection.CategoryTitle}}" stepKey="assertCategoryName"/> + <see userInput="{{productCount}}" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="assertProductCount"/> + </actionGroup> + + <!-- Check simple product on the category page --> + <actionGroup name="StorefrontCheckCategorySimpleProduct"> + <arguments> + <argument name="product"/> + </arguments> + <seeElement selector="{{StorefrontCategoryProductSection.ProductTitleByName(product.name)}}" stepKey="assertProductName"/> + <see userInput="${{product.price}}.00" selector="{{StorefrontCategoryProductSection.ProductPriceByName(product.name)}}" stepKey="AssertProductPrice"/> + <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> + <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" /> + <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> + <seeElement selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="AssertAddToCart" /> + </actionGroup> +</actionGroups> \ 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!-- Add Product to Compare from the category page and check message --> + <actionGroup name="StorefrontAddCategoryProductToCompareActionGroup"> + <arguments> + <argument name="productVar"/> + </arguments> + <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(productVar.name)}}" stepKey="moveMouseOverProduct" /> + <click selector="{{StorefrontCategoryProductSection.ProductAddToCompareByName(productVar.name)}}" stepKey="clickAddProductToCompare"/> + <waitForElement selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForAddCategoryProductToCompareSuccessMessage"/> + <see selector="{{StorefrontMessagesSection.success}}" userInput="You added product {{productVar.name}} to the comparison list." stepKey="assertAddCategoryProductToCompareSuccessMessage"/> + </actionGroup> + + <!-- Add Product to Compare from the product page and check message --> + <actionGroup name="StorefrontAddProductToCompareActionGroup"> + <arguments> + <argument name="productVar"/> + </arguments> + <click selector="{{StorefrontProductInfoMainSection.productAddToCompare}}" stepKey="clickAddToCompare" /> + <waitForElement selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForAddProductToCompareSuccessMessage"/> + <see selector="{{StorefrontMessagesSection.success}}" userInput="You added product {{productVar.name}} to the comparison list." stepKey="assertAddProductToCompareSuccessMessage"/> + </actionGroup> + + <!-- Check the product in compare sidebar --> + <actionGroup name="StorefrontCheckCompareSidebarProductActionGroup"> + <arguments> + <argument name="productVar"/> + </arguments> + <waitForElement selector="{{StorefrontComparisonSidebarSection.ProductTitleByName(productVar.name)}}" stepKey="waitForProduct"/> + </actionGroup> + + <!-- Open and check comparison page --> + <actionGroup name="StorefrontOpenAndCheckComparisionActionGroup"> + <click selector="{{StorefrontComparisonSidebarSection.Compare}}" stepKey="clickCompare"/> + <waitForLoadingMaskToDisappear stepKey="waitForComparePageloaded" /> + <seeInCurrentUrl url="{{StorefrontProductComparePage.url}}" stepKey="checkUrl"/> + <seeInTitle userInput="Products Comparison List" stepKey="assertPageNameInTitle"/> + <see userInput="Compare Products" selector="{{StorefrontProductCompareMainSection.PageName}}" stepKey="assertPageName"/> + </actionGroup> + + <!-- Check the simple product in comparison page --> + <actionGroup name="StorefrontCheckCompareSimpleProductActionGroup"> + <arguments> + <argument name="productVar"/> + </arguments> + <seeElement selector="{{StorefrontProductCompareMainSection.ProductLinkByName(productVar.name)}}" stepKey="assertProductName"/> + <see userInput="${{productVar.price}}.00" selector="{{StorefrontProductCompareMainSection.ProductPriceByName(productVar.name)}}" stepKey="assertProductPrice1"/> + <see userInput="{{productVar.sku}}" selector="{{StorefrontProductCompareMainSection.ProductAttributeByCodeAndProductName('SKU', productVar.name)}}" stepKey="assertProductPrice2"/> + <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> + <seeElement selector="{{StorefrontProductCompareMainSection.ProductAddToCartByName(productVar.name)}}" stepKey="assertProductAddToCart"/> + </actionGroup> + + <!-- Clear the compare list --> + <actionGroup name="StorefrontClearCompareActionGroup"> + <waitForElementVisible selector="{{StorefrontComparisonSidebarSection.ClearAll}}" time="30" stepKey="waitForClearAll"/> + <click selector="{{StorefrontComparisonSidebarSection.ClearAll}}" stepKey="clickClearAll"/> + <waitForElementVisible selector="{{ModalConfirmationSection.OkButton}}" time="30" stepKey="waitForClearOk"/> + <scrollTo selector="{{ModalConfirmationSection.OkButton}}" stepKey="scrollToClearOk"/> + <click selector="{{ModalConfirmationSection.OkButton}}" stepKey="clickClearOk"/> + <waitForElement selector="{{StorefrontMessagesSection.message('You cleared the comparison list.')}}" time="30" stepKey="AssertMessageCleared"/> + <waitForElement selector="{{StorefrontComparisonSidebarSection.NoItemsMessage}}" time="30" stepKey="assertNoItems"/> + </actionGroup> +</actionGroups> \ 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!-- Check the simple product on the product page --> + <actionGroup name="StorefrontCheckSimpleProduct"> + <arguments> + <argument name="product"/> + </arguments> + <seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> + <seeInTitle userInput="{{product.name}}" stepKey="AssertProductNameInTitle"/> + <see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/> + <see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/> + <see userInput="${{product.price}}.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/> + <see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertInStock"/> + <seeElement selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="assertAddToCart" /> + <see userInput="{{product.custom_attributes[description]}}" selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="assertProductDescription"/> + <see userInput="{{product.custom_attributes[short_description]}}" selector="{{StorefrontProductInfoMainSection.productShortDescription}}" stepKey="assertProductShortDescription"/> + </actionGroup> + + <!-- Assert product image in Storefront Product page --> + <actionGroup name="assertProductImageStorefrontProductPage"> + <arguments> + <argument name="product"/> + <argument name="image" defaultValue="MagentoLogo"/> + </arguments> + <seeInCurrentUrl url="/{{product.urlKey}}.html" stepKey="checkUrl"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <seeElement selector="{{StorefrontProductMediaSection.imageFile(image.filename)}}" stepKey="seeImage"/> + </actionGroup> + + <!-- Assert product image in Storefront Product page --> + <actionGroup name="assertProductImageStorefrontProductPage2"> + <arguments> + <argument name="product"/> + <argument name="image" defaultValue="MagentoLogo"/> + </arguments> + <seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <seeElement selector="{{StorefrontProductMediaSection.imageFile(image.filename)}}" stepKey="seeImage"/> + </actionGroup> + + <!-- Assert no product image in Storefront Product page --> + <actionGroup name="assertProductImageNotInStorefrontProductPage"> + <arguments> + <argument name="product"/> + <argument name="image" defaultValue="MagentoLogo"/> + </arguments> + <seeInCurrentUrl url="/{{product.urlKey}}.html" stepKey="checkUrl"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <dontSeeElement selector="{{StorefrontProductMediaSection.imageFile(image.filename)}}" stepKey="seeImage"/> + </actionGroup> + + <!-- Assert no product image in Storefront Product page --> + <actionGroup name="assertProductImageNotInStorefrontProductPage2"> + <arguments> + <argument name="product"/> + <argument name="image" defaultValue="MagentoLogo"/> + </arguments> + <seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <dontSeeElement selector="{{StorefrontProductMediaSection.imageFile(image.filename)}}" stepKey="seeImage"/> + </actionGroup> +</actionGroups> \ 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 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Click Add to Cart button in storefront product page--> <actionGroup name="addToCartFromStorefrontProductPage"> <arguments> 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 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="_defaultCategory" type="category"> <data key="name" unique="suffix">simpleCategory</data> <data key="name_lwr" unique="suffix">simplecategory</data> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> + <entity name="CONST" type="CONST"> + <data key="one">1</data> + <data key="two">2</data> + </entity> +</entities> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="CustomAttributeCategoryUrlKey" type="custom_attribute"> + <data key="attribute_code">url_key</data> + <data key="value" unique="suffix">category</data> + </entity> + <entity name="CustomAttributeProductUrlKey" type="custom_attribute"> + <data key="attribute_code">url_key</data> + <data key="value" unique="suffix">product</data> + </entity> + <entity name="CustomAttributeCategoryIds" type="custom_attribute_array"> + <data key="attribute_code">category_ids</data> + <var key="value" entityType="category" entityKey="id"/> + </entity> + <entity name="CustomAttributeProductAttribute" type="custom_attribute"> + <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> + <var key="value" entityKey="value" entityType="ProductAttributeOption"/> + </entity> + <entity name="ApiProductDescription" type="custom_attribute"> + <data key="attribute_code">description</data> + <data key="value" unique="suffix">API Product Description</data> + </entity> + <entity name="ApiProductShortDescription" type="custom_attribute"> + <data key="attribute_code">short_description</data> + <data key="value" unique="suffix">API Product Short Description</data> + </entity> + <entity name="ApiProductNewsFromDate" type="custom_attribute"> + <data key="attribute_code">news_from_date</data> + <data key="value">2018-05-17 00:00:00</data> + </entity> +</entities> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="ProductAttributeFrontendLabel" type="FrontendLabel"> + <data key="store_id">0</data> + <data key="label" unique="suffix">attribute</data> + </entity> +</entities> 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 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="TestImageContent" type="ImageContent"> <data key="base64_encoded_data">/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=</data> <data key="type">image/jpeg</data> 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 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="productAttributeWysiwyg" type="ProductAttribute"> <data key="attribute_code" unique="suffix">attribute</data> <data key="frontend_input">textarea</data> @@ -94,4 +94,25 @@ <data key="used_for_sort_by">true</data> <requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity> </entity> + <entity name="productAttributeMultiselectTwoOptions" type="ProductAttribute"> + <data key="attribute_code" unique="suffix">attribute</data> + <data key="frontend_input">multiselect</data> + <data key="scope">global</data> + <data key="is_required">false</data> + <data key="is_unique">false</data> + <data key="is_searchable">true</data> + <data key="is_visible">true</data> + <data key="is_visible_in_advanced_search">true</data> + <data key="is_visible_on_front">true</data> + <data key="is_filterable">true</data> + <data key="is_filterable_in_search">true</data> + <data key="used_in_product_listing">true</data> + <data key="is_used_for_promo_rules">true</data> + <data key="is_comparable">true</data> + <data key="is_used_in_grid">true</data> + <data key="is_visible_in_grid">true</data> + <data key="is_filterable_in_grid">true</data> + <data key="used_for_sort_by">true</data> + <requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity> + </entity> </entities> 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 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="ApiProductAttributeMediaGalleryEntryTestImage" type="ProductAttributeMediaGalleryEntry"> <data key="media_type">image</data> <data key="label" unique="suffix">Test Image </data> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="productAttributeOption1" type="ProductAttributeOption"> + <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> + <data key="label" unique="suffix">option1</data> + <data key="is_default">false</data> + <data key="sort_order">0</data> + <requiredEntity type="StoreLabel">Option1Store0</requiredEntity> + <requiredEntity type="StoreLabel">Option1Store1</requiredEntity> + </entity> + <entity name="productAttributeOption2" type="ProductAttributeOption"> + <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> + <data key="label" unique="suffix">option2</data> + <data key="is_default">true</data> + <data key="sort_order">1</data> + <requiredEntity type="StoreLabel">Option2Store0</requiredEntity> + <requiredEntity type="StoreLabel">Option2Store1</requiredEntity> + </entity> + <entity name="productAttributeOption3" type="ProductAttributeOption"> + <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> + <data key="label" unique="suffix">option3</data> + <data key="is_default">false</data> + <data key="sort_order">2</data> + <requiredEntity type="StoreLabel">Option3Store0</requiredEntity> + <requiredEntity type="StoreLabel">Option3Store1</requiredEntity> + </entity> + <entity name="productAttributeOption4" type="ProductAttributeOption"> + <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> + <data key="label" unique="suffix">option4</data> + <data key="is_default">false</data> + <data key="sort_order">3</data> + <requiredEntity type="StoreLabel">Option4Store0</requiredEntity> + <requiredEntity type="StoreLabel">Option4Store1</requiredEntity> + </entity> + <entity name="productAttributeOption5" type="ProductAttributeOption"> + <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> + <data key="label" unique="suffix">option5</data> + <data key="is_default">false</data> + <data key="sort_order">4</data> + <requiredEntity type="StoreLabel">Option5Store0</requiredEntity> + <requiredEntity type="StoreLabel">Option5Store1</requiredEntity> + </entity> + <entity name="productAttributeOption6" type="ProductAttributeOption"> + <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> + <data key="label" unique="suffix">option6</data> + <data key="is_default">false</data> + <data key="sort_order">5</data> + <requiredEntity type="StoreLabel">Option6Store0</requiredEntity> + <requiredEntity type="StoreLabel">Option6Store1</requiredEntity> + </entity> + <entity name="ProductAttributeOptionGetter" type="ProductAttributeOption"> + <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> + </entity> + <entity name="productAttributeOption" type="ProductAttributeOption"> + <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> + <data key="label" unique="suffix">customOption</data> + <data key="is_default">false</data> + <data key="sort_order">0</data> + </entity> +</entities> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="AddToDefaultSet" type="ProductAttributeSet"> + <var key="attributeCode" entityKey="attribute_code" entityType="ProductAttribute"/> + <data key="attributeSetId">4</data> + <data key="attributeGroupId">7</data> + <data key="sortOrder">0</data> + </entity> +</entities> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="_defaultProduct" type="product"> + <data key="sku" unique="suffix">testSku</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">testProductName</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">testurlkey</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="ApiSimpleProduct" type="product"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="ApiSimpleProductUpdateDescription" type="product2"> + <requiredEntity type="custom_attribute">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute">ApiProductShortDescription</requiredEntity> + </entity> + <entity name="ApiSimpleProductUpdateName" type="product"> + <data key="name" unique="suffix">Updated Api Simple Product</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + </entity> + <entity name="SimpleProduct" type="product"> + <data key="sku" unique="suffix">SimpleProduct</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">SimpleProduct</data> + <data key="price">123.00</data> + <data key="visibility">4</data> + <data key="status">1</data> + <data key="quantity">1000</data> + <data key="urlKey" unique="suffix">simpleproduct</data> + <data key="weight">1</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="SimpleProduct2" type="product"> + <data key="sku" unique="suffix">SimpleProduct</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">SimpleProduct</data> + <data key="price">123.00</data> + <data key="visibility">4</data> + <data key="status">1</data> + <data key="quantity">1000</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + </entity> + <entity name="SimpleProduct3" type="product"> + <data key="sku" unique="suffix">simple</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">simple</data> + <data key="price">123.00</data> + <data key="visibility">4</data> + <data key="status">1</data> + <data key="quantity">1000</data> + <data key="urlKey" unique="suffix">simple</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="SimpleProduct4" type="product"> + <data key="sku" unique="suffix">testSku</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">OutOfStockProduct</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">testurlkey</data> + <data key="status">1</data> + <data key="quantity">0</data> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="NewSimpleProduct" type="product"> + <data key="price">321.00</data> + </entity> + <entity name="SimpleOne" type="product2"> + <data key="sku" unique="suffix">SimpleOne</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">SimpleProduct</data> + <data key="price">1.23</data> + <data key="visibility">4</data> + <data key="status">1</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity> + </entity> + <entity name="ApiSimpleOne" type="product2"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity> + </entity> + <entity name="ApiSimpleOneHidden" type="product2"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">1</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity> + </entity> + <entity name="ApiSimpleTwo" type="product2"> + <data key="sku" unique="suffix">api-simple-product-two</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product Two</data> + <data key="price">234.00</data> + <data key="urlKey" unique="suffix">api-simple-product-two</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity> + </entity> + <entity name="ApiSimpleTwoHidden" type="product2"> + <data key="sku" unique="suffix">api-simple-product-two</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">1</data> + <data key="name" unique="suffix">Api Simple Product Two</data> + <data key="price">234.00</data> + <data key="urlKey" unique="suffix">api-simple-product-two</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity> + </entity> + <entity name="VirtualProduct" type="product"> + <data key="sku" unique="suffix">virtualproduct</data> + <data key="type_id">virtual</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">VirtualProduct</data> + <data key="price">99.99</data> + <data key="quantity">250</data> + <data key="weight">0</data> + <data key="status">1</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + </entity> + <entity name="SimpleTwo" type="product2"> + <data key="sku" unique="suffix">SimpleTwo</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">SimpleProduct</data> + <data key="price">1.23</data> + <data key="visibility">4</data> + <data key="status">1</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute">CustomAttributeProductUrlKey</requiredEntity> + </entity> + <entity name="ProductImage" type="uploadImage"> + <data key="title" unique="suffix">Image1</data> + <data key="price">1.00</data> + <data key="file_type">Upload File</data> + <data key="shareable">Yes</data> + <data key="file">magento-logo.png</data> + <data key="fileName">magento-logo</data> + </entity> + <entity name="MagentoLogo" type="image"> + <data key="title" unique="suffix">MagentoLogo</data> + <data key="price">1.00</data> + <data key="file_type">Upload File</data> + <data key="shareable">Yes</data> + <data key="file">magento-logo.png</data> + <data key="filename">magento-logo</data> + <data key="file_extension">png</data> + </entity> + <entity name="ProductWithUnicode" type="product"> + <data key="sku" unique="suffix">霁产品</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">霁产品</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">testurlkey</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="defaultVirtualProduct" type="product"> + <data key="sku" unique="suffix">virtualProduct</data> + <data key="type_id">virtual</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">virtualProduct</data> + <data key="price">12.34</data> + <data key="urlKey" unique="suffix">virtualproduct</data> + <data key="status">1</data> + <data key="quantity">100</data> + <data key="weight">0</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="productWithDescription" type="product"> + <data key="sku" unique="suffix">testProductWithDescriptionSku</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">testProductWithDescriptionName</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">testproductwithdescriptionurlkey</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + </entity> + <entity name="ApiProductWithDescription" type="product"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + </entity> + <entity name="_newDefaultProduct" type="product"> + <data key="sku" unique="suffix">testSku</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">testproductname</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">testurlkey</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="productWithOptions" type="product"> + <var key="sku" entityType="product" entityKey="sku" /> + <data key="file">magento.jpg</data> + <requiredEntity type="product_option">ProductOptionField</requiredEntity> + <requiredEntity type="product_option">ProductOptionArea</requiredEntity> + <requiredEntity type="product_option">ProductOptionFile</requiredEntity> + <requiredEntity type="product_option">ProductOptionDropDown</requiredEntity> + <requiredEntity type="product_option">ProductOptionRadiobutton</requiredEntity> + <requiredEntity type="product_option">ProductOptionCheckbox</requiredEntity> + <requiredEntity type="product_option">ProductOptionMultiSelect</requiredEntity> + <requiredEntity type="product_option">ProductOptionDate</requiredEntity> + <requiredEntity type="product_option">ProductOptionDateTime</requiredEntity> + <requiredEntity type="product_option">ProductOptionTime</requiredEntity> + </entity> + <entity name="ApiVirtualProductWithDescription" type="product"> + <data key="sku" unique="suffix">api-virtual-product</data> + <data key="type_id">virtual</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Virtual Product</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-virtual-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + </entity> + <entity name="SimpleProductWithNewFromDate" type="product"> + <data key="sku" unique="suffix">SimpleProduct</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">SimpleProduct</data> + <data key="price">125.00</data> + <data key="visibility">4</data> + <data key="status">1</data> + <data key="quantity">1000</data> + <data key="urlKey" unique="suffix">simpleproduct</data> + <data key="weight">1</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductNewsFromDate</requiredEntity> + </entity> + <entity name="SimpleProductNameWithDoubleQuote" type="product"> + <data key="name" unique="prefix">Double Quote"</data> + <data key="sku" unique="prefix">doubleQuote</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="price">10.00</data> + <data key="visibility">4</data> + <data key="status">1</data> + <data key="quantity">1000</data> + <data key="weight">1</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + </entity> + <entity name="GetProduct" type="product"> + <var key="sku" entityKey="sku" entityType="product"/> + </entity> + <entity name="GetProduct2" type="product2"> + <var key="sku" entityKey="sku" entityType="product2"/> + </entity> + <entity name="GetProduct3" type="product3"> + <var key="sku" entityKey="sku" entityType="product3"/> + </entity> + <entity name="ApiSimplePrice1" type="product"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">1.00</data> + </entity> + <entity name="ApiSimplePrice100" type="product"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">100.00</data> + </entity> + <entity name="ApiSimplePrice10Qty10" type="product"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">10.00</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + <data key="status">1</data> + <requiredEntity type="product_extension_attribute">EavStock10</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="ApiSimplePrice100Qty100" type="product"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">100.00</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + <data key="status">1</data> + <requiredEntity type="product_extension_attribute">EavStock100</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + </entity> + <entity name="ApiSimplePrice100Qty100v2" type="product"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">100.00</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + <data key="status">1</data> + <requiredEntity type="product_extension_attribute">EavStock100</requiredEntity> + </entity> +</entities> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="EavStockItem" type="product_extension_attribute"> + <requiredEntity type="stock_item">Qty_1000</requiredEntity> + </entity> + <entity name="EavStock100" type="product_extension_attribute"> + <requiredEntity type="stock_item">Qty_100</requiredEntity> + </entity> + <entity name="EavStock10" type="product_extension_attribute"> + <requiredEntity type="stock_item">Qty_10</requiredEntity> + </entity> +</entities> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="PriceFilterRange" type="filter"> + <data key="from">10</data> + <data key="to">100</data> + </entity> +</entities> 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 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="ProductOptionField" type="product_option"> <var key="product_sku" entityType="product" entityKey="sku" /> <data key="title">OptionField</data> 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 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="ProductOptionValueDropdown1" type="product_option_value"> <data key="title">OptionValueDropDown1</data> <data key="sort_order">1</data> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="Qty_1000" type="stock_item"> + <data key="qty">1000</data> + <data key="is_in_stock">true</data> + </entity> + <entity name="Qty_100" type="stock_item"> + <data key="qty">100</data> + <data key="is_in_stock">true</data> + </entity> + <entity name="Qty_10" type="stock_item"> + <data key="qty">10</data> + <data key="is_in_stock">true</data> + </entity> + <entity name="Qty_99" type="stock_item"> + <data key="qty">99</data> + <data key="is_in_stock">true</data> + </entity> + <entity name="Qty_101" type="stock_item"> + <data key="qty">101</data> + <data key="is_in_stock">true</data> + </entity> +</entities> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="Option1Store0" type="StoreLabel"> + <data key="store_id">0</data> + <data key="label">option1</data> + </entity> + <entity name="Option1Store1" type="StoreLabel"> + <data key="store_id">1</data> + <data key="label">option1</data> + </entity> + <entity name="Option2Store0" type="StoreLabel"> + <data key="store_id">0</data> + <data key="label">option2</data> + </entity> + <entity name="Option2Store1" type="StoreLabel"> + <data key="store_id">1</data> + <data key="label">option2</data> + </entity> + <entity name="Option3Store0" type="StoreLabel"> + <data key="store_id">0</data> + <data key="label">option3</data> + </entity> + <entity name="Option3Store1" type="StoreLabel"> + <data key="store_id">1</data> + <data key="label">option3</data> + </entity> + <entity name="Option4Store0" type="StoreLabel"> + <data key="store_id">0</data> + <data key="label">option4</data> + </entity> + <entity name="Option4Store1" type="StoreLabel"> + <data key="store_id">1</data> + <data key="label">option4</data> + </entity> + <entity name="Option5Store0" type="StoreLabel"> + <data key="store_id">0</data> + <data key="label">option5</data> + </entity> + <entity name="Option5Store1" type="StoreLabel"> + <data key="store_id">1</data> + <data key="label">option5</data> + </entity> + <entity name="Option6Store0" type="StoreLabel"> + <data key="store_id">0</data> + <data key="label">option6</data> + </entity> + <entity name="Option6Store1" type="StoreLabel"> + <data key="store_id">1</data> + <data key="label">option6</data> + </entity> +</entities> 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 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateCategory" dataType="category" type="create" auth="adminOauth" url="/V1/categories" method="POST"> <contentType>application/json</contentType> <object key="category" dataType="category"> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateCustomAttribute" dataType="custom_attribute" type="create"> <field key="attribute_code">string</field> <field key="value">string</field> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreateEmptyExtensionAttribute" dataType="empty_extension_attribute" type="create"> + </operation> + <operation name="UpdateEmptyExtensionAttribute" dataType="empty_extension_attribute" type="update"> + </operation> +</operations> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreateFrontendLabel" dataType="FrontendLabel" type="create"> + <field key="store_id">integer</field> + <field key="label">string</field> + </operation> +</operations> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProduct" dataType="product" type="create" auth="adminOauth" url="/V1/products" method="POST"> <contentType>application/json</contentType> <object dataType="product" key="product"> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProductAttribute" dataType="ProductAttribute" type="create" auth="adminOauth" url="/V1/products/attributes" method="POST"> <contentType>application/json</contentType> <object dataType="ProductAttribute" key="attribute"> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProductAttributeMediaGalleryEntry" dataType="ProductAttributeMediaGalleryEntry" type="create" auth="adminOauth" url="/V1/products/{sku}/media" method="POST"> <contentType>application/json</contentType> <object key="entry" dataType="ProductAttributeMediaGalleryEntry"> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProductAttributeOption" dataType="ProductAttributeOption" type="create" auth="adminOauth" url="/V1/products/attributes/{attribute_code}/options" method="POST"> <contentType>application/json</contentType> <object dataType="ProductAttributeOption" key="option"> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="AddProductAttributeToAttributeSet" dataType="ProductAttributeSet" type="create" auth="adminOauth" url="/V1/products/attribute-sets/attributes" method="POST"> <contentType>application/json</contentType> <field key="attributeSetId">integer</field> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreateProductExtensionAttribute" dataType="product_extension_attribute" type="create"> + <field key="stock_item">stock_item</field> + </operation> + <operation name="UpdateProductExtensionAttribute" dataType="product_extension_attribute" type="update"> + <field key="stock_item">stock_item</field> + </operation> +</operations> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProductLink" dataType="product_link" type="create"> <field key="sku">string</field> <field key="link_type">string</field> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProductLinkExtensionAttribute" dataType="product_link_extension_attribute" type="create"> <contentType>application/json</contentType> <field key="qty">integer</field> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProductLinks" dataType="product_links" type="create" auth="adminOauth" url="/V1/products/{sku}/links" method="POST"> <contentType>application/json</contentType> <array key="items"> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProductOption" dataType="product_option" type="create"> <field key="product_sku">string</field> <field key="option_id">integer</field> 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 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProductOptionValue" dataType="product_option_value" type="create"> <field key="title">string</field> <field key="sort_order">integer</field> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreateStockItem" dataType="stock_item" type="create"> + <field key="qty">integer</field> + <field key="is_in_stock">boolean</field> + </operation> + <operation name="UpdateStockItem" dataType="stock_item" type="update"> + <field key="qty">integer</field> + <field key="is_in_stock">boolean</field> + </operation> +</operations> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreateStoreLabel" dataType="StoreLabel" type="create"> + <field key="store_id">integer</field> + <field key="label">string</field> + </operation> +</operations> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreateValidationRule" dataType="validation_rule" type="create"> + <field key="key">string</field> + <field key="value">string</field> + </operation> + <operation name="UpdateValidationRule" dataType="validation_rule" type="update"> + <field key="key">string</field> + <field key="value">string</field> + </operation> +</operations> 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 @@ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="AdminCategoryEditPage" url="catalog/category/edit/id/{{categoryId}}/" area="admin" module="Catalog" parameterized="true"> <section name="AdminCategorySidebarActionSection"/> <section name="AdminCategoryMainActionsSection"/> 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 @@ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="AdminCategoryPage" url="catalog/category/" area="admin" module="Catalog"> <section name="AdminCategorySidebarActionSection"/> <section name="AdminCategoryMainActionsSection"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="ProductAttributePage" url="catalog/product_attribute/new/" area="admin" module="Catalog"> + <section name="AdminCreateProductAttributeSection"/> + </page> +</pages> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminProductAttributeGridPage" url="catalog/product_attribute" area="admin" module="Catalog"> + <section name="AdminProductAttributeGridSection"/> + </page> +</pages> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminProductAttributeSetEditPage" url="catalog/product_set/edit/id" area="admin" module="Catalog"> + <section name="AdminProductAttributeSetEditSection"/> + </page> +</pages> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminProductAttributeSetGridPage" url="catalog/product_set/" area="admin" module="ProductAttributeSet"> + <section name="AdminProductAttributeSetGridSection"/> + </page> +</pages> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="ProductAttributesEditPage" url="catalog/product_action_attribute/edit/" area="admin" module="Catalog"> + <section name="AdminEditProductAttributesSection"/> + </page> +</pages> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true"> + <section name="AdminProductFormSection"/> + <section name="AdminProductFormActionSection"/> + <section name="AdminProductSEOSection"/> + <section name="AdminProductImagesSection"/> + <section name="AdminAddProductsToOptionPanel"/> + <section name="AdminProductMessagesSection"/> + <section name="AdminProductFormRelatedUpSellCrossSellSection"/> + </page> +</pages> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminProductEditPage" url="catalog/product/edit/id/{{productId}}/" area="admin" module="Magento_Catalog" parameterized="true"> + <!-- This page object only exists for the url. Use the AdminProductCreatePage for selectors. --> + </page> +</pages> 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 @@ */ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="AdminProductIndexPage" url="catalog/product/index" area="admin" module="Magento_Catalog"> <section name="AdminProductGridActionSection" /> <section name="AdminProductGridFilterSection" /> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + --> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="ProductCatalogPage" url="/catalog/product/" area="admin" module="Magento_Catalog"> + <section name="ProductCatalogPageSection"/> + </page> +</pages> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCategoryPage" url="/{{var1}}.html" area="storefront" module="Catalog" parameterized="true"> + <section name="StorefrontCategoryMainSection"/> + <section name="WYSIWYGToolbarSection"/> + </page> +</pages> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontProductComparePage" url="catalog/product_compare/index" module="Magento_Catalog" area="storefront"> + <section name="StorefrontProductCompareMainSection" /> + </page> +</pages> 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 @@ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="StorefrontProductPage" url="/{{var1}}.html" area="storefront" module="Catalog" parameterized="true"> <section name="StorefrontProductInfoMainSection" /> <section name="StorefrontProductInfoDetailsSection" /> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminAddProductsToOptionPanel"> + <element name="addSelectedProducts" type="button" selector=".product_form_product_form_bundle-items_modal button.action-primary" timeout="30"/> + <element name="filters" type="button" selector=".product_form_product_form_bundle-items_modal button[data-action='grid-filter-expand']" timeout="30"/> + <element name="applyFilters" type="button" selector=".product_form_product_form_bundle-items_modal [data-action='grid-filter-apply']" timeout="30"/> + <element name="nameFilter" type="input" selector=".product_form_product_form_bundle-items_modal input[name='name']"/> + <element name="firstCheckbox" type="input" selector="//tr[1]//input[@data-action='select-row']"/> + <element name="nthCheckbox" type="input" selector="//tr[{{var}}]//input[@data-action='select-row']" parameterized="true"/> + </section> +</sections> \ 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCategoryBasicFieldSection"> <element name="IncludeInMenu" type="checkbox" selector="input[name='include_in_menu']"/> <element name="includeInMenuLabel" type="text" selector="input[name='include_in_menu']+label"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCategoryContentSection"> <element name="sectionHeader" type="button" selector="div[data-index='content']" timeout="30"/> <element name="uploadButton" type="button" selector="//*[@class='file-uploader-area']/label[text()='Upload']"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCategoryMainActionsSection"> <element name="SaveButton" type="button" selector=".page-actions-inner #save" timeout="30"/> <element name="DeleteButton" type="button" selector=".page-actions-inner #delete" timeout="30"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminCategoryMessagesSection"> + <element name="SuccessMessage" type="text" selector=".message-success"/> + </section> +</sections> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCategoryModalSection"> <element name="message" type="text" selector="aside.confirm div.modal-content"/> <element name="title" type="text" selector="aside.confirm .modal-header .modal-title"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCategoryProductsGridSection"> <element name="rowProductId" type="text" selector="#catalog_category_products_table tbody tr:nth-of-type({{row}}) .col-id" parameterized="true"/> <element name="rowProductName" type="text" selector="#catalog_category_products_table tbody tr:nth-of-type({{row}}) .col-name" parameterized="true"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminCategoryProductsSection"> + <element name="sectionHeader" type="button" selector="div[data-index='assign_products']" timeout="30"/> + </section> +</sections> \ 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCategorySEOSection"> <element name="SectionHeader" type="button" selector="div[data-index='search_engine_optimization']" timeout="30"/> <element name="UrlKeyInput" type="input" selector="input[name='url_key']"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminCategorySidebarActionSection"> + <element name="AddRootCategoryButton" type="button" selector="#add_root_category_button" timeout="30"/> + <element name="AddSubcategoryButton" type="button" selector="#add_subcategory_button" timeout="30"/> + </section> +</sections> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCategorySidebarTreeSection"> <element name="collapseAll" type="button" selector=".tree-actions a:first-child"/> <element name="expandAll" type="button" selector=".tree-actions a:last-child"/> 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 @@ */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCategoryWarningMessagesPopupSection"> <element name="warningMessage" type="text" selector=".modal-inner-wrap .modal-content .message.message-notice"/> <element name="cancelButton" type="button" selector=".modal-inner-wrap .action-secondary"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AttributePropertiesSection"> <element name="DefaultLabel" type="input" selector="#attribute_label"/> <element name="InputType" type="select" selector="#frontend_input"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminEditProductAttributesSection"> <element name="AttributeName" type="text" selector="#name"/> <element name="ChangeAttributeNameToggle" type="checkbox" selector="#toggle_name"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductAttributeGridSection"> <element name="AttributeCode" type="text" selector="//td[contains(text(),'{{var1}}')]" parameterized="true"/> <element name="createNewAttributeBtn" type="button" selector="button[data-index='add_new_attribute_button']"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductAttributeSetActionSection"> + <element name="save" type="button" selector="button[title='Save']" timeout="30"/> + <element name="reset" type="button" selector="button[title='Reset']" timeout="30"/> + <element name="back" type="button" selector="button[title='Back']" timeout="30"/> + </section> +</sections> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductAttributeSetEditSection"> <!-- Groups Column --> <element name="groupTree" type="block" selector="#tree-div1"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductAttributeSetGridSection"> <element name="filter" type="input" selector="#setGrid_filter_set_name"/> <element name="searchBtn" type="button" selector="#container button[title='Search']" timeout="30"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductAttributeSetSection"> <element name="name" type="input" selector="#attribute_set_name"/> <element name="basedOn" type="select" selector="#skeleton_set"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductCategoryCreationSection"> <element name="firstExampleProduct" type="button" selector=".data-row:nth-of-type(1)"/> <element name="newCategory" type="button" selector="//button/span[text()='New Category']"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductContentSection"> + <element name="sectionHeader" type="button" selector="div[data-index='content']" timeout="30"/> + <element name="descriptionTextArea" type="textarea" selector="#product_form_description"/> + <element name="shortDescriptionTextArea" type="textarea" selector="#product_form_short_description"/> + </section> +</sections> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductCustomizableOptionsSection"> <element name="checkIfCustomizableOptionsTabOpen" type="text" selector="//span[text()='Customizable Options']/parent::strong/parent::*[@data-state-collapsible='closed']"/> - <element name="customezableOptions" type="text" selector="//strong[contains(@class, 'admin__collapsible-title')]/span[text()='Customizable Options']"/> + <element name="customizableOptions" type="text" selector="//strong[contains(@class, 'admin__collapsible-title')]/span[text()='Customizable Options']"/> <element name="useDefaultOptionTitle" type="text" selector="[data-index='options'] tr.data-row [data-index='title'] [name^='options_use_default']"/> <element name="useDefaultOptionTitleByIndex" type="text" selector="[data-index='options'] [data-index='values'] tr[data-repeat-index='{{var1}}'] [name^='options_use_default']" parameterized="true"/> <element name="addOptionBtn" type="button" selector="button[data-index='button_add']"/> @@ -20,7 +20,6 @@ <element name="optionTypeTextField" type="button" selector=".admin__dynamic-rows[data-index='options'] .action-menu._active li li"/> <element name="maxCharactersInput" type="input" selector="input[name='product[options][0][max_characters]']"/> - <element name="checkSelect" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//span[text()='Option Type']/parent::label/parent::div//div[@data-role='selected-option']" parameterized="true"/> <element name="checkDropDown" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//parent::label/parent::div//li[@class='admin__action-multiselect-menu-inner-item']//label[text()='Drop-down']" parameterized="true"/> <element name="clickAddValue" type="button" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tfoot//button" parameterized="true"/> @@ -38,5 +37,10 @@ <element name="addValue" type="button" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[@data-action='add_new_row']" /> <element name="valueTitle" type="input" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[contains(@class, 'admin__control-table')]//tbody/tr[last()]//*[@data-index='title']//input" /> <element name="valuePrice" type="input" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[contains(@class, 'admin__control-table')]//tbody/tr[last()]//*[@data-index='price']//input" /> + + <element name="optionPrice" type="input" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[@name='product[options][0][price]']"/> + <element name="optionPriceType" type="select" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[@name='product[options][0][price_type]']"/> + <element name="optionSku" type="input" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[@name='product[options][0][sku]']"/> + <element name="optionFileExtensions" type="input" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[@name='product[options][0][file_extension]']"/> </section> </sections> \ 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 @@ */ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductFiltersSection"> <element name="filtersButton" type="button" selector="#container > div > div.admin__data-grid-header > div:nth-child(1) > div.data-grid-filters-actions-wrap > div > button"/> <element name="clearFiltersButton" type="button" selector="//div[@class='admin__data-grid-header']//button[@class='action-tertiary action-clear']" timeout="10"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductFormActionSection"> + <element name="backButton" type="button" selector="#back" timeout="30"/> + <element name="saveButton" type="button" selector="#save-button" timeout="30"/> + <element name="saveArrow" type="button" selector="button[data-ui-id='save-button-dropdown']" timeout="30"/> + <element name="saveAndClose" type="button" selector="span[title='Save & Close']" timeout="30"/> + <element name="changeStoreButton" type="button" selector="#store-change-button" timeout="10"/> + <element name="selectStoreView" type="button" selector="//ul[@data-role='stores-list']/li/a[normalize-space(.)='{{var1}}']" timeout="10" parameterized="true"/> + </section> +</sections> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductFormChangeStoreSection"> + <element name="storeSelector" type="button" selector="//a[contains(text(),'{{var1}}')]" parameterized="true"/> + <element name="acceptButton" type="button" selector="button[class='action-primary action-accept']" timeout="30"/> + </section> +</sections> 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 @@ */ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductFormSection"> <element name="attributeSet" type="select" selector="div[data-index='attribute_set_id'] .admin__field-control"/> <element name="attributeSetFilter" type="input" selector="div[data-index='attribute_set_id'] .admin__field-control input" timeout="30"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductGridActionSection"> + <element name="addProductToggle" type="button" selector=".action-toggle.primary.add"/> + <element name="addSimpleProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-simple']" timeout="30"/> + <element name="addGroupedProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-grouped']" timeout="30"/> + <element name="addVirtualProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-virtual']" timeout="30"/> + <element name="addBundleProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-bundle']" timeout="30"/> + <element name="addDownloadableProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-downloadable']" timeout="30"/> + <element name="addTypeProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-{{type}}']" parameterized="true"/> + <element name="productName" type="text" selector="//div[text()='{{var1}}']" parameterized="true"/> + </section> +</sections> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductGridConfirmActionSection"> <element name="title" type="text" selector=".modal-popup.confirm h1.modal-title"/> <element name="message" type="text" selector=".modal-popup.confirm div.modal-content"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductGridFilterSection"> <element name="filters" type="button" selector="button[data-action='grid-filter-expand']"/> <element name="clearAll" type="button" selector=".admin__data-grid-header .admin__data-grid-filters-current._show .action-clear" timeout="30"/> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductGridPaginationSection"> <element name="perPageDropdown" type="select" selector=".admin__data-grid-pager-wrap .selectmenu"/> <element name="perPageOption" type="button" selector="//div[@class='admin__data-grid-pager-wrap']//div[@class='selectmenu-items _active']//li//button[text()='{{label}}']" parameterized="true"/> 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 @@ */ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductGridSection"> <element name="loadingMask" type="text" selector=".admin__data-grid-loading-mask[data-component*='product_listing']"/> <element name="columnHeader" type="button" selector="//div[@data-role='grid-wrapper']//table[contains(@class, 'data-grid')]/thead/tr/th[contains(@class, 'data-grid-th')]/span[text() = '{{label}}']" parameterized="true" timeout="30"/> @@ -27,5 +27,6 @@ <element name="table" type="text" selector="#container > div > div.admin__data-grid-wrap > table"/> <element name="firstRow" type="button" selector="tr.data-row:nth-of-type(1)"/> <element name="productGridCheckboxOnRow" type="checkbox" selector="//*[@id='container']//tr[{{row}}]/td[1]//input" parameterized="true"/> + <element name="productGridNameProduct" type="input" selector="//tbody//tr//td//div[contains(., '{{var1}}')]" parameterized="true" timeout="30"/> </section> </sections> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductGridTableHeaderSection"> + <element name="id" type="button" selector=".//*[@class='sticky-header']/following-sibling::*//th[@class='data-grid-th _sortable _draggable _{{order}}']/span[text()='ID']" parameterized="true"/> + </section> +</sections> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductImagesSection"> + <element name="productImagesToggle" type="button" selector="div[data-index=gallery] .admin__collapsible-title"/> + <element name="imageFileUpload" type="input" selector="#fileupload"/> + <element name="imageUploadButton" type="button" selector="div.image div.fileinput-button"/> + <element name="imageFile" type="text" selector="//*[@id='media_gallery_content']//img[contains(@src, '{{url}}')]" parameterized="true"/> + <element name="removeImageButton" type="button" selector=".action-remove"/> + <element name="modalOkBtn" type="button" selector="button.action-primary.action-accept"/> + <element name="uploadProgressBar" type="text" selector=".uploader .file-row"/> + + <element name="nthProductImage" type="button" selector="#media_gallery_content > div:nth-child({{var}}) img.product-image" parameterized="true"/> + <element name="nthRemoveImageBtn" type="button" selector="#media_gallery_content > div:nth-child({{var}}) button.action-remove" parameterized="true"/> + + <element name="altText" type="textarea" selector="textarea[data-role='image-description']"/> + + <element name="roleBase" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Base']"/> + <element name="roleSmall" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Small']"/> + <element name="roleThumbnail" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Thumbnail']"/> + <element name="roleSwatch" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Swatch']"/> + + <element name="isBaseSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Base']"/> + <element name="isSmallSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Small']"/> + <element name="isThumbnailSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Thumbnail']"/> + <element name="isSwatchSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Swatch']"/> + </section> +</sections> \ 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductMessagesSection"> + <element name="successMessage" type="text" selector=".message-success"/> + <element name="errorMessage" type="text" selector=".message.message-error.error"/> + </section> +</sections> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductModalSlideGridSection"> + <element name="productGridXRowYColumnButton" type="input" selector=".modal-slide table.data-grid tr.data-row:nth-child({{row}}) td:nth-child({{column}})" parameterized="true" timeout="30"/> + </section> +</sections> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductFormRelatedUpSellCrossSellSection"> <element name="AddRelatedProductsButton" type="button" selector="button[data-index='button_related']" timeout="30"/> <element name="relatedProductSectionText" type="text" selector=".fieldset-wrapper.admin__fieldset-section[data-index='related']"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductSEOSection"> + <element name="sectionHeader" type="button" selector="div[data-index='search-engine-optimization']" timeout="30"/> + <element name="urlKeyInput" type="input" selector="input[name='product[url_key]']"/> + </section> +</sections> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminUpdateAttributesSection"> <element name="saveButton" type="button" selector="button[title='Save']" timeout="30"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontCategoryFilterSection"> + <element name="CategoryFilter" type="button" selector="//main//div[@class='filter-options']//div[contains(text(), 'Category')]"/> + <element name="CategoryByName" type="button" selector="//main//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{var1}}')]" parameterized="true"/> + </section> +</sections> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCategoryMainSection"> <element name="modeListButton" type="button" selector="#mode-list"/> <element name="CategoryTitle" type="text" selector="#page-title-heading span"/> @@ -24,5 +24,7 @@ <element name="productLinkByHref" type="text" selector="a.product-item-link[href$='{{var1}}.html']" parameterized="true"/> <element name="productPrice" type="text" selector="div.price-box.price-final_price"/> <element name="categoryImage" type="text" selector=".category-image"/> + <element name="emptyProductMessage" type="block" selector=".message.info.empty>div"/> + <element name="lineProductName" type="text" selector=".products.list.items.product-items li:nth-of-type({{line}}) .product-item-link" timeout="30" parameterized="true"/> </section> </sections> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontCategoryProductSection"> + <element name="ProductTitleByNumber" type="button" selector="//main//li[{{var1}}]//a[@class='product-item-link']" parameterized="true"/> + <element name="ProductPriceByNumber" type="text" selector="//main//li[{{var1}}]//span[@class='price']" parameterized="true"/> + <element name="ProductSpecialPriceByNumber" type="text" selector="//main//li[{{var1}}]//span[@class='special-price']//span[@class='price']" parameterized="true"/> + <element name="ProductOldPriceByNumber" type="text" selector="//main//li[{{var1}}]//span[@class='old-price']//span[@class='price']" parameterized="true"/> + <element name="ProductInfoByNumber" type="text" selector="//main//li[{{var1}}]//div[@class='product-item-info']" parameterized="true"/> + <element name="ProductAddToCompareByNumber" type="text" selector="//main//li[{{var1}}]//a[contains(@class, 'tocompare')]" parameterized="true"/> + <element name="listedProduct" type="block" selector="ol li:nth-child({{productPositionInList}}) img" parameterized="true"/> + <element name="categoryListView" type="button" selector="a[title='List']" timeout="30"/> + + <element name="ProductTitleByName" type="button" selector="//main//li//a[contains(text(), '{{var1}}')]" parameterized="true"/> + <element name="ProductPriceByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/> + <element name="ProductImageByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[@class='product-image-photo']" parameterized="true"/> + <element name="ProductImageBySrc" type="text" selector=".products-grid img[src*='{{pattern}}']" parameterized="true"/> + <element name="ProductInfoByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//div[@class='product-item-info']" parameterized="true"/> + <element name="ProductAddToCartByName" type="button" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocart')]" parameterized="true"/> + <element name="ProductAddToCompareByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocompare')]" parameterized="true"/> + <element name="ProductImageByNameAndSrc" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[contains(@src, '{{src}}')]" parameterized="true"/> + </section> +</sections> 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 @@ */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCategorySidebarSection"> <element name="filterOptionsTitle" type="text" selector="//div[@class='filter-options-title' and contains(text(), '{{var1}}')]" parameterized="true"/> <element name="filterOptions" type="text" selector=".filter-options-content .items"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontCategoryTopToolbarSection"> + <element name="gridMode" type="button" selector=".//*[@class='toolbar toolbar-products'][1]//*[@id='mode-grid']" timeout="30"/> + <element name="listMode" type="button" selector=".//*[@class='toolbar toolbar-products'][1]//*[@id='mode-list']" timeout="30"/> + <element name="sortByDropdown" type="select" selector=".//*[@class='toolbar toolbar-products'][1]//*[@id='sorter']" timeout="30"/> + </section> +</sections> 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 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontComparisonSidebarSection"> <element name="Compare" type="button" selector="//main//div[contains(@class, 'block-compare')]//a[contains(@class, 'action compare')]"/> <element name="ClearAll" type="button" selector="//main//div[contains(@class, 'block-compare')]//a[contains(@class, 'action clear')]"/> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontFooterSection"> + <element name="switchStoreButton" type="button" selector="#switcher-store-trigger"/> + <element name="storeLink" type="button" selector="//ul[@class='dropdown switcher-dropdown']//a[contains(text(),'{{var1}}')]" parameterized="true" timeout="30"/> + </section> +</sections> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontHeaderSection"> + <element name="NavigationCategoryByName" type="button" selector="//nav//a[span[contains(., '{{var1}}')]]" parameterized="true"/> + </section> +</sections> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontMessagesSection"> + <element name="success" type="text" selector="div.message-success.success.message"/> + </section> +</sections> 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 @@ */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontNavigationSection"> <element name="topCategory" type="button" selector="//a[contains(@class,'level-top')]/span[contains(text(),'{{var1}}')]" parameterized="true"/> <element name="subCategory" type="button" selector="//ul[contains(@class,'submenu')]//span[contains(text(),'{{var1}}')]" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProducRelatedProductsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProducRelatedProductsSection.xml similarity index 82% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProducRelatedProductsSection.xml rename to app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProducRelatedProductsSection.xml index 9165697051d0f..e15723582dbf0 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProducRelatedProductsSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProducRelatedProductsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontProductRelatedProductsSection"> <element name="relatedProductsActionsHeaderText" type="text" selector=".block.related .block-actions" /> <element name="relatedProductsListSectionText" type="text" selector=".block.related .products.wrapper.grid.products-grid.products-related" /> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductActionSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductActionSection.xml new file mode 100644 index 0000000000000..65d6b7c5f61cb --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductActionSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductActionSection"> + <element name="quantity" type="input" selector="#qty"/> + <element name="addToCart" type="button" selector="#product-addtocart-button"/> + <element name="addToCartButtonTitleIsAdding" type="text" selector="//button/span[text()='Adding...']"/> + <element name="addToCartButtonTitleIsAdded" type="text" selector="//button/span[text()='Added']"/> + <element name="addToCartButtonTitleIsAddToCart" type="text" selector="//button/span[text()='Add to Cart']"/> + </section> +</sections> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductCompareMainSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductCompareMainSection.xml new file mode 100644 index 0000000000000..728f9a5a174cd --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductCompareMainSection.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductCompareMainSection"> + <element name="PageName" type="text" selector="//*[@id='maincontent']//h1//span"/> + <element name="ProductLinkByName" type="button" selector="//*[@id='product-comparison']//tr//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]" parameterized="true"/> + <element name="ProductPriceByName" type="text" selector="//*[@id='product-comparison']//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/> + <element name="ProductImageByName" type="text" selector="//*[@id='product-comparison']//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]]//img[@class='product-image-photo']" parameterized="true"/> + <element name="ProductAttributeByCodeAndProductName" type="text" selector="//*[@id='product-comparison']//tr[.//th[./span[contains(text(), '{{var1}}')]]]//td[count(//*[@id='product-comparison']//tr//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var2}}')]]/preceding-sibling::td)+1]/div" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoDetailsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoDetailsSection.xml new file mode 100644 index 0000000000000..40f49fc2cc77b --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoDetailsSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductInfoDetailsSection"> + <element name="productNameForReview" type="text" selector=".legend.review-legend>strong" /> + </section> +</sections> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml new file mode 100644 index 0000000000000..7e1bec48aeebc --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductInfoMainSection"> + <element name="stock" type="input" selector=".stock.available"/> + <element name="productName" type="text" selector=".base"/> + <element name="productSku" type="text" selector=".product.attribute.sku>.value"/> + <element name="productPriceLabel" type="text" selector=".price-label"/> + <element name="productPrice" type="text" selector="div.price-box.price-final_price"/> + <element name="specialPrice" type="text" selector=".special-price"/> + <element name="updatedPrice" type="text" selector="div.price-box.price-final_price [data-price-type='finalPrice'] .price"/> + <element name="oldPrice" type="text" selector=".old-price"/> + <element name="oldPriceTag" type="text" selector=".old-price .price-label"/> + <element name="oldPriceAmount" type="text" selector=".old-price .price"/> + <element name="productStockStatus" type="text" selector=".stock[title=Availability]>span"/> + <element name="productImage" type="text" selector="//*[@id='maincontent']//div[@class='gallery-placeholder']//img[@class='fotorama__img']"/> + <element name="productImageSrc" type="text" selector="//*[@id='maincontent']//div[@class='gallery-placeholder']//img[contains(@src, '{{src}}')]" parameterized="true"/> + <element name="productDescription" type="text" selector="#description .value"/> + <element name="productOptionFieldInput" type="input" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//input[@type='text']" parameterized="true"/> + <element name="productOptionAreaInput" type="textarea" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//textarea" parameterized="true"/> + <element name="productOptionFile" type="file" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'OptionFile')]/../div[@class='control']//input[@type='file']" parameterized="true"/> + <element name="productOptionSelect" type="select" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//select" parameterized="true"/> + + + <!-- The parameter is the nth custom option that you want to get --> + <element name="nthCustomOption" type="block" selector="//*[@id='product-options-wrapper']/*[@class='fieldset']/*[contains(@class, 'field')][{{customOptionNum}}]" parameterized="true" /> + <!-- The 1st parameter is the nth custom option, the 2nd parameter is the nth value in the option --> + <element name="nthCustomOptionInput" type="radio" selector="//*[@id='product-options-wrapper']/*[@class='fieldset']/*[contains(@class, 'field')][{{customOptionNum}}]//*[contains(@class, 'admin__field-option')][{{customOptionValueNum}}]//input" parameterized="true" /> + <element name="productOptionRadioButtonsCheckbox" type="checkbox" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//input[@price='{{var2}}']" parameterized="true"/> + + <element name="productOptionDataMonth" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='month']" parameterized="true"/> + <element name="productOptionDataDay" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='day']" parameterized="true"/> + <element name="productOptionDataYear" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='year']" parameterized="true"/> + <element name="productOptionDateAndTimeMonth" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='month']" parameterized="true"/> + <element name="productOptionDateAndTimeDay" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='day']" parameterized="true"/> + <element name="productOptionDateAndTimeYear" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='year']" parameterized="true"/> + <element name="productOptionDateAndTimeHour" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='hour']" parameterized="true"/> + <element name="productOptionDateAndTimeMinute" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='minute']" parameterized="true"/> + <element name="productOptionTimeHour" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='hour']" parameterized="true"/> + <element name="productOptionTimeMinute" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='minute']" parameterized="true"/> + + <!-- Only one of Upload/Url Inputs are available for File and Sample depending on the value of the corresponding TypeSelector --> + <element name="addLinkFileUploadFile" type="file" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//input[@type='file']" parameterized="true" /> + + <element name="productShortDescription" type="text" selector="//div[@class='product attribute overview']//div[@class='value']"/> + <element name="productAttributeTitle1" type="text" selector="#product-options-wrapper div[tabindex='0'] label"/> + <element name="productAttributeOptions1" type="select" selector="#product-options-wrapper div[tabindex='0'] option"/> + <element name="productAttributeOptionsPrice" type="text" selector="//label[contains(.,'{{var1}}')]//span[@data-price-amount='{{var2}}']" parameterized="true"/> + <element name="productAttributeOptionsDropDown" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[@price='{{var2}}']" parameterized="true"/> + <element name="productAttributeOptionsRadioButtons" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//span[@data-price-amount='{{var2}}']" parameterized="true"/> + <element name="productAttributeOptionsCheckbox" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//span[@data-price-amount='{{var2}}']" parameterized="true"/> + <element name="productAttributeOptionsMultiselect" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[@price='{{var2}}']" parameterized="true"/> + <element name="productAttributeOptionsData" type="text" selector="//span[contains(.,'{{var1}}')]/../span[@class='price-notice']//span[@data-price-amount='{{var2}}']" parameterized="true"/> + <element name="mediaDescription" type="text" selector=".product.attribute.description>div>p>img"/> + <element name="mediaShortDescription" type="text" selector=".product.attribute.overview>div>p>img"/> + <element name="productAddToCompare" type="button" selector="a.action.tocompare"/> + <element name="productOptionDropDownTitle" type="text" selector="//label[contains(.,'{{var1}}')]" parameterized="true"/> + <element name="productOptionDropDownOptionTitle" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[contains(.,'{{var2}}')]" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMediaSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMediaSection.xml new file mode 100644 index 0000000000000..0273b39f48aba --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMediaSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductMediaSection"> + <element name="imageFile" type="text" selector="//*[@class='product media']//img[contains(@src, '{{filename}}')]" parameterized="true"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductMoreInformationSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMoreInformationSection.xml similarity index 76% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductMoreInformationSection.xml rename to app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMoreInformationSection.xml index e6269631274eb..fc2102e073de3 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductMoreInformationSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMoreInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontProductMoreInformationSection"> <element name="moreInformation" type="button" selector="#tab-label-additional-title" timeout="30"/> <element name="moreInformationTextArea" type="textarea" selector="#additional"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml new file mode 100644 index 0000000000000..acda5c40af8a3 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductPageSection"> + <element name="qtyInput" type="button" selector="input.input-text.qty"/> + <element name="addToCartBtn" type="button" selector="button.action.tocart.primary" timeout="30"/> + <element name="successMsg" type="button" selector="div.message-success"/> + <element name="alertMessage" type="text" selector=".page.messages [role=alert]"/> + <element name="messagesBlock" type="text" selector=".page.messages"/> + <element name="addToWishlist" type="button" selector="//a[@class='action towishlist']" timeout="30"/> + <element name="customTextOptionInput" type="input" selector=".input-text.product-custom-option"/> + <element name="charCounter" type="text" selector=".character-counter"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddDefaultImageSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageSimpleProductTest.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddDefaultImageSimpleProductTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageSimpleProductTest.xml index 3b3693d0ff8a6..c9b6e033a2fd8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddDefaultImageSimpleProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageSimpleProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddDefaultImageSimpleProductTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddDefaultImageVirtualProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageVirtualProductTest.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddDefaultImageVirtualProductTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageVirtualProductTest.xml index 292ba20f48bd3..add917199e2eb 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddDefaultImageVirtualProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddDefaultImageVirtualProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddRemoveProductImageVirtualProductTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageForCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageForCategoryTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml index 04e34871c8b73..6ee72877a0da0 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageForCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddImageForCategoryTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGCatalogTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGCatalogTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGCatalogTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGCatalogTest.xml index 43ce7e59ba621..479247ade8cb2 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGCatalogTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGCatalogTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddImageToWYSIWYGCatalogTest"> <before> <actionGroup ref="LoginActionGroup" stepKey="login"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGProductTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml index e0582fff6c3c7..d6e055c43322a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddImageToWYSIWYGProductTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAssignProductAttributeToAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAssignProductAttributeToAttributeSetTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml index 3615f4132ffb0..aed667db1f7b2 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAssignProductAttributeToAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAssignProductAttributeToAttributeSetTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateCategoryFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryFromProductPageTest.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateCategoryFromProductPageTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryFromProductPageTest.xml index 7c81f4472e92a..d5483f772f028 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateCategoryFromProductPageTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryFromProductPageTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateCategoryFromProductPageTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateCategoryTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest.xml index 2c39be3317545..7e3e2cd918f5e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateCategoryTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateProductCustomAttributeSet.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSet.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateProductCustomAttributeSet.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSet.xml index 65e987461b982..038c8fd2263f0 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateProductCustomAttributeSet.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSet.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateProductCustomAttributeSet"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateProductDuplicateUrlkeyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateProductDuplicateUrlkeyTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest.xml index 4e3f9da79b643..0340eea852a4c 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateProductDuplicateUrlkeyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateProductDuplicateUrlkeyTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml index 791ed1fdf83ac..dbe5a90d592da 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateRootCategoryAndSubcategoriesTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateSimpleProductTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml index f5fb0e87bdc01..b2e6119ef4e13 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateSimpleProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateSimpleProductTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateSimpleProductWithUnicodeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml similarity index 90% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateSimpleProductWithUnicodeTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml index db127799c97e9..486fea9d91f9e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateSimpleProductWithUnicodeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateSimpleProductWithUnicodeTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminEditTextEditorProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminEditTextEditorProductAttributeTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml index d406b6c920dc0..71f2ffecb4652 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminEditTextEditorProductAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminEditTextEditorProductAttributeTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassChangeProductsStatusTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassChangeProductsStatusTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassChangeProductsStatusTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminMassChangeProductsStatusTest.xml index cf7c6af2fbd85..2edca19deeb00 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassChangeProductsStatusTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassChangeProductsStatusTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminMassChangeProductsStatusTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml index f0d50c8a5f7d6..7c3e31e90c015 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminMassUpdateProductAttributesGlobalScopeTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml index 96b8032f88751..be0bc2bf52a0b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesMissingRequiredFieldTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminMassUpdateProductAttributesMissingRequiredFieldTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml index 00a2e41e2dfb3..f7a04709b76d9 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminMassUpdateProductAttributesStoreViewScopeTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMoveAnchoredCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMoveAnchoredCategoryTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml index 024af2a77a5ef..d29fde8590c9d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMoveAnchoredCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml @@ -6,7 +6,7 @@ */ --> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminMoveAnchoredCategoryTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml index 1b4d9372cb509..012c956c2dbef 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml @@ -7,9 +7,10 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminMultipleWebsitesUseDefaultValuesTest"> <annotations> + <features value="Catalog"/> <title value="Use Default Value checkboxes should be checked for new website scope"/> <description value="Use Default Value checkboxes for product attribute should be checked for new website scope"/> <severity value="MAJOR"/> @@ -18,7 +19,7 @@ </annotations> <after> <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite"> - <argument name="websiteName" value="Second Website"/> + <argument name="websiteName" value="Second Website"/> </actionGroup> <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> </after> @@ -35,8 +36,10 @@ <!--Create Store view --> <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/> + <waitForPageLoad stepKey="waitForSystemStorePage"/> <click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/> <waitForPageLoad stepKey="waitForProductPageLoad"/> + <waitForElementVisible selector="//legend[contains(., 'Store View Information')]" stepKey="waitForNewStorePageToOpen"/> <selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/> <fillField userInput="Second Store View" selector="{{AdminNewStoreSection.storeNameTextField}}" stepKey="fillStoreViewName"/> <fillField userInput="second_store_view" selector="{{AdminNewStoreSection.storeCodeTextField}}" stepKey="fillStoreViewCode"/> @@ -49,6 +52,7 @@ <!--Create a Simple Product --> <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToCatalogProductGrid"/> + <waitForPageLoad stepKey="waitForProductGrid"/> <click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/> <click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/> <fillField userInput="{{_defaultProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillProductName"/> @@ -67,7 +71,6 @@ <click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickStoreviewSwitcher"/> <click selector="{{AdminProductFormActionSection.selectStoreView('Second Store View')}}" stepKey="chooseStoreView"/> <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessage"/> - <!--<waitForPageLoad stepKey="waitForStoreViewSwitched"/>--> <waitForPageLoad time="30" stepKey="waitForPageLoad9"/> <see userInput="Second Store View" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewName"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminProductGridFilteringByDateAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminProductGridFilteringByDateAttributeTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml index 43edc3a54e00b..b079d35296e43 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminProductGridFilteringByDateAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminProductGridFilteringByDateAttributeTest"> <annotations> <title value="Verify Set Product as new Filter input on Product Grid doesn't getreset to currentDate"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml index 8b1f4fdc9380c..c8be44eb73ca9 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminProductStatusAttributeDisabledByDefaultTest"> <annotations> <title value="Verify the default option value for product Status attribute is set correctly during product creation"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveDefaultImageSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageSimpleProductTest.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveDefaultImageSimpleProductTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageSimpleProductTest.xml index 4623f2ad4a90c..f20e6caf637d4 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveDefaultImageSimpleProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageSimpleProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminRemoveDefaultImageSimpleProductTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveDefaultImageVirtualProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageVirtualProductTest.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveDefaultImageVirtualProductTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageVirtualProductTest.xml index e872d96b8fdff..86cc16e141e0a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveDefaultImageVirtualProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveDefaultImageVirtualProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminRemoveDefaultImageVirtualProductTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveImageFromCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveImageFromCategoryTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml index 11b29b9dd33e7..c68a848fb0fb6 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveImageFromCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminRemoveImageFromCategoryTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminSimpleProductImagesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml similarity index 99% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminSimpleProductImagesTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml index d0d5ba4a6f7ba..b51f6a6e43249 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminSimpleProductImagesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminSimpleProductImagesTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml index 7be5e5d281933..1441e2175d08e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminUnassignProductAttributeFromAttributeSetTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminUpdateCategoryStoreUrlKeyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminUpdateCategoryStoreUrlKeyTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml index e29890befd860..013b1b6d38123 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminUpdateCategoryStoreUrlKeyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminUpdateCategoryStoreUrlKeyTest"> <annotations> <features value="SEO-friendly URL Key Update"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml new file mode 100644 index 0000000000000..03d919e329115 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="AdvanceCatalogSearchSimpleProductByNameTest"> + <annotations> + <features value="Catalog"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search simple product with product name"/> + <description value="Guest customer should be able to advance search simple product with product name"/> + <severity value="MAJOR"/> + <testCaseId value="MC-132"/> + <group value="Catalog"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="product"/> + </before> + <after> + <deleteData createDataKey="product" stepKey="delete"/> + </after> + </test> + <test name="AdvanceCatalogSearchSimpleProductBySkuTest"> + <annotations> + <features value="Catalog"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search simple product with product sku"/> + <description value="Guest customer should be able to advance search simple product with product sku"/> + <severity value="MAJOR"/> + <testCaseId value="MC-133"/> + <group value="Catalog"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="product"/> + </before> + <after> + <deleteData createDataKey="product" stepKey="delete"/> + </after> + </test> + <test name="AdvanceCatalogSearchSimpleProductByDescriptionTest"> + <annotations> + <features value="Catalog"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search simple product with product description"/> + <description value="Guest customer should be able to advance search simple product with product description"/> + <severity value="MAJOR"/> + <testCaseId value="MC-134"/> + <group value="Catalog"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="product"/> + </before> + <after> + <deleteData createDataKey="product" stepKey="delete"/> + </after> + </test> + <test name="AdvanceCatalogSearchSimpleProductByShortDescriptionTest"> + <annotations> + <features value="Catalog"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search simple product with product short description"/> + <description value="Guest customer should be able to advance search simple product with product short description"/> + <severity value="MAJOR"/> + <testCaseId value="MC-135"/> + <group value="Catalog"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="product"/> + </before> + <after> + <deleteData createDataKey="product" stepKey="delete"/> + </after> + </test> + <test name="AdvanceCatalogSearchSimpleProductByPriceTest"> + <annotations> + <features value="Catalog"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search simple product with product price"/> + <description value="Guest customer should be able to advance search simple product with product price"/> + <severity value="MAJOR"/> + <testCaseId value="MC-136"/> + <group value="Catalog"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="product"/> + <getData entity="GetProduct" stepKey="arg1"> + <requiredEntity createDataKey="product"/> + </getData> + <getData entity="GetProduct" stepKey="arg2"> + <requiredEntity createDataKey="product"/> + </getData> + <getData entity="GetProduct" stepKey="arg3"> + <requiredEntity createDataKey="product"/> + </getData> + </before> + <after> + <deleteData createDataKey="product" stepKey="delete"/> + </after> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/ConfigurableOptionTextInputLengthValidationHint.xml b/app/code/Magento/Catalog/Test/Mftf/Test/ConfigurableOptionTextInputLengthValidationHint.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/ConfigurableOptionTextInputLengthValidationHint.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/ConfigurableOptionTextInputLengthValidationHint.xml index 45db40dd2e3dd..c97d2c45be951 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/ConfigurableOptionTextInputLengthValidationHint.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/ConfigurableOptionTextInputLengthValidationHint.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="ConfigurableOptionTextinputLengthValidationHintTest"> <annotations> <features value="Product Customizable Option"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml index 84035adaa90e6..4ec775f7ea2d8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="DeleteCategoriesTest"> <annotations> <features value="Catalog"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml new file mode 100644 index 0000000000000..a9829b67189cb --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml @@ -0,0 +1,233 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CAdminTest"> + <annotations> + <features value="End to End scenarios"/> + <stories value="B2C admin - MAGETWO-75412"/> + <group value="e2e"/> + <title value="Pass End to End B2C Admin scenario"/> + <description value="Admin creates products, creates and manages categories, creates promotions, creates an order, processes an order, processes a return, uses admin grids"/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-87014"/> + <!-- Skipped, see: https://jira.corp.magento.com/browse/MQE-891 --> + <group value="skip"/> + </annotations> + <after> + <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + </after> + + <!--Login to Admin Area--> + <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/> + + <!--Admin creates product--> + <!--Create Simple Product--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageSimple"/> + <waitForPageLoad time="30" stepKey="waitForProductPageLoadSimple"/> + <actionGroup ref="resetProductGridToDefaultView" stepKey="resetProductGridColumnsInitial"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateSimpleProduct"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="checkRequiredFieldsInProductForm" stepKey="checkRequiredFieldsProductSimple"/> + <actionGroup ref="fillMainProductForm" stepKey="fillSimpleProductMain"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="addProductImage" stepKey="addImageForProductSimple"> + <argument name="image" value="ProductImage"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/> + <click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackToGridSimple"/> + <actionGroup ref="filterProductGridBySku" stepKey="filterProductGridSimple"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <grabAttributeFrom selector="{{AdminProductGridSection.productThumbnail('1')}}" userInput="src" stepKey="getSimpleProductThumbnail"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$getSimpleProductThumbnail" stepKey="simpleThumbnailIsNotDefault"/> + <actionGroup ref="viewProductInAdminGrid" stepKey="seeSimpleProductInGrid"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + + <!--Create Virtual Product--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageVirtual"/> + <waitForPageLoad time="30" stepKey="waitForProductPageLoadVirtual"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateVirtualProduct"> + <argument name="product" value="VirtualProduct"/> + </actionGroup> + <fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{VirtualProduct.sku}}" stepKey="fillVirtualName"/> + <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{VirtualProduct.name}}" stepKey="fillVirtualSku"/> + <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{VirtualProduct.price}}" stepKey="fillVirtualPrice"/> + <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{VirtualProduct.quantity}}" stepKey="fillVirtualQty"/> + <actionGroup ref="saveProductForm" stepKey="saveVirtualProduct"/> + <actionGroup ref="viewProductInAdminGrid" stepKey="viewVirtualProductInGrid"> + <argument name="product" value="VirtualProduct"/> + </actionGroup> + + <!--Admin uses product grid--> + <!--Start with default view--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageGrid"/> + <waitForPageLoad stepKey="waitForProductGridPageLoad"/> + + <!--Search by keyword--> + <actionGroup ref="resetProductGridToDefaultView" stepKey="resetGridToDefaultKeywordSearch"/> + <actionGroup ref="searchProductGridByKeyword" stepKey="useKeywordSearchSimpleProduct"> + <argument name="keyword" value="SimpleProduct.name"/> + </actionGroup> + <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" userInput="1" stepKey="seeOnlyOneProductInGrid"/> + <see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="{{SimpleProduct.name}}" stepKey="seeOnlySimpleProductInGrid"/> + + <!--Paging works--> + <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultPagination"/> + <comment userInput="Admin uses paging on product grid" stepKey="usePagingProductGridComment"/> + <click selector="{{AdminProductGridPaginationSection.perPageDropdown}}" stepKey="clickProductPerPageDropdown"/> + <click selector="{{AdminProductGridPaginationSection.perPageOption('50')}}" stepKey="selectProductsPerPage"/> + <waitForLoadingMaskToDisappear stepKey="waitForProductGridLoad50PerPage"/> + <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" parameterArray="[5,50]" stepKey="see50ProductsInGrid"/> + <click selector="{{AdminProductGridPaginationSection.perPageDropdown}}" stepKey="clickProductPerPageDropdownCustom"/> + <click selector="{{AdminProductGridPaginationSection.perPageOption('Custom')}}" stepKey="selectCustomPerPage"/> + <fillField selector="{{AdminProductGridPaginationSection.perPageInput}}" userInput="5" stepKey="fillCustomPerPage"/> + <click selector="{{AdminProductGridPaginationSection.perPageApplyInput}}" stepKey="applyCustomPerPage"/> + <waitForPageLoad stepKey="waitForPageRefreshCustomPerPage"/> + <seeInField selector="{{AdminProductGridPaginationSection.currentPage}}" userInput="1" stepKey="seeOnFirstProductPage"/> + <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" userInput="5" stepKey="seeProductsOnFirstPage"/> + <click selector="{{AdminProductGridPaginationSection.nextPage}}" stepKey="clickNextProductPage"/> + <seeInField selector="{{AdminProductGridPaginationSection.currentPage}}" userInput="2" stepKey="seeOnSecondProductPage"/> + <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" parameterArray="[1,5]" stepKey="seeProductsOnSecondPage"/> + + <!--Filtering works (by Name, By Price, by Status)--> + <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultFiltering"/> + <actionGroup ref="filterProductGridBySku" stepKey="filterProductGridByGroupedSku"> + <argument name="product" value="GroupedProduct"/> + </actionGroup> + <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" userInput="1" stepKey="seeOneMatchingSkuInProductGrid"/> + <see selector="{{AdminProductGridSection.productGridCell('1','SKU')}}" userInput="{{GroupedProduct.sku}}" stepKey="seeProductInFilteredGridSku"/> + <!--Filter by price--> + <actionGroup ref="filterProductGridByPriceRange" stepKey="filterProductGridByPrice"> + <argument name="filter" value="PriceFilterRange"/> + </actionGroup> + <click selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="clickPriceHeaderToSortAscForFilter"/> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'Price')}}" stepKey="getMinimumPriceInGrid"/> + <click selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="clickPriceHeaderToSortDescForFilter"/> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'Price')}}" stepKey="getMaximumPriceInGrid"/> + <assertRegExp expected="'/\$[0-9]{2}\.[0-9]{2}/'" actual="$getMinimumPriceInGrid" stepKey="assertMinimumPriceIsCorrect"/> + <assertRegExp expected="'/\$[0-9]{2}\.[0-9]{2}/'" actual="$getMaximumPriceInGrid" stepKey="assertMaximumPriceIsCorrect"/> + <assertLessThan expected="$getMaximumPriceInGrid" actual="$getMinimumPriceInGrid" stepKey="checkPriceSortCorrect"/> + <!--Filter by status--> + <actionGroup ref="filterProductGridByEnabledStatus" stepKey="filterGridByEnabledProducts"/> + <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" parameterArray="[1,20]" stepKey="seeEnabledProductsNotEmpty"/> + <see selector="{{AdminProductGridSection.column('Status')}}" userInput="Enabled" stepKey="seeOnlyEnabledProducts"/> + <actionGroup ref="filterProductGridByDisabledStatus" stepKey="filterGridByDisabledProducts"/> + <dontSee selector="{{AdminProductGridSection.column('Status')}}" userInput="Enabled" stepKey="dontSeeEnabledProducts"/> + + <!--Sorting works (By Price, by ID)--> + <!--By Price--> + <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultSortingPrice"/> + <!--Filter by price so grid contains prices that we can compare correctly--> + <actionGroup ref="filterProductGridByPriceRange" stepKey="filterProductGridByPriceForCompare"> + <argument name="filter" value="PriceFilterRange"/> + </actionGroup> + <!--Sort Ascending--> + <click selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="clickPriceHeaderToSortAsc"/> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'Price')}}" stepKey="getFirstPriceSortAsc"/> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('2', 'Price')}}" stepKey="getSecondPriceSortAsc"/> + <assertLessThanOrEqual expected="$getSecondPriceSortAsc" actual="$getFirstPriceSortAsc" stepKey="checkPriceAscSortCorrect"/> + <!--Sort Descending--> + <click selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="clickPriceHeaderToSortDesc"/> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'Price')}}" stepKey="getFirstPriceSortDesc"/> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('2', 'Price')}}" stepKey="getSecondPriceSortDesc"/> + <assertGreaterThanOrEqual expected="$getSecondPriceSortDesc" actual="$getFirstPriceSortDesc" stepKey="checkPriceDescSortCorrect"/> + <!--By Product ID--> + <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultSortingId"/> + <!--Sort Ascending--> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'ID')}}" stepKey="getFirstProductIdSortAsc"/> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('2', 'ID')}}" stepKey="getSecondProductIdSortAsc"/> + <assertLessThan expected="$getSecondProductIdSortAsc" actual="$getFirstProductIdSortAsc" stepKey="checkProductIdAscSortCorrect"/> + <!--Sort Descending--> + <click selector="{{AdminProductGridSection.columnHeader('ID')}}" stepKey="clickIdHeaderToSortDesc"/> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'ID')}}" stepKey="getFirstProductIdSortDesc"/> + <grabTextFrom selector="{{AdminProductGridSection.productGridCell('2', 'ID')}}" stepKey="getSecondProductIdSortDesc"/> + <assertGreaterThan expected="$getSecondProductIdSortDesc" actual="$getFirstProductIdSortDesc" stepKey="checkProductIdDescSortCorrect"/> + + <!--Adding column works--> + <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultColumns"/> + <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdownToReset"/> + <click selector="{{AdminProductGridFilterSection.resetGridColumns}}" stepKey="resetProductGridColumns"/> + <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsDropdownAfterReset"/> + <!--Remove Price column--> + <seeElement selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="seeProductPriceColumn"/> + <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdown"/> + <uncheckOption selector="{{AdminProductGridFilterSection.viewColumnOption('Price')}}" stepKey="hidePriceColumn"/> + <dontSeeElement selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="dontSeeProductPriceColumn"/> + <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsDropdown"/> + <!--Add Weight column--> + <dontSeeElement selector="{{AdminProductGridSection.columnHeader('Weight')}}" stepKey="dontSeeWeightColumn"/> + <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdownWeight"/> + <checkOption selector="{{AdminProductGridFilterSection.viewColumnOption('Weight')}}" stepKey="showWeightColumn"/> + <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsDropdownWeight"/> + <seeElement selector="{{AdminProductGridSection.columnHeader('Weight')}}" stepKey="seeWeightColumn"/> + <actionGroup ref="filterProductGridBySku" stepKey="filterProductGridToCheckWeightColumn"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <see selector="{{AdminProductGridSection.productGridCell('1','Weight')}}" userInput="{{SimpleProduct.weight}}" stepKey="seeCorrectProductWeightInGrid"/> + <!--END Admin uses product grid--> + + <!--Admin creates category--> + <comment userInput="Admin creates category." stepKey="adminCreatesCategoryComment" before="navigateToCategoryPage"/> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/> + <waitForPageLoad time="30" stepKey="waitForCategoryPageLoad"/> + <!--Create category under Default Category--> + <click selector="{{AdminCategorySidebarTreeSection.categoryTreeRoot}}" stepKey="clickDefaultCategory"/> + <actionGroup ref="CheckCategoryNameIsRequiredField" stepKey="checkCategoryNameIsRequired"/> + <actionGroup ref="CreateCategory" stepKey="createCategory"> + <argument name="categoryEntity" value="_defaultCategory"/> + </actionGroup> + <!--Create category under newly created category--> + <click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="clickCreatedCategoryInTree"/> + <actionGroup ref="CreateCategory" stepKey="createSubCategory"> + <argument name="categoryEntity" value="SimpleSubCategory"/> + </actionGroup> + + <!--Admin moves category--> + <comment userInput="Admin moves category." stepKey="adminMovesCategoryComment" before="onCategoryPageToMoveCategory"/> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="onCategoryPageToMoveCategory"/> + <waitForPageLoad time="30" stepKey="waitForPageLoadMoveCategory"/> + <click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="expandTree"/> + <dragAndDrop selector1="{{AdminCategorySidebarTreeSection.categoryInTree(SimpleSubCategory.name)}}" + selector2="{{AdminCategorySidebarTreeSection.categoryTreeRoot}}" + stepKey="dragAndDropCategory"/> + <waitForPageLoad time="30" stepKey="waitForMoveConfirmation"/> + <see selector="{{AdminCategoryModalSection.title}}" userInput="Warning Message" stepKey="seeMoveConfirmationModal"/> + <click selector="{{AdminCategoryModalSection.ok}}" stepKey="clickOkConfirmMove"/> + <waitForPageLoad time="30" stepKey="waitForMove"/> + <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You moved the category." stepKey="seeCategoryMoveSuccessMessage"/> + <seeElement selector="{{AdminCategorySidebarTreeSection.categoryInTreeUnderRoot(SimpleSubCategory.name)}}" stepKey="seeSubcategoryIsUnderDefault"/> + + <!--Admin deletes category--> + <comment userInput="Admin deletes category" stepKey="deleteCategoryComment"/> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="onCategoryPageToDeleteCategory"/> + <waitForPageLoad time="30" stepKey="waitForCategoryPageDelete"/> + <actionGroup ref="DeleteCategory" stepKey="deleteCategory"> + <argument name="categoryEntity" value="_defaultCategory"/> + </actionGroup> + + <!--@TODO Move cleanup to "after" when MQE-830 is resolved--> + <!--Clean up categories--> + <comment userInput="Clean up categories" stepKey="cleanupCategoriesComment"/> + <actionGroup ref="DeleteCategory" stepKey="cleanSimpleSubCategory"> + <argument name="categoryEntity" value="SimpleSubCategory"/> + </actionGroup> + <!--Clean up products--> + <comment userInput="Clean up simple product" stepKey="cleanUpSimpleProduct"/> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteSimpleProduct"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <comment userInput="Clean up virtual product" stepKey="cleanUpVirtualProduct"/> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteVirtualProduct"> + <argument name="product" value="VirtualProduct"/> + </actionGroup> + </test> +</tests> \ No newline at end of file diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml new file mode 100644 index 0000000000000..e80de8122e810 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CGuestUserTest"> + <annotations> + <features value="End to End scenarios"/> + <stories value="B2C guest user - MAGETWO-75411"/> + <group value="e2e"/> + <title value="You should be able to pass End to End B2C Guest User scenario"/> + <description value="User browses catalog, searches for product, adds product to cart, adds product to wishlist, compares products, uses coupon code and checks out."/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-87435"/> + </annotations> + <before> + <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> + + <createData entity="ApiCategory" stepKey="createCategory"/> + + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct1"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct1Image"> + <requiredEntity createDataKey="createSimpleProduct1"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createSimpleProduct1Image1"> + <requiredEntity createDataKey="createSimpleProduct1"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct1" createDataKey="createSimpleProduct1"/> + + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct2"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct2Image"> + <requiredEntity createDataKey="createSimpleProduct2"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct2" createDataKey="createSimpleProduct2"/> + </before> + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createSimpleProduct1Image" stepKey="deleteSimpleProduct1Image"/>--> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createSimpleProduct1Image1" stepKey="deleteSimpleProduct1Image1"/>--> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> + + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createSimpleProduct2Image" stepKey="deleteSimpleProduct2Image"/>--> + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> + </after> + + <!-- Step 1: User browses catalog --> + <comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog" /> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/> + <waitForPageLoad stepKey="homeWaitForPageLoad"/> + <waitForElementVisible selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeWaitForWelcomeMessage"/> + <see userInput="Default welcome msg!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome"/> + + <!-- Open Category --> + <comment userInput="Open category" stepKey="commentOpenCategory" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="browseClickCategory"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategory"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <!-- Check simple product 1 in category --> + <comment userInput="Check simple product 1 in category" stepKey="commentCheckSimpleProductInCategory" /> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct1ImageSrc"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct1ImageSrc" stepKey="browseAssertSimpleProduct1ImageNotDefault"/> + <!-- Check simple product 2 in category --> + <comment userInput="Check simple product 2 in category" stepKey="commentCheckSimpleProduct2InCategory" /> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct2"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct2ImageSrc"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct2ImageSrc" stepKey="browseAssertSimpleProduct2ImageNotDefault"/> + + <!-- View Simple Product 1 --> + <comment userInput="View simple product 1" stepKey="commentViewSimpleProduct1" after="browseAssertSimpleProduct2ImageNotDefault"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="browseClickCategorySimpleProduct1View" after="commentViewSimpleProduct1"/> + <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct1Viewloaded" /> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct1PageImageSrc"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct1PageImageSrc" stepKey="browseAssertSimpleProduct1PageImageNotDefault"/> + + <!-- View Simple Product 2 --> + <comment userInput="View simple product 2" stepKey="commentViewSimpleProduct2" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory1"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" stepKey="browseClickCategorySimpleProduct2View"/> + <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct2ViewLoaded" /> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct2PageImageSrc"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct2PageImageSrc" stepKey="browseAssertSimpleProduct2PageImageNotDefault"/> + <comment userInput="End of browsing catalog" stepKey="endOfBrowsingCatalog" after="browseAssertSimpleProduct2PageImageNotDefault"/> + + <!-- Step 4: User compares products --> + <comment userInput="Start of comparing products" stepKey="startOfComparingProducts" after="endOfBrowsingCatalog"/> + <!-- Add Simple Product 1 to comparison --> + <comment userInput="Add simple product 1 to comparison" stepKey="commentAddSimpleProduct1ToComparison" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory" /> + <waitForLoadingMaskToDisappear stepKey="waitForCategoryloaded" /> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct1"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrc"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrc" stepKey="compareAssertSimpleProduct1ImageNotDefault"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="compareClickSimpleProduct1"/> + <waitForLoadingMaskToDisappear stepKey="waitForCompareSimpleProduct1loaded" /> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="compareGrabSimpleProduct1PageImageSrc"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$compareGrabSimpleProduct1PageImageSrc" stepKey="compareAssertSimpleProduct2PageImageNotDefault"/> + <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="compareAddSimpleProduct1ToCompare"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + + <!-- Add Simple Product 2 to comparison --> + <comment userInput="Add simple product 2 to comparison" stepKey="commentAddSimpleProduct2ToComparison" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory1"/> + <waitForLoadingMaskToDisappear stepKey="waitForCompareCategory1loaded" /> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct2"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrc"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrc" stepKey="compareAssertSimpleProduct2ImageNotDefault"/> + <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddSimpleProduct2ToCompare"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + + <!-- Check products in comparison sidebar --> + <!-- Check simple product 1 in comparison sidebar --> + <comment userInput="Check simple product 1 in comparison sidebar" stepKey="commentCheckSimpleProduct1InComparisonSidebar" after="compareAddSimpleProduct2ToCompare"/> + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct1InSidebar" after="commentCheckSimpleProduct1InComparisonSidebar"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- Check simple product 2 in comparison sidebar --> + <comment userInput="Check simple product 2 in comparison sidebar" stepKey="commentCheckSimpleProduct2InComparisonSidebar" /> + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct2InSidebar"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + + <!-- Check products on comparison page --> + <!-- Check simple product 1 on comparison page --> + <comment userInput="Check simple product 1 on comparison page" stepKey="commentCheckSimpleProduct1OnComparisonPage" after="compareSimpleProduct2InSidebar"/> + <actionGroup ref="StorefrontOpenAndCheckComparisionActionGroup" stepKey="compareOpenComparePage" after="commentCheckSimpleProduct1OnComparisonPage"/> + <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct1InComparison"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrcInComparison"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrcInComparison" stepKey="compareAssertSimpleProduct1ImageNotDefaultInComparison"/> + <!-- Check simple product2 on comparison page --> + <comment userInput="Check simple product 2 on comparison page" stepKey="commentCheckSimpleProduct2OnComparisonPage" /> + <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct2InComparison"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrcInComparison"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrcInComparison" stepKey="compareAssertSimpleProduct2ImageNotDefaultInComparison"/> + + <!-- Clear comparison sidebar --> + <comment userInput="Clear comparison sidebar" stepKey="commentClearComparisonSidebar" after="compareAssertSimpleProduct2ImageNotDefaultInComparison"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategoryBeforeClear" after="commentClearComparisonSidebar"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory2"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontClearCompareActionGroup" stepKey="compareClearCompare"/> + <comment userInput="End of Comparing Products" stepKey="endOfComparingProducts" /> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml new file mode 100644 index 0000000000000..b8827616e3ec5 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -0,0 +1,188 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CLoggedInUserTest"> + <before> + <createData entity="ApiCategory" stepKey="createCategory"/> + + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct1"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct1Image"> + <requiredEntity createDataKey="createSimpleProduct1"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createSimpleProduct1Image1"> + <requiredEntity createDataKey="createSimpleProduct1"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct1" createDataKey="createSimpleProduct1"/> + + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct2"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct2Image"> + <requiredEntity createDataKey="createSimpleProduct2"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct2" createDataKey="createSimpleProduct2"/> + </before> + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createSimpleProduct1Image" stepKey="deleteSimpleProduct1Image"/>--> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createSimpleProduct1Image1" stepKey="deleteSimpleProduct1Image1"/>--> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> + + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createSimpleProduct2Image" stepKey="deleteSimpleProduct2Image"/>--> + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> + </after> + + <!-- Step 1: User browses catalog --> + <comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog" after="endOfSigningUpUserAccount"/> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage" after="startOfBrowsingCatalog"/> + <waitForPageLoad stepKey="homeWaitForPageLoad" after="amOnHomePage"/> + <waitForElementVisible selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeWaitForWelcomeMessage" after="homeWaitForPageLoad"/> + <see userInput="Welcome, John Doe!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome" after="homeWaitForWelcomeMessage"/> + + <!-- Open Category --> + <comment userInput="Open category" stepKey="commentOpenCategory" after="homeCheckWelcome"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="browseClickCategory" after="commentOpenCategory"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategory" after="browseClickCategory"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <!-- Check simple product 1 in category --> + <comment userInput="Check simple product 1 in category" stepKey="commentCheckSimpleProductInCategory" after="browseAssertCategory"/> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1" after="commentCheckSimpleProductInCategory"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct1ImageSrc" after="browseAssertCategoryProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct1ImageSrc" stepKey="browseAssertSimpleProduct1ImageNotDefault" after="browseGrabSimpleProduct1ImageSrc"/> + <!-- Check simple product 2 in category --> + <comment userInput="Check simple product 2 in category" stepKey="commentCheckSimpleProduct2InCategory" after="browseAssertSimpleProduct1ImageNotDefault"/> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct2" after="commentCheckSimpleProduct2InCategory"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct2ImageSrc" after="browseAssertCategoryProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct2ImageSrc" stepKey="browseAssertSimpleProduct2ImageNotDefault" after="browseGrabSimpleProduct2ImageSrc"/> + + <!-- View Simple Product 1 --> + <comment userInput="View simple product 1" stepKey="commentViewSimpleProduct1" after="browseAssertSimpleProduct2ImageNotDefault"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="browseClickCategorySimpleProduct1View" after="commentViewSimpleProduct1"/> + <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct1Viewloaded" after="browseClickCategorySimpleProduct1View"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page" after="waitForSimpleProduct1Viewloaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct1PageImageSrc" after="browseAssertProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct1PageImageSrc" stepKey="browseAssertSimpleProduct1PageImageNotDefault" after="browseGrabSimpleProduct1PageImageSrc"/> + + <!-- View Simple Product 2 --> + <comment userInput="View simple product 2" stepKey="commentViewSimpleProduct2" after="browseAssertSimpleProduct1PageImageNotDefault"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory1" after="commentViewSimpleProduct2"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" stepKey="browseClickCategorySimpleProduct2View" after="clickCategory1"/> + <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct2ViewLoaded" after="browseClickCategorySimpleProduct2View"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page" after="waitForSimpleProduct2ViewLoaded"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct2PageImageSrc" after="browseAssertProduct2Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct2PageImageSrc" stepKey="browseAssertSimpleProduct2PageImageNotDefault" after="browseGrabSimpleProduct2PageImageSrc"/> + <comment userInput="End of browsing catalog" stepKey="endOfBrowsingCatalog" after="browseAssertSimpleProduct2PageImageNotDefault"/> + + <!-- Step 4: User compares products --> + <comment userInput="Start of comparing products" stepKey="startOfComparingProducts" after="endOfBrowsingCatalog"/> + <!-- Add Simple Product 1 to comparison --> + <comment userInput="Add simple product 1 to comparison" stepKey="commentAddSimpleProduct1ToComparison" after="startOfComparingProducts"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory" after="commentAddSimpleProduct1ToComparison"/> + <waitForLoadingMaskToDisappear stepKey="waitForCategoryloaded" after="compareClickCategory"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory" after="waitForCategoryloaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct1" after="compareAssertCategory"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrc" after="compareAssertSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrc" stepKey="compareAssertSimpleProduct1ImageNotDefault" after="compareGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="compareClickSimpleProduct1" after="compareAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCompareSimpleProduct1loaded" after="compareClickSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page" after="waitForCompareSimpleProduct1loaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="compareGrabSimpleProduct1PageImageSrc" after="compareAssertProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$compareGrabSimpleProduct1PageImageSrc" stepKey="compareAssertSimpleProduct2PageImageNotDefault" after="compareGrabSimpleProduct1PageImageSrc"/> + <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="compareAddSimpleProduct1ToCompare" after="compareAssertSimpleProduct2PageImageNotDefault"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + + <!-- Add Simple Product 2 to comparison --> + <comment userInput="Add simple product 2 to comparison" stepKey="commentAddSimpleProduct2ToComparison" after="compareAddSimpleProduct1ToCompare"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory1" after="commentAddSimpleProduct2ToComparison"/> + <waitForLoadingMaskToDisappear stepKey="waitForCompareCategory1loaded" after="compareClickCategory1"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1" after="waitForCompareCategory1loaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct2" after="compareAssertCategory1"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrc" after="compareAssertSimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrc" stepKey="compareAssertSimpleProduct2ImageNotDefault" after="compareGrabSimpleProduct2ImageSrc"/> + <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddSimpleProduct2ToCompare" after="compareAssertSimpleProduct2ImageNotDefault"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + + <!-- Check products in comparison sidebar --> + <!-- Check simple product 1 in comparison sidebar --> + <comment userInput="Check simple product 1 in comparison sidebar" stepKey="commentCheckSimpleProduct1InComparisonSidebar" after="compareAddSimpleProduct2ToCompare"/> + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct1InSidebar" after="commentCheckSimpleProduct1InComparisonSidebar"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- Check simple product2 in comparison sidebar --> + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct2InSidebar" after="compareSimpleProduct1InSidebar"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + + <!-- Check products on comparison page --> + <!-- Check simple product 1 on comparison page --> + <comment userInput="Check simple product 1 on comparison page" stepKey="commentCheckSimpleProduct1OnComparisonPage" after="compareSimpleProduct2InSidebar"/> + <actionGroup ref="StorefrontOpenAndCheckComparisionActionGroup" stepKey="compareOpenComparePage" after="commentCheckSimpleProduct1OnComparisonPage"/> + <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct1InComparison" after="compareOpenComparePage"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrcInComparison" after="compareAssertSimpleProduct1InComparison"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrcInComparison" stepKey="compareAssertSimpleProduct1ImageNotDefaultInComparison" after="compareGrabSimpleProduct1ImageSrcInComparison"/> + <!-- Check simple product2 on comparison page --> + <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct2InComparison" after="compareAssertSimpleProduct1ImageNotDefaultInComparison"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrcInComparison" after="compareAssertSimpleProduct2InComparison"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrcInComparison" stepKey="compareAssertSimpleProduct2ImageNotDefaultInComparison" after="compareGrabSimpleProduct2ImageSrcInComparison"/> + + <!-- Clear comparison sidebar --> + <comment userInput="Clear comparison sidebar" stepKey="commentClearComparisonSidebar" after="compareAssertSimpleProduct2ImageNotDefaultInComparison"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategoryBeforeClear" after="commentClearComparisonSidebar"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory2" after="compareClickCategoryBeforeClear"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontClearCompareActionGroup" stepKey="compareClearCompare" after="compareAssertCategory2"/> + <comment userInput="End of Comparing Products" stepKey="endOfComparingProducts" after="compareClearCompare"/> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml index e938bee27eb47..23d9a2a9e4cd0 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="SaveProductWithCustomOptionsAdditionalWebsiteTest"> <annotations> <features value="Save a product with Custom Options and assign to a different website"/> @@ -18,7 +18,6 @@ <testCaseId value="MAGETWO-91436"/> <group value="product"/> </annotations> - <before> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <!--Create new website --> <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite"> @@ -35,6 +34,7 @@ <!--Create Store view --> <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/> + <waitForElementVisible selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="waitForStoreViewBtn"/> <click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/> <waitForPageLoad stepKey="waitForProductPageLoad"/> <selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/> @@ -46,7 +46,7 @@ <conditionalClick selector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" dependentSelector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" visible="true" stepKey="AcceptNewStoreViewCreation"/> <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageReolad"/> <see userInput="You saved the store view." stepKey="seeSaveMessage" /> - </before> + <after> <actionGroup ref="ResetWebUrlOptions" stepKey="resetUrlOption"/> <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteTestWebsite"> @@ -65,8 +65,8 @@ <fillField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/> <fillField userInput="{{_defaultProduct.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/> - <!--<click selector="{{AdminProductCustomizableOptionsSection.customezableOptions}}" stepKey="openCustomOptionsSection"/>--> - <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customezableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.checkIfCustomizableOptionsTabOpen}}" visible="true" stepKey="clickIfContentTabCloses2"/> + <!--<click selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="openCustomOptionsSection"/>--> + <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.checkIfCustomizableOptionsTabOpen}}" visible="true" stepKey="clickIfContentTabCloses2"/> <click selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" stepKey="clickAddOption"/> <waitForPageLoad stepKey="waitAfterAddOption"/> <fillField selector="input[name='product[options][0][title]']" userInput="Radio Option" stepKey="fillOptionTitle"/> @@ -98,7 +98,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForProductPagetoSaveAgain"/> <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessageAgain"/> - <click selector="{{AdminProductCustomizableOptionsSection.customezableOptions}}" stepKey="openCustomOptionsSection2"/> + <click selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="openCustomOptionsSection2"/> <seeNumberOfElements selector=".admin__dynamic-rows[data-index='values'] tr.data-row" userInput="3" stepKey="see4RowsOfOptions"/> </test> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/SimpleProductTwoCustomOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/SimpleProductTwoCustomOptionsTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/SimpleProductTwoCustomOptionsTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/SimpleProductTwoCustomOptionsTest.xml index 2710002d625d7..084ae62788d41 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/SimpleProductTwoCustomOptionsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/SimpleProductTwoCustomOptionsTest.xml @@ -1,89 +1,89 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="SimpleProductTwoCustomOptionsTest"> - <annotations> - <features value="Catalog"/> - <stories value="Create simple product with two custom options" /> - <title value="Admin should be able to create simple product with two custom options"/> - <description value="Admin should be able to create simple product with two custom options"/> - <severity value="AVERAGE"/> - <testCaseId value="MC-248"/> - <group value="Catalog"/> - </annotations> - <before> - <!-- log in as admin --> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - - <!--Create product--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> - <waitForPageLoad stepKey="waitForProductIndexPage"/> - <actionGroup ref="goToCreateProductPage" stepKey="goToCreateSimpleProduct"> - <argument name="product" value="SimpleProduct3"/> - </actionGroup> - <actionGroup ref="fillMainProductFormNoWeight" stepKey="fillSimpleProductMain"> - <argument name="product" value="SimpleProduct3"/> - </actionGroup> - </before> - <after> - <!-- Delete the created product --> - <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct"> - <argument name="product" value="SimpleProduct3"/> - </actionGroup> - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - </after> - - <!-- opens the custom option panel and clicks add options --> - <click stepKey="openCustomizableOptions" selector="{{AdminProductCustomizableOptionsSection.customezableOptions}}"/> - <waitForPageLoad stepKey="waitForCustomOptionsOpen"/> - - <!-- Create a custom option with 2 values --> - <actionGroup ref="CreateCustomRadioOptions" stepKey="createCustomOption1"> - <argument name="customOptionName" value="ProductOptionRadiobutton.title"/> - <argument name="productOption" value="ProductOptionField"/> - <argument name="productOption2" value="ProductOptionField2"/> - </actionGroup> - - <!-- Create another custom option with 2 values --> - <actionGroup ref="CreateCustomRadioOptions" stepKey="createCustomOption2"> - <argument name="customOptionName" value="ProductOptionRadiobutton.title"/> - <argument name="productOption" value="ProductOptionField"/> - <argument name="productOption2" value="ProductOptionField2"/> - </actionGroup> - - <!-- Save the product --> - <click stepKey="saveProduct" selector="{{AdminProductFormActionSection.saveButton}}"/> - <waitForPageLoad stepKey="waitForProductSaved"/> - <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccess"/> - - <!-- navigate to the created product page --> - <amOnPage url="/{{SimpleProduct3.name}}.html" stepKey="goToCreatedProduct"/> - <waitForPageLoad stepKey="waitForProductPageLoad"/> - - <!-- Check to make sure all of the created names are there --> - <see stepKey="assertNameInFirstOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('1')}}" userInput="{{ProductOptionField.title}}"/> - <see stepKey="assertNameInSecondOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('2')}}" userInput="{{ProductOptionField.title}}"/> - <see stepKey="assertSecondNameInFirstOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('1')}}" userInput="{{ProductOptionField2.title}}"/> - <see stepKey="assertSecondNameInSecondOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('2')}}" userInput="{{ProductOptionField2.title}}"/> - - <!-- Check to see that all of the created prices are there --> - <see stepKey="assertPriceInFirstOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('1')}}" userInput="{{ProductOptionField.price}}"/> - <see stepKey="assertPriceInSecondOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('2')}}" userInput="{{ProductOptionField.price}}"/> - <see stepKey="assertSecondPriceInFirstOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('1')}}" userInput="{{ProductOptionField2.price}}"/> - <see stepKey="assertSecondPriceInSecondOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('2')}}" userInput="{{ProductOptionField2.price}}"/> - - <!-- select two of the radio buttons --> - <click stepKey="selectFirstCustomOption" selector="{{StorefrontProductInfoMainSection.nthCustomOptionInput('1','2')}}"/> - <click stepKey="selectSecondCustomOption" selector="{{StorefrontProductInfoMainSection.nthCustomOptionInput('2','1')}}"/> - - <!-- Check that the price has actually changed --> - <see stepKey="assertPriceHasChanged" selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="153.00"/> - </test> -</tests> +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="SimpleProductTwoCustomOptionsTest"> + <annotations> + <features value="Catalog"/> + <stories value="Create simple product with two custom options" /> + <title value="Admin should be able to create simple product with two custom options"/> + <description value="Admin should be able to create simple product with two custom options"/> + <severity value="AVERAGE"/> + <testCaseId value="MC-248"/> + <group value="Catalog"/> + </annotations> + <before> + <!-- log in as admin --> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + + <!--Create product--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> + <waitForPageLoad stepKey="waitForProductIndexPage"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateSimpleProduct"> + <argument name="product" value="SimpleProduct3"/> + </actionGroup> + <actionGroup ref="fillMainProductFormNoWeight" stepKey="fillSimpleProductMain"> + <argument name="product" value="SimpleProduct3"/> + </actionGroup> + </before> + <after> + <!-- Delete the created product --> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct"> + <argument name="product" value="SimpleProduct3"/> + </actionGroup> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + </after> + + <!-- opens the custom option panel and clicks add options --> + <click stepKey="openCustomizableOptions" selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}"/> + <waitForPageLoad stepKey="waitForCustomOptionsOpen"/> + + <!-- Create a custom option with 2 values --> + <actionGroup ref="CreateCustomRadioOptions" stepKey="createCustomOption1"> + <argument name="customOptionName" value="ProductOptionRadiobutton.title"/> + <argument name="productOption" value="ProductOptionField"/> + <argument name="productOption2" value="ProductOptionField2"/> + </actionGroup> + + <!-- Create another custom option with 2 values --> + <actionGroup ref="CreateCustomRadioOptions" stepKey="createCustomOption2"> + <argument name="customOptionName" value="ProductOptionRadiobutton.title"/> + <argument name="productOption" value="ProductOptionField"/> + <argument name="productOption2" value="ProductOptionField2"/> + </actionGroup> + + <!-- Save the product --> + <click stepKey="saveProduct" selector="{{AdminProductFormActionSection.saveButton}}"/> + <waitForPageLoad stepKey="waitForProductSaved"/> + <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccess"/> + + <!-- navigate to the created product page --> + <amOnPage url="/{{SimpleProduct3.name}}.html" stepKey="goToCreatedProduct"/> + <waitForPageLoad stepKey="waitForProductPageLoad"/> + + <!-- Check to make sure all of the created names are there --> + <see stepKey="assertNameInFirstOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('1')}}" userInput="{{ProductOptionField.title}}"/> + <see stepKey="assertNameInSecondOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('2')}}" userInput="{{ProductOptionField.title}}"/> + <see stepKey="assertSecondNameInFirstOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('1')}}" userInput="{{ProductOptionField2.title}}"/> + <see stepKey="assertSecondNameInSecondOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('2')}}" userInput="{{ProductOptionField2.title}}"/> + + <!-- Check to see that all of the created prices are there --> + <see stepKey="assertPriceInFirstOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('1')}}" userInput="{{ProductOptionField.price}}"/> + <see stepKey="assertPriceInSecondOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('2')}}" userInput="{{ProductOptionField.price}}"/> + <see stepKey="assertSecondPriceInFirstOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('1')}}" userInput="{{ProductOptionField2.price}}"/> + <see stepKey="assertSecondPriceInSecondOption" selector="{{StorefrontProductInfoMainSection.nthCustomOption('2')}}" userInput="{{ProductOptionField2.price}}"/> + + <!-- select two of the radio buttons --> + <click stepKey="selectFirstCustomOption" selector="{{StorefrontProductInfoMainSection.nthCustomOptionInput('1','2')}}"/> + <click stepKey="selectSecondCustomOption" selector="{{StorefrontProductInfoMainSection.nthCustomOptionInput('2','1')}}"/> + + <!-- Check that the price has actually changed --> + <see stepKey="assertPriceHasChanged" selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="153.00"/> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontProductNameWithDoubleQuote.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontProductNameWithDoubleQuote.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml index a848515aee873..956677c8b5de5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontProductNameWithDoubleQuote.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontProductNameWithDoubleQuote"> <annotations> <title value="Product with double quote in name"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontProductWithEmptyAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontProductWithEmptyAttributeTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml index f858340bc09fa..92013f6f9d0f0 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontProductWithEmptyAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontProductWithEmptyAttributeTest"> <annotations> <title value="Product attribute is not visible on storefront if it is empty"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml index 38872c4c58dcf..c03241348e807 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontProductsCompareWithEmptyAttributeTest"> <annotations> <title value="Product attribute is not visible on product compare page if it is empty"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViews.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViews.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViews.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViews.xml index 93585f8c14985..7d843012d1d1d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViews.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViews.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest"> <annotations> <features value="Catalog"/> @@ -77,7 +77,7 @@ <!-- Update Product with Option Value DropDown 1--> - <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customezableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.checkIfCustomizableOptionsTabOpen}}" visible="true" stepKey="clickIfContentTabCloses2"/> + <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.checkIfCustomizableOptionsTabOpen}}" visible="true" stepKey="clickIfContentTabCloses2"/> <click selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" stepKey="checkAddOption1"/> <waitForPageLoad time="10" stepKey="waitForPageLoad7"/> <fillField selector="{{AdminProductCustomizableOptionsSection.fillOptionTitle('New Option')}}" userInput="Custom Options 1" stepKey="fillOptionTitle1"/> @@ -104,7 +104,7 @@ <!-- Open tab Customizable Options --> <waitForPageLoad time="10" stepKey="waitForPageLoad2"/> - <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customezableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.checkIfCustomizableOptionsTabOpen}}" visible="true" stepKey="clickIfContentTabCloses3"/> + <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.checkIfCustomizableOptionsTabOpen}}" visible="true" stepKey="clickIfContentTabCloses3"/> <!-- Update Option Customizable Options and Option Value 1--> @@ -124,6 +124,7 @@ <!-- Login Customer Storefront --> <amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage"/> + <waitForPageLoad stepKey="waitForSignInPage"/> <fillField userInput="$$createCustomer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/> <fillField userInput="$$createCustomer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/> <click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/> @@ -131,7 +132,7 @@ <!-- Go to Product Page --> <amOnPage url="{{StorefrontHomePage.url}}$$createProduct.custom_attributes[url_key]$$.html" stepKey="amOnProduct1Page"/> - + <waitForPageLoad stepKey="waitForProductPage"/> <seeElement selector="{{StorefrontProductInfoMainSection.productOptionDropDownTitle('Custom Options 1')}}" stepKey="seeProductOptionDropDownTitle"/> <seeElement selector="{{StorefrontProductInfoMainSection.productOptionDropDownOptionTitle('Custom Options 1', 'option1')}}" stepKey="seeproductOptionDropDownOptionTitle1"/> <seeElement selector="{{StorefrontProductInfoMainSection.productOptionDropDownOptionTitle('Custom Options 1', 'option2')}}" stepKey="seeproductOptionDropDownOptionTitle2"/> @@ -194,13 +195,14 @@ <!-- Switch to FR Store View Storefront --> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnProduct4Page"/> + <waitForPageLoad stepKey="waitForStorefrontHomePage"/> <click selector="{{StorefrontHeaderSection.storeViewSwitcher}}" stepKey="clickStoreViewSwitcher1"/> <waitForElementVisible selector="{{StorefrontHeaderSection.storeViewDropdown}}" stepKey="waitForStoreViewDropdown1"/> <click selector="{{StorefrontHeaderSection.storeViewOption(customStoreFR.code)}}" stepKey="selectStoreView1"/> <waitForPageLoad stepKey="waitForPageLoad4"/> <amOnPage url="{{StorefrontHomePage.url}}$$createProduct.custom_attributes[url_key]$$.html" stepKey="amOnProduct2Page"/> - + <waitForPageLoad stepKey="waitForProductPage2"/> <seeElement selector="{{StorefrontProductInfoMainSection.productOptionDropDownTitle('FR Custom Options 1')}}" stepKey="seeProductFrOptionDropDownTitle"/> <seeElement selector="{{StorefrontProductInfoMainSection.productOptionDropDownOptionTitle('FR Custom Options 1', 'FR option1')}}" stepKey="productFrOptionDropDownOptionTitle1"/> <seeElement selector="{{StorefrontProductInfoMainSection.productOptionDropDownOptionTitle('FR Custom Options 1', 'FR option2')}}" stepKey="productFrOptionDropDownOptionTitle2"/> @@ -264,7 +266,7 @@ <!-- Open tab Customizable Options --> <waitForPageLoad time="30" stepKey="waitForPageLoad9"/> - <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customezableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.checkIfCustomizableOptionsTabOpen}}" visible="true" stepKey="clickIfContentTabCloses4" /> + <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.checkIfCustomizableOptionsTabOpen}}" visible="true" stepKey="clickIfContentTabCloses4" /> <!-- Update Option Customizable Options and Option Value 1--> @@ -281,7 +283,7 @@ <!--Go to Product Page--> <amOnPage url="{{StorefrontHomePage.url}}$$createProduct.custom_attributes[url_key]$$.html" stepKey="amOnProduct2Page2"/> - + <waitForPageLoad stepKey="waitForProductPage3"/> <seeElement selector="{{StorefrontProductInfoMainSection.productOptionDropDownTitle('Custom Options 1')}}" stepKey="seeProductOptionDropDownTitle1"/> <seeElement selector="{{StorefrontProductInfoMainSection.productOptionDropDownOptionTitle('Custom Options 1', 'option1')}}" stepKey="seeProductOptionDropDownOptionTitle3"/> <seeElement selector="{{StorefrontProductInfoMainSection.productOptionDropDownOptionTitle('Custom Options 1', 'option2')}}" stepKey="seeProductOptionDropDownOptionTitle4"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontPurchaseProductWithCustomOptions.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptions.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontPurchaseProductWithCustomOptions.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptions.xml index fa81e15833b81..3a7feb34354d7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/StorefrontPurchaseProductWithCustomOptions.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptions.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontPurchaseProductWithCustomOptions"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml index 53c0ba041c77f..51290ba12f2c7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="VerifyChildCategoriesShouldNotIncludeInMenuTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml index b0146f1c8deef..234148830bd43 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="VerifyDefaultWYSIWYGToolbarOnProductTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml index f7ff2f047ea5f..5fc0b6478ffb8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest"> <annotations> <features value="Catalog"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml index 7e78b476ae7dc..e2077f8676706 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest"> <annotations> <features value="Catalog"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/composer.json b/app/code/Magento/Catalog/Test/Mftf/composer.json new file mode 100644 index 0000000000000..501fc0fa6c8db --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/composer.json @@ -0,0 +1,44 @@ +{ + "name": "magento/functional-test-module-catalog", + "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-inventory": "100.0.0-dev", + "magento/functional-test-module-catalog-rule": "100.0.0-dev", + "magento/functional-test-module-catalog-url-rewrite": "100.0.0-dev", + "magento/functional-test-module-checkout": "100.0.0-dev", + "magento/functional-test-module-cms": "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-directory": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-indexer": "100.0.0-dev", + "magento/functional-test-module-media-storage": "100.0.0-dev", + "magento/functional-test-module-msrp": "100.0.0-dev", + "magento/functional-test-module-page-cache": "100.0.0-dev", + "magento/functional-test-module-product-alert": "100.0.0-dev", + "magento/functional-test-module-quote": "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-theme": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev", + "magento/functional-test-module-url-rewrite": "100.0.0-dev", + "magento/functional-test-module-widget": "100.0.0-dev", + "magento/functional-test-module-wishlist": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-cookie": "100.0.0-dev", + "magento/functional-test-module-sales": "100.0.0-dev", + "magento/functional-test-module-catalog-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php index b45df0380dcc6..5d8db5d5ba589 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php @@ -55,6 +55,9 @@ public function testCanShowTab($priceAllow, $stockAllow, $canShowTab) $this->assertEquals($canShowTab, $this->alerts->canShowTab()); } + /** + * @return array + */ public function canShowTabDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/CategoryTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/CategoryTest.php index 5e899263519da..1fc105686011f 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/CategoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/CategoryTest.php @@ -50,6 +50,9 @@ public function testIsAllowed($isAllowed) } } + /** + * @return array + */ public function isAllowedDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Category/Rss/LinkTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Category/Rss/LinkTest.php index 8932d77a81247..0cff8b2d0f207 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Category/Rss/LinkTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Category/Rss/LinkTest.php @@ -72,6 +72,9 @@ public function testIsRssAllowed($isAllowed) $this->assertEquals($isAllowed, $this->link->isRssAllowed()); } + /** + * @return array + */ public function isRssAllowedDataProvider() { return [ @@ -98,6 +101,9 @@ public function testIsTopCategory($isTop, $categoryLevel) $this->assertEquals($isTop, $this->link->isTopCategory()); } + /** + * @return array + */ public function isTopCategoryDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/RelatedTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/RelatedTest.php index 1d927a6e04ef5..deb84b7b2d3c4 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/RelatedTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/RelatedTest.php @@ -72,6 +72,9 @@ public function testCanItemsAddToCart($isComposite, $isSaleable, $hasRequiredOpt ); } + /** + * @return array + */ public function canItemsAddToCartDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/ToolbarTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/ToolbarTest.php index dce0be8e62df3..ac963326dbfa1 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/ToolbarTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/ProductList/ToolbarTest.php @@ -216,6 +216,9 @@ public function testSetModes($mode, $expected) $this->assertEquals($expected, $block->getModes()); } + /** + * @return array + */ public function setModesDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/NewProductsTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/NewProductsTest.php index e2e0fa2f27667..129dea37b185e 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/NewProductsTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/NewProductsTest.php @@ -91,6 +91,9 @@ protected function setUp() ); } + /** + * @return array + */ public function isAllowedDataProvider() { return [ @@ -108,6 +111,9 @@ public function testIsAllowed($configValue, $expectedResult) $this->assertEquals($expectedResult, $this->block->isAllowed()); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getItemMock() { $methods = [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/SpecialTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/SpecialTest.php index 6509aa138802e..3c9f19d61d16a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/SpecialTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Rss/Product/SpecialTest.php @@ -167,6 +167,9 @@ public function testGetRssData() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getItemMock() { $item = $this->getMockBuilder(\Magento\Catalog\Model\Product::class) diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/Image/UploadTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/Image/UploadTest.php index 07dacae7298cf..e2cd01fd1c23a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/Image/UploadTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/Image/UploadTest.php @@ -23,6 +23,9 @@ protected function setUp() $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/RefreshPathTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/RefreshPathTest.php new file mode 100644 index 0000000000000..45de62e218cfc --- /dev/null +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/RefreshPathTest.php @@ -0,0 +1,147 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Catalog\Test\Unit\Controller\Adminhtml\Category; + +use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Catalog\Controller\Adminhtml\Category\RefreshPath; +use Magento\Backend\App\Action\Context; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; + +/** + * Test for class Magento\Catalog\Controller\Adminhtml\Category\RefreshPath. + */ +class RefreshPathTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var JsonFactory|\PHPUnit_Framework_MockObject_MockObject + */ + private $resultJsonFactoryMock; + + /** + * @var Context|\PHPUnit_Framework_MockObject_MockObject + */ + private $contextMock; + + /** + * @inheritDoc + */ + protected function setUp() + { + $this->resultJsonFactoryMock = $this->getMockBuilder(JsonFactory::class) + ->disableOriginalConstructor() + ->setMethods(['create', 'setData']) + ->getMock(); + + $this->contextMock = $this->getMockBuilder(Context::class) + ->disableOriginalConstructor() + ->setMethods(['getRequest']) + ->getMock(); + } + + /** + * Sets object non-public property. + * + * @param mixed $object + * @param string $propertyName + * @param mixed $value + * + * @return void + */ + private function setObjectProperty($object, string $propertyName, $value) : void + { + $reflectionClass = new \ReflectionClass($object); + $reflectionProperty = $reflectionClass->getProperty($propertyName); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($object, $value); + } + + /** + * @return void + */ + public function testExecute() : void + { + $value = ['id' => 3, 'path' => '1/2/3', 'parentId' => 2]; + $result = '{"id":3,"path":"1/2/3","parentId":"2"}'; + + $requestMock = $this->getMockForAbstractClass(\Magento\Framework\App\RequestInterface::class); + + $refreshPath = $this->getMockBuilder(RefreshPath::class) + ->setMethods(['getRequest', 'create']) + ->setConstructorArgs([ + $this->contextMock, + $this->resultJsonFactoryMock, + ])->getMock(); + + $refreshPath->expects($this->any())->method('getRequest')->willReturn($requestMock); + $requestMock->expects($this->any())->method('getParam')->with('id')->willReturn($value['id']); + + $categoryMock = $this->getMockBuilder(\Magento\Catalog\Model\Category::class) + ->disableOriginalConstructor() + ->setMethods(['getPath', 'getParentId', 'getResource']) + ->getMock(); + + $categoryMock->expects($this->any())->method('getPath')->willReturn($value['path']); + $categoryMock->expects($this->any())->method('getParentId')->willReturn($value['parentId']); + + $categoryResource = $this->createMock(\Magento\Catalog\Model\ResourceModel\Category::class); + + $objectManagerMock = $this->getMockBuilder(ObjectManager::class) + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMock(); + + $this->setObjectProperty($refreshPath, '_objectManager', $objectManagerMock); + $this->setObjectProperty($categoryMock, '_resource', $categoryResource); + + $objectManagerMock->expects($this->once()) + ->method('create') + ->with(\Magento\Catalog\Model\Category::class) + ->willReturn($categoryMock); + + $this->resultJsonFactoryMock->expects($this->any())->method('create')->willReturnSelf(); + $this->resultJsonFactoryMock->expects($this->any()) + ->method('setData') + ->with($value) + ->willReturn($result); + + $this->assertEquals($result, $refreshPath->execute()); + } + + /** + * @return void + */ + public function testExecuteWithoutCategoryId() : void + { + $requestMock = $this->getMockForAbstractClass(\Magento\Framework\App\RequestInterface::class); + + $refreshPath = $this->getMockBuilder(RefreshPath::class) + ->setMethods(['getRequest', 'create']) + ->setConstructorArgs([ + $this->contextMock, + $this->resultJsonFactoryMock, + ])->getMock(); + + $refreshPath->expects($this->any())->method('getRequest')->willReturn($requestMock); + $requestMock->expects($this->any())->method('getParam')->with('id')->willReturn(null); + + $objectManagerMock = $this->getMockBuilder(ObjectManager::class) + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMock(); + + $this->setObjectProperty($refreshPath, '_objectManager', $objectManagerMock); + + $objectManagerMock->expects($this->never()) + ->method('create') + ->with(\Magento\Catalog\Model\Category::class) + ->willReturnSelf(); + + $refreshPath->execute(); + } +} diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/ValidateTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/ValidateTest.php index 450cf4663c99c..9c747393cc72a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/ValidateTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/ValidateTest.php @@ -195,6 +195,9 @@ public function testUniqueValidation(array $options, $isError) $this->assertInstanceOf(ResultJson::class, $this->getModel()->execute()); } + /** + * @return array + */ public function provideUniqueData() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php index ba716fdb53c89..47a60a1916142 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php @@ -58,7 +58,7 @@ protected function getContext() $objectManagerMock = $this->getMockForAbstractClass(\Magento\Framework\ObjectManagerInterface::class); $objectManagerMock->expects($this->any()) ->method('get') - ->willreturn($productActionMock); + ->willReturn($productActionMock); $eventManager = $this->getMockBuilder(\Magento\Framework\Event\Manager::class) ->setMethods(['dispatch']) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php index a0a563e1e070e..779630b9559c6 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php @@ -39,6 +39,9 @@ public function testExemplarXml($fixtureXml, array $expectedErrors) $this->assertEquals($expectedErrors, $actualErrors); } + /** + * @return array + */ public function exemplarXmlDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php index aef9d761c61ba..8d63530b91287 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php @@ -247,6 +247,9 @@ private function setUpModelForAfterSave() return $model->setAttribute($this->attribute); } + /** + * @return array + */ public function attributeValueDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/SortbyTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/SortbyTest.php index c582da8811ecb..467d72a549b64 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/SortbyTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/SortbyTest.php @@ -71,6 +71,9 @@ public function testBeforeSave($attributeCode, $data, $expected) $this->assertSame($expected, $object->getData($attributeCode)); } + /** + * @return array + */ public function beforeSaveDataProvider() { return [ @@ -117,6 +120,9 @@ public function testAfterLoad($attributeCode, $data, $expected) $this->assertSame($expected, $object->getData($attributeCode)); } + /** + * @return array + */ public function afterLoadDataProvider() { return [ @@ -159,6 +165,9 @@ public function testValidate($attributeData, $data, $expected) $this->assertSame($expected, $this->_model->validate($object)); } + /** + * @return array + */ public function validateDataProvider() { return [ @@ -251,6 +260,9 @@ public function testValidateDefaultSort($attributeCode, $data) $this->assertTrue($this->_model->validate($object)); } + /** + * @return array + */ public function validateDefaultSortDataProvider() { return [ @@ -294,6 +306,9 @@ public function testValidateDefaultSortException($attributeCode, $data) $this->_model->validate($object); } + /** + * @return array + */ public function validateDefaultSortException() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/CategoryRepositoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/CategoryRepositoryTest.php index 0f2166d1a2a6f..864b91b20d017 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/CategoryRepositoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/CategoryRepositoryTest.php @@ -280,6 +280,9 @@ public function testSaveWithValidateCategoryException($error, $expectedException $this->model->save($categoryMock); } + /** + * @return array + */ public function saveWithValidateCategoryExceptionDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php index 60937dd3f83f0..df01d1bafac3c 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php @@ -294,6 +294,9 @@ public function testGetUseFlatResourceTrue() $this->assertEquals(true, $category->getUseFlatResource()); } + /** + * @return object + */ protected function getCategoryModel() { return $this->objectManager->getObject( @@ -323,6 +326,9 @@ protected function getCategoryModel() ); } + /** + * @return array + */ public function reindexFlatEnabledTestDataProvider() { return [ @@ -382,6 +388,9 @@ public function testReindexFlatEnabled( $this->category->reindex(); } + /** + * @return array + */ public function reindexFlatDisabledTestDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ImageUploaderTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ImageUploaderTest.php index b8196fcd8bea3..c989f2dd47462 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ImageUploaderTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ImageUploaderTest.php @@ -114,6 +114,12 @@ protected function setUp() public function testSaveFileToTmpDir() { $fileId = 'file.jpg'; + $allowedMimeTypes = [ + 'image/jpg', + 'image/jpeg', + 'image/gif', + 'image/png', + ]; /** @var \Magento\MediaStorage\Model\File\Uploader|\PHPUnit_Framework_MockObject_MockObject $uploader */ $uploader = $this->createMock(\Magento\MediaStorage\Model\File\Uploader::class); $this->uploaderFactoryMock->expects($this->once())->method('create')->willReturn($uploader); @@ -123,6 +129,7 @@ public function testSaveFileToTmpDir() ->willReturn($this->basePath); $uploader->expects($this->once())->method('save')->with($this->basePath) ->willReturn(['tmp_name' => $this->baseTmpPath, 'file' => $fileId, 'path' => $this->basePath]); + $uploader->expects($this->atLeastOnce())->method('checkMimeType')->with($allowedMimeTypes)->willReturn(true); $storeMock = $this->createPartialMock( \Magento\Store\Model\Store::class, ['getBaseUrl'] diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/Plugin/IndexerConfigDataTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/Plugin/IndexerConfigDataTest.php index 56bd04594018c..f69cbeb91631f 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/Plugin/IndexerConfigDataTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/Plugin/IndexerConfigDataTest.php @@ -48,6 +48,9 @@ public function testAroundGet($isFlat, $path, $default, $inputData, $outputData) $this->assertEquals($outputData, $this->model->afterGet($this->subjectMock, $inputData, $path, $default)); } + /** + * @return array + */ public function aroundGetDataProvider() { $flatIndexerData = [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/StateTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/StateTest.php index 3beb9a3ffb773..6916cef2dfa61 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/StateTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/StateTest.php @@ -102,6 +102,9 @@ public function testIsAvailable($isAvailable, $isFlatEnabled, $isValid, $result) $this->assertEquals($result, $this->model->isAvailable()); } + /** + * @return array + */ public function isAvailableDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/System/Config/ModeTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/System/Config/ModeTest.php index 3b3941d116fde..fb02b80a60175 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/System/Config/ModeTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Flat/System/Config/ModeTest.php @@ -57,6 +57,9 @@ protected function setUp() ); } + /** + * @return array + */ public function dataProviderProcessValueEqual() { return [['0', '0'], ['', '0'], ['0', ''], ['1', '1']]; @@ -92,6 +95,9 @@ public function testProcessValueEqual($oldValue, $value) $this->model->processValue(); } + /** + * @return array + */ public function dataProviderProcessValueOn() { return [['0', '1'], ['', '1']]; @@ -143,6 +149,9 @@ public function testProcessValueOn($oldValue, $value) $this->model->processValue(); } + /** + * @return array + */ public function dataProviderProcessValueOff() { return [['1', '0'], ['1', '']]; diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/StoreGroupTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/StoreGroupTest.php index 8310f3692d966..e134407d547ac 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/StoreGroupTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/StoreGroupTest.php @@ -89,6 +89,9 @@ public function testBeforeAndAfterSaveNotNew($valueMap) $this->assertSame($this->subject, $this->model->afterSave($this->subject, $this->subject, $this->groupMock)); } + /** + * @return array + */ public function changedDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/ProcessorTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/ProcessorTest.php index 8c63d77b74f53..d30a8da0e77a2 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/ProcessorTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/ProcessorTest.php @@ -129,6 +129,9 @@ public function testReindexRow( $this->_model->reindexRow(1, $forceReindex); } + /** + * @return array + */ public function dataProviderReindexRow() { return [ @@ -198,6 +201,9 @@ public function testReindexList( $this->_model->reindexList([1], $forceReindex); } + /** + * @return array + */ public function dataProviderReindexList() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/System/Config/ModeTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/System/Config/ModeTest.php index ca67185203738..34cc5c70418b9 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/System/Config/ModeTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/System/Config/ModeTest.php @@ -50,6 +50,9 @@ protected function setUp() ); } + /** + * @return array + */ public function dataProviderProcessValueEqual() { return [['0', '0'], ['', '0'], ['0', ''], ['1', '1']]; @@ -84,6 +87,9 @@ public function testProcessValueEqual($oldValue, $value) $this->model->processValue(); } + /** + * @return array + */ public function dataProviderProcessValueOn() { return [['0', '1'], ['', '1']]; @@ -134,6 +140,9 @@ public function testProcessValueOn($oldValue, $value) $this->model->processValue(); } + /** + * @return array + */ public function dataProviderProcessValueOff() { return [['1', '0'], ['1', '']]; diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/CategoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/CategoryTest.php index 3e5daf1a98a9c..257a84e50248d 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/CategoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/CategoryTest.php @@ -77,6 +77,9 @@ protected function setUp() ); } + /** + * @return \Magento\Catalog\Model\Layer\Filter\DataProvider\Category + */ public function testGetCategoryWithAppliedId() { $storeId = 1234; diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/PriceTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/PriceTest.php index 3a23ebcdf4518..f2c77627e38d0 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/PriceTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Layer/Filter/DataProvider/PriceTest.php @@ -165,6 +165,9 @@ public function testValidateFilter($filter, $expectedResult) $this->assertSame($expectedResult, $this->target->validateFilter($filter)); } + /** + * @return array + */ public function validateFilterDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/ActionTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/ActionTest.php index 8cf075f4d8504..a97e4650b49bd 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/ActionTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/ActionTest.php @@ -164,6 +164,9 @@ public function testUpdateWebsites($type, $methodName) $this->assertEquals($this->model->getDataByKey('action_type'), $type); } + /** + * @return array + */ public function updateWebsitesDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Frontend/InputType/PresentationTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Frontend/InputType/PresentationTest.php index 16dff2d210f27..d3d0285614f08 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Frontend/InputType/PresentationTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Frontend/InputType/PresentationTest.php @@ -40,6 +40,9 @@ public function testGetPresentationInputType(string $inputType, bool $isWysiwygE $this->assertEquals($expectedResult, $this->presentation->getPresentationInputType($this->attributeMock)); } + /** + * @return array + */ public function getPresentationInputTypeDataProvider() { return [ @@ -59,6 +62,9 @@ public function testConvertPresentationDataToInputType(array $data, array $expec $this->assertEquals($expectedResult, $this->presentation->convertPresentationDataToInputType($data)); } + /** + * @return array + */ public function convertPresentationDataToInputTypeDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Source/InputtypeTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Source/InputtypeTest.php index 0246ba337dbc9..ef3a00e535576 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Source/InputtypeTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Source/InputtypeTest.php @@ -48,6 +48,9 @@ public function testToOptionArray() $this->assertEquals($inputTypesSet, $this->inputtypeModel->toOptionArray()); } + /** + * @return array + */ private function getInputTypeSet() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/CartConfigurationTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/CartConfigurationTest.php index 6f1f5e120b100..2144cf34c2a09 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/CartConfigurationTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/CartConfigurationTest.php @@ -21,6 +21,9 @@ public function testIsProductConfigured($productType, $config, $expected) $this->assertEquals($expected, $cartConfiguration->isProductConfigured($productMock, $config)); } + /** + * @return array + */ public function isProductConfiguredDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/ProcessorTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/ProcessorTest.php index d52aad50f05f3..15f003282dc04 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/ProcessorTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/ProcessorTest.php @@ -151,6 +151,9 @@ public function testValidate($value) $this->assertEquals(!$value, $this->model->validate($this->dataObject)); } + /** + * @return array + */ public function validateDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/LinkTypeProviderTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/LinkTypeProviderTest.php index ecf595fa50889..e242b77f1a5fc 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/LinkTypeProviderTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/LinkTypeProviderTest.php @@ -118,6 +118,9 @@ public function testGetItemAttributes($type, $typeId) $this->assertEquals($expectedResult, $this->model->getItemAttributes($type)); } + /** + * @return array + */ public function getItemAttributesDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/SelectTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/SelectTest.php index 046ee703c850e..95a9b961c8d81 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/SelectTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/SelectTest.php @@ -69,6 +69,9 @@ public function testIsValidSuccess($expectedResult, array $value) $this->assertEquals($expectedResult, $this->validator->isValid($this->valueMock)); } + /** + * @return array + */ public function isValidSuccessDataProvider() { return [ @@ -154,6 +157,9 @@ public function testIsValidateWithInvalidData($priceType, $price, $title) $this->assertEquals($messages, $this->validator->getMessages()); } + /** + * @return array + */ public function isValidateWithInvalidDataDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductList/ToolbarTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductList/ToolbarTest.php index 84a9e9ded094b..3789ba4ee126d 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductList/ToolbarTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductList/ToolbarTest.php @@ -112,6 +112,9 @@ public function testGetCurrentPageNoParam() $this->assertEquals(1, $this->toolbarModel->getCurrentPage()); } + /** + * @return array + */ public function stringParamProvider() { return [ @@ -119,6 +122,9 @@ public function stringParamProvider() ]; } + /** + * @return array + */ public function intParamProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/ReservedAttributeListTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/ReservedAttributeListTest.php index 7506b4adc1d3a..5080e64f46e27 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/ReservedAttributeListTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/ReservedAttributeListTest.php @@ -40,6 +40,9 @@ public function testIsReservedAttribute($isUserDefined, $attributeCode, $expecte $this->assertEquals($expected, $this->model->isReservedAttribute($attribute)); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php index 371696d08d00e..f340d0b204b62 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php @@ -151,6 +151,9 @@ public function testGetList($configValue, $customerGroupId, $groupData, $expecte } } + /** + * @return array + */ public function getListDataProvider() { return [ @@ -403,6 +406,9 @@ public function testAddWithInvalidData($price, $qty) $this->service->add('product_sku', 1, $price, $qty); } + /** + * @return array + */ public function addDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Type/AbstractTypeTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Type/AbstractTypeTest.php index dcddab60fb0b9..b34375256a959 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Type/AbstractTypeTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Type/AbstractTypeTest.php @@ -96,6 +96,9 @@ public function testAttributesCompare($attr1, $attr2, $expectedResult) $this->assertEquals($expectedResult, $this->model->attributesCompare($attribute, $attribute2)); } + /** + * @return array + */ public function attributeCompareProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/UrlTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/UrlTest.php index 9fa820d64bae1..ef7aad2cbb802 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/UrlTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/UrlTest.php @@ -169,6 +169,9 @@ public function testGetUrl( } } + /** + * @return array + */ public function getUrlDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php index a1cf6662d78f0..3fc3587637dad 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php @@ -1089,6 +1089,9 @@ public function testSaveWithLinks(array $newLinks, array $existingLinks, array $ $this->assertEquals($this->initializedProductMock, $results); } + /** + * @return mixed + */ public function saveWithLinksDataProvider() { // Scenario 1 @@ -1260,6 +1263,9 @@ public function testSaveExistingWithNewMediaGalleryEntries() $this->model->save($this->productMock); } + /** + * @return array + */ public function websitesProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php index 809ec8b9b7a2d..3a357df81fe23 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php @@ -514,6 +514,9 @@ public function testGetCategoryCollectionCollectionNull($initCategoryCollection, $this->assertEquals($initCategoryCollection, $result); } + /** + * @return array + */ public function getCategoryCollectionCollectionNullDataProvider() { return [ @@ -624,6 +627,9 @@ public function testReindex($productChanged, $isScheduled, $productFlatCount, $c $this->model->reindex(); } + /** + * @return array + */ public function getProductReindexProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/ConfigTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/ConfigTest.php index e6de1d33e564d..fb289c7beaac6 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/ConfigTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/ConfigTest.php @@ -68,6 +68,9 @@ public function testGetType($value, $expected) $this->assertEquals($expected, $this->config->getType('global')); } + /** + * @return array + */ public function getTypeDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/ImageTest.php b/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/ImageTest.php index 431d5736bb6dd..eb7b70c8a1718 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/ImageTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/ImageTest.php @@ -158,6 +158,9 @@ public function testGetUrl($filePath, $miscParams) ); } + /** + * @return array + */ public function getPathDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/PlaceholderTest.php b/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/PlaceholderTest.php index 96a6c15e35651..58007145d21a4 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/PlaceholderTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/View/Asset/PlaceholderTest.php @@ -147,6 +147,9 @@ public function testGetUrl($imageType, $placeholderPath) $this->assertEquals($expectedResult, $imageModel->getUrl()); } + /** + * @return array + */ public function getPathDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/BasePriceTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/BasePriceTest.php index d994e65a63a26..b823549391257 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/BasePriceTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/BasePriceTest.php @@ -106,6 +106,9 @@ public function testGetValue($specialPriceValue, $expectedResult) $this->assertSame($expectedResult, $this->basePrice->getValue()); } + /** + * @return array + */ public function getValueDataProvider() { return [[77, 77], [0, 0], [false, 99]]; diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CustomOptionPriceTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CustomOptionPriceTest.php index 9225a37c3e5b4..e21cad7a32a99 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CustomOptionPriceTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CustomOptionPriceTest.php @@ -77,6 +77,10 @@ protected function setUp() ); } + /** + * @param array $optionsData + * @return array + */ protected function setupOptions(array $optionsData) { $options = []; @@ -105,6 +109,10 @@ protected function setupOptions(array $optionsData) return $options; } + /** + * @param $optionsData + * @return array + */ protected function setupSingleValueOptions($optionsData) { $options = []; diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/MinimalTierPriceCalculatorTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/MinimalTierPriceCalculatorTest.php index d04bb4c681e67..1c50271976d15 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/MinimalTierPriceCalculatorTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/MinimalTierPriceCalculatorTest.php @@ -61,6 +61,9 @@ public function setUp() ); } + /** + * @return int + */ private function getValueTierPricesExistShouldReturnMinTierPrice() { $minPrice = 5; diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php index 90384c122f095..397cd0fb2d165 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/FinalPriceBoxTest.php @@ -347,6 +347,9 @@ public function testHasSpecialPrice($regularPrice, $finalPrice, $expectedResult) $this->assertEquals($expectedResult, $this->object->hasSpecialPrice()); } + /** + * @return array + */ public function hasSpecialPriceProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/PriceBoxTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/PriceBoxTest.php index 986a1f7710919..e4d531e91fa07 100644 --- a/app/code/Magento/Catalog/Test/Unit/Pricing/Render/PriceBoxTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Pricing/Render/PriceBoxTest.php @@ -88,6 +88,9 @@ public function testGetCanDisplayQty($typeCode, $expected) $this->assertEquals($expected, $this->object->getCanDisplayQty($product)); } + /** + * @return array + */ public function getCanDisplayQtyDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Ui/Component/Product/MassActionTest.php b/app/code/Magento/Catalog/Test/Unit/Ui/Component/Product/MassActionTest.php index 604136bb3ad4b..dcd50d4739d70 100644 --- a/app/code/Magento/Catalog/Test/Unit/Ui/Component/Product/MassActionTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Ui/Component/Product/MassActionTest.php @@ -222,6 +222,9 @@ public function testIsActionAllowed($expected, $actionType, $callNum, $resource $this->assertEquals($expected, $this->massAction->isActionAllowed($actionType)); } + /** + * @return array + */ public function isActionAllowedDataProvider() { return [ diff --git a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/CatalogEavValidationRulesTest.php b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/CatalogEavValidationRulesTest.php index 9b0ade2b1288f..57b277a786ea3 100644 --- a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/CatalogEavValidationRulesTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/CatalogEavValidationRulesTest.php @@ -53,6 +53,9 @@ public function testBuild($frontendInput, $frontendClass, array $eavConfig, arra $this->assertEquals($expectedResult, $this->catalogEavValidationRules->build($attribute, $eavConfig)); } + /** + * @return array + */ public function buildDataProvider() { $data['required'] = true; diff --git a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/AttributeSetTest.php b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/AttributeSetTest.php index 5fc6231b03735..e36021fc7ebf6 100644 --- a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/AttributeSetTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/AttributeSetTest.php @@ -106,6 +106,9 @@ public function testModifyMetaLocked($locked) ); } + /** + * @return array + */ public function modifyMetaLockedDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/CategoriesTest.php b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/CategoriesTest.php index 5f5913c20209a..cd6565f32ed18 100644 --- a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/CategoriesTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/CategoriesTest.php @@ -147,6 +147,9 @@ public function testModifyMetaLocked($locked) $this->assertEquals($locked, $modifyMeta['arguments']['data']['config']['disabled']); } + /** + * @return array + */ public function modifyMetaLockedDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php index 4c3945569db2a..01c286cdc74ce 100644 --- a/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php +++ b/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php @@ -9,8 +9,11 @@ use Magento\Catalog\Helper\Data; use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\DataObject; +use Magento\Framework\Serialize\Serializer\Json; use Magento\Framework\View\Element\Block\ArgumentInterface; +use Magento\Framework\Escaper; /** * Product breadcrumbs view model. @@ -29,18 +32,34 @@ class Breadcrumbs extends DataObject implements ArgumentInterface */ private $scopeConfig; + /** + * @var Json + */ + private $json; + + /** + * @var Escaper + */ + private $escaper; + /** * @param Data $catalogData * @param ScopeConfigInterface $scopeConfig + * @param Json|null $json + * @param Escaper|null $escaper */ public function __construct( Data $catalogData, - ScopeConfigInterface $scopeConfig + ScopeConfigInterface $scopeConfig, + Json $json = null, + Escaper $escaper = null ) { parent::__construct(); $this->catalogData = $catalogData; $this->scopeConfig = $scopeConfig; + $this->json = $json ?: ObjectManager::getInstance()->get(Json::class); + $this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class); } /** @@ -80,4 +99,22 @@ public function getProductName(): string ? $this->catalogData->getProduct()->getName() : ''; } + + /** + * Returns breadcrumb json. + * + * @return string + */ + public function getJsonConfiguration() + { + return $this->json->serialize( + [ + 'breadcrumbs' => [ + 'categoryUrlSuffix' => $this->escaper->escapeHtml($this->getCategoryUrlSuffix()), + 'userCategoryPathInUrl' => (int)$this->isCategoryUsedInProductUrl(), + 'product' => $this->escaper->escapeHtml($this->escaper->escapeJs($this->getProductName())) + ] + ] + ); + } } diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml index 8e5583a6699b7..30c05c2ec689b 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml @@ -13,7 +13,7 @@ <div class="admin__field field<?php if ($_option->getIsRequire()) echo ' required _required' ?>"> <label class="label admin__field-label"> <?= $block->escapeHtml($_option->getTitle()) ?> - <?= /* @escapeNotVerified */ $block->getFormatedPrice() ?> + <?= /* @escapeNotVerified */ $block->getFormattedPrice() ?> </label> <div class="admin__field-control control"> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml index edf4f68afded7..4ad7a95c91980 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml @@ -7,6 +7,7 @@ // @codingStandardsIgnoreFile ?> +<?php /* @var $block \Magento\Catalog\Block\Product\View\Options\Type\File */ ?> <?php $_option = $block->getOption(); ?> <?php $_fileInfo = $block->getFileInfo(); ?> <?php $_fileExists = $_fileInfo->hasData() ? true : false; ?> @@ -64,7 +65,7 @@ require(['prototype'], function(){ <div class="admin__field <?php if ($_option->getIsRequire()) echo ' required _required' ?>"> <label class="admin__field-label label"> <?= $block->escapeHtml($_option->getTitle()) ?> - <?= /* @escapeNotVerified */ $block->getFormatedPrice() ?> + <?= /* @escapeNotVerified */ $block->getFormattedPrice() ?> </label> <div class="admin__field-control control"> <?php if ($_fileExists): ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml index 14e485c6445e0..11fba22ea8139 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml @@ -12,7 +12,7 @@ <div class="field admin__field<?php if ($_option->getIsRequire()) echo ' required _required' ?>"> <label class="admin__field-label label"> <?= $block->escapeHtml($_option->getTitle()) ?> - <?= /* @escapeNotVerified */ $block->getFormatedPrice() ?> + <?= /* @escapeNotVerified */ $block->getFormattedPrice() ?> </label> <div class="control admin__field-control"> <?php if ($_option->getType() == \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_FIELD): ?> diff --git a/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml b/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml index ee4638670f60e..2976f1be14fa5 100644 --- a/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml +++ b/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml @@ -251,7 +251,6 @@ <item name="type" xsi:type="string">group</item> <item name="config" xsi:type="array"> <item name="breakLine" xsi:type="boolean">true</item> - <item name="required" xsi:type="boolean">true</item> </item> </argument> <field name="available_sort_by" formElement="multiselect"> @@ -292,7 +291,6 @@ <item name="type" xsi:type="string">group</item> <item name="config" xsi:type="array"> <item name="breakLine" xsi:type="boolean">true</item> - <item name="required" xsi:type="boolean">true</item> </item> </argument> <field name="default_sort_by" formElement="select"> diff --git a/app/code/Magento/Catalog/view/adminhtml/web/catalog/category/form.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/category/form.js index 0f6689b88db06..0a04358e41123 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/catalog/category/form.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/catalog/category/form.js @@ -14,6 +14,7 @@ define([ options: { categoryIdSelector: 'input[name="id"]', categoryPathSelector: 'input[name="path"]', + categoryParentSelector: 'input[name="parent"]', refreshUrl: config.refreshUrl }, @@ -45,6 +46,7 @@ define([ } else { $(this.options.categoryIdSelector).val(data.id).change(); $(this.options.categoryPathSelector).val(data.path).change(); + $(this.options.categoryParentSelector).val(data.parentId).change(); } } }; diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml index 063f8857329e5..c54ce5340851c 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml @@ -7,11 +7,4 @@ /** @var \Magento\Catalog\ViewModel\Product\Breadcrumbs $viewModel */ $viewModel = $block->getData('viewModel'); ?> -<div class="breadcrumbs" data-mage-init='{ - "breadcrumbs": { - "categoryUrlSuffix": "<?= $block->escapeHtml($viewModel->getCategoryUrlSuffix()); ?>", - "useCategoryPathInUrl": <?= (int)$viewModel->isCategoryUsedInProductUrl(); ?>, - "product": "<?= $block->escapeHtml($block->escapeJs($viewModel->getProductName())); ?>" - } -}'> -</div> +<div class="breadcrumbs" data-mage-init='<?= /* @escapeNotVerified */ $viewModel->getJsonConfiguration() ?>'></div> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml index 3420512977aad..66895fa1eabf9 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml @@ -7,6 +7,7 @@ // @codingStandardsIgnoreFile ?> +<?php /* @var $block \Magento\Catalog\Block\Product\View\Options\Type\Date */ ?> <?php $_option = $block->getOption() ?> <?php $_optionId = $_option->getId() ?> <?php $class = ($_option->getIsRequire()) ? ' required' : ''; ?> @@ -15,7 +16,7 @@ <fieldset class="fieldset fieldset-product-options-inner<?= /* @escapeNotVerified */ $class ?>"> <legend class="legend"> <span><?= $block->escapeHtml($_option->getTitle()) ?></span> - <?= /* @escapeNotVerified */ $block->getFormatedPrice() ?> + <?= /* @escapeNotVerified */ $block->getFormattedPrice() ?> </legend> <div class="control"> <?php if ($_option->getType() == \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_DATE_TIME diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml index 3ceba2eebd214..adb729c6d86ec 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml @@ -7,6 +7,7 @@ // @codingStandardsIgnoreFile ?> +<?php /* @var $block \Magento\Catalog\Block\Product\View\Options\Type\File */ ?> <?php $_option = $block->getOption(); ?> <?php $_fileInfo = $block->getFileInfo(); ?> <?php $_fileExists = $_fileInfo->hasData(); ?> @@ -19,7 +20,7 @@ <div class="field file<?= /* @escapeNotVerified */ $class ?>"> <label class="label" for="<?= /* @noEscape */ $_fileName ?>" id="<?= /* @noEscape */ $_fileName ?>-label"> <span><?= $block->escapeHtml($_option->getTitle()) ?></span> - <?= /* @escapeNotVerified */ $block->getFormatedPrice() ?> + <?= /* @escapeNotVerified */ $block->getFormattedPrice() ?> </label> <?php if ($_fileExists): ?> <div class="control"> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml index 852e0095f2f66..a04e366a43a2d 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml @@ -7,6 +7,7 @@ // @codingStandardsIgnoreFile ?> +<?php /* @var $block \Magento\Catalog\Block\Product\View\Options\Type\Text */ ?> <?php $_option = $block->getOption(); $class = ($_option->getIsRequire()) ? ' required' : ''; @@ -17,7 +18,7 @@ $class = ($_option->getIsRequire()) ? ' required' : ''; } ?><?= /* @escapeNotVerified */ $class ?>"> <label class="label" for="options_<?= /* @escapeNotVerified */ $_option->getId() ?>_text"> <span><?= $block->escapeHtml($_option->getTitle()) ?></span> - <?= /* @escapeNotVerified */ $block->getFormatedPrice() ?> + <?= /* @escapeNotVerified */ $block->getFormattedPrice() ?> </label> <div class="control"> diff --git a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js index 8fcac2f9f1d65..83e91d3c3d4c7 100644 --- a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js +++ b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js @@ -49,6 +49,23 @@ define([ }); }, + /** + * @private + */ + _redirect: function (url) { + var urlParts, locationParts, forceReload; + + urlParts = url.split('#'); + locationParts = window.location.href.split('#'); + forceReload = urlParts[0] === locationParts[0]; + + window.location.assign(url); + + if (forceReload) { + window.location.reload(); + } + }, + /** * @return {Boolean} */ @@ -62,34 +79,28 @@ define([ * @param {Object} form */ submitForm: function (form) { - var addToCartButton, self = this; - - if (form.has('input[type="file"]').length && form.find('input[type="file"]').val() !== '') { - self.element.off('submit'); - // disable 'Add to Cart' button - addToCartButton = $(form).find(this.options.addToCartButtonSelector); - addToCartButton.prop('disabled', true); - addToCartButton.addClass(this.options.addToCartButtonDisabledClass); - form.submit(); - } else { - self.ajaxSubmit(form); - } + this.ajaxSubmit(form); }, /** * @param {String} form */ ajaxSubmit: function (form) { - var self = this; + var self = this, + formData; $(self.options.minicartSelector).trigger('contentLoading'); self.disableAddToCartButton(form); + formData = new FormData(form[0]); $.ajax({ url: form.attr('action'), - data: form.serialize(), + data: formData, type: 'post', dataType: 'json', + cache: false, + contentType: false, + processData: false, /** @inheritdoc */ beforeSend: function () { @@ -125,7 +136,8 @@ define([ parameters.push(eventData.redirectParameters.join('&')); res.backUrl = parameters.join('#'); } - window.location = res.backUrl; + + self._redirect(res.backUrl); return; } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/LICENSE.txt b/app/code/Magento/CatalogAnalytics/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/LICENSE.txt rename to app/code/Magento/CatalogAnalytics/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/LICENSE_AFL.txt b/app/code/Magento/CatalogAnalytics/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/LICENSE_AFL.txt rename to app/code/Magento/CatalogAnalytics/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CatalogAnalytics/Test/Mftf/README.md b/app/code/Magento/CatalogAnalytics/Test/Mftf/README.md new file mode 100644 index 0000000000000..1d9f8f781e4b9 --- /dev/null +++ b/app/code/Magento/CatalogAnalytics/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Analytics Functional Tests + +The Functional Test Module for **Magento Catalog Analytics** module. diff --git a/app/code/Magento/CatalogAnalytics/Test/Mftf/composer.json b/app/code/Magento/CatalogAnalytics/Test/Mftf/composer.json new file mode 100644 index 0000000000000..c03b128d9ad83 --- /dev/null +++ b/app/code/Magento/CatalogAnalytics/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-catalog-analytics", + "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" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php index a1f581743a645..ebd8671de02fb 100644 --- a/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php +++ b/app/code/Magento/CatalogGraphQl/Model/AttributesJoiner.php @@ -28,6 +28,10 @@ public function join(FieldNode $fieldNode, AbstractCollection $collection) : voi /** @var FieldNode $field */ foreach ($query as $field) { + if ($field->kind === 'InlineFragment') { + continue; + } + if (!$collection->isAttributeAdded($field->name->value)) { $collection->addAttributeToSelect($field->name->value); } diff --git a/app/code/Magento/CatalogGraphQl/Model/Category/DepthCalculator.php b/app/code/Magento/CatalogGraphQl/Model/Category/DepthCalculator.php index baa456c7821ed..dbe58a9c77cd0 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Category/DepthCalculator.php +++ b/app/code/Magento/CatalogGraphQl/Model/Category/DepthCalculator.php @@ -26,6 +26,10 @@ public function calculate(FieldNode $fieldNode) : int $depth = count($selections) ? 1 : 0; $childrenDepth = [0]; foreach ($selections as $node) { + if ($node->kind === 'InlineFragment') { + continue; + } + $childrenDepth[] = $this->calculate($node); } diff --git a/app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php b/app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php index eb57873850b80..0401e1c42331e 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php +++ b/app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php @@ -37,7 +37,7 @@ public function calculate(int $rootCategoryId) : int { $connection = $this->resourceConnection->getConnection(); $select = $connection->select() - ->from($connection->getTableName('catalog_category_entity'), 'level') + ->from($this->resourceConnection->getTableName('catalog_category_entity'), 'level') ->where($this->resourceCategory->getLinkField() . " = ?", $rootCategoryId); return (int) $connection->fetchOne($select); } diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/CategoryTree.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/CategoryTree.php index 3c01579410638..da457279728bb 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/CategoryTree.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/CategoryTree.php @@ -24,9 +24,9 @@ class CategoryTree { /** - * In depth we need to calculate only children nodes, so 2 first wrapped nodes should be ignored + * In depth we need to calculate only children nodes, so the first wrapped node should be ignored */ - const DEPTH_OFFSET = 2; + const DEPTH_OFFSET = 1; /** * @var CollectionFactory @@ -143,6 +143,10 @@ private function joinAttributesRecursively(Collection $collection, FieldNode $fi /** @var FieldNode $node */ foreach ($subSelection as $node) { + if ($node->kind === 'InlineFragment') { + continue; + } + $this->joinAttributesRecursively($collection, $node); } } diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/Product/CollectionProcessor/ExtensibleEntityProcessor.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/Product/CollectionProcessor/ExtensibleEntityProcessor.php index 365d4f018ef4a..5fff991c0d6cd 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/Product/CollectionProcessor/ExtensibleEntityProcessor.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/Product/CollectionProcessor/ExtensibleEntityProcessor.php @@ -32,6 +32,13 @@ public function __construct(JoinProcessorInterface $joinProcessor) $this->joinProcessor = $joinProcessor; } + /** + * @param Collection $collection + * @param SearchCriteriaInterface $searchCriteria + * @param array $attributeNames + * @return Collection + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function process( Collection $collection, SearchCriteriaInterface $searchCriteria, diff --git a/app/code/Magento/CatalogGraphQl/Test/Mftf/README.md b/app/code/Magento/CatalogGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..81b6b9cf9beec --- /dev/null +++ b/app/code/Magento/CatalogGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Graph Ql Functional Tests + +The Functional Test Module for **Magento Catalog Graph Ql** module. diff --git a/app/code/Magento/CatalogGraphQl/Test/Mftf/composer.json b/app/code/Magento/CatalogGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..81a291e1527fc --- /dev/null +++ b/app/code/Magento/CatalogGraphQl/Test/Mftf/composer.json @@ -0,0 +1,26 @@ +{ + "name": "magento/functional-test-module-catalog-graph-ql", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/functional-test-module-eav": "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-search": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-eav-graph-ql": "100.0.0-dev", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-graph-ql": "100.0.0-dev", + "magento/functional-test-module-store-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 59009cc2d5637..097db293ab77c 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -909,6 +909,19 @@ public function getMultipleValueSeparator() return Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR; } + /** + * Return empty attribute value constant + * + * @return string + */ + public function getEmptyAttributeValueConstant() + { + if (!empty($this->_parameters[Import::FIELD_EMPTY_ATTRIBUTE_VALUE_CONSTANT])) { + return $this->_parameters[Import::FIELD_EMPTY_ATTRIBUTE_VALUE_CONSTANT]; + } + return Import::DEFAULT_EMPTY_ATTRIBUTE_VALUE_CONSTANT; + } + /** * Retrieve instance of product custom options import entity * diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php index 5de9d3880b5d2..db5b07279ed1c 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php @@ -75,6 +75,7 @@ protected function initCategories() $collection->addAttributeToSelect('name') ->addAttributeToSelect('url_key') ->addAttributeToSelect('url_path'); + $collection->setStoreId(\Magento\Store\Model\Store::DEFAULT_STORE_ID); /* @var $collection \Magento\Catalog\Model\ResourceModel\Category\Collection */ foreach ($collection as $category) { $structure = explode(self::DELIMITER_CATEGORY, $category->getPath()); diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php index adb660dd118f9..ae29fd2ef4bd4 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php @@ -13,6 +13,7 @@ use Magento\Catalog\Model\ResourceModel\Product\Option\Value\Collection as ProductOptionValueCollection; use Magento\Catalog\Model\ResourceModel\Product\Option\Value\CollectionFactory as ProductOptionValueCollectionFactory; use Magento\Store\Model\Store; +use Magento\ImportExport\Model\Import; /** * Entity class which provide possibility to import product custom options @@ -1090,7 +1091,7 @@ protected function _getMultiRowFormat($rowData) // Parse custom options. $rowData = $this->_parseCustomOptions($rowData); $multiRow = []; - if (empty($rowData['custom_options'])) { + if (empty($rowData['custom_options']) || !is_array($rowData['custom_options'])) { return $multiRow; } @@ -1235,7 +1236,12 @@ protected function _importData() $multiRowData = $this->_getMultiRowFormat($rowData); if (!empty($rowData[self::COLUMN_SKU]) && isset($this->_productsSkuToId[$rowData[self::COLUMN_SKU]])) { $this->_rowProductId = $this->_productsSkuToId[$rowData[self::COLUMN_SKU]]; - if (array_key_exists('custom_options', $rowData) && trim($rowData['custom_options']) === '') { + if (array_key_exists('custom_options', $rowData) + && ( + trim($rowData['custom_options']) === '' || + trim($rowData['custom_options']) === $this->_productEntity->getEmptyAttributeValueConstant() + ) + ) { $optionsToRemove[] = $this->_rowProductId; } } @@ -1923,7 +1929,8 @@ protected function _updateProducts(array $data) protected function _parseCustomOptions($rowData) { $beforeOptionValueSkuDelimiter = ';'; - if (empty($rowData['custom_options'])) { + if (empty($rowData['custom_options']) + || $rowData['custom_options'] === Import::DEFAULT_EMPTY_ATTRIBUTE_VALUE_CONSTANT) { return $rowData; } $rowData['custom_options'] = str_replace( diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php index 17d084002926a..afd018f077d20 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php @@ -28,6 +28,13 @@ abstract class AbstractType */ public static $commonAttributesCache = []; + /** + * Maintain a list of invisible attributes + * + * @var array + */ + public static $invAttributesCache = []; + /** * Attribute Code to Id cache * @@ -278,7 +285,14 @@ protected function _initAttributes() } } foreach ($absentKeys as $attributeSetName => $attributeIds) { - $this->attachAttributesById($attributeSetName, $attributeIds); + $unknownAttributeIds = array_diff( + $attributeIds, + array_keys(self::$commonAttributesCache), + self::$invAttributesCache + ); + if ($unknownAttributeIds || $this->_forcedAttributesCodes) { + $this->attachAttributesById($attributeSetName, $attributeIds); + } } foreach ($entityAttributes as $attributeRow) { if (isset(self::$commonAttributesCache[$attributeRow['attribute_id']])) { @@ -303,37 +317,45 @@ protected function _initAttributes() protected function attachAttributesById($attributeSetName, $attributeIds) { foreach ($this->_prodAttrColFac->create()->addFieldToFilter( - 'main_table.attribute_id', - ['in' => $attributeIds] + ['main_table.attribute_id', 'main_table.attribute_code'], + [ + ['in' => $attributeIds], + ['in' => $this->_forcedAttributesCodes] + ] ) as $attribute) { $attributeCode = $attribute->getAttributeCode(); $attributeId = $attribute->getId(); if ($attribute->getIsVisible() || in_array($attributeCode, $this->_forcedAttributesCodes)) { - self::$commonAttributesCache[$attributeId] = [ - 'id' => $attributeId, - 'code' => $attributeCode, - 'is_global' => $attribute->getIsGlobal(), - 'is_required' => $attribute->getIsRequired(), - 'is_unique' => $attribute->getIsUnique(), - 'frontend_label' => $attribute->getFrontendLabel(), - 'is_static' => $attribute->isStatic(), - 'apply_to' => $attribute->getApplyTo(), - 'type' => \Magento\ImportExport\Model\Import::getAttributeType($attribute), - 'default_value' => strlen( - $attribute->getDefaultValue() - ) ? $attribute->getDefaultValue() : null, - 'options' => $this->_entityModel->getAttributeOptions( - $attribute, - $this->_indexValueAttributes - ), - ]; + if (!isset(self::$commonAttributesCache[$attributeId])) { + self::$commonAttributesCache[$attributeId] = [ + 'id' => $attributeId, + 'code' => $attributeCode, + 'is_global' => $attribute->getIsGlobal(), + 'is_required' => $attribute->getIsRequired(), + 'is_unique' => $attribute->getIsUnique(), + 'frontend_label' => $attribute->getFrontendLabel(), + 'is_static' => $attribute->isStatic(), + 'apply_to' => $attribute->getApplyTo(), + 'type' => \Magento\ImportExport\Model\Import::getAttributeType($attribute), + 'default_value' => strlen( + $attribute->getDefaultValue() + ) ? $attribute->getDefaultValue() : null, + 'options' => $this->_entityModel->getAttributeOptions( + $attribute, + $this->_indexValueAttributes + ), + ]; + } + self::$attributeCodeToId[$attributeCode] = $attributeId; $this->_addAttributeParams( $attributeSetName, self::$commonAttributesCache[$attributeId], $attribute ); + } else { + self::$invAttributesCache[] = $attributeId; } } } @@ -537,6 +559,12 @@ public function clearEmptyData(array $rowData) if (!$attrParams['is_static'] && !isset($rowData[$attrCode])) { unset($rowData[$attrCode]); } + + if (isset($rowData[$attrCode]) + && $rowData[$attrCode] === $this->_entityModel->getEmptyAttributeValueConstant() + ) { + $rowData[$attrCode] = null; + } } return $rowData; } diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php index 60bfdd56a718e..e1a6188551c0c 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php @@ -150,7 +150,12 @@ public function isRequiredAttributeValid($attrCode, array $attributeParams, arra $doCheck = true; } - return $doCheck ? isset($rowData[$attrCode]) && strlen(trim($rowData[$attrCode])) : true; + if ($doCheck === true) { + return isset($rowData[$attrCode]) + && strlen(trim($rowData[$attrCode])) + && trim($rowData[$attrCode]) !== $this->context->getEmptyAttributeValueConstant(); + } + return true; } /** @@ -188,6 +193,11 @@ public function isAttributeValid($attrCode, array $attrParams, array $rowData) if (!strlen(trim($rowData[$attrCode]))) { return true; } + + if ($rowData[$attrCode] === $this->context->getEmptyAttributeValueConstant() && !$attrParams['is_required']) { + return true; + } + switch ($attrParams['type']) { case 'varchar': case 'text': diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Quantity.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Quantity.php index 728d3e4d17621..21566c955ba2f 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Quantity.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Quantity.php @@ -18,7 +18,9 @@ class Quantity extends AbstractImportValidator implements RowValidatorInterface public function isValid($value) { $this->_clearMessages(); - if (!empty($value['qty']) && !is_numeric($value['qty'])) { + if (!empty($value['qty']) && (!is_numeric($value['qty']) + && $value['qty'] !== $this->context->getEmptyAttributeValueConstant()) + ) { $this->_addMessages( [ sprintf( diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Weight.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Weight.php index 07d038a05d2f0..5cc91d4598701 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Weight.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Weight.php @@ -15,7 +15,9 @@ class Weight extends AbstractImportValidator implements RowValidatorInterface public function isValid($value) { $this->_clearMessages(); - if (!empty($value['weight']) && (!is_numeric($value['weight']) || $value['weight'] < 0)) { + if (!empty($value['weight']) && (!is_numeric($value['weight']) || $value['weight'] < 0) + && $value['weight'] !== $this->context->getEmptyAttributeValueConstant() + ) { $this->_addMessages( [ sprintf( diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php b/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php index ac94493722fb1..0939acabbd5fd 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php @@ -241,6 +241,7 @@ protected function _validateFile() $fileExtension = pathinfo($filePath, PATHINFO_EXTENSION); if (!$this->checkAllowedExtension($fileExtension)) { + $this->_directory->delete($filePath); throw new \Exception('Disallowed file type.'); } //run validate callbacks diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/LICENSE.txt b/app/code/Magento/CatalogImportExport/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/LICENSE.txt rename to app/code/Magento/CatalogImportExport/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/LICENSE_AFL.txt b/app/code/Magento/CatalogImportExport/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/LICENSE_AFL.txt rename to app/code/Magento/CatalogImportExport/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/README.md b/app/code/Magento/CatalogImportExport/Test/Mftf/README.md new file mode 100644 index 0000000000000..bdf321bbcd4bd --- /dev/null +++ b/app/code/Magento/CatalogImportExport/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Import Export Functional Tests + +The Functional Test Module for **Magento Catalog Import Export** module. diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/composer.json b/app/code/Magento/CatalogImportExport/Test/Mftf/composer.json new file mode 100644 index 0000000000000..1f223fc5f46b5 --- /dev/null +++ b/app/code/Magento/CatalogImportExport/Test/Mftf/composer.json @@ -0,0 +1,25 @@ +{ + "name": "magento/functional-test-module-catalog-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-inventory": "100.0.0-dev", + "magento/functional-test-module-catalog-url-rewrite": "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-media-storage": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-tax": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/CategoryProcessorTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/CategoryProcessorTest.php index 9d13f91aa2c37..69f4a465e3309 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/CategoryProcessorTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/CategoryProcessorTest.php @@ -148,6 +148,9 @@ public function testGetCategoryById($categoriesCache, $expectedResult) $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function getCategoryByIdDataProvider() { return [ diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/AbstractTypeTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/AbstractTypeTest.php index e24b4e1948149..bd2fe896b8c0a 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/AbstractTypeTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/AbstractTypeTest.php @@ -134,8 +134,28 @@ protected function setUp() ->expects($this->any()) ->method('addFieldToFilter') ->with( - 'main_table.attribute_id', - ['in' => ['attribute_id', 'boolean_attribute']] + ['main_table.attribute_id', 'main_table.attribute_code'], + [ + [ + 'in' => + [ + 'attribute_id', + 'boolean_attribute', + ], + ], + [ + 'in' => + [ + 'related_tgtr_position_behavior', + 'related_tgtr_position_limit', + 'upsell_tgtr_position_behavior', + 'upsell_tgtr_position_limit', + 'thumbnail_label', + 'small_image_label', + 'image_label', + ], + ], + ] ) ->willReturn([$attribute1, $attribute2]); @@ -269,6 +289,9 @@ public function testIsRowValidError() $this->assertFalse($this->simpleType->isRowValid($rowData, $rowNum)); } + /** + * @return array + */ public function addAttributeOptionDataProvider() { return [ diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/QuantityTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/QuantityTest.php index 144214fd6e318..b550102cb1a15 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/QuantityTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/QuantityTest.php @@ -7,6 +7,7 @@ use Magento\CatalogImportExport\Model\Import\Product; use Magento\CatalogImportExport\Model\Import\Product\Validator\Quantity; +use Magento\ImportExport\Model\Import; /** * Class QuantityTest @@ -25,6 +26,10 @@ protected function setUp() $contextStub = $this->getMockBuilder(Product::class) ->disableOriginalConstructor() ->getMock(); + $contextStub->expects($this->any()) + ->method('getEmptyAttributeValueConstant') + ->willReturn(Import::DEFAULT_EMPTY_ATTRIBUTE_VALUE_CONSTANT); + $contextStub->method('retrieveMessageTemplate')->willReturn(null); $this->quantity->init($contextStub); } @@ -54,6 +59,9 @@ public function isValidDataProvider() [true, ['qty' => '']], [false, ['qty' => 'abc']], [false, ['qty' => true]], + [false, ['qty' => true]], + [true, ['qty' => Import::DEFAULT_EMPTY_ATTRIBUTE_VALUE_CONSTANT]], + [false, ['qty' => '__EMPTY__VALUE__TEST__']], ]; } } diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/TierPriceTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/TierPriceTest.php index 4e902024769f7..bffefce24e1fd 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/TierPriceTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/TierPriceTest.php @@ -48,6 +48,10 @@ protected function setUp() ); } + /** + * @param $groupId + * @return \Magento\CatalogImportExport\Model\Import\Product\Validator\TierPrice + */ protected function processInit($groupId) { $searchResult = $this->createMock(\Magento\Customer\Api\Data\GroupSearchResultsInterface::class); diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/WeightTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/WeightTest.php new file mode 100644 index 0000000000000..78174828ae26e --- /dev/null +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Validator/WeightTest.php @@ -0,0 +1,69 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CatalogImportExport\Test\Unit\Model\Import\Product\Validator; + +use Magento\CatalogImportExport\Model\Import\Product; +use Magento\CatalogImportExport\Model\Import\Product\Validator\Weight; +use Magento\ImportExport\Model\Import; + +/** + * Class WeightTest + */ +class WeightTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var Weight + */ + private $weight; + + protected function setUp() + { + $this->weight = new Weight(); + + $contextStub = $this->getMockBuilder(Product::class) + ->disableOriginalConstructor() + ->getMock(); + $contextStub->expects($this->any()) + ->method('getEmptyAttributeValueConstant') + ->willReturn(Import::DEFAULT_EMPTY_ATTRIBUTE_VALUE_CONSTANT); + + $contextStub->method('retrieveMessageTemplate')->willReturn(null); + $this->weight->init($contextStub); + } + + /** + * @param bool $expectedResult + * @param array $value + * @dataProvider isValidDataProvider + */ + public function testIsValid($expectedResult, $value) + { + $result = $this->weight->isValid($value); + $this->assertEquals($expectedResult, $result); + } + + /** + * @return array + */ + public function isValidDataProvider() + { + return [ + [true, ['weight' => 0]], + [true, ['weight' => 1]], + [true, ['weight' => 5]], + [false, ['weight' => -1]], + [false, ['weight' => -10]], + [true, ['weight' => '']], + [false, ['weight' => 'abc']], + [false, ['weight' => true]], + [false, ['weight' => true]], + [true, ['weight' => Import::DEFAULT_EMPTY_ATTRIBUTE_VALUE_CONSTANT]], + [false, ['weight' => '__EMPTY__VALUE__TEST__']], + ]; + } +} diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php index 9282c5cb5c02e..a562916b3b4bb 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php @@ -505,6 +505,9 @@ protected function _initSkus() return $this; } + /** + * @return $this + */ protected function _initImagesArrayKeys() { $this->imageTypeProcessor->expects($this->once())->method('getImageTypes')->willReturn( @@ -600,6 +603,28 @@ public function testGetMultipleValueSeparatorFromParameters() ); } + public function testGetEmptyAttributeValueConstantDefault() + { + $this->setPropertyValue($this->importProduct, '_parameters', null); + $this->assertEquals( + Import::DEFAULT_EMPTY_ATTRIBUTE_VALUE_CONSTANT, + $this->importProduct->getEmptyAttributeValueConstant() + ); + } + + public function testGetEmptyAttributeValueConstantFromParameters() + { + $expectedSeparator = '__EMPTY__VALUE__TEST__'; + $this->setPropertyValue($this->importProduct, '_parameters', [ + \Magento\ImportExport\Model\Import::FIELD_EMPTY_ATTRIBUTE_VALUE_CONSTANT => $expectedSeparator, + ]); + + $this->assertEquals( + $expectedSeparator, + $this->importProduct->getEmptyAttributeValueConstant() + ); + } + public function testDeleteProductsForReplacement() { $importProduct = $this->getMockBuilder(\Magento\CatalogImportExport\Model\Import\Product::class) @@ -808,6 +833,9 @@ public function testGetCategoryProcessor() $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function getStoreIdByCodeDataProvider() { return [ @@ -1252,6 +1280,9 @@ public function uploadMediaFilesDataProvider() ]; } + /** + * @return array + */ public function getImagesFromRowDataProvider() { return [ @@ -1278,6 +1309,9 @@ public function getImagesFromRowDataProvider() ]; } + /** + * @return array + */ public function validateRowValidateNewProductTypeAddRowErrorCallDataProvider() { return [ @@ -1312,6 +1346,9 @@ public function validateRowValidateNewProductTypeAddRowErrorCallDataProvider() ]; } + /** + * @return array + */ public function validateRowCheckSpecifiedSkuDataProvider() { return [ @@ -1330,6 +1367,9 @@ public function validateRowCheckSpecifiedSkuDataProvider() ]; } + /** + * @return array + */ public function validateRowDataProvider() { return [ diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/UploaderTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/UploaderTest.php index f6a211bc47c62..ed95d5a0212c9 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/UploaderTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/UploaderTest.php @@ -193,6 +193,9 @@ public function testMoveFileUrlDrivePool($fileUrl, $expectedHost, $expectedDrive $this->assertNull($result); } + /** + * @return array + */ public function moveFileUrlDriverPoolDataProvider() { return [ @@ -211,6 +214,9 @@ public function moveFileUrlDriverPoolDataProvider() ]; } + /** + * @return array + */ public function moveFileUrlDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/ActionGroup/DisplayOutOfStockProductActionGroup.xml b/app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml similarity index 90% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/ActionGroup/DisplayOutOfStockProductActionGroup.xml rename to app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml index b75cbff116761..1bec4cc99c0e8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/ActionGroup/DisplayOutOfStockProductActionGroup.xml +++ b/app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="displayOutOfStockProduct"> <amOnPage url="{{InventoryConfigurationPage.url}}" stepKey="navigateToInventoryConfigurationPage"/> <waitForPageLoad stepKey="waitForConfigPageToLoad"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/LICENSE.txt b/app/code/Magento/CatalogInventory/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/LICENSE.txt rename to app/code/Magento/CatalogInventory/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/LICENSE_AFL.txt b/app/code/Magento/CatalogInventory/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/LICENSE_AFL.txt rename to app/code/Magento/CatalogInventory/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml new file mode 100644 index 0000000000000..95e873a3b164d --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="InventoryConfigurationPage" url="admin/system_config/edit/section/cataloginventory/" area="admin" module="Magento_Config"> + <section name="InventorySection"/> + </page> +</pages> diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/README.md b/app/code/Magento/CatalogInventory/Test/Mftf/README.md new file mode 100644 index 0000000000000..3903fe316b36c --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Inventory Functional Tests + +The Functional Test Module for **Magento Catalog Inventory** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/Section/InventorySection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/Section/InventorySection.xml rename to app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml index 526d8b5730eb0..55fbc84ead96a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/Section/InventorySection.xml +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="InventoryConfigSection"> <element name="ProductStockOptionsTab" type="button" selector="#cataloginventory_options-head"/> <element name="CheckIfProductStockOptionsTabExpanded" type="button" selector="#cataloginventory_options-head:not(.open)"/> diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/composer.json b/app/code/Magento/CatalogInventory/Test/Mftf/composer.json new file mode 100644 index 0000000000000..afd8d3ddb661a --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/composer.json @@ -0,0 +1,23 @@ +{ + "name": "magento/functional-test-module-catalog-inventory", + "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-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-quote": "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/CatalogInventory/Test/Unit/Helper/StockTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Helper/StockTest.php index 2fe40c118b06a..bd04df0da0a4a 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Helper/StockTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Helper/StockTest.php @@ -167,6 +167,9 @@ public function testAddInStockFilterToCollection($configMock) $this->assertNull($this->stock->addInStockFilterToCollection($collectionMock)); } + /** + * @return array + */ public function filterProvider() { $configMock = $this->getMockBuilder(\Magento\Framework\App\Config::class) diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Plugin/ProductLinksTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Plugin/ProductLinksTest.php index ea562da2f01c0..3788b1bc401fe 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Plugin/ProductLinksTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Plugin/ProductLinksTest.php @@ -48,6 +48,9 @@ public function testAfterGetProductCollectionShow($status, $callCount) $this->assertEquals($collectionMock, $this->model->afterGetProductCollection($subjectMock, $collectionMock)); } + /** + * @return array + */ private function buildMocks() { /** @var \Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection $collectionMock */ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php index 11a04d26994ae..7e2bad0b96354 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php @@ -450,6 +450,10 @@ public function testException() $this->quantityValidator->validate($this->observerMock); } + /** + * @param $qty + * @param $hasError + */ private function setUpStubForQuantity($qty, $hasError) { $this->productMock->expects($this->any()) @@ -480,6 +484,9 @@ private function setUpStubForQuantity($qty, $hasError) ->willReturn(''); } + /** + * @param $qty + */ private function createInitialStub($qty) { $this->storeMock->expects($this->any()) diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Spi/StockStateProviderTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Spi/StockStateProviderTest.php index 5c75249b7cbf8..aad24cbeb7ac1 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Spi/StockStateProviderTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Spi/StockStateProviderTest.php @@ -243,41 +243,66 @@ public function testCheckQuoteItemQty(StockItemInterface $stockItem, $expectedRe ); } + /** + * @return array + */ public function verifyStockDataProvider() { return $this->prepareDataForMethod('verifyStock'); } + /** + * @return array + */ public function verifyNotificationDataProvider() { return $this->prepareDataForMethod('verifyNotification'); } + /** + * @return array + */ public function checkQtyDataProvider() { return $this->prepareDataForMethod('checkQty'); } + /** + * @return array + */ public function suggestQtyDataProvider() { return $this->prepareDataForMethod('suggestQty'); } + /** + * @return array + */ public function getStockQtyDataProvider() { return $this->prepareDataForMethod('getStockQty'); } + /** + * @return array + */ public function checkQtyIncrementsDataProvider() { return $this->prepareDataForMethod('checkQtyIncrements'); } + /** + * @return array + */ public function checkQuoteItemQtyDataProvider() { return $this->prepareDataForMethod('checkQuoteItemQty'); } + /** + * @param $methodName + * @return array + */ protected function prepareDataForMethod($methodName) { $variations = []; @@ -318,6 +343,9 @@ protected function prepareDataForMethod($methodName) return $variations; } + /** + * @return array + */ protected function getVariations() { $stockQty = 100; @@ -430,6 +458,9 @@ public function testCheckQtyIncrementsMsg($isChildItem, $expectedMsg) $this->assertEquals($expectedMsg, $result->getMessage()->render()); } + /** + * @return array + */ public function checkQtyIncrementsMsgDataProvider() { return [ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/ItemTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/ItemTest.php index e63a573b2f3a4..3dc5992c3ec37 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/ItemTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/ItemTest.php @@ -491,6 +491,9 @@ public function testDispatchEvents($eventName, $methodName, $objectName) ); } + /** + * @return array + */ public function eventsDataProvider() { return [ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/StockTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/StockTest.php index c3abad50ef9f4..9ecab4dca77e3 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/StockTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/StockTest.php @@ -125,7 +125,10 @@ public function testDispatchEvents($eventName, $methodName, $objectName) sprintf('Event "%s" with object name "%s" doesn\'t dispatched properly', $eventName, $objectName) ); } - + + /** + * @return array + */ public function eventsDataProvider() { return [ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Ui/Component/Product/Form/Element/UseConfigSettingsTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Ui/Component/Product/Form/Element/UseConfigSettingsTest.php index db183ae5c0da0..0ce62133d6f9b 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Ui/Component/Product/Form/Element/UseConfigSettingsTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Ui/Component/Product/Form/Element/UseConfigSettingsTest.php @@ -106,6 +106,9 @@ public function testPrepareSource( $this->assertEquals($expectedResult, $this->useConfigSettings->getData('config')); } + /** + * @return array + */ public function prepareSourceDataProvider() { return [ diff --git a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/CatalogPriceRuleActionGroup.xml b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/CatalogPriceRuleActionGroup.xml new file mode 100644 index 0000000000000..ad92af9bb3b1b --- /dev/null +++ b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/CatalogPriceRuleActionGroup.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!-- action group to create a new catalog price rule giving a catalogRule entity --> + <actionGroup name="newCatalogPriceRuleByUI"> + <arguments> + <argument name="catalogRule" defaultValue="_defaultCatalogRule"/> + </arguments> + <!-- Go to the admin Catalog rule grid and add a new one --> + <amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/> + <waitForPageLoad stepKey="waitForPriceRulePage"/> + <click stepKey="addNewRule" selector="{{AdminGridMainControls.add}}"/> + + <!-- Fill the form according the the attributes of the entity --> + <fillField stepKey="fillName" selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{catalogRule.name}}"/> + <fillField stepKey="fillDescription" selector="{{AdminNewCatalogPriceRule.description}}" userInput="{{catalogRule.description}}"/> + <selectOption stepKey="selectSite" selector="{{AdminNewCatalogPriceRule.websites}}" userInput="{{catalogRule.website_ids[0]}}"/> + <selectOption stepKey="selectCustomerGroups" selector="{{AdminNewCatalogPriceRule.customerGroups}}" userInput="{{catalogRule.customer_group_ids[0]}}"/> + <click stepKey="clickFromCalender" selector="{{AdminNewCatalogPriceRule.fromDateButton}}"/> + <click stepKey="clickFromToday" selector="{{AdminNewCatalogPriceRule.todayDate}}"/> + <click stepKey="clickToCalender" selector="{{AdminNewCatalogPriceRule.toDateButton}}"/> + <click stepKey="clickToToday" selector="{{AdminNewCatalogPriceRule.todayDate}}"/> + <click stepKey="openActionDropdown" selector="{{AdminNewCatalogPriceRule.actionsTab}}"/> + <selectOption stepKey="discountType" selector="{{AdminNewCatalogPriceRuleActions.apply}}" userInput="{{catalogRule.simple_action}}"/> + <fillField stepKey="fillDiscountValue" selector="{{AdminNewCatalogPriceRuleActions.discountAmount}}" userInput="{{catalogRule.discount_amount}}"/> + + <!-- Scroll to top and either save or save and apply after the action group --> + <scrollToTopOfPage stepKey="scrollToTop"/> + </actionGroup> + + <actionGroup name="applyCatalogPriceRules"> + <amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/> + <waitForPageLoad stepKey="waitForPriceRulePage"/> + <click stepKey="applyRules" selector="{{AdminCatalogPriceRuleGrid.applyRules}}"/> + <see stepKey="assertSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="Updated rules applied."/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Data/CatalogRuleData.xml b/app/code/Magento/CatalogRule/Test/Mftf/Data/CatalogRuleData.xml new file mode 100644 index 0000000000000..3199a53026a92 --- /dev/null +++ b/app/code/Magento/CatalogRule/Test/Mftf/Data/CatalogRuleData.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="_defaultCatalogRule" type="catalogRule"> + <data key="name" unique="suffix">CatalogPriceRule</data> + <data key="description">Catalog Price Rule Description</data> + <data key="is_active">1</data> + <array key="customer_group_ids"> + <item>0</item> + </array> + <array key="website_ids"> + <item>1</item> + </array> + <data key="simple_action">by_percent</data> + <data key="discount_amount">10</data> + </entity> + + <entity name="CatalogRuleByFixed" type="catalogRule"> + <data key="name" unique="suffix">CatalogPriceRule</data> + <data key="description">Catalog Price Rule Description</data> + <data key="is_active">1</data> + <array key="customer_group_ids"> + <item>0</item> + </array> + <array key="website_ids"> + <item>1</item> + </array> + <data key="simple_action">by_fixed</data> + <data key="discount_amount">10</data> + </entity> + + <entity name="CatalogRuleToPercent" type="catalogRule"> + <data key="name" unique="suffix">CatalogPriceRule</data> + <data key="description">Catalog Price Rule Description</data> + <data key="is_active">1</data> + <array key="customer_group_ids"> + <item>0</item> + </array> + <array key="website_ids"> + <item>1</item> + </array> + <data key="simple_action">to_percent</data> + <data key="discount_amount">90</data> + </entity> + + <entity name="CatalogRuleToFixed" type="catalogRule"> + <data key="name" unique="suffix">CatalogPriceRule</data> + <data key="description">Catalog Price Rule Description</data> + <data key="is_active">1</data> + <array key="customer_group_ids"> + <item>0</item> + </array> + <array key="website_ids"> + <item>1</item> + </array> + <data key="simple_action">to_fixed</data> + <data key="discount_amount">100</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/LICENSE.txt b/app/code/Magento/CatalogRule/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/LICENSE.txt rename to app/code/Magento/CatalogRule/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/LICENSE_AFL.txt b/app/code/Magento/CatalogRule/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/LICENSE_AFL.txt rename to app/code/Magento/CatalogRule/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Metadata/catalog-rule-meta.xml b/app/code/Magento/CatalogRule/Test/Mftf/Metadata/catalog-rule-meta.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Metadata/catalog-rule-meta.xml rename to app/code/Magento/CatalogRule/Test/Mftf/Metadata/catalog-rule-meta.xml index e404e4471ba45..6f5bd2decc6ce 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Metadata/catalog-rule-meta.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Metadata/catalog-rule-meta.xml @@ -8,7 +8,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="createCatalogRule" dataType="catalogRule" type="create" auth="adminFormKey" url="/catalog_rule/promo_catalog/save/" method="POST"> <contentType>application/x-www-form-urlencoded</contentType> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Page/CatalogRulePage.xml b/app/code/Magento/CatalogRule/Test/Mftf/Page/CatalogRulePage.xml new file mode 100644 index 0000000000000..e080a252e7855 --- /dev/null +++ b/app/code/Magento/CatalogRule/Test/Mftf/Page/CatalogRulePage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="CatalogRulePage" url="catalog_rule/promo_catalog/" module="Magento_CatalogRule" area="admin"> + <section name="AdminSecondaryGridSection"/> + </page> +</pages> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/README.md b/app/code/Magento/CatalogRule/Test/Mftf/README.md new file mode 100644 index 0000000000000..086f52535e00a --- /dev/null +++ b/app/code/Magento/CatalogRule/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Rule Functional Tests + +The Functional Test Module for **Magento Catalog Rule** module. diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminNewCatalogPriceRuleSection.xml b/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminNewCatalogPriceRuleSection.xml new file mode 100644 index 0000000000000..b60a4c6516a82 --- /dev/null +++ b/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminNewCatalogPriceRuleSection.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminNewCatalogPriceRule"> + <element name="saveAndApply" type="button" selector="#save_and_apply" timeout="30"/> + <element name="save" type="button" selector="#save" timeout="30"/> + <element name="delete" type="button" selector="#delete" timeout="30"/> + + <element name="ruleName" type="input" selector="[name='name']"/> + <element name="description" type="textarea" selector="[name='description']"/> + <element name="status" type="select" selector="[name='is_active']"/> + + <element name="websites" type="select" selector="[name='website_ids']"/> + <element name="websitesOptions" type="select" selector="[name='website_ids'] option"/> + <element name="customerGroups" type="select" selector="[name='customer_group_ids']"/> + <element name="customerGroupsOptions" type="select" selector="[name='customer_group_ids'] option"/> + + <element name="fromDateButton" type="button" selector="[name='from_date'] + button" timeout="15"/> + <element name="toDateButton" type="button" selector="[name='to_date'] + button" timeout="15"/> + <element name="todayDate" type="button" selector="#ui-datepicker-div [data-handler='today']"/> + <element name="priority" type="input" selector="[name='sort_order']"/> + <element name="conditionsTab" type="block" selector="[data-index='block_promo_catalog_edit_tab_conditions']"/> + <element name="actionsTab" type="block" selector="[data-index='actions']"/> + </section> + + <section name="AdminNewCatalogPriceRuleActions"> + <element name="apply" type="select" selector="[name='simple_action']"/> + <element name="discountAmount" type="input" selector="[name='discount_amount']"/> + <element name="disgardRules" type="select" selector="[name='stop_rules_processing']"/> + </section> + + <section name="AdminCatalogPriceRuleGrid"> + <element name="applyRules" type="button" selector="#apply_rules" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest.xml new file mode 100644 index 0000000000000..a68965d97e879 --- /dev/null +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest.xml @@ -0,0 +1,240 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="AdminCreateCatalogPriceRuleByPercentTest"> + <annotations> + <features value="CatalogRule"/> + <stories value="Create catalog price rule"/> + <title value="Admin should be able to create a catalog price rule applied as a percentage of original (for simple product)"/> + <description value="Admin should be able to create a catalog price rule applied as a percentage of original (for simple product)"/> + <severity value="MAJOR"/> + <testCaseId value="MC-65"/> + <group value="CatalogRule"/> + </annotations> + <before> + <!-- Create the simple product and category that it will be in --> + <createData entity="ApiCategory" stepKey="createCategory"/> + <createData entity="ApiSimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- log in and create the price rule --> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup stepKey="createNewPriceRule" ref="newCatalogPriceRuleByUI"/> + <click stepKey="saveAndApply" selector="{{AdminNewCatalogPriceRule.saveAndApply}}"/> + <see stepKey="assertSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule."/> + </before> + <after> + <!-- delete the simple product and catalog price rule and logout --> + <amOnPage stepKey="goToPriceRulePage" url="admin/catalog_rule/promo_catalog/"/> + <actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid"> + <argument name="name" value="{{_defaultCatalogRule.name}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/> + </actionGroup> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + </after> + + <!-- Go to category page and make sure that all of the prices are correct --> + <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategoryPage"/> + <waitForPageLoad stepKey="waitForCategory"/> + <see stepKey="seeOldPrice" selector="{{StorefrontCategoryProductSection.ProductOldPriceByNumber('1')}}" userInput="$$createProduct.price$$"/> + <see stepKey="seeNewPrice" selector="{{StorefrontCategoryProductSection.ProductSpecialPriceByNumber('1')}}" userInput="$110.70"/> + + <!-- Go to the simple product page and check that the prices are correct --> + <amOnPage stepKey="goToProductPage" url="$$createProduct.sku$$.html"/> + <waitForPageLoad stepKey="waitForProductPage"/> + <see stepKey="seeOldPriceTag" selector="{{StorefrontProductInfoMainSection.oldPriceTag}}" userInput="Regular Price"/> + <see stepKey="seeOldPrice2" selector="{{StorefrontProductInfoMainSection.oldPriceAmount}}" userInput="$$createProduct.price$$"/> + <see stepKey="seeNewPrice2" selector="{{StorefrontProductInfoMainSection.updatedPrice}}" userInput="$110.70"/> + + <!-- Add the product to cart and check that the price is correct there --> + <click stepKey="addToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForAddedToCart"/> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForCart"/> + <see stepKey="seeNewPriceInCart" selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$110.70"/> + </test> + + <test name="AdminCreateCatalogPriceRuleByFixedTest"> + <annotations> + <features value="CatalogRule"/> + <stories value="Create catalog price rule"/> + <title value="Admin should be able to create a catalog price rule applied as a fixed amount (for simple product)"/> + <description value="Admin should be able to create a catalog price rule applied as a fixed amount (for simple product)"/> + <severity value="MAJOR"/> + <testCaseId value="MC-93"/> + <group value="CatalogRule"/> + </annotations> + <before> + <!-- Create the simple product and category that it will be in --> + <createData entity="ApiCategory" stepKey="createCategory"/> + <createData entity="ApiSimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- log in and create the price rule --> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup stepKey="createNewPriceRule" ref="newCatalogPriceRuleByUI"> + <argument name="catalogRule" value="CatalogRuleByFixed"/> + </actionGroup> + <click stepKey="saveAndApply" selector="{{AdminNewCatalogPriceRule.saveAndApply}}"/> + <see stepKey="assertSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule."/> + </before> + <after> + <!-- delete the simple product and catalog price rule and logout --> + <amOnPage stepKey="goToPriceRulePage" url="admin/catalog_rule/promo_catalog/"/> + <actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid"> + <argument name="name" value="{{CatalogRuleByFixed.name}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/> + </actionGroup> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + </after> + + <!-- Go to category page and make sure that all of the prices are correct --> + <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategoryPage"/> + <waitForPageLoad stepKey="waitForCategory"/> + <see stepKey="seeOldPrice" selector="{{StorefrontCategoryProductSection.ProductOldPriceByNumber('1')}}" userInput="$$createProduct.price$$"/> + <see stepKey="seeNewPrice" selector="{{StorefrontCategoryProductSection.ProductSpecialPriceByNumber('1')}}" userInput="$113.00"/> + + <!-- Go to the simple product page and check that the prices are correct --> + <amOnPage stepKey="goToProductPage" url="$$createProduct.sku$$.html"/> + <waitForPageLoad stepKey="waitForProductPage"/> + <see stepKey="seeOldPriceTag" selector="{{StorefrontProductInfoMainSection.oldPriceTag}}" userInput="Regular Price"/> + <see stepKey="seeOldPrice2" selector="{{StorefrontProductInfoMainSection.oldPriceAmount}}" userInput="$$createProduct.price$$"/> + <see stepKey="seeNewPrice2" selector="{{StorefrontProductInfoMainSection.updatedPrice}}" userInput="$113.00"/> + + <!-- Add the product to cart and check that the price is correct there --> + <click stepKey="addToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForAddedToCart"/> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForCart"/> + <see stepKey="seeNewPriceInCart" selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$113.00"/> + </test> + + <test name="AdminCreateCatalogPriceRuleToPercentTest"> + <annotations> + <features value="CatalogRule"/> + <stories value="Create catalog price rule"/> + <title value="Admin should be able to create a catalog price rule adjust final price to this percentage (for simple product)"/> + <description value="Admin should be able to create a catalog price rule adjust final price to this percentage (for simple product)"/> + <severity value="MAJOR"/> + <testCaseId value="MC-69"/> + <group value="CatalogRule"/> + </annotations> + <before> + <!-- Create the simple product and category that it will be in --> + <createData entity="ApiCategory" stepKey="createCategory"/> + <createData entity="ApiSimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- log in and create the price rule --> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup stepKey="createNewPriceRule" ref="newCatalogPriceRuleByUI"> + <argument name="catalogRule" value="CatalogRuleToPercent"/> + </actionGroup> + <click stepKey="saveAndApply" selector="{{AdminNewCatalogPriceRule.saveAndApply}}"/> + <see stepKey="assertSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule."/> + </before> + <after> + <!-- delete the simple product and catalog price rule and logout --> + <amOnPage stepKey="goToPriceRulePage" url="admin/catalog_rule/promo_catalog/"/> + <actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid"> + <argument name="name" value="{{CatalogRuleToPercent.name}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/> + </actionGroup> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + </after> + + <!-- Go to category page and make sure that all of the prices are correct --> + <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategoryPage"/> + <waitForPageLoad stepKey="waitForCategory"/> + <see stepKey="seeOldPrice" selector="{{StorefrontCategoryProductSection.ProductOldPriceByNumber('1')}}" userInput="$$createProduct.price$$"/> + <see stepKey="seeNewPrice" selector="{{StorefrontCategoryProductSection.ProductSpecialPriceByNumber('1')}}" userInput="$110.70"/> + + <!-- Go to the simple product page and check that the prices are correct --> + <amOnPage stepKey="goToProductPage" url="$$createProduct.sku$$.html"/> + <waitForPageLoad stepKey="waitForProductPage"/> + <see stepKey="seeOldPriceTag" selector="{{StorefrontProductInfoMainSection.oldPriceTag}}" userInput="Regular Price"/> + <see stepKey="seeOldPrice2" selector="{{StorefrontProductInfoMainSection.oldPriceAmount}}" userInput="$$createProduct.price$$"/> + <see stepKey="seeNewPrice2" selector="{{StorefrontProductInfoMainSection.updatedPrice}}" userInput="$110.70"/> + + <!-- Add the product to cart and check that the price is correct there --> + <click stepKey="addToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForAddedToCart"/> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForCart"/> + <see stepKey="seeNewPriceInCart" selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$110.70"/> + </test> + + <test name="AdminCreateCatalogPriceRuleToFixedTest"> + <annotations> + <features value="CatalogRule"/> + <stories value="Create catalog price rule"/> + <title value="Admin should be able to create a catalog price rule adjust final price to discount value (for simple product)"/> + <description value="Admin should be able to create a catalog price rule adjust final price to discount value (for simple product)"/> + <severity value="MAJOR"/> + <testCaseId value="MC-60"/> + <group value="CatalogRule"/> + </annotations> + <before> + <!-- Create the simple product and category that it will be in --> + <createData entity="ApiCategory" stepKey="createCategory"/> + <createData entity="ApiSimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- log in and create the price rule --> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup stepKey="createNewPriceRule" ref="newCatalogPriceRuleByUI"> + <argument name="catalogRule" value="CatalogRuleToFixed"/> + </actionGroup> + <click stepKey="saveAndApply" selector="{{AdminNewCatalogPriceRule.saveAndApply}}"/> + <see stepKey="assertSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule."/> + </before> + <after> + <!-- delete the simple product and catalog price rule and logout --> + <amOnPage stepKey="goToPriceRulePage" url="admin/catalog_rule/promo_catalog/"/> + <actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid"> + <argument name="name" value="{{CatalogRuleToFixed.name}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/> + </actionGroup> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + </after> + + <!-- Go to category page and make sure that all of the prices are correct --> + <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategoryPage"/> + <waitForPageLoad stepKey="waitForCategory"/> + <see stepKey="seeOldPrice" selector="{{StorefrontCategoryProductSection.ProductOldPriceByNumber('1')}}" userInput="$$createProduct.price$$"/> + <see stepKey="seeNewPrice" selector="{{StorefrontCategoryProductSection.ProductSpecialPriceByNumber('1')}}" userInput="$100.00"/> + + <!-- Go to the simple product page and check that the prices are correct --> + <amOnPage stepKey="goToProductPage" url="$$createProduct.sku$$.html"/> + <waitForPageLoad stepKey="waitForProductPage"/> + <see stepKey="seeOldPriceTag" selector="{{StorefrontProductInfoMainSection.oldPriceTag}}" userInput="Regular Price"/> + <see stepKey="seeOldPrice2" selector="{{StorefrontProductInfoMainSection.oldPriceAmount}}" userInput="$$createProduct.price$$"/> + <see stepKey="seeNewPrice2" selector="{{StorefrontProductInfoMainSection.updatedPrice}}" userInput="$100.00"/> + + <!-- Add the product to cart and check that the price is correct there --> + <click stepKey="addToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForAddedToCart"/> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForCart"/> + <see stepKey="seeNewPriceInCart" selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$100.00"/> + </test> +</tests> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml new file mode 100644 index 0000000000000..77a9a48074c29 --- /dev/null +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="StorefrontInactiveCatalogRuleTest"> + <annotations> + <features value="CatalogRule"/> + <stories value="Customer view catalog price rule"/> + <title value="Customer should not see the catalog price rule promotion if status is inactive"/> + <description value="Customer should not see the catalog price rule promotion if status is inactive"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-79"/> + <group value="CatalogRule"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="login"/> + <createData entity="ApiCategory" stepKey="createCategory"/> + <createData entity="ApiSimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <actionGroup ref="newCatalogPriceRuleByUI" stepKey="createNewPriceRule"/> + <selectOption selector="{{AdminNewCatalogPriceRule.status}}" userInput="Inactive" stepKey="setInactive"/> + <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/> + <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="seeSuccess"/> + </before> + <after> + <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <amOnPage url="admin/catalog_rule/promo_catalog/" stepKey="goToPriceRulePage"/> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule"> + <argument name="name" value="{{_defaultCatalogRule.name}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/> + </actionGroup> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="logout"/> + </after> + + <!-- Verify price is not discounted on category page --> + <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategory"/> + <waitForPageLoad stepKey="waitForCategory"/> + <see selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" userInput="$$createProduct.price$$" stepKey="seePrice1"/> + + <!-- Verify price is not discounted on the product page --> + <amOnPage url="$$createProduct.sku$$.html" stepKey="goToProduct"/> + <waitForPageLoad stepKey="waitForProduct"/> + <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createProduct.price$$" stepKey="seePrice2"/> + + <!-- Verify price is not discounted in the cart --> + <click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/> + <waitForPageLoad stepKey="waitForCart"/> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForCheckout"/> + <see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$$createProduct.price$$" stepKey="seePrice3"/> + </test> +</tests> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/composer.json b/app/code/Magento/CatalogRule/Test/Mftf/composer.json new file mode 100644 index 0000000000000..0b57cf8dfaefa --- /dev/null +++ b/app/code/Magento/CatalogRule/Test/Mftf/composer.json @@ -0,0 +1,27 @@ +{ + "name": "magento/functional-test-module-catalog-rule", + "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-customer": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-rule": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-import-export": "100.0.0-dev", + "magento/functional-test-module-catalog-rule-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CatalogRule/Test/Unit/Model/Product/PriceModifierTest.php b/app/code/Magento/CatalogRule/Test/Unit/Model/Product/PriceModifierTest.php index b1e27bf973404..ccc86920a7e74 100644 --- a/app/code/Magento/CatalogRule/Test/Unit/Model/Product/PriceModifierTest.php +++ b/app/code/Magento/CatalogRule/Test/Unit/Model/Product/PriceModifierTest.php @@ -56,6 +56,9 @@ public function testModifyPriceIfPriceExists($resultPrice, $expectedPrice) $this->assertEquals($expectedPrice, $this->priceModifier->modifyPrice(100, $this->productMock)); } + /** + * @return array + */ public function modifyPriceDataProvider() { return ['resulted_price_exists' => [150, 150], 'resulted_price_not_exists' => [null, 100]]; diff --git a/app/code/Magento/CatalogRule/Test/Unit/Model/Rule/Condition/MappableConditionProcessorTest.php b/app/code/Magento/CatalogRule/Test/Unit/Model/Rule/Condition/MappableConditionProcessorTest.php index e28c443e46fed..87f959214a8fb 100644 --- a/app/code/Magento/CatalogRule/Test/Unit/Model/Rule/Condition/MappableConditionProcessorTest.php +++ b/app/code/Magento/CatalogRule/Test/Unit/Model/Rule/Condition/MappableConditionProcessorTest.php @@ -1008,6 +1008,11 @@ public function testException() $this->mappableConditionProcessor->rebuildConditionsTree($inputCondition); } + /** + * @param $subConditions + * @param $aggregator + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getMockForCombinedCondition($subConditions, $aggregator) { $mock = $this->getMockBuilder(CombinedCondition::class) @@ -1022,6 +1027,10 @@ protected function getMockForCombinedCondition($subConditions, $aggregator) return $mock; } + /** + * @param $attribute + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getMockForSimpleCondition($attribute) { $mock = $this->getMockBuilder(SimpleCondition::class) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/LICENSE.txt b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/LICENSE.txt rename to app/code/Magento/CatalogRuleConfigurable/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/LICENSE_AFL.txt b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/LICENSE_AFL.txt rename to app/code/Magento/CatalogRuleConfigurable/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/README.md b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/README.md new file mode 100644 index 0000000000000..3d271b8325e60 --- /dev/null +++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Rule Configurable Functional Tests + +The Functional Test Module for **Magento Catalog Rule Configurable** module. diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/composer.json b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/composer.json new file mode 100644 index 0000000000000..20b1a74c9416a --- /dev/null +++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/composer.json @@ -0,0 +1,23 @@ +{ + "name": "magento/functional-test-module-catalog-rule-configurable", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0", + "magento/magento-composer-installer": "100.0.0-dev", + "magento/functional-test-module-catalog": "100.0.0-dev", + "magento/functional-test-module-catalog-rule": "100.0.0-dev", + "magento/functional-test-module-configurable-product": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-catalog-rule": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CatalogSearch/Setup/Patch/Data/SetInitialSearchWeightForAttributes.php b/app/code/Magento/CatalogSearch/Setup/Patch/Data/SetInitialSearchWeightForAttributes.php index e266e67804e88..beff1c66d4f61 100644 --- a/app/code/Magento/CatalogSearch/Setup/Patch/Data/SetInitialSearchWeightForAttributes.php +++ b/app/code/Magento/CatalogSearch/Setup/Patch/Data/SetInitialSearchWeightForAttributes.php @@ -6,6 +6,7 @@ namespace Magento\CatalogSearch\Setup\Patch\Data; +use Magento\Framework\App\State; use Magento\Framework\Setup\Patch\DataPatchInterface; use Magento\Framework\Setup\Patch\PatchVersionInterface; use Magento\Framework\Indexer\IndexerInterfaceFactory; @@ -27,17 +28,25 @@ class SetInitialSearchWeightForAttributes implements DataPatchInterface, PatchVe */ private $attributeRepository; + /** + * @var State + */ + private $state; + /** * SetInitialSearchWeightForAttributes constructor. * @param IndexerInterfaceFactory $indexerFactory * @param ProductAttributeRepositoryInterface $attributeRepository + * @param State $state */ public function __construct( IndexerInterfaceFactory $indexerFactory, - ProductAttributeRepositoryInterface $attributeRepository + ProductAttributeRepositoryInterface $attributeRepository, + State $state ) { $this->indexerFactory = $indexerFactory; $this->attributeRepository = $attributeRepository; + $this->state = $state; } /** @@ -47,6 +56,13 @@ public function apply() { $this->setWeight('sku', 6); $this->setWeight('name', 5); + $indexer = $this->indexerFactory->create()->load('catalogsearch_fulltext'); + $this->state->emulateAreaCode( + \Magento\Framework\App\Area::AREA_CRONTAB, + function () use ($indexer) { + $indexer->reindexAll(); + } + ); } /** @@ -76,8 +92,9 @@ public function getAliases() /** * Set attribute search weight. * - * @param $attributeCode - * @param $weight + * @param string $attributeCode + * @param int $weight + * @return void */ private function setWeight($attributeCode, $weight) { diff --git a/app/code/Magento/CatalogSearch/Setup/RecurringData.php b/app/code/Magento/CatalogSearch/Setup/RecurringData.php deleted file mode 100644 index 0c2aee800b6f1..0000000000000 --- a/app/code/Magento/CatalogSearch/Setup/RecurringData.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\CatalogSearch\Setup; - -use Magento\Framework\App\State; -use Magento\Framework\Indexer\IndexerInterfaceFactory; -use Magento\Framework\Setup\InstallDataInterface; -use Magento\Framework\Setup\ModuleContextInterface; -use Magento\Framework\Setup\ModuleDataSetupInterface; - -/** - * Recurring data install. - */ -class RecurringData implements InstallDataInterface -{ - /** - * @var IndexerInterfaceFactory - */ - private $indexerInterfaceFactory; - /** - * @var State - */ - private $state; - - /** - * Init - * - * @param IndexerInterfaceFactory $indexerInterfaceFactory - */ - public function __construct( - IndexerInterfaceFactory $indexerInterfaceFactory, - State $state - ) { - $this->indexerInterfaceFactory = $indexerInterfaceFactory; - $this->state = $state; - } - - /** - * {@inheritdoc} - */ - public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) - { - $this->state->emulateAreaCode( - \Magento\Framework\App\Area::AREA_CRONTAB, - [$this, 'reindex'] - ); - } - - /** - * Run reindex. - * - * @return void - */ - public function reindex() - { - $this->indexerInterfaceFactory->create()->load('catalogsearch_fulltext')->reindexAll(); - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/ActionGroup/StorefrontCatalogSearchActionGroup.xml b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/StorefrontCatalogSearchActionGroup.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/ActionGroup/StorefrontCatalogSearchActionGroup.xml rename to app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/StorefrontCatalogSearchActionGroup.xml index fdf0564780024..c4bb5ff4b6dc7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/ActionGroup/StorefrontCatalogSearchActionGroup.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/StorefrontCatalogSearchActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!-- Quick search the phrase and check if the result page contains correct information --> <actionGroup name="StorefrontCheckQuickSearchActionGroup"> <arguments> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Data/ConstData.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Data/ConstData.xml new file mode 100644 index 0000000000000..08fc1ce00e5e4 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Data/ConstData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> + <entity name="CONST" type="CONST"> + <data key="apiSimpleProduct">Api Simple Product</data> + <data key="nonexistentProductName">NonexistentProductName</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/LICENSE.txt b/app/code/Magento/CatalogSearch/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/LICENSE.txt rename to app/code/Magento/CatalogSearch/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/LICENSE_AFL.txt b/app/code/Magento/CatalogSearch/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/LICENSE_AFL.txt rename to app/code/Magento/CatalogSearch/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Page/StorefrontCatalogSearchAdvancedFormPage.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Page/StorefrontCatalogSearchAdvancedFormPage.xml new file mode 100644 index 0000000000000..c52d816f0f30a --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Page/StorefrontCatalogSearchAdvancedFormPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCatalogSearchAdvancedFormPage" url="/catalogsearch/advanced/" area="storefront" module="Magento_CatalogSearch"> + <section name="StorefrontCatalogSearchAdvancedFormSection" /> + <section name="StorefrontQuickSearchSection" /> + </page> +</pages> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Page/StorefrontCatalogSearchAdvancedResultPage.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Page/StorefrontCatalogSearchAdvancedResultPage.xml new file mode 100644 index 0000000000000..422ccc652b793 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Page/StorefrontCatalogSearchAdvancedResultPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCatalogSearchAdvancedResultPage" url="/catalogsearch/advanced/result" area="storefront" module="Magento_CatalogSearch"> + <section name="StorefrontCatalogSearchAdvancedResultMainSection" /> + <section name="StorefrontQuickSearchSection" /> + </page> +</pages> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Page/StorefrontCatalogSearchPage.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Page/StorefrontCatalogSearchPage.xml new file mode 100644 index 0000000000000..6141aa96226c0 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Page/StorefrontCatalogSearchPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCatalogSearchPage" url="/catalogsearch/result/" area="storefront" module="Magento_CatalogSearch"> + <section name="StorefrontCatalogSearchMainSection" /> + <section name="StorefrontQuickSearchSection" /> + </page> +</pages> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/README.md b/app/code/Magento/CatalogSearch/Test/Mftf/README.md new file mode 100644 index 0000000000000..5ee0e968a4d3a --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Search Functional Tests + +The Functional Test Module for **Magento Catalog Search** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontCatalogSearchAdvancedFormSection.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedFormSection.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontCatalogSearchAdvancedFormSection.xml rename to app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedFormSection.xml index 30cb16d684be6..d7c63ca1af2de 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontCatalogSearchAdvancedFormSection.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedFormSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCatalogSearchAdvancedFormSection"> <element name="SearchTitle" type="text" selector=".page-title span"/> <element name="ProductName" type="input" selector="#name"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml similarity index 82% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml rename to app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml index bf143d5f4b8b5..d0634754eeed8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCatalogSearchAdvancedResultMainSection"> <element name="SearchTitle" type="text" selector=".page-title span"/> <element name="ProductItemInfo" type="button" selector=".product-item-info"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontCatalogSearchMainSection.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchMainSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontCatalogSearchMainSection.xml rename to app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchMainSection.xml index 440cd4fe8da0b..165629f1cea81 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontCatalogSearchMainSection.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchMainSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCatalogSearchMainSection"> <element name="SearchTitle" type="text" selector=".page-title span"/> <element name="ProductItemInfo" type="button" selector=".product-item-info"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontFooterSection.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontFooterSection.xml new file mode 100644 index 0000000000000..dae21aeefc1f9 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontFooterSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontFooterSection"> + <element name="AdvancedSearch" type="button" selector="//footer//ul//li//a[text()='Advanced Search']"/> + </section> +</sections> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml new file mode 100644 index 0000000000000..f33f3db14b6cc --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="AdvanceCatalogSearchSimpleProductByNameTest"> + <annotations> + <features value="CatalogSearch"/> + <group value="CatalogSearch"/> + </annotations> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameActionGroup" stepKey="search"> + <argument name="name" value="$$product.name$$"/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> + <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> + </test> + <test name="AdvanceCatalogSearchSimpleProductBySkuTest"> + <annotations> + <features value="CatalogSearch"/> + <group value="CatalogSearch"/> + </annotations> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByProductSkuActionGroup" stepKey="search"> + <argument name="sku" value="$$product.sku$$"/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> + <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> + </test> + <test name="AdvanceCatalogSearchSimpleProductByDescriptionTest"> + <annotations> + <features value="CatalogSearch"/> + <group value="CatalogSearch"/> + </annotations> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByDescriptionActionGroup" stepKey="search"> + <argument name="description" value="$$product.custom_attributes[description]$$"/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> + <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> + </test> + <test name="AdvanceCatalogSearchSimpleProductByShortDescriptionTest"> + <annotations> + <features value="CatalogSearch"/> + <group value="CatalogSearch"/> + </annotations> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByShortDescriptionActionGroup" stepKey="search"> + <argument name="shortDescription" value="$$product.custom_attributes[short_description]$$"/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> + <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> + </test> + <test name="AdvanceCatalogSearchSimpleProductByPriceTest"> + <annotations> + <features value="CatalogSearch"/> + <group value="CatalogSearch"/> + </annotations> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="search"> + <argument name="name" value="$$arg1.name$$"/> + <argument name="priceFrom" value="$$arg2.price$$"/> + <argument name="priceTo" value="$$arg3.price$$"/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> + <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$arg1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml new file mode 100644 index 0000000000000..b19c00eaf325b --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CGuestUserTest"> + <!-- Step 2: User searches for product --> + <comment userInput="Start of searching products" stepKey="startOfSearchingProducts" after="endOfBrowsingCatalog"/> + <!-- Advanced Search with Product 1 Data --> + <comment userInput="Advanced search" stepKey="commentAdvancedSearch" after="startOfSearchingProducts"/> + <actionGroup ref="StorefrontOpenAdvancedSearchActionGroup" stepKey="searchOpenAdvancedSearchForm" after="commentAdvancedSearch"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <fillField userInput="$$createSimpleProduct1.name$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.ProductName}}" stepKey="searchAdvancedFillProductName" after="searchOpenAdvancedSearchForm"/> + <fillField userInput="$$createSimpleProduct1.sku$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.SKU}}" stepKey="searchAdvancedFillSKU" after="searchAdvancedFillProductName"/> + <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" stepKey="searchAdvancedFillPriceFrom" after="searchAdvancedFillSKU"/> + <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" stepKey="searchAdvancedFillPriceTo" after="searchAdvancedFillPriceFrom"/> + <click selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="searchClickAdvancedSearchSubmitButton" after="searchAdvancedFillPriceTo"/> + <waitForLoadingMaskToDisappear stepKey="waitForSearchProductsloaded" after="searchClickAdvancedSearchSubmitButton"/> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="searchCheckAdvancedSearchResult" after="waitForSearchProductsloaded"/> + <see userInput="1" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productCount}} span" stepKey="searchAdvancedAssertProductCount" after="searchCheckAdvancedSearchResult"/> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertSimpleProduct1" after="searchAdvancedAssertProductCount"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1ImageSrc" after="searchAssertSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1ImageSrc" stepKey="searchAdvancedAssertSimpleProduct1ImageNotDefault" after="searchAdvancedGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="searchClickSimpleProduct1View" after="searchAdvancedAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForSearchSimpleProduct1Viewloaded" after="searchClickSimpleProduct1View"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="searchAssertSimpleProduct1Page" after="waitForSearchSimpleProduct1Viewloaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1PageImageSrc" after="searchAssertSimpleProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1PageImageSrc" stepKey="searchAdvancedAssertSimpleProduct1PageImageNotDefault" after="searchAdvancedGrabSimpleProduct1PageImageSrc"/> + + <!-- Quick Search with common part of product names --> + <comment userInput="Quick search" stepKey="commentQuickSearch" after="searchAdvancedAssertSimpleProduct1PageImageNotDefault"/> + <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchQuickSearchCommonPart" after="commentQuickSearch"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="phrase" value="CONST.apiSimpleProduct"/> + </actionGroup> + <actionGroup ref="StorefrontSelectSearchFilterCategoryActionGroup" stepKey="searchSelectFilterCategoryCommonPart" after="searchQuickSearchCommonPart"> + <argument name="category" value="$$createCategory$$"/> + </actionGroup> + <see userInput="3" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="searchAssertFilterCategoryProductCountCommonPart" after="searchSelectFilterCategoryCommonPart"/> + + <!-- Search simple product 1 --> + <comment userInput="Search simple product 1" stepKey="commentSearchSimpleProduct1" after="searchAssertFilterCategoryProductCountCommonPart"/> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct1" after="commentSearchSimpleProduct1"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct1ImageSrc" after="searchAssertFilterCategorySimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct1ImageSrc" stepKey="searchAssertSimpleProduct1ImageNotDefault" after="searchGrabSimpleProduct1ImageSrc"/> + <!-- Search simple product2 --> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct2" after="searchAssertSimpleProduct1ImageNotDefault"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct2ImageSrc" after="searchAssertFilterCategorySimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct2ImageSrc" stepKey="searchAssertSimpleProduct2ImageNotDefault" after="searchGrabSimpleProduct2ImageSrc"/> + + <!-- Quick Search with non-existent product name --> + <comment userInput="Quick Search with non-existent product name" stepKey="commentQuickSearchWithNonExistentProductName" after="searchAssertSimpleProduct2ImageNotDefault" /> + <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchFillQuickSearchNonExistent" after="commentQuickSearchWithNonExistentProductName"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="phrase" value="CONST.nonexistentProductName"/> + </actionGroup> + <see userInput="Your search returned no results." selector="{{StorefrontCatalogSearchMainSection.message}}" stepKey="searchAssertQuickSearchMessageNonExistent" after="searchFillQuickSearchNonExistent"/> + <comment userInput="End of searching products" stepKey="endOfSearchingProducts" after="searchAssertQuickSearchMessageNonExistent" /> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml new file mode 100644 index 0000000000000..5669a788105fa --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CLoggedInUserTest"> + <!-- Step 2: User searches for product --> + <comment userInput="Start of searching products" stepKey="startOfSearchingProducts" after="endOfBrowsingCatalog"/> + <!-- Advanced Search with Product 1 Data --> + <comment userInput="Advanced search" stepKey="commentAdvancedSearch" after="startOfSearchingProducts"/> + <actionGroup ref="StorefrontOpenAdvancedSearchActionGroup" stepKey="searchOpenAdvancedSearchForm" after="commentAdvancedSearch"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <fillField userInput="$$createSimpleProduct1.name$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.ProductName}}" stepKey="searchAdvancedFillProductName" after="searchOpenAdvancedSearchForm"/> + <fillField userInput="$$createSimpleProduct1.sku$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.SKU}}" stepKey="searchAdvancedFillSKU" after="searchAdvancedFillProductName"/> + <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" stepKey="searchAdvancedFillPriceFrom" after="searchAdvancedFillSKU"/> + <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" stepKey="searchAdvancedFillPriceTo" after="searchAdvancedFillPriceFrom"/> + <click selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="searchClickAdvancedSearchSubmitButton" after="searchAdvancedFillPriceTo"/> + <waitForLoadingMaskToDisappear stepKey="waitForSearchProductsloaded" after="searchClickAdvancedSearchSubmitButton"/> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="searchCheckAdvancedSearchResult" after="waitForSearchProductsloaded"/> + <see userInput="1" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productCount}} span" stepKey="searchAdvancedAssertProductCount" after="searchCheckAdvancedSearchResult"/> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertSimpleProduct1" after="searchAdvancedAssertProductCount"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1ImageSrc" after="searchAssertSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1ImageSrc" stepKey="searchAdvancedAssertSimpleProduct1ImageNotDefault" after="searchAdvancedGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="searchClickSimpleProduct1View" after="searchAdvancedAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForSearchSimpleProduct1Viewloaded" after="searchClickSimpleProduct1View"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="searchAssertSimpleProduct1Page" after="waitForSearchSimpleProduct1Viewloaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1PageImageSrc" after="searchAssertSimpleProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1PageImageSrc" stepKey="searchAdvancedAssertSimpleProduct1PageImageNotDefault" after="searchAdvancedGrabSimpleProduct1PageImageSrc"/> + + <!-- Quick Search with common part of product names --> + <comment userInput="Quick search" stepKey="commentQuickSearch" after="searchAdvancedAssertSimpleProduct1PageImageNotDefault"/> + <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchQuickSearchCommonPart" after="commentQuickSearch"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="phrase" value="CONST.apiSimpleProduct"/> + </actionGroup> + <actionGroup ref="StorefrontSelectSearchFilterCategoryActionGroup" stepKey="searchSelectFilterCategoryCommonPart" after="searchQuickSearchCommonPart"> + <argument name="category" value="$$createCategory$$"/> + </actionGroup> + <see userInput="3" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="searchAssertFilterCategoryProductCountCommonPart" after="searchSelectFilterCategoryCommonPart"/> + + <!-- Search simple product 1 --> + <comment userInput="Search simple product 1" stepKey="commentSearchSimpleProduct1" after="searchAssertFilterCategoryProductCountCommonPart"/> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct1" after="commentSearchSimpleProduct1"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct1ImageSrc" after="searchAssertFilterCategorySimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct1ImageSrc" stepKey="searchAssertSimpleProduct1ImageNotDefault" after="searchGrabSimpleProduct1ImageSrc"/> + <!-- Search simple product2 --> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct2" after="searchAssertSimpleProduct1ImageNotDefault"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct2ImageSrc" after="searchAssertFilterCategorySimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct2ImageSrc" stepKey="searchAssertSimpleProduct2ImageNotDefault" after="searchGrabSimpleProduct2ImageSrc"/> + + <!-- Quick Search with non-existent product name --> + <comment userInput="Quick Search with non-existent product name" stepKey="commentQuickSearchWithNonExistentProductName" after="searchAssertSimpleProduct2ImageNotDefault" /> + <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchFillQuickSearchNonExistent" after="commentQuickSearchWithNonExistentProductName"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="phrase" value="CONST.nonexistentProductName"/> + </actionGroup> + <see userInput="Your search returned no results." selector="{{StorefrontCatalogSearchMainSection.message}}" stepKey="searchAssertQuickSearchMessageNonExistent" after="searchFillQuickSearchNonExistent"/> + <comment userInput="End of searching products" stepKey="endOfSearchingProducts" after="searchAssertQuickSearchMessageNonExistent" /> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/composer.json b/app/code/Magento/CatalogSearch/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7d54620eeac83 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/composer.json @@ -0,0 +1,26 @@ +{ + "name": "magento/functional-test-module-catalog-search", + "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-customer": "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-search": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-theme": "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/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/PreprocessorTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/PreprocessorTest.php index f4c512916465f..01108358da2e0 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/PreprocessorTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Adapter/Mysql/Filter/PreprocessorTest.php @@ -314,6 +314,9 @@ public function testProcessTermFilter($frontendInput, $fieldValue, $isNegation, $this->assertSame($expected, $this->removeWhitespaces($actualResult)); } + /** + * @return array + */ public function testTermFilterDataProvider() { return [ diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/AdvancedTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/AdvancedTest.php index ac3e84a5c8fef..fc5915bb3cdff 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/AdvancedTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/AdvancedTest.php @@ -99,6 +99,9 @@ protected function setUp() ->willReturn($this->store); } + /** + * @return array + */ public function addFiltersDataProvider() { return array_merge( @@ -269,6 +272,10 @@ private function createBackend($table) return $backend; } + /** + * @param string $optionText + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function createSource($optionText = 'optionText') { $source = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute\Source\AbstractSource::class) @@ -281,6 +288,9 @@ private function createSource($optionText = 'optionText') return $source; } + /** + * @return array + */ private function addFiltersPriceDataProvider() { return [ diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Autocomplete/DataProviderTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Autocomplete/DataProviderTest.php index bb8fc848bb2b7..91d1d773172b6 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Autocomplete/DataProviderTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Autocomplete/DataProviderTest.php @@ -123,6 +123,9 @@ public function testGetItems() $this->assertEquals($this->limit, count($result)); } + /** + * @param array $data + */ private function buildCollection(array $data) { $collectionData = []; diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php index f2cacd74fddfb..0c3bd42a1b5eb 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Indexer/FulltextTest.php @@ -119,6 +119,9 @@ function ($store) use ($ids) { $this->model->execute($ids); } + /** + * @param $stores + */ private function setupDataProvider($stores) { $this->dimensionProviderMock->expects($this->once())->method('getIterator')->willReturn( diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Fulltext/CollectionTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Fulltext/CollectionTest.php index c0f1f3fcaa5e6..a3b1d2fd0f2b6 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Fulltext/CollectionTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/ResourceModel/Fulltext/CollectionTest.php @@ -206,6 +206,11 @@ protected function getFilterBuilder() return $filterBuilder; } + /** + * @param MockObject $filterBuilder + * @param array $filters + * @return MockObject + */ protected function addFiltersToFilterBuilder(MockObject $filterBuilder, array $filters) { $i = 1; @@ -222,6 +227,9 @@ protected function addFiltersToFilterBuilder(MockObject $filterBuilder, array $f return $filterBuilder; } + /** + * @return MockObject + */ protected function createFilter() { $filter = $this->getMockBuilder(\Magento\Framework\Api\Filter::class) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/BaseSelectStrategy/StrategyMapperTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/BaseSelectStrategy/StrategyMapperTest.php index 1ff1131e5f002..5fa5b0333c6ba 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/BaseSelectStrategy/StrategyMapperTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/BaseSelectStrategy/StrategyMapperTest.php @@ -91,6 +91,9 @@ public function testBaseSelectFullTextSearchStrategy( ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/CustomAttributeFilterCheckTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/CustomAttributeFilterCheckTest.php index 2022492ed1c86..175407bda677f 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/CustomAttributeFilterCheckTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/CustomAttributeFilterCheckTest.php @@ -78,6 +78,9 @@ public function testIsCustomPositive($attributeFrontEndType) ); } + /** + * @return array + */ public function dataProviderForIsCustomPositive() { return [ diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Indexer/IndexStructureTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Indexer/IndexStructureTest.php index c393f91f21fe1..ee16a22ff9f36 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Indexer/IndexStructureTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Indexer/IndexStructureTest.php @@ -120,6 +120,12 @@ private function createDimensionMock($name, $value) return $dimension; } + /** + * @param $callNumber + * @param $tableName + * @param $isTableExist + * @return mixed + */ private function mockDropTable($callNumber, $tableName, $isTableExist) { $this->connection->expects($this->at($callNumber++)) @@ -135,6 +141,11 @@ private function mockDropTable($callNumber, $tableName, $isTableExist) return $callNumber; } + /** + * @param $callNumber + * @param $tableName + * @return mixed + */ private function mockFulltextTable($callNumber, $tableName) { $table = $this->getMockBuilder(\Magento\Framework\DB\Ddl\Table::class) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/QueryChecker/FullTextSearchCheckTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/QueryChecker/FullTextSearchCheckTest.php index bb6e4ab8b4281..d13dcc11628f2 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/QueryChecker/FullTextSearchCheckTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/QueryChecker/FullTextSearchCheckTest.php @@ -78,6 +78,9 @@ public function testInvalidArgumentException2() $this->fullTextSearchCheck->isRequiredForQuery($filterMock); } + /** + * @return array + */ public function positiveDataProvider() { $boolQueryMock = $this->getBoolQueryMock(); @@ -114,6 +117,9 @@ public function positiveDataProvider() ]; } + /** + * @return array + */ public function negativeDataProvider() { $emptyBoolQueryMock = $this->getBoolQueryMock(); @@ -147,6 +153,9 @@ public function negativeDataProvider() ]; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getMatchQueryMock() { $matchQueryMock = $this->getMockBuilder(\Magento\Framework\Search\Request\QueryInterface::class) @@ -161,6 +170,9 @@ private function getMatchQueryMock() return $matchQueryMock; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getBoolQueryMock() { $boolQueryMock = $this->getMockBuilder(\Magento\Framework\Search\Request\Query\BoolExpression::class) @@ -175,6 +187,9 @@ private function getBoolQueryMock() return $boolQueryMock; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getFilterQueryMock() { $filterQueryMock = $this->getMockBuilder(\Magento\Framework\Search\Request\Query\Filter::class) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/RequestGeneratorTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/RequestGeneratorTest.php index 259c8e5d7f897..b52c9cfd67494 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/RequestGeneratorTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/RequestGeneratorTest.php @@ -239,6 +239,10 @@ private function createAttributeMock($attributeOptions) return $attribute; } + /** + * @param $value + * @return int|void + */ private function countVal(&$value) { return !empty($value) ? count($value) : 0; diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/SelectContainer/SelectContainerBuilderTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/SelectContainer/SelectContainerBuilderTest.php index ef4d8d314825b..374d0390f937c 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/SelectContainer/SelectContainerBuilderTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/SelectContainer/SelectContainerBuilderTest.php @@ -190,6 +190,9 @@ public function testBuildByRequest() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function mockQuery() { return $this->getMockBuilder(QueryInterface::class) @@ -197,6 +200,9 @@ private function mockQuery() ->getMockForAbstractClass(); } + /** + * @return array + */ private function mockFilters() { $visibilityFilter = $this->getMockBuilder(Term::class) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/TableMapperTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/TableMapperTest.php index 1521b38d8c298..cfddc07bceecc 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/TableMapperTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/TableMapperTest.php @@ -275,6 +275,9 @@ function (FilterInterface $filter) { $this->tableMapper->addTables($select, $request); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getSelectMock() { return $this->getMockBuilder(\Magento\Framework\DB\Select::class) @@ -282,6 +285,9 @@ private function getSelectMock() ->getMock(); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getRequestMock() { return $this->getMockBuilder(\Magento\Framework\Search\RequestInterface::class) @@ -289,6 +295,9 @@ private function getRequestMock() ->getMock(); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getQueryMock() { return $this->getMockBuilder(QueryInterface::class) @@ -296,6 +305,9 @@ private function getQueryMock() ->getMockForAbstractClass(); } + /** + * @return array + */ private function getDifferentFiltersMock() { $visibilityFilter = $this->getMockBuilder(Term::class) @@ -316,6 +328,9 @@ private function getDifferentFiltersMock() return [$visibilityFilter, $customFilter, $nonCustomFilter]; } + /** + * @return array + */ private function getSameFiltersMock() { $visibilityFilter1 = $this->getMockBuilder(Term::class) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/LICENSE.txt b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/LICENSE.txt rename to app/code/Magento/CatalogUrlRewrite/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/LICENSE_AFL.txt b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/LICENSE_AFL.txt rename to app/code/Magento/CatalogUrlRewrite/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/README.md b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/README.md new file mode 100644 index 0000000000000..785d0cce48c3e --- /dev/null +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Url Rewrite Functional Tests + +The Functional Test Module for **Magento Catalog Url Rewrite** module. diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/composer.json b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/composer.json new file mode 100644 index 0000000000000..03c48982f5865 --- /dev/null +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/composer.json @@ -0,0 +1,24 @@ +{ + "name": "magento/functional-test-module-catalog-url-rewrite", + "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-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", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev", + "magento/functional-test-module-url-rewrite": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Ui/DataProvider/Product/Form/Modifier/ProductUrlRewriteTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Ui/DataProvider/Product/Form/Modifier/ProductUrlRewriteTest.php index 763f78ac1fea6..40f7642f35383 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Ui/DataProvider/Product/Form/Modifier/ProductUrlRewriteTest.php +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Ui/DataProvider/Product/Form/Modifier/ProductUrlRewriteTest.php @@ -27,6 +27,9 @@ protected function setUp() ->getMockForAbstractClass(); } + /** + * @return \Magento\Ui\DataProvider\Modifier\ModifierInterface|object + */ protected function createModel() { return $this->objectManager->getObject(ProductUrlRewrite::class, [ diff --git a/app/code/Magento/CatalogUrlRewriteGraphQl/Test/Mftf/README.md b/app/code/Magento/CatalogUrlRewriteGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..331e823743b19 --- /dev/null +++ b/app/code/Magento/CatalogUrlRewriteGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Url Rewrite Graph Ql Functional Tests + +The Functional Test Module for **Magento Catalog Url Rewrite Graph Ql** module. diff --git a/app/code/Magento/CatalogUrlRewriteGraphQl/Test/Mftf/composer.json b/app/code/Magento/CatalogUrlRewriteGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..a66ca925561c1 --- /dev/null +++ b/app/code/Magento/CatalogUrlRewriteGraphQl/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-catalog-url-rewrite-graph-ql", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-catalog-url-rewrite": "100.0.0-dev", + "magento/functional-test-module-catalog-graph-ql": "100.0.0-dev", + "magento/functional-test-module-url-rewrite-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CatalogWidget/Block/Product/Widget/Conditions.php b/app/code/Magento/CatalogWidget/Block/Product/Widget/Conditions.php index 04ae7c6a2d750..9f7962301cab4 100644 --- a/app/code/Magento/CatalogWidget/Block/Product/Widget/Conditions.php +++ b/app/code/Magento/CatalogWidget/Block/Product/Widget/Conditions.php @@ -51,7 +51,7 @@ class Conditions extends Template implements RendererInterface /** * @var string */ - protected $_template = 'product/widget/conditions.phtml'; + protected $_template = 'Magento_CatalogWidget::product/widget/conditions.phtml'; /** * @param \Magento\Framework\Data\Form\Element\Factory $elementFactory diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/LICENSE.txt b/app/code/Magento/CatalogWidget/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/LICENSE.txt rename to app/code/Magento/CatalogWidget/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/LICENSE_AFL.txt b/app/code/Magento/CatalogWidget/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/LICENSE_AFL.txt rename to app/code/Magento/CatalogWidget/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CatalogWidget/Test/Mftf/README.md b/app/code/Magento/CatalogWidget/Test/Mftf/README.md new file mode 100644 index 0000000000000..2ba00559524cb --- /dev/null +++ b/app/code/Magento/CatalogWidget/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Catalog Widget Functional Tests + +The Functional Test Module for **Magento Catalog Widget** module. diff --git a/app/code/Magento/CatalogWidget/Test/Mftf/composer.json b/app/code/Magento/CatalogWidget/Test/Mftf/composer.json new file mode 100644 index 0000000000000..9b3437526718a --- /dev/null +++ b/app/code/Magento/CatalogWidget/Test/Mftf/composer.json @@ -0,0 +1,24 @@ +{ + "name": "magento/functional-test-module-catalog-widget", + "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-customer": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-rule": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-widget": "100.0.0-dev", + "magento/functional-test-module-wishlist": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php b/app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php index 3039066ad1388..5de8b9d9632fc 100644 --- a/app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php +++ b/app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php @@ -316,6 +316,9 @@ public function testCreateCollection($pagerEnable, $productsCount, $productsPerP $this->assertSame($collection, $this->productsList->createCollection()); } + /** + * @return array + */ public function createCollectionDataProvider() { return [ diff --git a/app/code/Magento/Checkout/Setup/Patch/Data/PrepareInitialCheckoutConfiguration.php b/app/code/Magento/Checkout/Setup/Patch/Data/PrepareInitialCheckoutConfiguration.php index bc38809d070b2..47a19fb3234fd 100644 --- a/app/code/Magento/Checkout/Setup/Patch/Data/PrepareInitialCheckoutConfiguration.php +++ b/app/code/Magento/Checkout/Setup/Patch/Data/PrepareInitialCheckoutConfiguration.php @@ -817,7 +817,7 @@ public function apply() $connection->commit(); } catch (\Exception $e) { - $connection->rollback(); + $connection->rollBack(); throw $e; } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/CheckoutActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/CheckoutActionGroup.xml rename to app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml index 551ebeb1d0e00..e70bccbfdfe2b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/CheckoutActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!-- Go to checkout from minicart --> <actionGroup name="GoToCheckoutFromMinicartActionGroup"> <wait stepKey="wait" time="10" /> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml rename to app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml index 98b3e439382b7..e7a6e219d28b1 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!-- Guest checkout filling billing section --> <actionGroup name="GuestCheckoutFillNewBillingAddressActionGroup"> <arguments> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/StorefrontMiniCartActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontMiniCartActionGroup.xml similarity index 86% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/StorefrontMiniCartActionGroup.xml rename to app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontMiniCartActionGroup.xml index 9e7c0e082036f..b2402d94723cd 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/StorefrontMiniCartActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontMiniCartActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="clickViewAndEditCartFromMiniCart"> <conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/> <waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml new file mode 100644 index 0000000000000..33b83fe63fdc1 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!-- Add Product to Cart from the category page and check message and product count in Minicart --> + <actionGroup name="StorefrontAddCategoryProductToCartActionGroup"> + <arguments> + <argument name="product"/> + <argument name="productCount"/> + </arguments> + <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" /> + <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart" /> + <!-- @TODO: Use general message selector after MQE-694 is fixed --> + <waitForElement selector="{{StorefrontMessagesSection.messageProductAddedToCart(product.name)}}" time="30" stepKey="assertMessage"/> + <waitForText userInput="{{productCount}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/> + </actionGroup> + + <!-- Add Product to Cart from the category page with specified quantity and check message and product count in Minicart --> + <actionGroup name="StorefrontAddCategoryProductToCartWithQuantityActionGroup"> + <arguments> + <argument name="product"/> + <argument name="quantity" defaultValue="1" type="string"/> + <argument name="checkQuantity" defaultValue="1" type="string"/> + </arguments> + <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" /> + <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart" /> + <!-- @TODO: Use general message selector after MQE-694 is fixed --> + <waitForElement selector="{{StorefrontMessagesSection.messageProductAddedToCart(product.name)}}" time="30" stepKey="assertMessage"/> + <waitForText userInput="{{checkQuantity}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/> + <conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/> + <waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/> + <fillField selector="{{StorefrontMinicartSection.itemQuantity(product.name)}}" userInput="{{quantity}}" stepKey="setProductQtyToFiftyInMiniCart"/> + <click selector="{{StorefrontMinicartSection.itemQuantityUpdate(product.name)}}" stepKey="updateQtyInMiniCart"/> + </actionGroup> + + <!-- Add Product to Cart from the product page and check message and product count in Minicart --> + <actionGroup name="StorefrontAddProductToCartActionGroup"> + <arguments> + <argument name="product"/> + <argument name="productCount" type="string"/> + </arguments> + <click selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="clickAddToCart" /> + <!-- @TODO: Use general message selector after MQE-694 is fixed --> + <waitForElement selector="{{StorefrontMessagesSection.messageProductAddedToCart(product.name)}}" time="30" stepKey="assertMessage"/> + <waitForText userInput="{{productCount}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/> + </actionGroup> + + <!-- Open the Minicart and check Simple Product --> + <actionGroup name="StorefrontOpenMinicartAndCheckSimpleProductActionGroup"> + <arguments> + <argument name="product"/> + </arguments> + <waitForElement selector="{{StorefrontMinicartSection.productLinkByName(product.name)}}" stepKey="waitForMinicartProduct" /> + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart" /> + <see userInput="${{product.price}}.00" selector="{{StorefrontMinicartSection.productPriceByName(product.name)}}" stepKey="assertProductPrice"/> + </actionGroup> + + <!-- Check Simple Product in the Cart --> + <actionGroup name="StorefrontCheckCartSimpleProductActionGroup"> + <arguments> + <argument name="product"/> + <argument name="productQuantity"/> + </arguments> + <seeElement selector="{{CheckoutCartProductSection.ProductLinkByName(product.name)}}" stepKey="assertProductName"/> + <see userInput="${{product.price}}.00" selector="{{CheckoutCartProductSection.ProductPriceByName(product.name)}}" stepKey="assertProductPrice"/> + <seeInField userInput="{{productQuantity}}" selector="{{CheckoutCartProductSection.ProductQuantityByName(product.name)}}" stepKey="assertProductQuantity"/> + </actionGroup> + + <!-- Check the Cart --> + <actionGroup name="StorefrontCheckCartActionGroup"> + <arguments> + <argument name="subtotal"/> + <argument name="shipping"/> + <argument name="shippingMethod"/> + <argument name="total"/> + </arguments> + <seeInCurrentUrl url="{{CheckoutCartPage.url}}" stepKey="assertUrl"/> + <waitForText userInput="${{total}}" selector="{{CheckoutCartSummarySection.total}}" time="30" stepKey="waitForTotal"/> + <see userInput="${{subtotal}}" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertSubtotal"/> + <see userInput="${{shipping}}" selector="{{CheckoutCartSummarySection.shipping}}" stepKey="assertShipping"/> + <see userInput="({{shippingMethod}})" selector="{{CheckoutCartSummarySection.shippingMethod}}" stepKey="assertShippingMethod"/> + <see userInput="${{total}}" selector="{{CheckoutCartSummarySection.total}}" stepKey="assertTotal"/> + </actionGroup> + + <!-- Open the Cart from Minicart--> + <actionGroup name="StorefrontOpenCartFromMinicartActionGroup"> + <waitForElement selector="{{StorefrontMinicartSection.showCart}}" stepKey="waitForShowMinicart" /> + <waitForElement selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForCartLink" /> + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart" /> + <click selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="clickCart" /> + </actionGroup> + + <actionGroup name="changeSummaryQuoteAddress"> + <arguments> + <argument name="taxCode"/> + </arguments> + <conditionalClick stepKey="openShippingDetails" selector="{{CheckoutCartSummarySection.shippingHeading}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false"/> + <selectOption stepKey="selectCountry" selector="{{CheckoutCartSummarySection.country}}" userInput="{{taxCode.country}}"/> + <selectOption stepKey="selectStateProvince" selector="{{CheckoutCartSummarySection.country}}" userInput="{{taxCode.country}}"/> + <fillField stepKey="fillZip" selector="{{CheckoutCartSummarySection.postcode}}" userInput="{{taxCode.zip}}"/> + <waitForPageLoad stepKey="waitForFormUpdate"/> + </actionGroup> +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Checkout/Test/Mftf/Data/ConstData.xml b/app/code/Magento/Checkout/Test/Mftf/Data/ConstData.xml new file mode 100644 index 0000000000000..1703d7255e1f8 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Data/ConstData.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> + <entity name="CONST" type="CONST"> + <data key="successGuestCheckoutOrderNumberMessage">Your order # is:</data> + <data key="successCheckoutOrderNumberMessage">Your order number is:</data> + <data key="successCheckoutEmailYouMessage">We'll email you an order confirmation with details and tracking info.</data> + </entity> +</entities> diff --git a/app/code/Magento/Checkout/Test/Mftf/Data/QuoteData.xml b/app/code/Magento/Checkout/Test/Mftf/Data/QuoteData.xml new file mode 100644 index 0000000000000..51fb264a16a1c --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Data/QuoteData.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> + <entity name="E2EB2CQuote" type="Quote"> + <data key="subtotal">480.00</data> + <data key="shipping">15.00</data> + <data key="total">495.00</data> + <data key="shippingMethod">Flat Rate - Fixed</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/LICENSE.txt b/app/code/Magento/Checkout/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/LICENSE.txt rename to app/code/Magento/Checkout/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/LICENSE_AFL.txt b/app/code/Magento/Checkout/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/LICENSE_AFL.txt rename to app/code/Magento/Checkout/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Checkout/Test/Mftf/Page/CheckoutCartPage.xml b/app/code/Magento/Checkout/Test/Mftf/Page/CheckoutCartPage.xml new file mode 100644 index 0000000000000..dcc652829b3cc --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Page/CheckoutCartPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="CheckoutCartPage" url="/checkout/cart" module="Checkout" area="storefront"> + <section name="CheckoutCartProductSection"/> + <section name="CheckoutCartSummarySection"/> + </page> +</pages> diff --git a/app/code/Magento/Checkout/Test/Mftf/Page/CheckoutPage.xml b/app/code/Magento/Checkout/Test/Mftf/Page/CheckoutPage.xml new file mode 100644 index 0000000000000..aa11d42275a38 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Page/CheckoutPage.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="CheckoutPage" url="/checkout" area="storefront" module="Magento_Checkout"> + <section name="CheckoutShippingSection"/> + <section name="CheckoutShippingMethodsSection"/> + <section name="CheckoutOrderSummarySection"/> + <section name="CheckoutSuccessMainSection"/> + <section name="CheckoutPaymentSection"/> + </page> +</pages> diff --git a/app/code/Magento/Checkout/Test/Mftf/Page/CheckoutSuccessPage.xml b/app/code/Magento/Checkout/Test/Mftf/Page/CheckoutSuccessPage.xml new file mode 100644 index 0000000000000..1c3293267e2ab --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Page/CheckoutSuccessPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="CheckoutSuccessPage" url="/checkout/onepage/success/" area="storefront" module="Magento_Checkout"> + <section name="CheckoutSuccessMainSection"/> + <section name="CheckoutSuccessRegisterSection"/> + </page> +</pages> diff --git a/app/code/Magento/Checkout/Test/Mftf/Page/GuestCheckoutReviewAndPaymentsPage.xml b/app/code/Magento/Checkout/Test/Mftf/Page/GuestCheckoutReviewAndPaymentsPage.xml new file mode 100644 index 0000000000000..cac9c934cd662 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Page/GuestCheckoutReviewAndPaymentsPage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="GuestCheckoutReviewAndPaymentsPage" url="/checkout/#payment" area="storefront" module="Magento_Checkout"> + <section name="CheckoutPaymentSection"/> + </page> +</pages> diff --git a/app/code/Magento/Checkout/Test/Mftf/README.md b/app/code/Magento/Checkout/Test/Mftf/README.md new file mode 100644 index 0000000000000..ec43eb9c6c3ef --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Checkout Functional Tests + +The Functional Test Module for **Magento Checkout** module. diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/AdminDataGridHeaderSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/AdminDataGridHeaderSection.xml new file mode 100644 index 0000000000000..56062f96152c2 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/AdminDataGridHeaderSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminDataGridHeaderSection"> + <element name="attributeCodeFilterInput" type="input" selector=".admin__data-grid-filters input[name='attribute_code']"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutCartProductSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartProductSection.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutCartProductSection.xml rename to app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartProductSection.xml index fa0776c1f60c9..6e2262d58b89d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutCartProductSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartProductSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CheckoutCartProductSection"> <element name="ProductLinkByName" type="button" selector="//main//table[@id='shopping-cart-table']//tbody//tr//strong[contains(@class, 'product-item-name')]//a[contains(text(), '{{var1}}')]" diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml new file mode 100644 index 0000000000000..ce4069a0c916d --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="CheckoutCartSummarySection"> + <element name="subtotal" type="text" selector="//*[@id='cart-totals']//tr[@class='totals sub']//td//span[@class='price']"/> + <element name="shippingMethod" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//th//span[@class='value']"/> + <element name="shipping" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//td//span[@class='price']"/> + <element name="total" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price']"/> + <element name="proceedToCheckout" type="button" selector=".action.primary.checkout span" timeout="30"/> + <element name="discountAmount" type="text" selector="td[data-th='Discount']"/> + <element name="shippingHeading" type="button" selector="#block-shipping-heading"/> + <element name="postcode" type="input" selector="input[name='postcode']"/> + <element name="stateProvince" type="select" selector="select[name='region_id']"/> + <element name="country" type="select" selector="select[name='country_id']"/> + </section> +</sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutHeaderSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutHeaderSection.xml new file mode 100644 index 0000000000000..ca42eff89cf26 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutHeaderSection.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="CheckoutHeaderSection"> + <element name="shippingMethodStep" type="text" selector=".opc-progress-bar-item:nth-of-type(1)"/> + <element name="reviewAndPaymentsStep" type="text" selector=".opc-progress-bar-item:nth-of-type(2)"/> + </section> +</sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutOrderSummarySection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutOrderSummarySection.xml new file mode 100644 index 0000000000000..cb079d2f0361e --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutOrderSummarySection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="CheckoutOrderSummarySection"> + <element name="miniCartTab" type="button" selector=".title[role='tab']"/> + <element name="productItemName" type="text" selector=".product-item-name"/> + <element name="productItemQty" type="text" selector=".value"/> + <element name="productItemPrice" type="text" selector=".price"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutPaymentSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutPaymentSection.xml rename to app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml index 3d1e9f24b8d9a..6d7533be7e9ea 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutPaymentSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml @@ -7,12 +7,12 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CheckoutPaymentSection"> <element name="isPaymentSection" type="text" selector="//*[@class='opc-progress-bar']/li[contains(@class, '_active') and span[contains(.,'Review & Payments')]]"/> <element name="availablePaymentSolutions" type="text" selector="#checkout-payment-method-load>div>div>div:nth-child(2)>div.payment-method-title.field.choice"/> <element name="notAvailablePaymentSolutions" type="text" selector="#checkout-payment-method-load>div>div>div.payment-method._active>div.payment-method-title.field.choice"/> - <element name="billingNewAddressForm" type="text" selector="#billing-new-address-form"/> + <element name="billingNewAddressForm" type="text" selector=".billing-new-address-form"/> <element name="placeOrderDisabled" type="button" selector="#checkout-payment-method-load button.disabled"/> <element name="update" type="button" selector=".payment-method-billing-address .action.action-update"/> <element name="guestFirstName" type="input" selector=".billing-address-form input[name*='firstname']"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingGuestInfoSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingGuestInfoSection.xml similarity index 84% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingGuestInfoSection.xml rename to app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingGuestInfoSection.xml index f2cca89be6c18..ca13af52c1ed5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingGuestInfoSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingGuestInfoSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CheckoutShippingGuestInfoSection"> <element name="email" type="input" selector="#customer-email"/> <element name="firstName" type="input" selector="input[name=firstname]"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingMethodsSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingMethodsSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingMethodsSection.xml rename to app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingMethodsSection.xml index a6e09494b7423..552341a531106 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingMethodsSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingMethodsSection.xml @@ -7,9 +7,9 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CheckoutShippingMethodsSection"> - <element name="next" type="button" selector="button.button.action.continue.primary"/> + <element name="next" type="button" selector="button.button.action.continue.primary" timeout="30"/> <element name="firstShippingMethod" type="radio" selector="//*[@id='checkout-shipping-method-load']//input[@class='radio']"/> <element name="shippingMethodRow" type="text" selector=".form.methods-shipping table tbody tr"/> <element name="checkShippingMethodByName" type="radio" selector="//div[@id='checkout-shipping-method-load']//td[contains(., '{{var1}}')]/..//input" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml similarity index 89% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingSection.xml rename to app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml index 247c9664caf0a..136658cc59106 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CheckoutShippingSection"> <element name="isShippingStep" type="text" selector="//*[@class='opc-progress-bar']/li[contains(@class, '_active') and span[contains(.,'Shipping')]]"/> <element name="shippingTab" type="text" selector="//li[contains(@class,'opc-progress-bar-item')]//*[text()='Shipping']" timeout="30"/> @@ -31,5 +31,6 @@ <element name="next" type="button" selector="button.button.action.continue.primary" timeout="30"/> <element name="firstShippingMethod" type="radio" selector="//*[@id='checkout-shipping-method-load']//input[@class='radio']"/> <element name="defaultShipping" type="button" selector=".billing-address-details"/> + <element name="stateInput" type="input" selector="input[name=region]"/> </section> </sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml new file mode 100644 index 0000000000000..8a55015f9d244 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="CheckoutSuccessMainSection"> + <element name="successTitle" type="text" selector=".page-title"/> + <element name="success" type="text" selector="div.checkout-success"/> + <element name="orderNumber" type="text" selector="div.checkout-success > p:nth-child(1) > span"/> + <element name="orderNumber22" type="text" selector=".order-number>strong"/> + <element name="orderLink" type="text" selector="a[href*=order_id].order-number" timeout="30"/> + <element name="orderNumberText" type="text" selector=".checkout-success > p:nth-child(1)"/> + <element name="continueShoppingButton" type="button" selector=".action.primary.continue" timeout="30"/> + <element name="printLink" type="button" selector=".print" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessRegisterSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessRegisterSection.xml new file mode 100644 index 0000000000000..271ccec450510 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessRegisterSection.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="CheckoutSuccessRegisterSection"> + <element name="registerMessage" type="text" selector="#registration p:nth-child(1)"/> + <element name="customerEmail" type="text" selector="#registration p:nth-child(2)"/> + <element name="createAccountButton" type="button" selector="#registration form input[type='submit']" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StoreFrontRemoveItemModalSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StoreFrontRemoveItemModalSection.xml new file mode 100644 index 0000000000000..4e2a08e94bd9f --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StoreFrontRemoveItemModalSection.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StoreFrontRemoveItemModalSection"> + <element name="message" type="text" selector="aside.confirm div.modal-content"/> + <element name="ok" type="button" selector="aside.confirm .modal-footer .action-primary"/> + <element name="cancel" type="button" selector="aside.confirm .modal-footer .action-secondary"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontCategoryProductSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontCategoryProductSection.xml new file mode 100644 index 0000000000000..0edbb21bc6f5d --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontCategoryProductSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontCategoryProductSection"> + <element name="ProductAddToCartByNumber" type="button" selector="//main//li[{{var1}}]//button[contains(@class, 'tocart')]" parameterized="true"/> + <element name="ProductAddToCartByName" type="button" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//button[contains(@class, 'tocart')]" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMessagesSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMessagesSection.xml new file mode 100644 index 0000000000000..4341d99c3fb30 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMessagesSection.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontMessagesSection"> + <!-- @TODO: Use general message selector after MQE-694 is fixed --> + <element name="messageProductAddedToCart" type="text" + selector="//main//div[contains(@class, 'messages')]//div[contains(@class, 'message')]/div[contains(text(), 'You added {{var1}} to your shopping cart.')]" + parameterized="true" + /> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMiniCartSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMiniCartSection.xml rename to app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml index bdd97130a9715..0da16a34134b8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMiniCartSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontMinicartSection"> <element name="productCount" type="text" selector="//header//div[contains(@class, 'minicart-wrapper')]//a[contains(@class, 'showcart')]//span[@class='counter-number']"/> <element name="viewAndEditCart" type="button" selector="//header//div[contains(@class, 'minicart-wrapper')]//a[contains(@class, 'viewcart')]"/> @@ -23,5 +23,7 @@ <element name="viewAndEditCart" type="button" selector=".action.viewcart" timeout="30"/> <element name="miniCartItemsText" type="text" selector=".minicart-items"/> <element name="deleteMiniCartItem" type="button" selector=".action.delete" timeout="30"/> + <element name="itemQuantity" type="input" selector="//a[text()='{{productName}}']/../..//input[contains(@class,'cart-item-qty')]" parameterized="true"/> + <element name="itemQuantityUpdate" type="button" selector="//a[text()='{{productName}}']/../..//span[text()='Update']" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductCompareMainSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductCompareMainSection.xml new file mode 100644 index 0000000000000..823260be42f2a --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductCompareMainSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductCompareMainSection"> + <element name="ProductAddToCartByName" type="button" selector="//*[@id='product-comparison']//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]]//button[contains(@class, 'tocart')]" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductInfoMainSection.xml new file mode 100644 index 0000000000000..1ff5d2c874459 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductInfoMainSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductInfoMainSection"> + <element name="AddToCart" type="button" selector="#product-addtocart-button"/> + </section> +</sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldShouldNotAcceptJustIntegerValuesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldShouldNotAcceptJustIntegerValuesTest.xml new file mode 100644 index 0000000000000..add1a1b1cf9be --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldShouldNotAcceptJustIntegerValuesTest.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="AddressStateFieldShouldNotAcceptJustIntegerValuesTest"> + <annotations> + <features value="Checkout"/> + <stories value="MAGETWO-91465"/> + <title value="Guest Checkout"/> + <description value="Address State field should not allow just integer values"/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-93203"/> + <group value="checkout"/> + </annotations> + <before> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="ApiSimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + </before> + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + </after> + + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/> + <waitForPageLoad stepKey="waitForPageLoad1"/> + <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/> + <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/> + <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/> + <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$createProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/> + <see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity"/> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMinicart" /> + <selectOption stepKey="selectCounty" selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country_id}}"/> + <waitForPageLoad stepKey="waitFormToReload"/> + <fillField selector="{{CheckoutShippingSection.stateInput}}" userInput="1" stepKey="enterStateAsIntegerValue"/> + <waitForPageLoad stepKey="waitforFormValidation"/> + <see userInput="First character must be letter." stepKey="seeTheErrorMessageDisplayed"/> + <fillField selector="{{CheckoutShippingSection.stateInput}}" userInput=" 1" stepKey="enterStateAsIntegerValue1"/> + <waitForPageLoad stepKey="waitforFormValidation1"/> + <see userInput="First character must be letter." stepKey="seeTheErrorMessageDisplayed1"/> + <fillField selector="{{CheckoutShippingSection.stateInput}}" userInput="ABC1" stepKey="enterStateAsIntegerValue2"/> + <waitForPageLoad stepKey="waitforFormValidation2"/> + <dontSee userInput="First character must be letter." stepKey="seeTheErrorMessageIsNotDisplayed"/> + </test> +</tests> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml new file mode 100644 index 0000000000000..d718222283586 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="CheckCheckoutSuccessPageAsRegisterCustomer"> + <annotations> + <features value="Checkout"/> + <stories value="Success page elements are presented for placed order as Customer"/> + <title value="Customer Checkout"/> + <description value="To be sure that other elements of Success page are shown for placed order as registered Customer."/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-60345"/> + <group value="checkout"/> + </annotations> + + <before> + <createData entity="SimpleTwo" stepKey="createSimpleProduct"/> + <createData entity="Simple_US_Customer" stepKey="createSimpleUsCustomer"> + <field key="group_id">1</field> + </createData> + </before> + + <after> + <!--Logout from customer account--> + <amOnPage url="customer/account/logout/" stepKey="logoutCustomerOne"/> + <waitForPageLoad stepKey="waitLogoutCustomerOne"/> + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createSimpleUsCustomer" stepKey="deleteCustomer"/> + </after> + + <!--Log in to Storefront as Customer--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUpNewUser"> + <argument name="Customer" value="$$createSimpleUsCustomer$$"/> + </actionGroup> + + <!--Go to product page--> + <amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage"/> + <waitForPageLoad stepKey="waitForCatalogPageLoad"/> + + <!--Add Product to Shopping Cart--> + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage"> + <argument name="productName" value="$$createSimpleProduct.name$$"/> + </actionGroup> + + <!--Go to Checkout--> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> + <click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/> + <waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/> + <click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/> + <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoadedTest3"/> + + <!--Click Place Order button--> + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/> + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="seeSuccessTitle"/> + <see selector="{{CheckoutSuccessMainSection.orderNumberText}}" userInput="Your order number is: " stepKey="seeOrderNumber"/> + <see selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessNotify"/> + + <click selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="clickOrderLink"/> + <seeInCurrentUrl url="{{StorefrontCustomerOrderPage.url}}" stepKey="seeMyOrderPage"/> + + <!--Go to product page--> + <amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage2"/> + <waitForPageLoad stepKey="waitForCatalogPageLoad2"/> + + <!--Add Product to Shopping Cart--> + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage2"> + <argument name="productName" value="$$createSimpleProduct.name$$"/> + </actionGroup> + + <!--Go to Checkout--> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart2"/> + <click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod2"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask3"/> + <waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton2"/> + <click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext2"/> + <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoadedTest4"/> + + <!--Click Place Order button--> + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder2"/> + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage2"/> + <click selector="{{CheckoutSuccessMainSection.continueShoppingButton}}" stepKey="clickContinueShoppingButton"/> + <see userInput="Home Page" selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="seeHomePageTitle"/> + <seeCurrentUrlEquals url="{{_ENV.MAGENTO_BASE_URL}}" stepKey="seeHomePageUrl"/> + + <!--Go to product page--> + <amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage3"/> + <waitForPageLoad stepKey="waitForCatalogPageLoad3"/> + + <!--Add Product to Shopping Cart--> + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage3"> + <argument name="productName" value="$$createSimpleProduct.name$$"/> + </actionGroup> + + <!--Go to Checkout--> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart3"/> + <click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod3"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask4"/> + <waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton3"/> + <click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext3"/> + <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoadedTest5"/> + + <!--Click Place Order button--> + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder3"/> + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage3"/> + + <!--Check "Print Receipt" button is presented (desktop only)--> + <seeElement selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="seeVisiblePrint"/> + <resizeWindow width="600" height="800" stepKey="resizeWindow"/> + <waitForElementNotVisible selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="waitInvisiblePrint"/> + <dontSeeElement selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="seeInvisiblePrint"/> + <resizeWindow width="1360" height="1020" stepKey="maximizeWindowKey1"/> + <waitForElementVisible selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="waitVisiblePrint"/> + <seeElement selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="seeVisiblePrint2" /> + + <!--See print page--> + <click selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="clickPrintLink"/> + <switchToWindow stepKey="switchToWindow"/> + <switchToNextTab stepKey="switchToTab"/> + <seeInCurrentUrl url="sales/order/print/order_id" stepKey="seePrintPage"/> + <seeElement selector="{{StorefrontCustomerOrderViewSection.orderTitle}}" stepKey="seeOrderTitleOnPrint"/> + <switchToWindow stepKey="switchToWindow2"/> + </test> + <test name="CheckCheckoutSuccessPageAsGuest"> + <annotations> + <features value="Checkout"/> + <stories value="Success page elements are presented for placed order as Guest"/> + <title value="Customer Checkout"/> + <description value="To be sure that other elements of Success page are presented for placed order as Guest."/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-60346"/> + <group value="checkout"/> + </annotations> + + <before> + <createData entity="SimpleTwo" stepKey="createSimpleProduct"/> + </before> + + <after> + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> + </after> + + <!--Go to product page--> + <amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage"/> + <waitForPageLoad stepKey="waitForCatalogPageLoad"/> + + <!--Add Product to Shopping Cart--> + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage"> + <argument name="productName" value="$$createSimpleProduct.name$$"/> + </actionGroup> + + <!--Go to Checkout--> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> + + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + + <!--Click Place Order button--> + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/> + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/> + + <!--See success messages--> + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="seeSuccessTitle"/> + <see selector="{{CheckoutSuccessMainSection.orderNumberText}}" userInput="Your order # is: " stepKey="seeOrderNumber"/> + + <!--Check register section--> + <see selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessNotify"/> + <see selector="{{CheckoutSuccessRegisterSection.registerMessage}}" userInput="You can track your order status by creating an account." stepKey="seeRegisterMessage"/> + <see selector="{{CheckoutSuccessRegisterSection.customerEmail}}" userInput="Email Address: {{CustomerEntityOne.email}}" stepKey="seeCustomerEmail"/> + <seeElement selector="{{CheckoutSuccessRegisterSection.createAccountButton}}" stepKey="seeVisibleCreateAccountButton"/> + <click selector="{{CheckoutSuccessRegisterSection.createAccountButton}}" stepKey="clickCreateAccountButton"/> + <seeInCurrentUrl url="{{StorefrontCustomerCreatePage.url}}" stepKey="seeCreateAccountPage"/> + <see userInput="Create New Customer Account" selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="seeCreateAccountPageTitle"/> + + <!--Go to product page--> + <amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage2"/> + <waitForPageLoad stepKey="waitForCatalogPageLoad2"/> + + <!--Add Product to Shopping Cart--> + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage2"> + <argument name="productName" value="$$createSimpleProduct.name$$"/> + </actionGroup> + + <!--Go to Checkout--> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart2"/> + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection2"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + + <!--Click Place Order button--> + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder2"/> + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage2"/> + + <!--Continue shopping--> + <click selector="{{CheckoutSuccessMainSection.continueShoppingButton}}" stepKey="clickContinueShoppingButton"/> + <seeCurrentUrlEquals url="{{_ENV.MAGENTO_BASE_URL}}" stepKey="seeHomePageUrl"/> + <see userInput="Home Page" selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="seeHomePageTitle"/> + </test> +</tests> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml new file mode 100644 index 0000000000000..e386698092aa4 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -0,0 +1,207 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CGuestUserTest"> + <!-- Step 3: User adds products to cart --> + <comment userInput="Start of adding products to cart" stepKey="startOfAddingProductsToCart" after="endOfBrowsingCatalog"/> + <!-- Add Simple Product 1 to cart --> + <comment userInput="Add Simple Product 1 to cart" stepKey="commentAddSimpleProduct1ToCart" after="startOfAddingProductsToCart" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory" after="commentAddSimpleProduct1ToCart"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartCategoryloaded" after="cartClickCategory"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="waitForCartCategoryloaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct1" after="cartAssertCategory"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct1ImageSrc" after="cartAssertSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct1ImageSrc" stepKey="cartAssertSimpleProduct1ImageNotDefault" after="cartGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickSimpleProduct1" after="cartAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loaded" after="cartClickSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertProduct1Page" after="waitForCartSimpleProduct1loaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabSimpleProduct1PageImageSrc" after="cartAssertProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabSimpleProduct1PageImageSrc" stepKey="cartAssertSimpleProduct1PageImageNotDefault" after="cartGrabSimpleProduct1PageImageSrc"/> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddProduct1ToCart" after="cartAssertSimpleProduct1PageImageNotDefault"> + <argument name="product" value="$$createSimpleProduct1$$"/> + <argument name="productCount" value="1"/> + </actionGroup> + + <!-- Add Simple Product 2 to cart --> + <comment userInput="Add Simple Product 2 to cart" stepKey="commentAddSimpleProduct2ToCart" after="cartAddProduct1ToCart" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory1" after="commentAddSimpleProduct2ToCart"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartCategory1loaded" after="cartClickCategory1"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="waitForCartCategory1loaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct2" after="cartAssertCategory1ForSimpleProduct2"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct2ImageSrc" after="cartAssertSimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct2ImageSrc" stepKey="cartAssertSimpleProduct2ImageNotDefault" after="cartGrabSimpleProduct2ImageSrc"/> + <actionGroup ref="StorefrontAddCategoryProductToCartActionGroup" stepKey="cartAddProduct2ToCart" after="cartAssertSimpleProduct2ImageNotDefault"> + <argument name="product" value="$$createSimpleProduct2$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productCount" value="CONST.two"/> + </actionGroup> + + <!-- Check products in minicart --> + <!-- Check simple product 1 in minicart --> + <comment userInput="Check simple product 1 in minicart" stepKey="commentCheckSimpleProduct1InMinicart" after="cartAddProduct2ToCart"/> + <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct1" after="commentCheckSimpleProduct1InMinicart"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1ImageSrc" after="cartOpenMinicartAndCheckSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct1ImageSrc" stepKey="cartMinicartAssertSimpleProduct1ImageNotDefault" after="cartMinicartGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartMinicartClickSimpleProduct1" after="cartMinicartAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct1loaded" after="cartMinicartClickSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct1Page" after="waitForMinicartSimpleProduct1loaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1PageImageSrc" after="cartAssertMinicartProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct1PageImageSrc" stepKey="cartMinicartAssertSimpleProduct1PageImageNotDefault" after="cartMinicartGrabSimpleProduct1PageImageSrc"/> + <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct2" after="cartMinicartAssertSimpleProduct1PageImageNotDefault"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- Check simple product2 in minicart --> + <comment userInput="Check simple product 2 in minicart" stepKey="commentCheckSimpleProduct2InMinicart" after="cartOpenMinicartAndCheckSimpleProduct2"/> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2ImageSrc" after="commentCheckSimpleProduct2InMinicart"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct2ImageSrc" stepKey="cartMinicartAssertSimpleProduct2ImageNotDefault" after="cartMinicartGrabSimpleProduct2ImageSrc"/> + <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartMinicartClickSimpleProduct2" after="cartMinicartAssertSimpleProduct2ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct2loaded" after="cartMinicartClickSimpleProduct2"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct2Page" after="waitForMinicartSimpleProduct2loaded"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2PageImageSrc" after="cartAssertMinicartProduct2Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct2PageImageSrc" stepKey="cartMinicartAssertSimpleProduct2PageImageNotDefault" after="cartMinicartGrabSimpleProduct2PageImageSrc"/> + + <!-- Check products in cart --> + <comment userInput="Check cart information" stepKey="commentCheckCartInformation" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart" after="commentCheckCartInformation"/> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCart" after="cartOpenCart"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="subtotal" value="E2EB2CQuote.subtotal"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shipping" value="E2EB2CQuote.shipping"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="total" value="E2EB2CQuote.total"/> + </actionGroup> + + <!-- Check simple product 1 in cart --> + <comment userInput="Check simple product 1 in cart" stepKey="commentCheckSimpleProduct1InCart" after="cartAssertCart"/> + <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct1" after="commentCheckSimpleProduct1InCart"> + <argument name="product" value="$$createSimpleProduct1$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productQuantity" value="CONST.one"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct1ImageSrc" after="cartAssertCartSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct1ImageSrc" stepKey="cartCartAssertSimpleProduct1ImageNotDefault" after="cartCartGrabSimpleProduct1ImageSrc"/> + <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickCartSimpleProduct1" after="cartCartAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loadedAgain" after="cartClickCartSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct1Page" after="waitForCartSimpleProduct1loadedAgain"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc1" after="cartAssertCartProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc1" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault1" after="cartCartGrabSimpleProduct2PageImageSrc1"/> + + <!-- Check simple product 2 in cart --> + <comment userInput="Check simple product 2 in cart" stepKey="commentCheckSimpleProduct2InCart" after="cartCartAssertSimpleProduct2PageImageNotDefault1"/> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart1" after="commentCheckSimpleProduct2InCart"/> + <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct2" after="cartOpenCart1"> + <argument name="product" value="$$createSimpleProduct2$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productQuantity" value="CONST.one"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct2ImageSrc" after="cartAssertCartSimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct2ImageSrc" stepKey="cartCartAssertSimpleProduct2ImageNotDefault" after="cartCartGrabSimpleProduct2ImageSrc"/> + <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartClickCartSimpleProduct2" after="cartCartAssertSimpleProduct2ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct2loaded" after="cartClickCartSimpleProduct2"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct2Page" after="waitForCartSimpleProduct2loaded"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc2" after="cartAssertCartProduct2Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc2" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault2" after="cartCartGrabSimpleProduct2PageImageSrc2"/> + <comment userInput="End of adding products to cart" stepKey="endOfAddingProductsToCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> + + <!-- Step 6: Check out --> + <comment userInput="Start of checking out" stepKey="startOfCheckingOut" after="endOfUsingCouponCode" /> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMinicart" after="startOfCheckingOut"/> + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection" after="guestGoToCheckoutFromMinicart"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + + <!-- Check order summary in checkout --> + <comment userInput="Check order summary in checkout" stepKey="commentCheckOrderSummaryInCheckout" after="guestCheckoutFillingShippingSection" /> + <actionGroup ref="CheckOrderSummaryInCheckoutActionGroup" stepKey="guestCheckoutCheckOrderSummary" after="commentCheckOrderSummaryInCheckout"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="subtotal" value="E2EB2CQuote.subtotal"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingTotal" value="E2EB2CQuote.shipping"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="total" value="E2EB2CQuote.total"/> + </actionGroup> + + <!-- Check ship to information in checkout --> + <comment userInput="Check ship to information in checkout" stepKey="commentCheckShipToInformationInCheckout" after="guestCheckoutCheckOrderSummary" /> + <actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="guestCheckoutCheckShipToInformation" after="commentCheckShipToInformationInCheckout"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + + <!-- Check shipping method in checkout --> + <comment userInput="Check shipping method in checkout" stepKey="commentCheckShippingMethodInCheckout" after="guestCheckoutCheckShipToInformation" /> + <actionGroup ref="CheckShippingMethodInCheckoutActionGroup" stepKey="guestCheckoutCheckShippingMethod" after="commentCheckShippingMethodInCheckout"> + <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod" /> + </actionGroup> + + <!-- Verify Simple Product 1 is in checkout cart items --> + <comment userInput="Verify Simple Product 1 is in checkout cart items" stepKey="commentVerifySimpleProduct1IsInCheckoutCartItems" after="guestCheckoutCheckShippingMethod" /> + <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="guestCheckoutCheckSimpleProduct1InCartItems" after="commentVerifySimpleProduct1IsInCheckoutCartItems"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + + <!-- Verify Simple Product 2 is in checkout cart items --> + <comment userInput="Verify Simple Product 2 is in checkout cart items" stepKey="commentVerifySimpleProduct2IsInCheckoutCartItems" after="guestCheckoutCheckSimpleProduct1InCartItems" /> + <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="guestCheckoutCheckSimpleProduct2InCartItems" after="commentVerifySimpleProduct2IsInCheckoutCartItems"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + + <comment userInput="Place order with check money order payment" stepKey="commentPlaceOrderWithCheckMoneyOrderPayment" after="guestCheckoutCheckSimpleProduct2InCartItems" /> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="guestSelectCheckMoneyOrderPayment" after="commentPlaceOrderWithCheckMoneyOrderPayment"/> + <actionGroup ref="CheckBillingAddressInCheckoutActionGroup" stepKey="guestSeeBillingAddress" after="guestSelectCheckMoneyOrderPayment"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="guestPlaceorder" after="guestSeeBillingAddress"> + <argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage" /> + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> + </actionGroup> + <comment userInput="End of checking out" stepKey="endOfCheckingOut" after="guestPlaceorder" /> + </test> +</tests> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml new file mode 100644 index 0000000000000..6effeec685106 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -0,0 +1,207 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CLoggedInUserTest"> + <!-- Step 3: User adds products to cart --> + <comment userInput="Start of adding products to cart" stepKey="startOfAddingProductsToCart" after="endOfBrowsingCatalog"/> + <!-- Add Simple Product 1 to cart --> + <comment userInput="Add Simple Product 1 to cart" stepKey="commentAddSimpleProduct1ToCart" after="startOfAddingProductsToCart" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory" after="commentAddSimpleProduct1ToCart"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartCategoryloaded" after="cartClickCategory"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="waitForCartCategoryloaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct1" after="cartAssertCategory"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct1ImageSrc" after="cartAssertSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct1ImageSrc" stepKey="cartAssertSimpleProduct1ImageNotDefault" after="cartGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickSimpleProduct1" after="cartAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loaded" after="cartClickSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertProduct1Page" after="waitForCartSimpleProduct1loaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabSimpleProduct1PageImageSrc" after="cartAssertProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabSimpleProduct1PageImageSrc" stepKey="cartAssertSimpleProduct1PageImageNotDefault" after="cartGrabSimpleProduct1PageImageSrc"/> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddProduct1ToCart" after="cartAssertSimpleProduct1PageImageNotDefault"> + <argument name="product" value="$$createSimpleProduct1$$"/> + <argument name="productCount" value="1"/> + </actionGroup> + + <!-- Add Simple Product 2 to cart --> + <comment userInput="Add Simple Product 2 to cart" stepKey="commentAddSimpleProduct2ToCart" after="cartAddProduct1ToCart" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory1" after="commentAddSimpleProduct2ToCart"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartCategory1loaded" after="cartClickCategory1"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="waitForCartCategory1loaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct2" after="cartAssertCategory1ForSimpleProduct2"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct2ImageSrc" after="cartAssertSimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct2ImageSrc" stepKey="cartAssertSimpleProduct2ImageNotDefault" after="cartGrabSimpleProduct2ImageSrc"/> + <actionGroup ref="StorefrontAddCategoryProductToCartActionGroup" stepKey="cartAddProduct2ToCart" after="cartAssertSimpleProduct2ImageNotDefault"> + <argument name="product" value="$$createSimpleProduct2$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productCount" value="CONST.two"/> + </actionGroup> + + <!-- Check products in minicart --> + <!-- Check simple product 1 in minicart --> + <comment userInput="Check simple product 1 in minicart" stepKey="commentCheckSimpleProduct1InMinicart" after="cartAddProduct2ToCart"/> + <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct1" after="commentCheckSimpleProduct1InMinicart"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1ImageSrc" after="cartOpenMinicartAndCheckSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct1ImageSrc" stepKey="cartMinicartAssertSimpleProduct1ImageNotDefault" after="cartMinicartGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartMinicartClickSimpleProduct1" after="cartMinicartAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct1loaded" after="cartMinicartClickSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct1Page" after="waitForMinicartSimpleProduct1loaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1PageImageSrc" after="cartAssertMinicartProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct1PageImageSrc" stepKey="cartMinicartAssertSimpleProduct1PageImageNotDefault" after="cartMinicartGrabSimpleProduct1PageImageSrc"/> + <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct2" after="cartMinicartAssertSimpleProduct1PageImageNotDefault"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- Check simple product2 in minicart --> + <comment userInput="Check simple product 2 in minicart" stepKey="commentCheckSimpleProduct2InMinicart" after="cartOpenMinicartAndCheckSimpleProduct2"/> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2ImageSrc" after="commentCheckSimpleProduct2InMinicart"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct2ImageSrc" stepKey="cartMinicartAssertSimpleProduct2ImageNotDefault" after="cartMinicartGrabSimpleProduct2ImageSrc"/> + <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartMinicartClickSimpleProduct2" after="cartMinicartAssertSimpleProduct2ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct2loaded" after="cartMinicartClickSimpleProduct2"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct2Page" after="waitForMinicartSimpleProduct2loaded"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2PageImageSrc" after="cartAssertMinicartProduct2Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct2PageImageSrc" stepKey="cartMinicartAssertSimpleProduct2PageImageNotDefault" after="cartMinicartGrabSimpleProduct2PageImageSrc"/> + + <!-- Check products in cart --> + <comment userInput="Check cart information" stepKey="commentCheckCartInformation" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart" after="commentCheckCartInformation"/> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCart" after="cartOpenCart"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="subtotal" value="E2EB2CQuote.subtotal"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shipping" value="E2EB2CQuote.shipping"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="total" value="E2EB2CQuote.total"/> + </actionGroup> + + <!-- Check simple product 1 in cart --> + <comment userInput="Check simple product 1 in cart" stepKey="commentCheckSimpleProduct1InCart" after="cartAssertCart"/> + <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct1" after="commentCheckSimpleProduct1InCart"> + <argument name="product" value="$$createSimpleProduct1$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productQuantity" value="CONST.one"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct1ImageSrc" after="cartAssertCartSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct1ImageSrc" stepKey="cartCartAssertSimpleProduct1ImageNotDefault" after="cartCartGrabSimpleProduct1ImageSrc"/> + <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickCartSimpleProduct1" after="cartCartAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loadedAgain" after="cartClickCartSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct1Page" after="waitForCartSimpleProduct1loadedAgain"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc1" after="cartAssertCartProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc1" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault1" after="cartCartGrabSimpleProduct2PageImageSrc1"/> + + <!-- Check simple product 2 in cart --> + <comment userInput="Check simple product 2 in cart" stepKey="commentCheckSimpleProduct2InCart" after="cartCartAssertSimpleProduct2PageImageNotDefault1"/> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart1" after="commentCheckSimpleProduct2InCart"/> + <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct2" after="cartOpenCart1"> + <argument name="product" value="$$createSimpleProduct2$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productQuantity" value="CONST.one"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct2ImageSrc" after="cartAssertCartSimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct2ImageSrc" stepKey="cartCartAssertSimpleProduct2ImageNotDefault" after="cartCartGrabSimpleProduct2ImageSrc"/> + <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartClickCartSimpleProduct2" after="cartCartAssertSimpleProduct2ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct2loaded" after="cartClickCartSimpleProduct2"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct2Page" after="waitForCartSimpleProduct2loaded"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc2" after="cartAssertCartProduct2Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc2" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault2" after="cartCartGrabSimpleProduct2PageImageSrc2"/> + <comment userInput="End of adding products to cart" stepKey="endOfAddingProductsToCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> + + <!-- Step 7: Check out --> + <comment userInput="Start of checking out" stepKey="startOfCheckingOut" after="endOfUsingCouponCode" /> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" after="startOfCheckingOut"/> + <actionGroup ref="LoggedInUserCheckoutFillingShippingSectionActionGroup" stepKey="checkoutFillingShippingSection" after="goToCheckoutFromMinicart"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + + <!-- Check order summary in checkout --> + <comment userInput="Check order summary in checkout" stepKey="commentCheckOrderSummaryInCheckout" after="checkoutFillingShippingSection" /> + <actionGroup ref="CheckOrderSummaryInCheckoutActionGroup" stepKey="checkoutCheckOrderSummary" after="commentCheckOrderSummaryInCheckout"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="subtotal" value="E2EB2CQuote.subtotal"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingTotal" value="E2EB2CQuote.shipping"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="total" value="E2EB2CQuote.total"/> + </actionGroup> + + <!-- Check ship to information in checkout --> + <comment userInput="Check ship to information in checkout" stepKey="commentCheckShipToInformationInCheckout" after="checkoutCheckOrderSummary" /> + <actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="checkoutCheckShipToInformation" after="commentCheckShipToInformationInCheckout"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + + <!-- Check shipping method in checkout --> + <comment userInput="Check shipping method in checkout" stepKey="commentCheckShippingMethodInCheckout" after="checkoutCheckShipToInformation" /> + <actionGroup ref="CheckShippingMethodInCheckoutActionGroup" stepKey="checkoutCheckShippingMethod" after="commentCheckShippingMethodInCheckout"> + <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod" /> + </actionGroup> + + <!-- Verify Simple Product 1 is in checkout cart items --> + <comment userInput="Verify Simple Product 1 is in checkout cart items" stepKey="commentVerifySimpleProduct1IsInCheckoutCartItems" after="checkoutCheckShippingMethod" /> + <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="checkoutCheckSimpleProduct1InCartItems" after="commentVerifySimpleProduct1IsInCheckoutCartItems"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + + <!-- Verify Simple Product 2 is in checkout cart items --> + <comment userInput="Verify Simple Product 2 is in checkout cart items" stepKey="commentVerifySimpleProduct2IsInCheckoutCartItems" after="checkoutCheckSimpleProduct1InCartItems" /> + <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="checkoutCheckSimpleProduct2InCartItems" after="commentVerifySimpleProduct2IsInCheckoutCartItems"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + + <comment userInput="Place order with check money order payment" stepKey="commentPlaceOrderWithCheckMoneyOrderPayment" after="checkoutCheckSimpleProduct2InCartItems" /> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrderPayment" after="commentPlaceOrderWithCheckMoneyOrderPayment"/> + <actionGroup ref="CheckBillingAddressInCheckoutActionGroup" stepKey="seeBillingAddress" after="selectCheckMoneyOrderPayment"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeorder" after="seeBillingAddress"> + <argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage" /> + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> + </actionGroup> + <comment userInput="End of checking out" stepKey="endOfCheckingOut" after="placeorder" /> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml rename to app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml index ac29f8aa0bcc9..efa8b4ca75147 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="NoErrorCartCheckoutForProductsDeletedFromMiniCartTest"> <annotations> <features value="Checkout"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/StorefrontCustomerCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/StorefrontCustomerCheckoutTest.xml rename to app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml index 13d60edbd87b2..c88f6cec4bcdb 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/StorefrontCustomerCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontCustomerCheckoutTest"> <annotations> <features value="Checkout"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/StorefrontGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/StorefrontGuestCheckoutTest.xml rename to app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml index 02ce7ae57cf3e..9d88e42447cb6 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/StorefrontGuestCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontGuestCheckoutTest"> <annotations> <features value="Checkout"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/composer.json b/app/code/Magento/Checkout/Test/Mftf/composer.json new file mode 100644 index 0000000000000..32c1a2c6bcd3f --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/composer.json @@ -0,0 +1,36 @@ +{ + "name": "magento/functional-test-module-checkout", + "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-inventory": "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-directory": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-msrp": "100.0.0-dev", + "magento/functional-test-module-page-cache": "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-sales-rule": "100.0.0-dev", + "magento/functional-test-module-shipping": "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-theme": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-cookie": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Checkout/Test/Unit/Block/Cart/AbstractCartTest.php b/app/code/Magento/Checkout/Test/Unit/Block/Cart/AbstractCartTest.php index aecaf0ec9f039..1a9c5555c91c0 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/Cart/AbstractCartTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/Cart/AbstractCartTest.php @@ -124,6 +124,9 @@ public function testGetTotalsCache($expectedResult, $isVirtual) $this->assertEquals($expectedResult, $model->getTotalsCache()); } + /** + * @return array + */ public function getTotalsCacheDataProvider() { return [ diff --git a/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php b/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php index 2478270e0aec6..417c1e4295ea1 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php @@ -82,6 +82,9 @@ public function testGetLabel($productCount, $label) $this->assertSame($label, (string)$block->getLabel()); } + /** + * @return array + */ public function getLabelDataProvider() { return [[1, 'My Cart (1 item)'], [2, 'My Cart (2 items)'], [0, 'My Cart']]; diff --git a/app/code/Magento/Checkout/Test/Unit/Block/LinkTest.php b/app/code/Magento/Checkout/Test/Unit/Block/LinkTest.php index 24065c1f54eb3..7db5d7ecb19fd 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/LinkTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/LinkTest.php @@ -68,6 +68,9 @@ public function testToHtml($canOnepageCheckout, $isOutputEnabled) $this->assertEquals('', $block->toHtml()); } + /** + * @return array + */ public function toHtmlDataProvider() { return [[false, true], [true, false], [false, false]]; diff --git a/app/code/Magento/Checkout/Test/Unit/Block/Onepage/SuccessTest.php b/app/code/Magento/Checkout/Test/Unit/Block/Onepage/SuccessTest.php index 18281494029b6..36d37d07ef752 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/Onepage/SuccessTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/Onepage/SuccessTest.php @@ -153,6 +153,9 @@ public function testToHtmlOrderVisibleOnFront(array $invisibleStatuses, $expecte $this->assertEquals($expectedResult, $this->block->getIsOrderVisible()); } + /** + * @return array + */ public function invisibleStatusesProvider() { return [ diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Index/IndexTest.php b/app/code/Magento/Checkout/Test/Unit/Controller/Index/IndexTest.php index 04723c5894f8f..b7ff79fc3c200 100644 --- a/app/code/Magento/Checkout/Test/Unit/Controller/Index/IndexTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Controller/Index/IndexTest.php @@ -10,8 +10,8 @@ use Magento\Customer\Model\Session; use Magento\Framework\App\Request\Http; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; -use PHPUnit_Framework_MockObject_Builder_InvocationMocker as InvocationMocker; -use PHPUnit_Framework_MockObject_Matcher_InvokedCount as InvokedCount; +use PHPUnit\Framework\MockObject\Builder\InvocationMocker as InvocationMocker; +use PHPUnit\Framework\MockObject\Matcher\InvokedCount as InvokedCount; use PHPUnit_Framework_MockObject_MockObject as MockObject; use Magento\Checkout\Helper\Data; use Magento\Quote\Model\Quote; diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Stub/OnepageStub.php b/app/code/Magento/Checkout/Test/Unit/Controller/Stub/OnepageStub.php index 26771c1531267..1a8fecd8356bb 100644 --- a/app/code/Magento/Checkout/Test/Unit/Controller/Stub/OnepageStub.php +++ b/app/code/Magento/Checkout/Test/Unit/Controller/Stub/OnepageStub.php @@ -8,6 +8,9 @@ class OnepageStub extends \Magento\Checkout\Controller\Onepage { + /** + * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void + */ public function execute() { // Empty method stub for test diff --git a/app/code/Magento/Checkout/Test/Unit/Model/Cart/CollectQuoteTest.php b/app/code/Magento/Checkout/Test/Unit/Model/Cart/CollectQuoteTest.php new file mode 100644 index 0000000000000..14410578b12e4 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Unit/Model/Cart/CollectQuoteTest.php @@ -0,0 +1,178 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Checkout\Test\Unit\Model\Cart; + +use Magento\Customer\Api\AddressRepositoryInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Api\Data\RegionInterface; +use Magento\Checkout\Model\Cart\CollectQuote; +use Magento\Customer\Model\Session as CustomerSession; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\Data\EstimateAddressInterface; +use Magento\Quote\Api\Data\EstimateAddressInterfaceFactory; +use Magento\Quote\Api\ShippingMethodManagementInterface; +use Magento\Quote\Model\Quote; +use PHPUnit\Framework\TestCase; + +/** + * Class CollectQuoteTest + */ +class CollectQuoteTest extends TestCase +{ + /** + * @var CollectQuote + */ + private $model; + + /** + * @var CustomerSession|\PHPUnit_Framework_MockObject_MockObject + */ + private $customerSessionMock; + + /** + * @var CustomerRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $customerRepositoryMock; + + /** + * @var AddressRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $addressRepositoryMock; + + /** + * @var EstimateAddressInterfaceFactory|\PHPUnit_Framework_MockObject_MockObject + */ + private $estimateAddressFactoryMock; + + /** + * @var EstimateAddressInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $estimateAddressMock; + + /** + * @var ShippingMethodManagementInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $shippingMethodManagerMock; + + /** + * @var CartRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $quoteRepositoryMock; + + /** + * @var Quote|\PHPUnit_Framework_MockObject_MockObject + */ + private $quoteMock; + + /** + * @var CustomerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $customerMock; + + /** + * @var AddressInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $addressMock; + + /** + * Set up + */ + protected function setUp() + { + $this->customerSessionMock = $this->createMock(CustomerSession::class); + $this->customerRepositoryMock = $this->getMockForAbstractClass( + CustomerRepositoryInterface::class, + [], + '', + false, + true, + true, + ['getById'] + ); + $this->addressRepositoryMock = $this->createMock(AddressRepositoryInterface::class); + $this->estimateAddressMock = $this->createMock(EstimateAddressInterface::class); + $this->estimateAddressFactoryMock = + $this->createPartialMock(EstimateAddressInterfaceFactory::class, ['create']); + $this->shippingMethodManagerMock = $this->createMock(ShippingMethodManagementInterface::class); + $this->quoteRepositoryMock = $this->createMock(CartRepositoryInterface::class); + $this->quoteMock = $this->createMock(Quote::class); + $this->customerMock = $this->createMock(CustomerInterface::class); + $this->addressMock = $this->createMock(AddressInterface::class); + + $this->model = new CollectQuote( + $this->customerSessionMock, + $this->customerRepositoryMock, + $this->addressRepositoryMock, + $this->estimateAddressFactoryMock, + $this->shippingMethodManagerMock, + $this->quoteRepositoryMock + ); + } + + /** + * Test collect method + */ + public function testCollect() + { + $customerId = 1; + $defaultAddressId = 999; + $countryId = 'USA'; + $regionId = 'CA'; + $regionMock = $this->createMock(RegionInterface::class); + + $this->customerSessionMock->expects(self::once()) + ->method('isLoggedIn') + ->willReturn(true); + $this->customerSessionMock->expects(self::once()) + ->method('getCustomerId') + ->willReturn($customerId); + $this->customerRepositoryMock->expects(self::once()) + ->method('getById') + ->willReturn($this->customerMock); + $this->customerMock->expects(self::once()) + ->method('getDefaultShipping') + ->willReturn($defaultAddressId); + $this->addressMock->expects(self::once()) + ->method('getCountryId') + ->willReturn($countryId); + $regionMock->expects(self::once()) + ->method('getRegion') + ->willReturn($regionId); + $this->addressMock->expects(self::once()) + ->method('getRegion') + ->willReturn($regionMock); + $this->addressRepositoryMock->expects(self::once()) + ->method('getById') + ->with($defaultAddressId) + ->willReturn($this->addressMock); + $this->estimateAddressFactoryMock->expects(self::once()) + ->method('create') + ->willReturn($this->estimateAddressMock); + $this->quoteRepositoryMock->expects(self::once()) + ->method('save') + ->with($this->quoteMock); + + $this->model->collect($this->quoteMock); + } + + /** + * Test with a not logged in customer + */ + public function testCollectWhenCustomerIsNotLoggedIn() + { + $this->customerSessionMock->expects(self::once()) + ->method('isLoggedIn') + ->willReturn(false); + $this->customerRepositoryMock->expects(self::never()) + ->method('getById'); + + $this->model->collect($this->quoteMock); + } +} diff --git a/app/code/Magento/Checkout/Test/Unit/Model/CartTest.php b/app/code/Magento/Checkout/Test/Unit/Model/CartTest.php index 40de71e28c05e..6bd0bdf258a0a 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/CartTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/CartTest.php @@ -279,6 +279,9 @@ public function testGetSummaryQty($useQty) $this->assertEquals($itemsCount, $this->cart->getSummaryQty()); } + /** + * @return array + */ public function useQtyDataProvider() { return [ diff --git a/app/code/Magento/Checkout/Test/Unit/Model/Session/SuccessValidatorTest.php b/app/code/Magento/Checkout/Test/Unit/Model/Session/SuccessValidatorTest.php index fec1d6d4d003f..ced6faa00fabe 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/Session/SuccessValidatorTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/Session/SuccessValidatorTest.php @@ -90,6 +90,10 @@ public function testIsValidTrue() $this->assertTrue($this->createSuccessValidator($checkoutSession)->isValid($checkoutSession)); } + /** + * @param \PHPUnit_Framework_MockObject_MockObject $checkoutSession + * @return object + */ protected function createSuccessValidator(\PHPUnit_Framework_MockObject_MockObject $checkoutSession) { return $this->objectManagerHelper->getObject( diff --git a/app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php b/app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php index c07413c8611d0..a196b10478c7f 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php @@ -46,6 +46,9 @@ public function testGetResponseData($error, $result) $this->assertEquals($result, $this->sidebar->getResponseData($error)); } + /** + * @return array + */ public function dataProviderGetResponseData() { return [ diff --git a/app/code/Magento/Checkout/Test/Unit/Model/Type/OnepageTest.php b/app/code/Magento/Checkout/Test/Unit/Model/Type/OnepageTest.php index 48b6a535ae9c1..eb6a5623d9df9 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/Type/OnepageTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/Type/OnepageTest.php @@ -271,6 +271,9 @@ public function testInitCheckout($stepData, $isLoggedIn, $isSetStepDataCalled) $this->onepage->initCheckout(); } + /** + * @return array + */ public function initCheckoutDataProvider() { return [ @@ -303,6 +306,9 @@ public function testGetCheckoutMethod($isLoggedIn, $quoteCheckoutMethod, $isAllo $this->assertEquals($expected, $this->onepage->getCheckoutMethod()); } + /** + * @return array + */ public function getCheckoutMethodDataProvider() { return [ diff --git a/app/code/Magento/Checkout/etc/adminhtml/system.xml b/app/code/Magento/Checkout/etc/adminhtml/system.xml index 6947e1162600a..11e3ba5f3ed9a 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/system.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/system.xml @@ -41,6 +41,10 @@ <field id="number_items_to_display_pager" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> <label>Number of Items to Display Pager</label> </field> + <field id="crosssell_enabled" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <label>Show Cross-sell Items in the Shopping Cart</label> + <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + </field> </group> <group id="cart_link" translate="label" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0"> <label>My Cart Link</label> diff --git a/app/code/Magento/Checkout/etc/config.xml b/app/code/Magento/Checkout/etc/config.xml index 3c24c38ecf85b..e1ba4381f2230 100644 --- a/app/code/Magento/Checkout/etc/config.xml +++ b/app/code/Magento/Checkout/etc/config.xml @@ -17,6 +17,7 @@ <delete_quote_after>30</delete_quote_after> <redirect_to_cart>0</redirect_to_cart> <number_items_to_display_pager>20</number_items_to_display_pager> + <crosssell_enabled>1</crosssell_enabled> </cart> <cart_link> <use_qty>1</use_qty> diff --git a/app/code/Magento/Checkout/i18n/en_US.csv b/app/code/Magento/Checkout/i18n/en_US.csv index 8d297c4060abd..a6ea2c13579a7 100644 --- a/app/code/Magento/Checkout/i18n/en_US.csv +++ b/app/code/Magento/Checkout/i18n/en_US.csv @@ -176,4 +176,9 @@ Payment,Payment "Not yet calculated","Not yet calculated" "We received your order!","We received your order!" "Thank you for your purchase!","Thank you for your purchase!" -"optional", "optional" +"Password", "Password" +"Something went wrong while saving the page. Please refresh the page and try again.","Something went wrong while saving the page. Please refresh the page and try again." +"Item in Cart","Item in Cart" +"Items in Cart","Items in Cart" +"Close","Close" +"Show Cross-sell Items in the Shopping Cart","Show Cross-sell Items in the Shopping Cart" diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml index ff4c6dbd35ff2..69d2523d88dfb 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml @@ -186,7 +186,7 @@ </block> <container name="checkout.cart.widget" as="checkout_cart_widget" label="Shopping Cart Items After"/> </container> - <block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" template="Magento_Catalog::product/list/items.phtml" after="-"> + <block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" template="Magento_Catalog::product/list/items.phtml" after="-" ifconfig="checkout/cart/crosssell_enabled"> <arguments> <argument name="type" xsi:type="string">crosssell</argument> </arguments> diff --git a/app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html b/app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html index 1be754934042b..086cca814bec1 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html @@ -9,7 +9,8 @@ <!-- ko template: getTemplate() --><!-- /ko --> <!--/ko--> <form data-bind="attr: {'data-hasrequired': $t('* Required Fields')}"> - <fieldset id="billing-new-address-form" class="fieldset address"> + <fieldset data-bind="attr: { id:'billing-new-address-form-'+index, value:index}" + class="billing-new-address-form fieldset address"> <!-- ko foreach: getRegion('additional-fieldsets') --> <!-- ko template: getTemplate() --><!-- /ko --> <!--/ko--> diff --git a/app/code/Magento/Checkout/view/frontend/web/template/form/element/email.html b/app/code/Magento/Checkout/view/frontend/web/template/form/element/email.html index 0dee6cb0708e6..8d6142e07fcf0 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/form/element/email.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/form/element/email.html @@ -22,7 +22,8 @@ type="email" data-bind=" textInput: email, - hasFocus: emailFocused" + hasFocus: emailFocused, + mageInit: {'mage/trim-input':{}}" name="username" data-validate="{required:true, 'validate-email':true}" id="customer-email" /> @@ -41,7 +42,7 @@ <input class="input-text" data-bind=" attr: { - placeholder: $t('optional'), + placeholder: $t('Password'), }" type="password" name="password" diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/LICENSE.txt b/app/code/Magento/CheckoutAgreements/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/LICENSE.txt rename to app/code/Magento/CheckoutAgreements/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/LICENSE_AFL.txt b/app/code/Magento/CheckoutAgreements/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/LICENSE_AFL.txt rename to app/code/Magento/CheckoutAgreements/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/README.md b/app/code/Magento/CheckoutAgreements/Test/Mftf/README.md new file mode 100644 index 0000000000000..593e89f08b5b5 --- /dev/null +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Checkout Agreements Functional Tests + +The Functional Test Module for **Magento Checkout Agreements** module. diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/composer.json b/app/code/Magento/CheckoutAgreements/Test/Mftf/composer.json new file mode 100644 index 0000000000000..5ba702a5903a5 --- /dev/null +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-checkout-agreements", + "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-quote": "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/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php index 4b7cd239a66f5..9e095fb6cdec4 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php @@ -489,6 +489,9 @@ public function uploadFile($targetPath, $type = null) } $uploader->setAllowRenameFiles(true); $uploader->setFilesDispersion(false); + if (!$uploader->checkMimeType($this->getAllowedMimeTypes($type))) { + throw new \Magento\Framework\Exception\LocalizedException(__('File validation failed.')); + } $result = $uploader->save($targetPath); if (!$result) { @@ -645,11 +648,7 @@ public function getSession() */ public function getAllowedExtensions($type = null) { - if (is_string($type) && array_key_exists("{$type}_allowed", $this->_extensions)) { - $allowed = $this->_extensions["{$type}_allowed"]; - } else { - $allowed = $this->_extensions['allowed']; - } + $allowed = $this->getExtensionsList($type); return array_keys(array_filter($allowed)); } @@ -755,4 +754,34 @@ protected function _getRelativePathToRoot($path) strlen($this->_sanitizePath($this->_cmsWysiwygImages->getStorageRoot())) ); } + + /** + * Prepare mime types config settings. + * + * @param string|null $type Type of storage, e.g. image, media etc. + * @return array Array of allowed file extensions + */ + private function getAllowedMimeTypes($type = null): array + { + $allowed = $this->getExtensionsList($type); + + return array_values(array_filter($allowed)); + } + + /** + * Get list of allowed file extensions with mime type in values. + * + * @param string|null $type + * @return array + */ + private function getExtensionsList($type = null): array + { + if (is_string($type) && array_key_exists("{$type}_allowed", $this->_extensions)) { + $allowed = $this->_extensions["{$type}_allowed"]; + } else { + $allowed = $this->_extensions['allowed']; + } + + return $allowed; + } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/AssertCMSBlockContentActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertCMSBlockContentActionGroup.xml similarity index 86% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/AssertCMSBlockContentActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertCMSBlockContentActionGroup.xml index c45e0036e719a..553d851707b96 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/AssertCMSBlockContentActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertCMSBlockContentActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AssertBlockContent"> <grabValueFrom selector="{{BlockNewPageBasicFieldsSection.blockTitle}}" stepKey="grabTextFromTitle"/> <assertEquals stepKey="assertTitle" message="pass"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/AssertCMSPageContentActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertCMSPageContentActionGroup.xml similarity index 87% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/AssertCMSPageContentActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertCMSPageContentActionGroup.xml index 10a51aadd09b5..f286c9159c6d8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/AssertCMSPageContentActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertCMSPageContentActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AssertCMSPageContent"> <grabValueFrom selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" stepKey="grabTextFromTitle"/> <assertEquals stepKey="assertTitle" message="pass"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/AssignBlockToCMSPageActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssignBlockToCMSPageActionGroup.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/AssignBlockToCMSPageActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/AssignBlockToCMSPageActionGroup.xml index d5efbe4b258ea..3fa72c2d6b561 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/AssignBlockToCMSPageActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssignBlockToCMSPageActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AssignBlockToCMSPage"> <arguments> <argument name="Block" defaultValue=""/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/CMSActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/CMSActionGroup.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/CMSActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/CMSActionGroup.xml index 0639837a50f13..06419356d8e84 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/CMSActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/CMSActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="navigateToCreatedCMSPage"> <arguments> <argument name="CMSPage" defaultValue=""/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/DeleteImageFromStorageActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/DeleteImageFromStorageActionGroup.xml similarity index 89% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/DeleteImageFromStorageActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/DeleteImageFromStorageActionGroup.xml index c4853d9f824c0..cbd239cde80fe 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/DeleteImageFromStorageActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/DeleteImageFromStorageActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="DeleteImageFromStorageActionGroup"> <arguments> <argument name="Image"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/FillOutBlockContentActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/FillOutBlockContentActionGroup.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/FillOutBlockContentActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/FillOutBlockContentActionGroup.xml index c593103f95676..ef7c925c3f8f7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/FillOutBlockContentActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/FillOutBlockContentActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="FillOutBlockContent"> <fillField selector="{{BlockNewPageBasicFieldsSection.blockTitle}}" userInput="{{_defaultBlock.title}}" stepKey="fillFieldTitle1"/> <fillField selector="{{BlockNewPageBasicFieldsSection.identifier}}" userInput="{{_defaultBlock.identifier}}" stepKey="fillFieldIdentifier"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/FillOutCMSPageContentActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/FillOutCMSPageContentActionGroup.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/FillOutCMSPageContentActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/FillOutCMSPageContentActionGroup.xml index bbda1f49f0187..5caeadcea282d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/FillOutCMSPageContentActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/FillOutCMSPageContentActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="FillOutCMSPageContent"> <fillField selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput="{{_duplicatedCMSPage.title}}" stepKey="fillFieldTitle"/> <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPage"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/NavigateToMediaFolderActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/NavigateToMediaFolderActionGroup.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/NavigateToMediaFolderActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/NavigateToMediaFolderActionGroup.xml index 4d5373eea3fb8..031481d90d1bd 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/NavigateToMediaFolderActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/NavigateToMediaFolderActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="NavigateToMediaFolderActionGroup"> <arguments> <argument name="FolderName" type="string"/> diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/RestoreLayoutSettingActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/RestoreLayoutSettingActionGroup.xml new file mode 100644 index 0000000000000..54c4164749152 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/RestoreLayoutSettingActionGroup.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="RestoreLayoutSetting"> + <waitForElementVisible selector="{{DefaultLayoutsSection.pageLayout}}" stepKey="waittForDefaultCMSLayout" after="expandDefaultLayouts" /> + <selectOption selector="{{DefaultLayoutsSection.pageLayout}}" userInput="1 column" stepKey="selectOneColumn" before="clickSaveConfig"/> + </actionGroup> +</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/SearchBlockOnGridPageActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/SearchBlockOnGridPageActionGroup.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/SearchBlockOnGridPageActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/SearchBlockOnGridPageActionGroup.xml index cee15a652d9f2..8656f4e03a21e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/SearchBlockOnGridPageActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/SearchBlockOnGridPageActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="searchBlockOnGridPage"> <arguments> <argument name="Block" defaultValue=""/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/SelectImageFromMediaStorageActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/SelectImageFromMediaStorageActionGroup.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/SelectImageFromMediaStorageActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/SelectImageFromMediaStorageActionGroup.xml index 8f9b7595665f3..8c1d17c8d9bed 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/SelectImageFromMediaStorageActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/SelectImageFromMediaStorageActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="clickBrowseBtnOnUploadPopup"> <click selector="{{MediaGallerySection.Browse}}" stepKey="clickBrowse" /> <waitForPageLoad stepKey="waitForPageLoad1" /> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyTinyMCEActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyTinyMCEActionGroup.xml similarity index 89% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyTinyMCEActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyTinyMCEActionGroup.xml index e3da3da1f2d4d..24900ad33b560 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/VerifyTinyMCEActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyTinyMCEActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="VerifyTinyMCEActionGroup"> <waitForElementVisible selector="{{TinyMCESection.TinyMCE4}}" stepKey="waitForTinyMCE" time="30" /> <seeElement selector="{{TinyMCESection.TinyMCE4}}" stepKey="seeTinyMCE4" /> diff --git a/app/code/Magento/Cms/Test/Mftf/Data/BlockPageData.xml b/app/code/Magento/Cms/Test/Mftf/Data/BlockPageData.xml new file mode 100644 index 0000000000000..9e0db2ada4a2f --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Data/BlockPageData.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="_defaultBlock" type="block"> + <data key="title">Default Block</data> + <data key="identifier" unique="suffix" >block</data> + <data key="content">Here is a block test. Yeah!</data> + <data key="active">true</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Data/CmsPageData.xml b/app/code/Magento/Cms/Test/Mftf/Data/CmsPageData.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Data/CmsPageData.xml rename to app/code/Magento/Cms/Test/Mftf/Data/CmsPageData.xml index 25e55ea756afb..73e2d6256ce61 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Data/CmsPageData.xml +++ b/app/code/Magento/Cms/Test/Mftf/Data/CmsPageData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="_defaultCmsPage" type="cms_page"> <data key="title">Test CMS Page</data> <data key="content_heading">Test Content Heading</data> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/LICENSE.txt b/app/code/Magento/Cms/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/LICENSE.txt rename to app/code/Magento/Cms/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/LICENSE_AFL.txt b/app/code/Magento/Cms/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/LICENSE_AFL.txt rename to app/code/Magento/Cms/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/block-meta.xml b/app/code/Magento/Cms/Test/Mftf/Metadata/block-meta.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/block-meta.xml rename to app/code/Magento/Cms/Test/Mftf/Metadata/block-meta.xml index 2cbae2b71a6ef..d764275f7c44b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/block-meta.xml +++ b/app/code/Magento/Cms/Test/Mftf/Metadata/block-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateBlock" dataType="block" type="create" auth="adminOauth" url="/V1/cmsBlock" method="POST"> <contentType>application/json</contentType> <object key="block" dataType="block"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/cms-meta.xml b/app/code/Magento/Cms/Test/Mftf/Metadata/cms-meta.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/cms-meta.xml rename to app/code/Magento/Cms/Test/Mftf/Metadata/cms-meta.xml index 21ad5bc8d8752..495ca2ee0c2fe 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Metadata/cms-meta.xml +++ b/app/code/Magento/Cms/Test/Mftf/Metadata/cms-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateCMSPage" dataType="cms_page" type="create" auth="adminOauth" url="/V1/cmsPage" method="POST"> <contentType>application/json</contentType> <object key="page" dataType="cms_page"> diff --git a/app/code/Magento/Cms/Test/Mftf/Page/CmsBlocksPage.xml b/app/code/Magento/Cms/Test/Mftf/Page/CmsBlocksPage.xml new file mode 100644 index 0000000000000..790c2feafcad0 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Page/CmsBlocksPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="CmsBlocksPage" url="/cms/block/" area="admin" module="Magento_Cms"> + <section name="BlockPageActionsSection"/> + </page> +</pages> diff --git a/app/code/Magento/Cms/Test/Mftf/Page/CmsNewBlockPage.xml b/app/code/Magento/Cms/Test/Mftf/Page/CmsNewBlockPage.xml new file mode 100644 index 0000000000000..d607c1ccf39af --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Page/CmsNewBlockPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="CmsNewBlock" area="admin" url="/cms/block/new" module="Magento_Cms"> + <section name="CmsNewBlockBlockActionsSection"/> + <section name="CmsNewBlockBlockBasicFieldsSection"/> + </page> +</pages> diff --git a/app/code/Magento/Cms/Test/Mftf/Page/CmsNewPagePage.xml b/app/code/Magento/Cms/Test/Mftf/Page/CmsNewPagePage.xml new file mode 100644 index 0000000000000..b165d6c044c2b --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Page/CmsNewPagePage.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="CmsNewPagePage" url="/cms/page/new" area="admin" module="Magento_Cms"> + <section name="CmsNewPagePageActionsSection"/> + <section name="CmsNewPagePageBasicFieldsSection"/> + <section name="CmsNewPagePageContentSection"/> + <section name="CmsNewPagePageSeoSection"/> + </page> +</pages> diff --git a/app/code/Magento/Cms/Test/Mftf/Page/CmsPagesPage.xml b/app/code/Magento/Cms/Test/Mftf/Page/CmsPagesPage.xml new file mode 100644 index 0000000000000..9dcb3d608d04e --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Page/CmsPagesPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="CmsPagesPage" url="/cms/page" area="admin" module="Magento_Cms"> + <section name="CmsPagesPageActionsSection"/> + </page> +</pages> diff --git a/app/code/Magento/Cms/Test/Mftf/Page/StorefrontHomePage.xml b/app/code/Magento/Cms/Test/Mftf/Page/StorefrontHomePage.xml new file mode 100644 index 0000000000000..289d872aad804 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Page/StorefrontHomePage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontHomePage" url="/" module="Magento_Cms" area="storefront"> + <section name="StorefrontHeaderSection"/> + </page> +</pages> diff --git a/app/code/Magento/Cms/Test/Mftf/README.md b/app/code/Magento/Cms/Test/Mftf/README.md new file mode 100644 index 0000000000000..5e223390c07cd --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Cms Functional Tests + +The Functional Test Module for **Magento Cms** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/BlockPageActionsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/BlockPageActionsSection.xml similarity index 87% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/BlockPageActionsSection.xml rename to app/code/Magento/Cms/Test/Mftf/Section/BlockPageActionsSection.xml index e5609f55daec7..3fb56e0b179dd 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/BlockPageActionsSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/BlockPageActionsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="BlockPageActionsSection"> <element name="addNewBlock" type="button" selector="#add" timeout="30"/> <element name="select" type="button" selector="//div[text()='{{var1}}']//parent::td//following-sibling::td//button[text()='Select']" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewBlockBlockActionsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockActionsSection.xml similarity index 86% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewBlockBlockActionsSection.xml rename to app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockActionsSection.xml index 9918be3846263..65ea1226772cf 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewBlockBlockActionsSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockActionsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CmsNewBlockBlockActionsSection"> <element name="savePage" type="button" selector="#save-button" timeout="30"/> </section> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewBlockBlockBasicFieldsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockBasicFieldsSection.xml similarity index 84% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewBlockBlockBasicFieldsSection.xml rename to app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockBasicFieldsSection.xml index e57abf7f1025e..00b81686f7167 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewBlockBlockBasicFieldsSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockBasicFieldsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CmsNewBlockBlockBasicFieldsSection"> <element name="title" type="input" selector="input[name=title]"/> <element name="identifier" type="input" selector="input[name=identifier]"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageActionsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageActionsSection.xml rename to app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml index 64ee4262a51dd..810c482dffd1a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageActionsSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CmsNewPagePageActionsSection"> <element name="savePage" type="button" selector="#save_and_close" timeout="10"/> <element name="reset" type="button" selector="#reset"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageBasicFieldsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageBasicFieldsSection.xml similarity index 75% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageBasicFieldsSection.xml rename to app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageBasicFieldsSection.xml index cb2b5f0d9c947..468dbecb20e02 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageBasicFieldsSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageBasicFieldsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CmsNewPagePageBasicFieldsSection"> <element name="pageTitle" type="input" selector="input[name=title]"/> <element name="isActive" type="button" selector="//input[@name='is_active' and @value='{{var1}}']" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageContentSection.xml similarity index 87% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml rename to app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageContentSection.xml index fefd047de6148..8015134c90f9c 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageContentSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageContentSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CmsNewPagePageContentSection"> <element name="header" type="button" selector="div[data-index=content]"/> <element name="contentHeading" type="input" selector="input[name=content_heading]"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageSeoSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageSeoSection.xml new file mode 100644 index 0000000000000..0fe9c01d36fcb --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageSeoSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="CmsNewPagePageSeoSection"> + <element name="header" type="button" selector="div[data-index=search_engine_optimisation]" timeout="30"/> + <element name="urlKey" type="input" selector="input[name=identifier]"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsPagesPageActionsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsPagesPageActionsSection.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsPagesPageActionsSection.xml rename to app/code/Magento/Cms/Test/Mftf/Section/CmsPagesPageActionsSection.xml index 7d4b06ff6d947..b27fb84e98a08 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsPagesPageActionsSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsPagesPageActionsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CmsPagesPageActionsSection"> <element name="filterButton" type="input" selector="//button[text()='Filters']"/> <element name="URLKey" type="input" selector="//div[@class='admin__form-field-control']/input[@name='identifier']"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CustomVariableSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CustomVariableSection.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CustomVariableSection.xml rename to app/code/Magento/Cms/Test/Mftf/Section/CustomVariableSection.xml index fed4755356bf1..354c86cfc4b3f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CustomVariableSection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/CustomVariableSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="CustomVariableSection"> <element name="GridCustomVariableCode" type="text" selector=".//*[@id='customVariablesGrid_table']/tbody//tr//td[contains(text(), '{{var1}}')]" parameterized="true"/> <element name="variableCode" type="input" selector="#code"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Section/StorefrontBlockSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontBlockSection.xml new file mode 100644 index 0000000000000..fb4abe30b37af --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontBlockSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontBlockSection"> + <element name="mediaDescription" type="text" selector=".widget.block.block-static-block>p>img"/> + <element name="imageSource" type="text" selector="//img[contains(@src,'{{var1}}')]" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml new file mode 100644 index 0000000000000..d7c0a41464d21 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontCMSPageSection.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontCMSPageSection"> + <element name="mediaDescription" type="text" selector=".column.main>p>img"/> + <element name="imageSource" type="text" selector="//img[contains(@src,'{{var1}}')]" parameterized="true"/> + <element name="mainTitle" type="text" selector="#maincontent .page-title"/> + </section> +</sections> diff --git a/app/code/Magento/Cms/Test/Mftf/Section/StorefrontHeaderSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontHeaderSection.xml new file mode 100644 index 0000000000000..154bf33ac5661 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Section/StorefrontHeaderSection.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontHeaderSection"> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml b/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml rename to app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection.xml index f840840587738..fef9e2d851652 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml +++ b/app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="TinyMCESection"> <element name="checkIfContentTabOpen" type="button" selector="//span[text()='Content']/parent::strong/parent::*[@data-state-collapsible='closed']"/> <element name="CheckIfTabExpand" type="button" selector="//div[@data-state-collapsible='closed']//span[text()='Content']"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGBlockTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGBlockTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGBlockTest.xml index d08e67999a62e..b37c9e97a78fc 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGBlockTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddImageToWYSIWYGBlockTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGCMSTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGCMSTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGCMSTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGCMSTest.xml index 06265ecba60d4..995f52e42b3a6 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGCMSTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGCMSTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddImageToWYSIWYGCMSTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGBlockTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGBlockTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGBlockTest.xml index a57e0a1daafb7..d0d8edc6abc91 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGBlockTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddVariableToWYSIWYGBlockTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGCMSTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGCMSTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGCMSTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGCMSTest.xml index 501eaae76c7ac..a7627b5492d72 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddVariableToWYSIWYGCMSTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGCMSTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddVariableToWYSIWYGCMSTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGBlockTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGBlockTest.xml index 19b7dac734af2..4d93980da9a33 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGBlockTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddWidgetToWYSIWYGBlockTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml index 94a13c282d89a..90caf89c6a0ca 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml index 442fac5fd73f4..89030034dde12 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml index d86bcf36d1b93..5993c7e2b82f3 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml index 7f07bdfde24a3..6d626b3a91734 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml index 2e225bfd55de6..69938147444fe 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml index 3313ad3e639fb..c3797d758d860 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml index 177f5c6d77bc2..1574e6bd3b469 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminCreateCmsBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockTest.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminCreateCmsBlockTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockTest.xml index a5013384c4142..3b80204f5c3d3 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminCreateCmsBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateDuplicatedCmsBlockTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminCreateCmsPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsPageTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminCreateCmsPageTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsPageTest.xml index 717605d74788f..73e38fcdad558 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminCreateCmsPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsPageTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateCmsPageTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml index f45329f64926e..3d45d4baae748 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest"> <annotations> <features value="Cms"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml rename to app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml index 6e02ab67e61d5..2bfdc5f503720 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest"> <annotations> <features value="Cms"/> diff --git a/app/code/Magento/Cms/Test/Mftf/composer.json b/app/code/Magento/Cms/Test/Mftf/composer.json new file mode 100644 index 0000000000000..cdf6572dc1460 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/composer.json @@ -0,0 +1,28 @@ +{ + "name": "magento/functional-test-module-cms", + "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-email": "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-theme": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev", + "magento/functional-test-module-variable": "100.0.0-dev", + "magento/functional-test-module-widget": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-cms-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Widget/ChooserTest.php b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Widget/ChooserTest.php index 97988a5676842..a27110ca96b6d 100644 --- a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Widget/ChooserTest.php +++ b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Widget/ChooserTest.php @@ -233,6 +233,9 @@ public function testPrepareElementHtml($elementValue, $modelBlockId) $this->assertEquals($this->elementMock, $this->this->prepareElementHtml($this->elementMock)); } + /** + * @return array + */ public function prepareElementHtmlDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Page/Widget/ChooserTest.php b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Page/Widget/ChooserTest.php index 174e3a68b7c66..7b91d54ec3aa1 100644 --- a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Page/Widget/ChooserTest.php +++ b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Page/Widget/ChooserTest.php @@ -236,6 +236,9 @@ public function testPrepareElementHtml($elementValue, $cmsPageId) $this->assertEquals($this->elementMock, $this->this->prepareElementHtml($this->elementMock)); } + /** + * @return array + */ public function prepareElementHtmlDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Helper/PageTest.php b/app/code/Magento/Cms/Test/Unit/Helper/PageTest.php index 8b41f0e3ac0d4..c50f33caa6bc2 100644 --- a/app/code/Magento/Cms/Test/Unit/Helper/PageTest.php +++ b/app/code/Magento/Cms/Test/Unit/Helper/PageTest.php @@ -367,6 +367,9 @@ public function testPrepareResultPage( ); } + /** + * @return array + */ public function renderPageExtendedDataProvider() { return [ @@ -467,6 +470,9 @@ public function testGetPageUrl( $this->assertEquals($expectedResult, $this->object->getPageUrl($pageId)); } + /** + * @return array + */ public function getPageUrlDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php b/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php index 0c2c62ac62191..d13b4f47a85e7 100644 --- a/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php +++ b/app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php @@ -396,6 +396,9 @@ public function testGetCurrentPathThrowException() $this->fail('An expected exception has not been raised.'); } + /** + * @return array + */ public function providerGetCurrentPath() { return [ @@ -449,6 +452,9 @@ public function testGetImageHtmlDeclarationRenderingAsTag( $this->assertEquals($expectedHtml, $this->imagesHelper->getImageHtmlDeclaration($fileName, true)); } + /** + * @return array + */ public function providerGetImageHtmlDeclarationRenderingAsTag() { return [ @@ -495,6 +501,9 @@ public function testGetImageHtmlDeclaration($baseUrl, $fileName, $isUsingStaticU $this->assertEquals($expectedHtml, $this->imagesHelper->getImageHtmlDeclaration($fileName)); } + /** + * @return array + */ public function providerGetImageHtmlDeclaration() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php index b9b0d6f772c62..26b5d74ffb961 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php @@ -119,6 +119,9 @@ public function testAfterLoad($item, $storesData) $this->assertEquals($expectedResult[$item->getId()], $item->getStoreId()); } + /** + * @return array + */ public function getItemsDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php index dd31650cb3a3a..6d45e7bf6ab1d 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php @@ -119,6 +119,9 @@ public function testAfterLoad($item, $storesData) $this->assertEquals($expectedResult[$item->getId()], $item->getStoreId()); } + /** + * @return array + */ public function getItemsDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/ConfigTest.php b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/ConfigTest.php index 5ad9cc13b2c7d..b7825ce49c20f 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/ConfigTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/ConfigTest.php @@ -199,6 +199,9 @@ public function testGetConfig($data, $isAuthorizationAllowed, $expectedResults) $this->assertEquals('localhost/pub/static/', $config->getData('baseStaticDefaultUrl')); } + /** + * @return array + */ public function getConfigDataProvider() { return [ diff --git a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php index 25134451d5a56..2dc98bcefb961 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php @@ -107,6 +107,13 @@ class StorageTest extends \PHPUnit\Framework\TestCase */ protected $objectManagerHelper; + private $allowedImageExtensions = [ + 'jpg' => 'image/jpg', + 'jpeg' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/png', + ]; + /** * @return void * @SuppressWarnings(PHPMD.ExcessiveMethodLength) @@ -120,7 +127,7 @@ protected function setUp() $this->directoryMock = $this->createPartialMock( \Magento\Framework\Filesystem\Directory\Write::class, - ['delete', 'getDriver', 'create', 'getRelativePath', 'isExist'] + ['delete', 'getDriver', 'create', 'getRelativePath', 'isExist', 'isFile'] ); $this->directoryMock->expects( $this->any() @@ -176,7 +183,16 @@ protected function setUp() ->disableOriginalConstructor() ->getMock(); $this->sessionMock = $this->getMockBuilder(\Magento\Backend\Model\Session::class) - ->setMethods(['getCurrentPath']) + ->setMethods( + [ + 'getCurrentPath', + 'getName', + 'getSessionId', + 'getCookieLifetime', + 'getCookiePath', + 'getCookieDomain', + ] + ) ->disableOriginalConstructor() ->getMock(); $this->backendUrlMock = $this->createMock(\Magento\Backend\Model\Url::class); @@ -184,6 +200,10 @@ protected function setUp() $this->coreFileStorageMock = $this->getMockBuilder(\Magento\MediaStorage\Helper\File\Storage\Database::class) ->disableOriginalConstructor() ->getMock(); + $allowedExtensions = [ + 'allowed' => $this->allowedImageExtensions, + 'image_allowed' => $this->allowedImageExtensions, + ]; $this->objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); @@ -205,8 +225,9 @@ protected function setUp() 'resizeParameters' => $this->resizeParameters, 'dirs' => [ 'exclude' => [], - 'include' => [] - ] + 'include' => [], + ], + 'extensions' => $allowedExtensions, ] ); } @@ -229,24 +250,22 @@ public function testGetResizeHeight() /** * @covers \Magento\Cms\Model\Wysiwyg\Images\Storage::deleteDirectory + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage Directory /storage/some/another/dir is not under storage root path. */ public function testDeleteDirectoryOverRoot() { - $this->expectException(\Magento\Framework\Exception\LocalizedException::class); - $this->expectExceptionMessage( - sprintf('Directory %s is not under storage root path.', self::INVALID_DIRECTORY_OVER_ROOT) - ); $this->driverMock->expects($this->atLeastOnce())->method('getRealPathSafety')->will($this->returnArgument(0)); $this->imagesStorage->deleteDirectory(self::INVALID_DIRECTORY_OVER_ROOT); } /** * @covers \Magento\Cms\Model\Wysiwyg\Images\Storage::deleteDirectory + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage We can't delete root directory /storage/root/dir right now. */ public function testDeleteRootDirectory() { - $this->expectException(\Magento\Framework\Exception\LocalizedException::class); - $this->expectExceptionMessage(sprintf('We can\'t delete root directory %s right now.', self::STORAGE_ROOT_DIR)); $this->driverMock->expects($this->atLeastOnce())->method('getRealPathSafety')->will($this->returnArgument(0)); $this->imagesStorage->deleteDirectory(self::STORAGE_ROOT_DIR); } @@ -302,8 +321,8 @@ public function testGetDirsCollection($exclude, $include, $fileNames, $expectedR 'resizeParameters' => $this->resizeParameters, 'dirs' => [ 'exclude' => $exclude, - 'include' => $include - ] + 'include' => $include, + ], ] ); @@ -328,11 +347,11 @@ public function dirsCollectionDataProvider() return [ [ 'exclude' => [ - ['name' => 'dress'] + ['name' => 'dress'], ], 'include' => [], 'filenames' => [], - 'expectRemoveKeys' => [] + 'expectRemoveKeys' => [], ], [ 'exclude' => [], @@ -340,36 +359,36 @@ public function dirsCollectionDataProvider() 'filenames' => [ '/dress', ], - 'expectRemoveKeys' => [] + 'expectRemoveKeys' => [], ], [ 'exclude' => [ - ['name' => 'dress'] + ['name' => 'dress'], ], 'include' => [], 'filenames' => [ '/collection', ], - 'expectRemoveKeys' => [] + 'expectRemoveKeys' => [], ], [ 'exclude' => [ ['name' => 'gear', 'regexp' => 1], ['name' => 'home', 'regexp' => 1], ['name' => 'collection'], - ['name' => 'dress'] + ['name' => 'dress'], ], 'include' => [ ['name' => 'home', 'regexp' => 1], - ['name' => 'collection'] + ['name' => 'collection'], ], 'filenames' => [ '/dress', '/collection', - '/gear' + '/gear', ], - 'expectRemoveKeys' => [[0], [2]] - ] + 'expectRemoveKeys' => [[0], [2]], + ], ]; } @@ -411,4 +430,94 @@ protected function generalTestGetDirsCollection($path, $collectionArray = [], $e $this->imagesStorage->getDirsCollection($path); } + + public function testUploadFile() + { + $targetPath = '/target/path'; + $fileName = 'image.gif'; + $realPath = $targetPath . '/' . $fileName; + $thumbnailTargetPath = self::STORAGE_ROOT_DIR . '/.thumbs'; + $thumbnailDestination = $thumbnailTargetPath . '/' . $fileName; + $type = 'image'; + $result = [ + 'result', + 'cookie' => [ + 'name' => 'session_name', + 'value' => '1', + 'lifetime' => '50', + 'path' => 'cookie/path', + 'domain' => 'cookie_domain', + ], + ]; + $uploader = $this->getMockBuilder(\Magento\MediaStorage\Model\File\Uploader::class) + ->disableOriginalConstructor() + ->setMethods( + [ + 'setAllowedExtensions', + 'setAllowRenameFiles', + 'setFilesDispersion', + 'checkMimeType', + 'save', + 'getUploadedFileName', + ] + ) + ->getMock(); + $this->uploaderFactoryMock->expects($this->atLeastOnce())->method('create')->with(['fileId' => 'image']) + ->willReturn($uploader); + $uploader->expects($this->atLeastOnce())->method('setAllowedExtensions') + ->with(array_keys($this->allowedImageExtensions))->willReturnSelf(); + $uploader->expects($this->atLeastOnce())->method('setAllowRenameFiles')->with(true)->willReturnSelf(); + $uploader->expects($this->atLeastOnce())->method('setFilesDispersion')->with(false) + ->willReturnSelf(); + $uploader->expects($this->atLeastOnce())->method('checkMimeType') + ->with(array_values($this->allowedImageExtensions))->willReturnSelf(); + $uploader->expects($this->atLeastOnce())->method('save')->with($targetPath)->willReturn($result); + $uploader->expects($this->atLeastOnce())->method('getUploadedFileName')->willReturn($fileName); + + $this->directoryMock->expects($this->atLeastOnce())->method('getRelativePath')->willReturnMap( + [ + [$realPath, $realPath], + [$thumbnailTargetPath, $thumbnailTargetPath], + [$thumbnailDestination, $thumbnailDestination], + ] + ); + $this->directoryMock->expects($this->atLeastOnce())->method('isFile') + ->willReturnMap( + [ + [$realPath, true], + [$thumbnailDestination, true], + ] + ); + $this->directoryMock->expects($this->atLeastOnce())->method('isExist') + ->willReturnMap( + [ + [$realPath, true], + [$thumbnailTargetPath, true], + ] + ); + + $image = $this->getMockBuilder(\Magento\Catalog\Model\Product\Image::class) + ->disableOriginalConstructor() + ->setMethods(['open', 'keepAspectRatio', 'resize', 'save']) + ->getMock(); + $image->expects($this->atLeastOnce())->method('open')->with($realPath); + $image->expects($this->atLeastOnce())->method('keepAspectRatio')->with(true); + $image->expects($this->atLeastOnce())->method('resize')->with(100, 50); + $image->expects($this->atLeastOnce())->method('save')->with($thumbnailDestination); + + $this->adapterFactoryMock->expects($this->atLeastOnce())->method('create')->willReturn($image); + + $this->sessionMock->expects($this->atLeastOnce())->method('getName') + ->willReturn($result['cookie']['name']); + $this->sessionMock->expects($this->atLeastOnce())->method('getSessionId') + ->willReturn($result['cookie']['value']); + $this->sessionMock->expects($this->atLeastOnce())->method('getCookieLifetime') + ->willReturn($result['cookie']['lifetime']); + $this->sessionMock->expects($this->atLeastOnce())->method('getCookiePath') + ->willReturn($result['cookie']['path']); + $this->sessionMock->expects($this->atLeastOnce())->method('getCookieDomain') + ->willReturn($result['cookie']['domain']); + + $this->assertEquals($result, $this->imagesStorage->uploadFile($targetPath, $type)); + } } diff --git a/app/code/Magento/Cms/Test/Unit/Observer/NoCookiesObserverTest.php b/app/code/Magento/Cms/Test/Unit/Observer/NoCookiesObserverTest.php index 8c09d42ec556e..cbb13c6f254eb 100644 --- a/app/code/Magento/Cms/Test/Unit/Observer/NoCookiesObserverTest.php +++ b/app/code/Magento/Cms/Test/Unit/Observer/NoCookiesObserverTest.php @@ -139,6 +139,9 @@ public function testNoCookies($pageUrl) $this->assertEquals($this->noCookiesObserver, $this->noCookiesObserver->execute($this->observerMock)); } + /** + * @return array + */ public function noCookiesDataProvider() { return [ diff --git a/app/code/Magento/Cms/etc/di.xml b/app/code/Magento/Cms/etc/di.xml index 5b0f5e1413461..978d75c9b1e56 100644 --- a/app/code/Magento/Cms/etc/di.xml +++ b/app/code/Magento/Cms/etc/di.xml @@ -34,24 +34,24 @@ </argument> <argument name="extensions" xsi:type="array"> <item name="allowed" xsi:type="array"> - <item name="jpg" xsi:type="number">1</item> - <item name="jpeg" xsi:type="number">1</item> - <item name="png" xsi:type="number">1</item> - <item name="gif" xsi:type="number">1</item> + <item name="jpg" xsi:type="string">image/jpg</item> + <item name="jpeg" xsi:type="string">image/jpeg</item> + <item name="png" xsi:type="string">image/png</item> + <item name="gif" xsi:type="string">image/gif</item> </item> <item name="image_allowed" xsi:type="array"> - <item name="jpg" xsi:type="number">1</item> - <item name="jpeg" xsi:type="number">1</item> - <item name="png" xsi:type="number">1</item> - <item name="gif" xsi:type="number">1</item> + <item name="jpg" xsi:type="string">image/jpg</item> + <item name="jpeg" xsi:type="string">image/jpeg</item> + <item name="png" xsi:type="string">image/png</item> + <item name="gif" xsi:type="string">image/gif</item> </item> <item name="media_allowed" xsi:type="array"> - <item name="flv" xsi:type="number">1</item> - <item name="swf" xsi:type="number">1</item> - <item name="avi" xsi:type="number">1</item> - <item name="mov" xsi:type="number">1</item> - <item name="rm" xsi:type="number">1</item> - <item name="wmv" xsi:type="number">1</item> + <item name="flv" xsi:type="string">video/x-flv</item> + <item name="swf" xsi:type="string">application/x-shockwave-flash</item> + <item name="avi" xsi:type="string">video/x-msvideo</item> + <item name="mov" xsi:type="string">video/x-sgi-movie</item> + <item name="rm" xsi:type="string">application/vnd.rn-realmedia</item> + <item name="wmv" xsi:type="string">video/x-ms-wmv</item> </item> </argument> <argument name="dirs" xsi:type="array"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/LICENSE.txt b/app/code/Magento/CmsUrlRewrite/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/LICENSE.txt rename to app/code/Magento/CmsUrlRewrite/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/LICENSE_AFL.txt b/app/code/Magento/CmsUrlRewrite/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/LICENSE_AFL.txt rename to app/code/Magento/CmsUrlRewrite/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CmsUrlRewrite/Test/Mftf/README.md b/app/code/Magento/CmsUrlRewrite/Test/Mftf/README.md new file mode 100644 index 0000000000000..4b377286964b1 --- /dev/null +++ b/app/code/Magento/CmsUrlRewrite/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Cms Url Rewrite Functional Tests + +The Functional Test Module for **Magento Cms Url Rewrite** module. diff --git a/app/code/Magento/CmsUrlRewrite/Test/Mftf/composer.json b/app/code/Magento/CmsUrlRewrite/Test/Mftf/composer.json new file mode 100644 index 0000000000000..9bed46134f87e --- /dev/null +++ b/app/code/Magento/CmsUrlRewrite/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-cms-url-rewrite", + "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-cms": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-url-rewrite": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CmsUrlRewriteGraphQl/Test/Mftf/README.md b/app/code/Magento/CmsUrlRewriteGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..284cf1e935466 --- /dev/null +++ b/app/code/Magento/CmsUrlRewriteGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Cms Url Rewrite Graph Ql Functional Tests + +The Functional Test Module for **Magento Cms Url Rewrite Graph Ql** module. diff --git a/app/code/Magento/CmsUrlRewriteGraphQl/Test/Mftf/composer.json b/app/code/Magento/CmsUrlRewriteGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..edd1c6b352623 --- /dev/null +++ b/app/code/Magento/CmsUrlRewriteGraphQl/Test/Mftf/composer.json @@ -0,0 +1,23 @@ +{ + "name": "magento/functional-test-module-cms-url-rewrite-graph-ql", + "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-url-rewrite-graph-ql": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-cms": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-cms-url-rewrite": "100.0.0-dev", + "magento/functional-test-module-catalog-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/ConfigAdminAccountSharingActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigAdminAccountSharingActionGroup.xml similarity index 84% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/ConfigAdminAccountSharingActionGroup.xml rename to app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigAdminAccountSharingActionGroup.xml index efd6574e7f4af..51155423e62bf 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/ConfigAdminAccountSharingActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigAdminAccountSharingActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="ConfigAdminAccountSharingActionGroup"> <amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}/admin/system_config/edit/section/admin/" stepKey="navigateToConfigurationPage" /> <waitForPageLoad stepKey="wait1"/> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigSalesTaxClassActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigSalesTaxClassActionGroup.xml new file mode 100644 index 0000000000000..7bb2441a6a529 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigSalesTaxClassActionGroup.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="SetTaxClassForShipping"> + <amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxPage"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <conditionalClick selector="{{SalesConfigSection.TaxClassesTab}}" dependentSelector="{{SalesConfigSection.CheckIfTaxClassesTabExpand}}" visible="true" stepKey="expandTaxClassesTab"/> + <waitForElementVisible selector="{{SalesConfigSection.ShippingTaxClass}}" stepKey="seeShippingTaxClass"/> + <uncheckOption selector="{{SalesConfigSection.EnableTaxClassForShipping}}" stepKey="uncheckUseSystemValue"/> + <selectOption selector="{{SalesConfigSection.ShippingTaxClass}}" userInput="Taxable Goods" stepKey="setShippingTaxClass"/> + <click selector="{{SalesConfigSection.TaxClassesTab}}" stepKey="collapseTaxClassesTab"/> + <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig" /> + </actionGroup> + <actionGroup name="ResetTaxClassForShipping"> + <amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxConfigPagetoReset"/> + <waitForPageLoad stepKey="waitForPageLoad2"/> + <conditionalClick selector="{{SalesConfigSection.TaxClassesTab}}" dependentSelector="{{SalesConfigSection.CheckIfTaxClassesTabExpand}}" visible="true" stepKey="openTaxClassTab"/> + <waitForElementVisible selector="{{SalesConfigSection.ShippingTaxClass}}" stepKey="seeShippingTaxClass2"/> + <selectOption selector="{{SalesConfigSection.ShippingTaxClass}}" userInput="None" stepKey="resetShippingTaxClass"/> + <checkOption selector="{{SalesConfigSection.EnableTaxClassForShipping}}" stepKey="useSystemValue"/> + <click selector="{{SalesConfigSection.TaxClassesTab}}" stepKey="collapseTaxClassesTab"/> + <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfiguration"/> + </actionGroup> + </actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/ConfigWYSIWYGActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigWYSIWYGActionGroup.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/ConfigWYSIWYGActionGroup.xml rename to app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigWYSIWYGActionGroup.xml index 11d7acc61d75e..52adb0b1f50a5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/ConfigWYSIWYGActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigWYSIWYGActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="EnabledWYSIWYG"> <amOnPage url="admin/admin/system_config/edit/section/cms/" stepKey="navigateToConfigurationPage" /> <waitForPageLoad stepKey="wait1"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/ConfigWebUrlOptionsActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigWebUrlOptionsActionGroup.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/ConfigWebUrlOptionsActionGroup.xml rename to app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigWebUrlOptionsActionGroup.xml index 56c313688fdb6..056b89624a2f5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/ConfigWebUrlOptionsActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigWebUrlOptionsActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="EnableWebUrlOptions"> <amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/> <waitForPageLoad stepKey="waitForPageLoad"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/GeneralConfigurationActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/GeneralConfigurationActionGroup.xml similarity index 78% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/GeneralConfigurationActionGroup.xml rename to app/code/Magento/Config/Test/Mftf/ActionGroup/GeneralConfigurationActionGroup.xml index 9a990e88455f9..c3c0430a3d58c 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/GeneralConfigurationActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/GeneralConfigurationActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="NavigateToDefaultLayoutsSetting"> <amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/> <waitForPageLoad stepKey="waitForPageLoad"/> diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/RestoreLayoutSettingActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/RestoreLayoutSettingActionGroup.xml new file mode 100644 index 0000000000000..670cd236be8be --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/RestoreLayoutSettingActionGroup.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="RestoreLayoutSetting"> + <amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <conditionalClick stepKey="expandDefaultLayouts" selector="{{WebSection.DefaultLayoutsTab}}" dependentSelector="{{WebSection.CheckIfTabExpand}}" visible="true" /> + <click selector="{{ContentManagementSection.Save}}" stepKey="clickSaveConfig" /> + </actionGroup> +</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/SwitcherActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/SwitcherActionGroup.xml similarity index 86% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/SwitcherActionGroup.xml rename to app/code/Magento/Config/Test/Mftf/ActionGroup/SwitcherActionGroup.xml index f127b14931c98..172ace8b18c11 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/SwitcherActionGroup.xml +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/SwitcherActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="SwitchToVersion4ActionGroup"> <amOnPage url="{{ConfigurationStoresPage.url}}" stepKey="navigateToWYSIWYGConfigPage1"/> <waitForPageLoad stepKey="waitForConfigPageToLoad"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/LICENSE.txt b/app/code/Magento/Config/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/LICENSE.txt rename to app/code/Magento/Config/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/LICENSE_AFL.txt b/app/code/Magento/Config/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/LICENSE_AFL.txt rename to app/code/Magento/Config/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Config/Test/Mftf/Page/AdminConfigPage.xml b/app/code/Magento/Config/Test/Mftf/Page/AdminConfigPage.xml new file mode 100644 index 0000000000000..c24e578c9109c --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/Page/AdminConfigPage.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminConfigPage" url="admin/system_config/" area="admin" module="Magento_Config"> + <section name="AdminConfigSection"/> + </page> + <page name="AdminContentManagementPage" url="admin/system_config/edit/section/cms/" area="admin" module="Magento_Config"> + <section name="ContentManagementSection"/> + </page> + <page name="AdminSalesTaxClassPage" url="admin/system_config/edit/section/tax/" area="admin" module="Magento_Config"> + <section name="SalesTaxClassSection"/> + </page> +</pages> diff --git a/app/code/Magento/Config/Test/Mftf/README.md b/app/code/Magento/Config/Test/Mftf/README.md new file mode 100644 index 0000000000000..060168a5fa643 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Config Functional Tests + +The Functional Test Module for **Magento Config** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/AdminConfigSection.xml b/app/code/Magento/Config/Test/Mftf/Section/AdminConfigSection.xml similarity index 90% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/AdminConfigSection.xml rename to app/code/Magento/Config/Test/Mftf/Section/AdminConfigSection.xml index eb5428bb6e7db..a1b8c2f62f7da 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/AdminConfigSection.xml +++ b/app/code/Magento/Config/Test/Mftf/Section/AdminConfigSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminConfigSection"> <element name="advancedReportingMenuItem" type="text" selector="//a[contains(concat(' ',normalize-space(@class),' '),'item-nav')]/span[text()='Advanced Reporting']"/> <element name="advancedReportingService" type="select" selector="#analytics_general_enabled"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/AdminSection.xml b/app/code/Magento/Config/Test/Mftf/Section/AdminSection.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/AdminSection.xml rename to app/code/Magento/Config/Test/Mftf/Section/AdminSection.xml index 294f08326f63b..8278c6366b68a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/AdminSection.xml +++ b/app/code/Magento/Config/Test/Mftf/Section/AdminSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminSection"> <element name="CheckIfTabExpand" type="button" selector="#admin_security-head:not(.open)"/> <element name="SecurityTab" type="button" selector="#admin_security-head"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/GeneralSection.xml b/app/code/Magento/Config/Test/Mftf/Section/GeneralSection.xml similarity index 90% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/GeneralSection.xml rename to app/code/Magento/Config/Test/Mftf/Section/GeneralSection.xml index b51cfc1d316e5..b1454ff07ee9e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/GeneralSection.xml +++ b/app/code/Magento/Config/Test/Mftf/Section/GeneralSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="ContentManagementSection"> <element name="WYSIWYGOptions" type="button" selector="#cms_wysiwyg-head"/> <element name="CheckIfTabExpand" type="button" selector="#cms_wysiwyg-head:not(.open)"/> diff --git a/app/code/Magento/Config/Test/Mftf/Section/SalesConfigSection.xml b/app/code/Magento/Config/Test/Mftf/Section/SalesConfigSection.xml new file mode 100644 index 0000000000000..f1520f5813e6d --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/Section/SalesConfigSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="SalesConfigSection"> + <element name="TaxClassesTab" type="button" selector="#tax_classes-head"/> + <element name="CheckIfTaxClassesTabExpand" type="button" selector="#tax_classes-head:not(.open)"/> + <element name="ShippingTaxClass" type="select" selector="#tax_classes_shipping_tax_class"/> + <element name="EnableTaxClassForShipping" type="checkbox" selector="#tax_classes_shipping_tax_class_inherit"/> + </section> +</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/StoreConfigSection.xml b/app/code/Magento/Config/Test/Mftf/Section/StoreConfigSection.xml similarity index 76% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/StoreConfigSection.xml rename to app/code/Magento/Config/Test/Mftf/Section/StoreConfigSection.xml index 6580d41c06d49..0ff3f3ca55d22 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Section/StoreConfigSection.xml +++ b/app/code/Magento/Config/Test/Mftf/Section/StoreConfigSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StoreConfigSection"> <element name="CheckIfTabExpand" type="button" selector="#general_store_information-head:not(.open)"/> <element name="StoreInformation" type="button" selector="#general_store_information-head"/> diff --git a/app/code/Magento/Config/Test/Mftf/composer.json b/app/code/Magento/Config/Test/Mftf/composer.json new file mode 100644 index 0000000000000..0dacef66e5dce --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/composer.json @@ -0,0 +1,23 @@ +{ + "name": "magento/functional-test-module-config", + "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-deploy": "100.0.0-dev", + "magento/functional-test-module-directory": "100.0.0-dev", + "magento/functional-test-module-email": "100.0.0-dev", + "magento/functional-test-module-media-storage": "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/Config/Test/Unit/Block/System/Config/DwstreeTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/DwstreeTest.php index d3750022d93de..1cb393b212199 100644 --- a/app/code/Magento/Config/Test/Unit/Block/System/Config/DwstreeTest.php +++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/DwstreeTest.php @@ -121,6 +121,9 @@ public function testInitTabs($section, $website, $store) ); } + /** + * @return array + */ public function initTabsDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php index be3b8e2ead0c1..f5c65e848b3bf 100644 --- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php +++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php @@ -85,6 +85,9 @@ public function testGetHtmlWhenValueIsEmpty($value) $this->assertNotEmpty($this->_object->getHtml()); } + /** + * @return array + */ public function getHtmlWhenValueIsEmptyDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php index 9d76363213d0b..bb109bcb25f06 100644 --- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php +++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php @@ -224,6 +224,9 @@ public function testRender($expanded, $nested, $extra) } } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php index 804965e41b148..93650dd62657c 100644 --- a/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php +++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/FormTest.php @@ -227,6 +227,9 @@ public function testInitForm($sectionIsVisible) $this->assertEquals($this->_formMock, $object->getForm()); } + /** + * @return array + */ public function initFormDataProvider() { return [ @@ -340,6 +343,9 @@ public function testInitGroup($shouldCloneFields, $prefixes, $callNum) $object->initForm(); } + /** + * @return array + */ public function initGroupDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Console/Command/ConfigShow/ValueProcessorTest.php b/app/code/Magento/Config/Test/Unit/Console/Command/ConfigShow/ValueProcessorTest.php index cf758553e876d..07dcc65493a85 100644 --- a/app/code/Magento/Config/Test/Unit/Console/Command/ConfigShow/ValueProcessorTest.php +++ b/app/code/Magento/Config/Test/Unit/Console/Command/ConfigShow/ValueProcessorTest.php @@ -73,15 +73,15 @@ protected function setUp() /** * @param bool $hasBackendModel - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsGetBackendModel - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsCreate - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsGetValue - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetPath - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetScope - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetScopeId - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetValue - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsAfterLoad - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSerialize + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsGetBackendModel + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsCreate + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsGetValue + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetPath + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetScope + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetScopeId + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetValue + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsAfterLoad + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSerialize * @param string $expectsValue * @param string $className * @param string $value diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/AddressTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/AddressTest.php index bacbda537fb1d..e6b774db041c3 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/AddressTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/AddressTest.php @@ -40,6 +40,9 @@ public function testBeforeSave($value, $expectedValue) $this->assertEquals($expectedValue, $this->model->getValue()); } + /** + * @return array + */ public function beforeSaveDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/SenderTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/SenderTest.php index 8e559ff8284ed..e38c247c3861a 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/SenderTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/Email/SenderTest.php @@ -41,6 +41,9 @@ public function testBeforeSave($value, $expectedValue) $this->assertEquals($expectedValue, $this->model->getValue()); } + /** + * @return array + */ public function beforeSaveDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/SerializedTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/SerializedTest.php index 493fdf9505c4c..bb1e0e0225901 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Backend/SerializedTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Backend/SerializedTest.php @@ -52,6 +52,9 @@ public function testAfterLoad($expected, $value, $numCalls, $unserializedValue = $this->assertEquals($expected, $this->serializedConfig->getValue()); } + /** + * @return array + */ public function afterLoadDataProvider() { return [ @@ -87,6 +90,9 @@ public function testBeforeSave($expected, $value, $numCalls, $serializedValue = $this->assertEquals($expected, $this->serializedConfig->getValue()); } + /** + * @return array + */ public function beforeSaveDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php index 51432366bb441..e602e0407feff 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php @@ -141,6 +141,9 @@ public function testIsVisibleReturnsTrueForProperScopes($settings, $scope) $this->assertTrue($this->_model->isVisible()); } + /** + * @return array + */ public function isVisibleReturnsTrueForProperScopesDataProvider() { return [ @@ -170,6 +173,9 @@ public function testIsVisibleReturnsFalseForNonProperScopes($settings, $scope) $this->assertFalse($this->_model->isVisible()); } + /** + * @return array + */ public function isVisibleReturnsFalseForNonProperScopesDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/FieldTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/FieldTest.php index 30c567fb490e6..750a829eef7ec 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/FieldTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/FieldTest.php @@ -88,6 +88,9 @@ public function testIsNegative($data, $isNegative) $this->assertEquals($isNegative, $this->_getFieldObject($data, $isNegative)->isNegative()); } + /** + * @return array + */ public function dataProvider() { return [ @@ -110,6 +113,9 @@ public function testIsValueSatisfy($data, $isNegative, $value, $expected) $this->assertEquals($expected, $this->_getFieldObject($data, $isNegative)->isValueSatisfy($value)); } + /** + * @return array + */ public function isValueSatisfyDataProvider() { return [ @@ -135,6 +141,9 @@ public function testGetValues($data, $isNegative, $expected) $this->assertEquals($expected, $this->_getFieldObject($data, $isNegative)->getValues()); } + /** + * @return array + */ public function getValuesDataProvider() { $complexDataValues = [self::COMPLEX_VALUE1, self::COMPLEX_VALUE2, self::COMPLEX_VALUE3]; diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/MapperTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/MapperTest.php index 2f081ea4285b9..c6cd03cf8f35b 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/MapperTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/MapperTest.php @@ -150,6 +150,9 @@ public function testGetDependenciesWhenDependentIsInvisible($isValueSatisfy) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function getDependenciesDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/IteratorTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/IteratorTest.php index 1a0f3d03b060c..dcb7a90e55290 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/IteratorTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/IteratorTest.php @@ -68,6 +68,9 @@ public function testIsLast($elementId, $result) $this->assertEquals($result, $this->_model->isLast($elementMock)); } + /** + * @return array + */ public function isLastDataProvider() { return [[1, false], [2, false], [3, true]]; diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/ElementVisibilityCompositeTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/ElementVisibilityCompositeTest.php index b779c29c93155..d2a89a8abc7fa 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/ElementVisibilityCompositeTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/ElementVisibilityCompositeTest.php @@ -51,9 +51,9 @@ public function testException() } /** - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $firstExpects + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $firstExpects * @param bool $firstResult - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $secondExpects + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $secondExpects * @param bool $secondResult * @param bool $expectedResult * @dataProvider visibilityDataProvider @@ -74,9 +74,9 @@ public function testDisabled($firstExpects, $firstResult, $secondExpects, $secon } /** - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $firstExpects + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $firstExpects * @param bool $firstResult - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $secondExpects + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $secondExpects * @param bool $secondResult * @param bool $expectedResult * @dataProvider visibilityDataProvider diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/ExtendsTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/ExtendsTest.php index df20db4a1d92a..dde19c801f4de 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/ExtendsTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/ExtendsTest.php @@ -42,6 +42,9 @@ public function testMapWithBadPath() $this->_sut->map($sourceData); } + /** + * @return array + */ public function mapDataProvider() { return [ @@ -53,6 +56,9 @@ public function mapDataProvider() ]; } + /** + * @return array + */ protected function _emptySectionsNodeData() { $data = ['config' => ['system' => ['sections' => 'some_non_array']]]; @@ -60,6 +66,9 @@ protected function _emptySectionsNodeData() return [$data, $data]; } + /** + * @return array + */ protected function _extendFromASiblingData() { $source = $result = [ @@ -79,6 +88,9 @@ protected function _extendFromASiblingData() return [$source, $result]; } + /** + * @return array + */ protected function _extendFromNodeOnHigherLevelData() { $source = $result = [ @@ -112,6 +124,9 @@ protected function _extendFromNodeOnHigherLevelData() return [$source, $result]; } + /** + * @return array + */ protected function _extendWithMerge() { $source = $result = [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/Helper/RelativePathConverterTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/Helper/RelativePathConverterTest.php index 058f9a380a27d..dd95574ffa62d 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/Helper/RelativePathConverterTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Structure/Mapper/Helper/RelativePathConverterTest.php @@ -52,11 +52,17 @@ public function testConvert($nodePath, $relativePath, $result) $this->assertEquals($result, $this->_sut->convert($nodePath, $relativePath)); } + /** + * @return array + */ public function convertWithInvalidArgumentsDataProvider() { return [['', ''], ['some/node', ''], ['', 'some/node']]; } + /** + * @return array + */ public function convertDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php index e67ea6ec0fba1..6c059f4b69b70 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php @@ -221,6 +221,9 @@ private function getElementReturnsEmptyElementIfNotExistingElementIsRequested( return $elementMock; } + /** + * @return array + */ public function emptyElementDataProvider() { return [ @@ -389,6 +392,9 @@ public function testGetFieldPathsByAttribute($attributeName, $attributeValue, $p $this->assertEquals($paths, $this->_model->getFieldPathsByAttribute($attributeName, $attributeValue)); } + /** + * @return array + */ public function getFieldPathsByAttributeDataProvider() { return [ diff --git a/app/code/Magento/Config/Test/Unit/Model/Placeholder/EnvironmentTest.php b/app/code/Magento/Config/Test/Unit/Model/Placeholder/EnvironmentTest.php index 8217ff09c0541..e4c01e794fb0f 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Placeholder/EnvironmentTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Placeholder/EnvironmentTest.php @@ -52,6 +52,9 @@ public function testGenerate($path, $scope, $scopeId, $expected) ); } + /** + * @return array + */ public function getGenerateDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/LICENSE.txt b/app/code/Magento/ConfigurableImportExport/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/LICENSE.txt rename to app/code/Magento/ConfigurableImportExport/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/LICENSE_AFL.txt b/app/code/Magento/ConfigurableImportExport/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/LICENSE_AFL.txt rename to app/code/Magento/ConfigurableImportExport/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/ConfigurableImportExport/Test/Mftf/README.md b/app/code/Magento/ConfigurableImportExport/Test/Mftf/README.md new file mode 100644 index 0000000000000..e496ea6011c7f --- /dev/null +++ b/app/code/Magento/ConfigurableImportExport/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Configurable Import Export Functional Tests + +The Functional Test Module for **Magento Configurable Import Export** module. diff --git a/app/code/Magento/ConfigurableImportExport/Test/Mftf/composer.json b/app/code/Magento/ConfigurableImportExport/Test/Mftf/composer.json new file mode 100644 index 0000000000000..74322a53512f9 --- /dev/null +++ b/app/code/Magento/ConfigurableImportExport/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-configurable-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-configurable-product": "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/app/code/Magento/ConfigurableImportExport/Test/Unit/Model/Import/Product/Type/ConfigurableTest.php b/app/code/Magento/ConfigurableImportExport/Test/Unit/Model/Import/Product/Type/ConfigurableTest.php index 8cdb5531a3cab..4446f98cff515 100644 --- a/app/code/Magento/ConfigurableImportExport/Test/Unit/Model/Import/Product/Type/ConfigurableTest.php +++ b/app/code/Magento/ConfigurableImportExport/Test/Unit/Model/Import/Product/Type/ConfigurableTest.php @@ -392,6 +392,9 @@ protected function _getBunch() ]; } + /** + * @return array + */ protected function _getSuperAttributes() { return [ diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Created.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Created.php index 9ebd5f3ee3705..92c40f71f2db9 100644 --- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Created.php +++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Created.php @@ -16,7 +16,7 @@ class Created extends \Magento\Backend\Block\Widget /** * @var string */ - protected $_template = 'catalog/product/attribute/new/created.phtml'; + protected $_template = 'Magento_ConfigurableProduct::catalog/product/attribute/new/created.phtml'; /** * Core registry diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Variations/Config.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Variations/Config.php index c02a922c71b5c..1c5d01da574cf 100644 --- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Variations/Config.php +++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Variations/Config.php @@ -18,7 +18,7 @@ class Config extends Widget implements TabInterface /** * @var string */ - protected $_template = 'catalog/product/edit/super/config.phtml'; + protected $_template = 'Magento_ConfigurableProduct::catalog/product/edit/super/config.phtml'; /** * Core registry diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php index 29583231a764a..19de63b7a976c 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php +++ b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php @@ -926,6 +926,8 @@ protected function _prepareProduct(\Magento\Framework\DataObject $buyRequest, $p return $result; } } + } elseif (is_string($result)) { + return __($result)->render(); } } diff --git a/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurablePriceResolver.php b/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurablePriceResolver.php index 3d42217de5f91..5581fcc07b861 100644 --- a/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurablePriceResolver.php +++ b/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurablePriceResolver.php @@ -64,7 +64,7 @@ public function resolvePrice(\Magento\Framework\Pricing\SaleableInterface $produ foreach ($this->lowestPriceOptionsProvider->getProducts($product) as $subProduct) { $productPrice = $this->priceResolver->resolvePrice($subProduct); - $price = $price ? min($price, $productPrice) : $productPrice; + $price = isset($price) ? min($price, $productPrice) : $productPrice; } return (float)$price; diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/AdminConfigurableProductActionGroup.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminConfigurableProductActionGroup.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/AdminConfigurableProductActionGroup.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminConfigurableProductActionGroup.xml index c2866816110c5..63ef6cb99f8c1 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/AdminConfigurableProductActionGroup.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminConfigurableProductActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Filter the product grid and view expected products--> <actionGroup name="viewConfigurableProductInAdminGrid"> <arguments> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/ConfigurableProductCheckoutActionGroup.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/ConfigurableProductCheckoutActionGroup.xml similarity index 89% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/ConfigurableProductCheckoutActionGroup.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/ConfigurableProductCheckoutActionGroup.xml index 78a7e8e09ad03..f272fa8ea733c 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/ConfigurableProductCheckoutActionGroup.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/ConfigurableProductCheckoutActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!-- Check configurable product in checkout cart items --> <actionGroup name="CheckConfigurableProductInCheckoutCartItemsActionGroup"> <arguments> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontCategoryActionGroup.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontCategoryActionGroup.xml new file mode 100644 index 0000000000000..9c160d72acc8d --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontCategoryActionGroup.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!-- Check configurable product on the category page --> + <actionGroup name="StorefrontCheckCategoryConfigurableProduct"> + <arguments> + <argument name="product"/> + <argument name="optionProduct"/> + </arguments> + <seeElement selector="{{StorefrontCategoryProductSection.ProductTitleByName(product.name)}}" stepKey="assertProductName"/> + <see userInput="${{optionProduct.price}}.00" selector="{{StorefrontCategoryProductSection.ProductPriceByName(product.name)}}" stepKey="AssertProductPrice"/> + <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> + <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" /> + <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> + <seeElement selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="AssertAddToCart" /> + </actionGroup> +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontCompareActionGroup.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontCompareActionGroup.xml new file mode 100644 index 0000000000000..62e03b62151a5 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontCompareActionGroup.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!-- Check the configurable product in comparison page --> + <actionGroup name="StorefrontCheckCompareConfigurableProductActionGroup"> + <arguments> + <argument name="product"/> + <argument name="optionProduct"/> + </arguments> + <seeElement selector="{{StorefrontProductCompareMainSection.ProductLinkByName(product.name)}}" stepKey="assertProductName"/> + <see userInput="${{optionProduct.price}}.00" selector="{{StorefrontProductCompareMainSection.ProductPriceByName(product.name)}}" stepKey="assertProductPrice"/> + <see userInput="{{product.sku}}" selector="{{StorefrontProductCompareMainSection.ProductAttributeByCodeAndProductName('SKU', product.name)}}" stepKey="assertProductSku"/> + <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> + <seeElement selector="{{StorefrontProductCompareMainSection.ProductAddToCartByName(product.name)}}" stepKey="assertProductAddToCart"/> + </actionGroup> +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontProductActionGroup.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontProductActionGroup.xml new file mode 100644 index 0000000000000..968f8c490af8d --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontProductActionGroup.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!-- Check the configurable product on the product page --> + <actionGroup name="StorefrontCheckConfigurableProduct"> + <arguments> + <argument name="product"/> + <argument name="optionProduct"/> + </arguments> + <seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> + <seeInTitle userInput="{{product.name}}" stepKey="AssertProductNameInTitle"/> + <see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/> + <see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/> + <see userInput="${{optionProduct.price}}.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/> + <see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertInStock"/> + <seeElement selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="assertAddToCart" /> + <see userInput="{{product.custom_attributes[description]}}" selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="assertProductDescription"/> + <see userInput="{{product.custom_attributes[short_description]}}" selector="{{StorefrontProductInfoMainSection.productShortDescription}}" stepKey="assertProductShortDescription"/> + </actionGroup> +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml new file mode 100644 index 0000000000000..cc88a2c6147ef --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!-- Check Configurable Product in the Cart --> + <actionGroup name="StorefrontCheckCartConfigurableProductActionGroup"> + <arguments> + <argument name="product"/> + <argument name="optionProduct"/> + <argument name="productQuantity"/> + </arguments> + <seeElement selector="{{CheckoutCartProductSection.ProductLinkByName(product.name)}}" stepKey="assertProductName"/> + <see userInput="${{optionProduct.price}}.00" selector="{{CheckoutCartProductSection.ProductPriceByName(product.name)}}" stepKey="assertProductPrice"/> + <seeInField userInput="{{productQuantity}}" selector="{{CheckoutCartProductSection.ProductQuantityByName(product.name)}}" stepKey="assertProductQuantity"/> + </actionGroup> + + <!-- Open the Minicart and check Configurable Product --> + <actionGroup name="StorefrontOpenMinicartAndCheckConfigurableProductActionGroup"> + <arguments> + <argument name="product"/> + <argument name="optionProduct"/> + </arguments> + <waitForElement selector="{{StorefrontMinicartSection.productLinkByName(product.name)}}" stepKey="waitForMinicartProduct" /> + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart" /> + <see userInput="${{optionProduct.price}}.00" selector="{{StorefrontMinicartSection.productPriceByName(product.name)}}" stepKey="assertProductPrice"/> + </actionGroup> +</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConfigurableProductData.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductData.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConfigurableProductData.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductData.xml index 70e758a51409d..f92b388b46649 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConfigurableProductData.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="BaseConfigurableProduct" type="product"> <data key="sku" unique="suffix">configurable</data> <data key="type_id">configurable</data> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductOptionData.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductOptionData.xml new file mode 100644 index 0000000000000..21dcf998a6399 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductOptionData.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="ConfigurableProductTwoOptions" type="ConfigurableProductOption"> + <var key="attribute_id" entityKey="attribute_id" entityType="ProductAttribute" /> + <data key="label">option</data> + <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity> + <requiredEntity type="ValueIndex">ValueIndex2</requiredEntity> + </entity> +</entities> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConstData.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConstData.xml new file mode 100644 index 0000000000000..974be1e14a389 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConstData.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> + <entity name="CONST" type="CONST"> + <data key="three">3</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ProductConfigurableAttributeData.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ProductConfigurableAttributeData.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ProductConfigurableAttributeData.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ProductConfigurableAttributeData.xml index ed8bbc949c550..f99f960f6a945 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ProductConfigurableAttributeData.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ProductConfigurableAttributeData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="colorProductAttribute" type="product_attribute"> <data key="default_label" unique="suffix">Color</data> <data key="input_type">Dropdown</data> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ValueIndexData.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ValueIndexData.xml new file mode 100644 index 0000000000000..54d489a446fd7 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ValueIndexData.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="ValueIndex1" type="ValueIndex"> + <var key="value_index" entityKey="value" entityType="ProductAttributeOption"/> + </entity> + <entity name="ValueIndex2" type="ValueIndex"> + <var key="value_index" entityKey="value" entityType="ProductAttributeOption"/> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/LICENSE.txt b/app/code/Magento/ConfigurableProduct/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/LICENSE.txt rename to app/code/Magento/ConfigurableProduct/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/LICENSE_AFL.txt b/app/code/Magento/ConfigurableProduct/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/LICENSE_AFL.txt rename to app/code/Magento/ConfigurableProduct/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/configurable_product_add_child-meta.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/configurable_product_add_child-meta.xml new file mode 100644 index 0000000000000..6a77e97d8f276 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/configurable_product_add_child-meta.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="ConfigurableProductAddChild" dataType="ConfigurableProductAddChild" type="create" auth="adminOauth" url="/V1/configurable-products/{sku}/child" method="POST"> + <contentType>application/json</contentType> + <field key="childSku">string</field> + </operation> +</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/configurable_product_options-meta.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/configurable_product_options-meta.xml similarity index 78% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/configurable_product_options-meta.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/configurable_product_options-meta.xml index d110dce403a90..37e6be683c2fe 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/configurable_product_options-meta.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/configurable_product_options-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateConfigurableProductOption" dataType="ConfigurableProductOption" type="create" auth="adminOauth" url="/V1/configurable-products/{sku}/options" method="POST"> <contentType>application/json</contentType> <object dataType="ConfigurableProductOption" key="option"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/extension_attribute_configurable_product_options-meta.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/extension_attribute_configurable_product_options-meta.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/extension_attribute_configurable_product_options-meta.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/extension_attribute_configurable_product_options-meta.xml index 68be11fc2dca3..2f1db19a1fd64 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/extension_attribute_configurable_product_options-meta.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/extension_attribute_configurable_product_options-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateExtensionAttributeConfigProductOption" dataType="ExtensionAttributeConfigProductOption" type="create"> <contentType>application/json</contentType> <array key="configurable_product_options"> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/valueIndex-meta.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/valueIndex-meta.xml new file mode 100644 index 0000000000000..8d955fcc94431 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Metadata/valueIndex-meta.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="ValueIndex" dataType="ValueIndex" type="create"> + <field key="value_index">integer</field> + </operation> +</operations> \ No newline at end of file diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Page/AdminProductCreatePage.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Page/AdminProductCreatePage.xml new file mode 100644 index 0000000000000..01a494afd10e0 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Page/AdminProductCreatePage.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true"> + <section name="AdminProductFormConfigurationsSection"/> + <section name="AdminCreateProductConfigurationsPanel"/> + <section name="AdminNewAttributePanel"/> + <section name="AdminChooseAffectedAttributeSetPopup"/> + </page> +</pages> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/README.md b/app/code/Magento/ConfigurableProduct/Test/Mftf/README.md new file mode 100644 index 0000000000000..fb3770d722a63 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Configurable Product Functional Tests + +The Functional Test Module for **Magento Configurable Product** module. diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminChooseAffectedAttributeSetSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminChooseAffectedAttributeSetSection.xml new file mode 100644 index 0000000000000..dac7027b73951 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminChooseAffectedAttributeSetSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminChooseAffectedAttributeSetPopup"> + <element name="confirm" type="button" selector="button[data-index='confirm_button']" timeout="30"/> + </section> +</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminCreateProductConfigurationsPanelSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminCreateProductConfigurationsPanelSection.xml similarity index 87% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminCreateProductConfigurationsPanelSection.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminCreateProductConfigurationsPanelSection.xml index 99f6a8842481e..77759043a0500 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminCreateProductConfigurationsPanelSection.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminCreateProductConfigurationsPanelSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCreateProductConfigurationsPanel"> <element name="next" type="button" selector=".steps-wizard-navigation .action-next-step" timeout="30"/> <element name="createNewAttribute" type="button" selector=".select-attributes-actions button[title='Create New Attribute']" timeout="30"/> @@ -18,6 +18,7 @@ <element name="id" type="text" selector="//tr[contains(@data-repeat-index, '0')]/td[2]/div"/> <element name="selectAll" type="button" selector=".action-select-all"/> + <element name="selectAllByAttribute" type="button" selector="//div[@data-attribute-title='{{attr}}']//button[contains(@class, 'action-select-all')]" parameterized="true"/> <element name="createNewValue" type="input" selector=".action-create-new" timeout="30"/> <element name="attributeName" type="input" selector="li[data-attribute-option-title=''] .admin__field-create-new .admin__control-text"/> <element name="saveAttribute" type="button" selector="li[data-attribute-option-title=''] .action-save" timeout="30"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminNewAttributePanelSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminNewAttributePanelSection.xml new file mode 100644 index 0000000000000..31787ca75f199 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminNewAttributePanelSection.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminNewAttributePanel"> + <element name="container" type="text" selector="#create_new_attribute"/> + <element name="saveAttribute" type="button" selector="#save"/> + <element name="newAttributeIFrame" type="iframe" selector="create_new_attribute_container"/> + <element name="defaultLabel" type="input" selector="input[name='frontend_label[0]']"/> + <element name="inputType" type="select" selector="select[name='frontend_input']" timeout="30"/> + <element name="valuesRequired" type="select" selector="select#is_required"/> + <element name="addOption" type="button" selector="#add_new_option_button"/> + <element name="isDefault" type="radio" selector="[data-role='options-container'] tr:nth-of-type({{row}}) input[name='default[]']" parameterized="true"/> + <element name="optionAdminValue" type="input" selector="[data-role='options-container'] input[name='option[value][option_{{row}}][0]']" parameterized="true"/> + <element name="optionDefaultStoreValue" type="input" selector="[data-role='options-container'] input[name='option[value][option_{{row}}][1]']" parameterized="true"/> + <element name="deleteOption" type="button" selector="#delete_button_option_{{row}}" parameterized="true"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductFormConfigurationsSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductFormConfigurationsSection.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml index 43bf9822903be..8a2cd192a20e3 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductFormConfigurationsSection.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml @@ -7,8 +7,9 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductFormConfigurationsSection"> + <element name="sectionHeader" type="text" selector=".admin__collapsible-block-wrapper[data-index='configurable']"/> <element name="createConfigurations" type="button" selector="button[data-index='create_configurable_products_button']" timeout="30"/> <element name="currentVariationsRows" type="button" selector=".data-row"/> <element name="currentVariationsNameCells" type="textarea" selector=".admin__control-fields[data-index='name_container']"/> @@ -31,11 +32,6 @@ <section name="AdminConfigurableProductSelectAttributesSlideOut"> <element name="grid" type="button" selector=".admin__data-grid-wrap tbody"/> </section> - <section name="AdminConfigurableProductAssignSourcesSlideOut"> - <element name="done" type="button" selector=".product_form_product_form_assign_sources_configurable_modal .action-primary" timeout="5"/> - <element name="assignSources" type="button" selector="(//button/span[contains(text(), 'Assign Sources')])[2]" timeout="5"/> - <element name="quantityPerSource" type="input" selector="input[name='quantity_resolver[dynamicRows][dynamicRows][0][quantity_per_source]']"/> - </section> <section name="StorefrontConfigurableProductPage"> <element name="productAttributeDropDown" type="select" selector="select[id*='attribute']"/> </section> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductGridActionSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductGridActionSection.xml new file mode 100644 index 0000000000000..1d4ec9270ef8f --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductGridActionSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductGridActionSection"> + <element name="addConfigurableProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-configurable']" timeout="30"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml new file mode 100644 index 0000000000000..4f96ea41eac5a --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductInfoMainSection"> + <element name="optionByAttributeId" type="input" selector="#attribute{{var1}}" parameterized="true"/> + <element name="productAttributeTitle1" type="text" selector="#product-options-wrapper div[tabindex='0'] label"/> + <element name="productAttributeOptions1" type="select" selector="#product-options-wrapper div[tabindex='0'] option"/> + <element name="productAttributeOptionsSelectButton" type="select" selector="#product-options-wrapper .super-attribute-select"/> + <element name="productAttributeOptionsError" type="text" selector="//div[@class='mage-error']"/> + <!-- Parameter is the order number of the attribute on the page (1 is the newest) --> + <element name="nthAttributeOnPage" type="block" selector="tr:nth-of-type({{numElement}}) .data" parameterized="true"/> + <element name="stockIndication" type="block" selector=".stock" /> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminAddDefaultImageConfigurableTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddDefaultImageConfigurableTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminAddDefaultImageConfigurableTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddDefaultImageConfigurableTest.xml index 55d6029c917ce..7dbacfa2ce612 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminAddDefaultImageConfigurableTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddDefaultImageConfigurableTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddDefaultImageConfigurableTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductCreateTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductCreateTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest.xml index 55a7e21729d78..17ace8419c034 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductCreateTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminConfigurableProductCreateTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductDeleteTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductDeleteTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest.xml index 02f742cd5f1c4..17f17323a9edd 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductDeleteTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminConfigurableProductDeleteTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml new file mode 100644 index 0000000000000..c612431ec7044 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml @@ -0,0 +1,345 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="AdminConfigurableProductChildrenOutOfStockTest"> + <annotations> + <features value="ConfigurableProduct"/> + <stories value="Product visibility when in stock/out of stock"/> + <title value="Configurable Product goes 'Out of Stock' if all associated Simple Products are 'Out of Stock'"/> + <description value="Configurable Product goes 'Out of Stock' if all associated Simple Products are 'Out of Stock'"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-181"/> + <group value="ConfigurableProduct"/> + </annotations> + <before> + <!-- TODO: This should be converted to an actionGroup once MQE-993 is fixed. --> + <!-- Create the category to put the product in --> + <createData entity="ApiCategory" stepKey="createCategory"/> + + <!-- Create the configurable product based on the data in the /data folder --> + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Make the configurable product have two options, that are children of the default attribute set --> + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + + <!-- Create the 2 children that will be a part of the configurable product --> + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + </createData> + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + + <!-- Assign the two products to the configurable product --> + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + + <!-- log in --> + <actionGroup ref="LoginAsAdmin" stepKey="login"/> + </before> + + <after> + <amOnPage url="admin/admin/auth/logout/" stepKey="logout"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> + </after> + + <!-- Check to make sure that the configurable product shows up as in stock --> + <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage"/> + <waitForPageLoad stepKey="waitForStoreFrontLoad"/> + <see stepKey="checkForOutOfStock" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK" /> + + <!-- Find the first simple product that we just created using the product grid and go to its page--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> + <waitForPageLoad stepKey="waitForAdminProductGridLoad"/> + <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/> + <actionGroup ref="filterProductGridBySku" stepKey="findCreatedProduct"> + <argument name="product" value="ApiSimpleOne"/> + </actionGroup> + <waitForPageLoad stepKey="waitForFiltersToBeApplied"/> + <click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/> + <waitForPageLoad stepKey="waitForProductPageLoad"/> + + <!-- Edit the quantity of the simple first product as 0 --> + <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="0" stepKey="fillProductQuantity"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/> + + <!-- Check to make sure that the configurable product shows up as in stock --> + <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage2"/> + <waitForPageLoad stepKey="waitForStoreFrontLoad2"/> + <see stepKey="checkForOutOfStock2" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK"/> + + <!-- Find the second simple product that we just created using the product grid and go to its page--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage2"/> + <waitForPageLoad stepKey="waitForAdminProductGridLoad2"/> + <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial2"/> + <actionGroup ref="filterProductGridBySku" stepKey="findCreatedProduct2"> + <argument name="product" value="ApiSimpleTwo"/> + </actionGroup> + <waitForPageLoad stepKey="waitForFiltersToBeApplied2"/> + <click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage2"/> + <waitForPageLoad stepKey="waitForProductPageLoad2"/> + + <!-- Edit the quantity of the second simple product as 0 --> + <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="0" stepKey="fillProductQuantity2"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct2"/> + + <!-- Check to make sure that the configurable product shows up as out of stock --> + <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage3"/> + <waitForPageLoad stepKey="waitForStoreFrontLoad3"/> + <see stepKey="checkForOutOfStock3" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="OUT OF STOCK"/> + </test> + + <test name="AdminConfigurableProductOutOfStockTestDeleteChildren"> + <annotations> + <features value="ConfigurableProduct"/> + <stories value="Product visibility when in stock/out of stock"/> + <title value="Configurable Product goes 'Out of Stock' if all associated Simple Products are deleted"/> + <description value="Configurable Product goes 'Out of Stock' if all associated Simple Products are deleted"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-3042"/> + <group value="ConfigurableProduct"/> + </annotations> + <before> + <!-- TODO: This should be converted to an actionGroup once MQE-993 is fixed. --> + <!-- Create the category to put the product in --> + <createData entity="ApiCategory" stepKey="createCategory"/> + + <!-- Create the configurable product based on the data in the /data folder --> + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Make the configurable product have two options, that are children of the default attribute set --> + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + + <!-- Create the 2 children that will be a part of the configurable product --> + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + </createData> + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + + <!-- Assign the two products to the configurable product --> + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + + <!-- log in --> + <actionGroup ref="LoginAsAdmin" stepKey="login"/> + </before> + + <after> + <amOnPage url="admin/admin/auth/logout/" stepKey="logout"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> + </after> + + <!-- Check to make sure that the configurable product shows up as in stock --> + <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage"/> + <waitForPageLoad stepKey="waitForStoreFrontLoad"/> + <see stepKey="checkForOutOfStock" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK" /> + + <!-- Delete the first simple product --> + <actionGroup stepKey="deleteProduct1" ref="deleteProductBySku"> + <argument name="sku" value="{{ApiSimpleOne.sku}}"/> + </actionGroup> + + <!-- Check to make sure that the configurable product shows up as in stock --> + <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage2"/> + <waitForPageLoad stepKey="waitForStoreFrontLoad2"/> + <see stepKey="checkForOutOfStock2" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK"/> + + <!-- Delete the second simple product --> + <actionGroup stepKey="deleteProduct2" ref="deleteProductBySku"> + <argument name="sku" value="{{ApiSimpleTwo.sku}}"/> + </actionGroup> + + <!-- Check to make sure that the configurable product shows up as out of stock --> + <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage3"/> + <waitForPageLoad stepKey="waitForStoreFrontLoad3"/> + <see stepKey="checkForOutOfStock3" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="OUT OF STOCK"/> + </test> + + <test name="AdminConfigurableProductOutOfStockAndDeleteCombinationTest"> + <annotations> + <features value="ConfigurableProduct"/> + <stories value="Product visibility when in stock/out of stock"/> + <title value="Configurable Product goes 'Out of Stock' if all associated Simple Products are a combination of 'Out of Stock' and deleted"/> + <description value="Configurable Product goes 'Out of Stock' if all associated Simple Products are a combination of 'Out of Stock' and deleted"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-3046"/> + <group value="ConfigurableProduct"/> + </annotations> + <before> + <!-- TODO: This should be converted to an actionGroup once MQE-993 is fixed. --> + <!-- Create the category to put the product in --> + <createData entity="ApiCategory" stepKey="createCategory"/> + + <!-- Create the configurable product based on the data in the /data folder --> + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Make the configurable product have two options, that are children of the default attribute set --> + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + + <!-- Create the 2 children that will be a part of the configurable product --> + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + </createData> + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + + <!-- Assign the two products to the configurable product --> + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + + <!-- log in --> + <actionGroup ref="LoginAsAdmin" stepKey="login"/> + </before> + + <after> + <amOnPage url="admin/admin/auth/logout/" stepKey="logout"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> + </after> + + <!-- Check to make sure that the configurable product shows up as in stock --> + <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage"/> + <waitForPageLoad stepKey="waitForStoreFrontLoad"/> + <see stepKey="checkForOutOfStock" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK" /> + + <!-- Delete the first simple product --> + <actionGroup stepKey="deleteProduct1" ref="deleteProductBySku"> + <argument name="sku" value="{{ApiSimpleOne.sku}}"/> + </actionGroup> + + <!-- Check to make sure that the configurable product shows up as in stock --> + <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage2"/> + <waitForPageLoad stepKey="waitForStoreFrontLoad2"/> + <see stepKey="checkForOutOfStock2" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK"/> + + <!-- Find the second simple product that we just created using the product grid and go to its page--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage2"/> + <waitForPageLoad stepKey="waitForAdminProductGridLoad2"/> + <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial2"/> + <actionGroup ref="filterProductGridBySku" stepKey="findCreatedProduct2"> + <argument name="product" value="ApiSimpleTwo"/> + </actionGroup> + <waitForPageLoad stepKey="waitForFiltersToBeApplied2"/> + <click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage2"/> + <waitForPageLoad stepKey="waitForProductPageLoad2"/> + + <!-- Edit the quantity of the second simple product as 0 --> + <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="0" stepKey="fillProductQuantity2"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct2"/> + + <!-- Check to make sure that the configurable product shows up as out of stock --> + <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage3"/> + <waitForPageLoad stepKey="waitForStoreFrontLoad3"/> + <see stepKey="checkForOutOfStock3" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="OUT OF STOCK"/> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductSearchTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductSearchTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest.xml index 5da689aa5e61c..77ccf7bc6900b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductSearchTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminConfigurableProductSearchTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductUpdateAttributeTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductUpdateAttributeTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest.xml index a8eabb3b56a39..2282da467a967 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductUpdateAttributeTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminConfigurableProductUpdateAttributeTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductUpdateTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest.xml similarity index 99% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductUpdateTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest.xml index d640e243c0572..154ce019f8c16 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductUpdateTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminConfigurableProductBulkUpdateTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminRelatedProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRelatedProductsTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminRelatedProductsTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRelatedProductsTest.xml index 50fb6bdf866d8..4461c06ed6b51 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminRelatedProductsTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRelatedProductsTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminRelatedProductsTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminRemoveDefaultImageConfigurableTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRemoveDefaultImageConfigurableTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminRemoveDefaultImageConfigurableTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRemoveDefaultImageConfigurableTest.xml index 287cdce875d77..1c34566322c23 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminRemoveDefaultImageConfigurableTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminRemoveDefaultImageConfigurableTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminRemoveDefaultImageConfigurableTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml index 609ccbb4c27a2..9467f82ebae24 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="ConfigurableProductPriceAdditionalStoreViewTest"> <annotations> <features value="ConfigurableProductPriceStoreFront"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CAdminTest.xml new file mode 100644 index 0000000000000..a00ce52f442d7 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CAdminTest.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CAdminTest"> + <!--Create configurable product--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageConfigurable" after="seeSimpleProductInGrid"/> + <waitForPageLoad stepKey="waitForProductPageLoadConfigurable" after="visitAdminProductPageConfigurable"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateConfigurableProduct" after="waitForProductPageLoadConfigurable"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + <actionGroup ref="checkRequiredFieldsInProductForm" stepKey="checkRequiredFieldsProductConfigurable" after="goToCreateConfigurableProduct"/> + <actionGroup ref="fillMainProductForm" stepKey="fillConfigurableProductMain" after="checkRequiredFieldsProductConfigurable"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + <!--Create product configurations--> + <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickCreateConfigurations" after="fillConfigurableProductMain"/> + <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" time="30" stepKey="waitForConfigurationModalOpen" after="clickCreateConfigurations"/> + <!--Create new attribute--> + <click selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" stepKey="clickCreateNewAttribute" after="waitForConfigurationModalOpen"/> + <switchToIFrame selector="{{AdminNewAttributePanel.newAttributeIFrame}}" stepKey="enterAttributePanelIFrame" after="clickCreateNewAttribute"/> + <wait time="2" stepKey="waitForModalIframeReady" after="enterAttributePanelIFrame"/> + <waitForElementVisible selector="{{AdminNewAttributePanel.defaultLabel}}" time="30" stepKey="waitForIframeLoad" after="waitForModalIframeReady"/> + <fillField selector="{{AdminNewAttributePanel.defaultLabel}}" userInput="{{colorProductAttribute.default_label}}" stepKey="fillDefaultLabel" after="waitForIframeLoad"/> + <selectOption selector="{{AdminNewAttributePanel.inputType}}" userInput="{{colorProductAttribute.input_type}}" stepKey="selectAttributeInputType" after="fillDefaultLabel"/> + <!--Add option 1 to attribute--> + <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption1" after="selectAttributeInputType"/> + <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('1')}}" time="30" stepKey="waitForOptionRow1" after="clickAddOption1"/> + <fillField selector="{{AdminNewAttributePanel.optionAdminValue('0')}}" userInput="{{colorProductAttribute1.name}}" stepKey="fillAdminLabel1" after="waitForOptionRow1"/> + <fillField selector="{{AdminNewAttributePanel.optionDefaultStoreValue('0')}}" userInput="{{colorProductAttribute1.name}}" stepKey="fillDefaultLabel1" after="fillAdminLabel1"/> + <!--Add option 2 to attribute--> + <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption2" after="fillDefaultLabel1"/> + <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('2')}}" time="30" stepKey="waitForOptionRow2" after="clickAddOption2"/> + <fillField selector="{{AdminNewAttributePanel.optionAdminValue('1')}}" userInput="{{colorProductAttribute2.name}}" stepKey="fillAdminLabel2" after="waitForOptionRow2"/> + <fillField selector="{{AdminNewAttributePanel.optionDefaultStoreValue('1')}}" userInput="{{colorProductAttribute2.name}}" stepKey="fillDefaultLabel2" after="fillAdminLabel2"/> + <!--Save new attribute--> + <click selector="{{AdminNewAttributePanel.saveAttribute}}" stepKey="clickSaveAttribute" after="fillDefaultLabel2"/> + <switchToIFrame stepKey="switchToParentPage" after="clickSaveAttribute"/> + <waitForElementNotVisible selector="{{AdminNewAttributePanel.container}}" time="30" stepKey="waitForNewAttributePanelClose" after="switchToParentPage"/> + <waitForLoadingMaskToDisappear stepKey="waitForSaveAttributeLoadingMask" after="waitForNewAttributePanelClose"/> + <!--Find new attribute in grid and select--> + <click selector="{{AdminCreateProductConfigurationsPanel.filters}}" stepKey="openFilterPanel" after="waitForSaveAttributeLoadingMask"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.attributeCode}}" userInput="{{colorProductAttribute.default_label}}" stepKey="fillAttributeCodeFilter" after="openFilterPanel"/> + <click selector="{{AdminCreateProductConfigurationsPanel.applyFilters}}" stepKey="clickApplyFiltersAttribute" after="fillAttributeCodeFilter"/> + <checkOption selector="{{AdminCreateProductConfigurationsPanel.firstCheckbox}}" stepKey="checkAttributeInGrid" after="clickApplyFiltersAttribute"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNext1" after="checkAttributeInGrid"/> + <!--Select all options for attribute--> + <click selector="{{AdminCreateProductConfigurationsPanel.selectAll}}" stepKey="selectAllAttributeOptions" after="clickNext1"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNext2" after="selectAllAttributeOptions"/> + <!--Images, price and quantity configuration--> + <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="selectApplySingleQty" after="clickNext2"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="{{BaseConfigurableProduct.quantity}}" stepKey="fillConfigurableQuantity" after="selectApplySingleQty"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNext3" after="fillConfigurableQuantity"/> + <!--Generate products--> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickGenerateProducts" after="clickNext3"/> + <!--Save configurable product--> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveConfigurableProduct" after="clickGenerateProducts"/> + <waitForElementVisible selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" time="30" stepKey="waitForAttributeSetConfirmation" after="clickSaveConfigurableProduct"/> + <click selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="clickConfirmAttributeSet" after="waitForAttributeSetConfirmation"/> + <see selector="You saved the product" stepKey="seeConfigurableSaveConfirmation" after="clickConfirmAttributeSet"/> + <actionGroup ref="viewConfigurableProductInAdminGrid" stepKey="viewConfigurableProductInGrid" after="seeConfigurableSaveConfirmation"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + + <!--@TODO Move cleanup to "after" when MQE-830 is resolved--> + <comment userInput="Clean up configurable product" stepKey="cleanUpConfigurableProduct" after="deleteSimpleProduct"/> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteConfigurableProduct" after="cleanUpConfigurableProduct"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + </test> +</tests> \ No newline at end of file diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml new file mode 100644 index 0000000000000..1f7b2bff0a7de --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CGuestUserTest"> + <before> + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigChildProduct1Image"> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createConfigChildProduct2Image"> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigProductImage"> + <requiredEntity createDataKey="createConfigProduct"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateConfigProduct" createDataKey="createConfigProduct"/> + </before> + <after> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createConfigChildProduct1Image" stepKey="deleteConfigChildProduct1Image"/>--> + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createConfigChildProduct2Image" stepKey="deleteConfigChildProduct2Image"/>--> + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createConfigProductImage" stepKey="deleteConfigProductImage"/>--> + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> + </after> + + <!-- Verify Configurable Product in checkout cart items --> + <comment userInput="Verify Configurable Product in checkout cart items" stepKey="commentVerifyConfigurableProductInCheckoutCartItems" after="guestCheckoutCheckSimpleProduct2InCartItems" /> + <actionGroup ref="CheckConfigurableProductInCheckoutCartItemsActionGroup" stepKey="guestCheckoutCheckConfigurableProductInCartItems" after="commentVerifyConfigurableProductInCheckoutCartItems"> + <argument name="productVar" value="$$createConfigProduct$$"/> + <argument name="optionLabel" value="$$createConfigProductAttribute.attribute[frontend_labels][0][label]$$" /> + <argument name="optionValue" value="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" /> + </actionGroup> + + <!-- Check configurable product in category --> + <comment userInput="Verify Configurable Product in category" stepKey="commentVerifyConfigurableProductInCategory" after="browseAssertSimpleProduct2ImageNotDefault" /> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="browseAssertCategoryConfigProduct" after="commentVerifyConfigurableProductInCategory"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="browseGrabConfigProductImageSrc" after="browseAssertCategoryConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabConfigProductImageSrc" stepKey="browseAssertConfigProductImageNotDefault" after="browseGrabConfigProductImageSrc"/> + + <!-- View Configurable Product --> + <comment userInput="View Configurable Product" stepKey="commentViewConfigurableProduct" after="browseAssertSimpleProduct2PageImageNotDefault" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory2" after="commentViewConfigurableProduct"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="browseClickCategoryConfigProductView" after="clickCategory2"/> + <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductViewloaded" after="browseClickCategoryConfigProductView"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="browseAssertConfigProductPage" after="waitForConfigurableProductViewloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabConfigProductPageImageSrc" after="browseAssertConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabConfigProductPageImageSrc" stepKey="browseAssertConfigProductPageImageNotDefault" after="browseGrabConfigProductPageImageSrc"/> + + <!-- Add Configurable Product to cart --> + <comment userInput="Add Configurable Product to cart" stepKey="commentAddConfigurableProductToCart" after="cartAddProduct2ToCart" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory2" after="commentAddConfigurableProductToCart"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartCategory2loaded" after="cartClickCategory2"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForConfigurableProduct" after="waitForCartCategory2loaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="cartAssertConfigProduct" after="cartAssertCategory1ForConfigurableProduct"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartGrabConfigProductImageSrc" after="cartAssertConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabConfigProductImageSrc" stepKey="cartAssertConfigProductImageNotDefault" after="cartGrabConfigProductImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName($$createConfigProduct.name$$)}}" stepKey="cartClickCategoryConfigProductAddToCart" after="cartAssertConfigProductImageNotDefault"/> + <waitForElement selector="{{StorefrontMessagesSection.message('You need to choose options for your item.')}}" time="30" stepKey="cartWaitForConfigProductPageLoad" after="cartClickCategoryConfigProductAddToCart"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductPage" after="cartWaitForConfigProductPageLoad"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc1" after="cartAssertConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc1" stepKey="cartAssertConfigProductPageImageNotDefault1" after="cartGrabConfigProductPageImageSrc1"/> + <selectOption userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontProductInfoMainSection.optionByAttributeId($$createConfigProductAttribute.attribute_id$$)}}" stepKey="cartConfigProductFillOption" after="cartAssertConfigProductPageImageNotDefault1"/> + <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductOptionloaded" after="cartConfigProductFillOption"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductWithOptionPage" after="waitForConfigurableProductOptionloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc2" after="cartAssertConfigProductWithOptionPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc2" stepKey="cartAssertConfigProductPageImageNotDefault2" after="cartGrabConfigProductPageImageSrc2"/> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddConfigProductToCart" after="cartAssertConfigProductPageImageNotDefault2"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + + <!-- Check configurable product in minicart --> + <comment userInput="Check configurable product in minicart" stepKey="commentCheckConfigurableProductInMinicart" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> + <actionGroup ref="StorefrontOpenMinicartAndCheckConfigurableProductActionGroup" stepKey="cartOpenMinicartAndCheckConfigProduct" after="commentCheckConfigurableProductInMinicart"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartMinicartGrabConfigProductImageSrc" after="cartOpenMinicartAndCheckConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabConfigProductImageSrc" stepKey="cartMinicartAssertConfigProductImageNotDefault" after="cartMinicartGrabConfigProductImageSrc"/> + <click selector="{{StorefrontMinicartSection.productOptionsDetailsByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProductDetails" after="cartMinicartAssertConfigProductImageNotDefault"/> + <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontMinicartSection.productOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartMinicartCheckConfigProductOption" after="cartMinicartClickConfigProductDetails"/> + <click selector="{{StorefrontMinicartSection.productLinkByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProduct" after="cartMinicartCheckConfigProductOption"/> + <waitForLoadingMaskToDisappear stepKey="waitForMinicartConfigProductloaded" after="cartMinicartClickConfigProduct"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertMinicartConfigProductPage" after="waitForMinicartConfigProductloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabConfigProductPageImageSrc" after="cartAssertMinicartConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabConfigProductPageImageSrc" stepKey="cartMinicartAssertConfigProductPageImageNotDefault" after="cartMinicartGrabConfigProductPageImageSrc"/> + + <!-- Check configurable product in cart --> + <comment userInput="Check configurable product in cart" stepKey="commentCheckConfigurableProductInCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart2" after="commentCheckConfigurableProductInCart"/> + <actionGroup ref="StorefrontCheckCartConfigurableProductActionGroup" stepKey="cartAssertCartConfigProduct" after="cartOpenCart2"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productQuantity" value="CONST.one"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartCartGrabConfigProduct2ImageSrc" after="cartAssertCartConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabConfigProduct2ImageSrc" stepKey="cartCartAssertConfigProduct2ImageNotDefault" after="cartCartGrabConfigProduct2ImageSrc"/> + <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{CheckoutCartProductSection.ProductOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartCheckConfigProductOption" after="cartCartAssertConfigProduct2ImageNotDefault"/> + <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createConfigProduct.name$$)}}" stepKey="cartClickCartConfigProduct" after="cartCheckConfigProductOption"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartConfigProductloaded" after="cartClickCartConfigProduct"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertCartConfigProductPage" after="waitForCartConfigProductloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabConfigProductPageImageSrc" after="cartAssertCartConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabConfigProductPageImageSrc" stepKey="cartCartAssertConfigProductPageImageNotDefault" after="cartCartGrabConfigProductPageImageSrc"/> + + <!-- Add Configurable Product to comparison --> + <comment userInput="Add Configurable Product to comparison" stepKey="commentAddConfigurableProductToComparison" after="compareAddSimpleProduct2ToCompare" /> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="compareAssertConfigProduct" after="commentAddConfigurableProductToComparison"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrc" after="compareAssertConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrc" stepKey="compareAssertConfigProductImageNotDefault" after="compareGrabConfigProductImageSrc"/> + <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddConfigProductToCompare" after="compareAssertConfigProductImageNotDefault"> + <argument name="productVar" value="$$createConfigProduct$$"/> + </actionGroup> + + <!-- Check configurable product in comparison sidebar --> + <comment userInput="Add Configurable Product in comparison sidebar" stepKey="commentAddConfigurableProductInComparisonSidebar" after="compareSimpleProduct2InSidebar" /> + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareConfigProductInSidebar" after="commentAddConfigurableProductInComparisonSidebar"> + <argument name="productVar" value="$$createConfigProduct$$"/> + </actionGroup> + + <!-- Check configurable product on comparison page --> + <comment userInput="Add Configurable Product on comparison page" stepKey="commentAddConfigurableProductOnComparisonPage" after="compareAssertSimpleProduct2ImageNotDefaultInComparison" /> + <actionGroup ref="StorefrontCheckCompareConfigurableProductActionGroup" stepKey="compareAssertConfigProductInComparison" after="commentAddConfigurableProductOnComparisonPage"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrcInComparison" after="compareAssertConfigProductInComparison"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrcInComparison" stepKey="compareAssertConfigProductImageNotDefaultInComparison" after="compareGrabConfigProductImageSrcInComparison"/> + </test> +</tests> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml new file mode 100644 index 0000000000000..07e2ecf86ca9e --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CLoggedInUserTest"> + <before> + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigChildProduct1Image"> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createConfigChildProduct2Image"> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigProductImage"> + <requiredEntity createDataKey="createConfigProduct"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateConfigProduct" createDataKey="createConfigProduct"/> + </before> + <after> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createConfigChildProduct1Image" stepKey="deleteConfigChildProduct1Image"/>--> + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createConfigChildProduct2Image" stepKey="deleteConfigChildProduct2Image"/>--> + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createConfigProductImage" stepKey="deleteConfigProductImage"/>--> + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> + </after> + + <!-- Verify Configurable Product in checkout cart items --> + <comment userInput="Verify Configurable Product in checkout cart items" stepKey="commentVerifyConfigurableProductInCheckoutCartItems" after="checkoutCheckSimpleProduct2InCartItems" /> + <actionGroup ref="CheckConfigurableProductInCheckoutCartItemsActionGroup" stepKey="checkoutCheckConfigurableProductInCartItems" after="commentVerifyConfigurableProductInCheckoutCartItems"> + <argument name="productVar" value="$$createConfigProduct$$"/> + <argument name="optionLabel" value="$$createConfigProductAttribute.attribute[frontend_labels][0][label]$$" /> + <argument name="optionValue" value="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" /> + </actionGroup> + + <!-- Check configurable product in category --> + <comment userInput="Verify Configurable Product in category" stepKey="commentVerifyConfigurableProductInCategory" after="browseAssertSimpleProduct2ImageNotDefault" /> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="browseAssertCategoryConfigProduct" after="commentVerifyConfigurableProductInCategory"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="browseGrabConfigProductImageSrc" after="browseAssertCategoryConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabConfigProductImageSrc" stepKey="browseAssertConfigProductImageNotDefault" after="browseGrabConfigProductImageSrc"/> + + <!-- View Configurable Product --> + <comment userInput="View Configurable Product" stepKey="commentViewConfigurableProduct" after="browseAssertSimpleProduct2PageImageNotDefault" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory2" after="commentViewConfigurableProduct"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="browseClickCategoryConfigProductView" after="clickCategory2"/> + <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductViewloaded" after="browseClickCategoryConfigProductView"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="browseAssertConfigProductPage" after="waitForConfigurableProductViewloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabConfigProductPageImageSrc" after="browseAssertConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabConfigProductPageImageSrc" stepKey="browseAssertConfigProductPageImageNotDefault" after="browseGrabConfigProductPageImageSrc"/> + + <!-- Add Configurable Product to cart --> + <comment userInput="Add Configurable Product to cart" stepKey="commentAddConfigurableProductToCart" after="cartAddProduct2ToCart" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory2" after="commentAddConfigurableProductToCart"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartCategory2loaded" after="cartClickCategory2"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForConfigurableProduct" after="waitForCartCategory2loaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="cartAssertConfigProduct" after="cartAssertCategory1ForConfigurableProduct"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartGrabConfigProductImageSrc" after="cartAssertConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabConfigProductImageSrc" stepKey="cartAssertConfigProductImageNotDefault" after="cartGrabConfigProductImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName($$createConfigProduct.name$$)}}" stepKey="cartClickCategoryConfigProductAddToCart" after="cartAssertConfigProductImageNotDefault"/> + <waitForElement selector="{{StorefrontMessagesSection.message('You need to choose options for your item.')}}" time="30" stepKey="cartWaitForConfigProductPageLoad" after="cartClickCategoryConfigProductAddToCart"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductPage" after="cartWaitForConfigProductPageLoad"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc1" after="cartAssertConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc1" stepKey="cartAssertConfigProductPageImageNotDefault1" after="cartGrabConfigProductPageImageSrc1"/> + <selectOption userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontProductInfoMainSection.optionByAttributeId($$createConfigProductAttribute.attribute_id$$)}}" stepKey="cartConfigProductFillOption" after="cartAssertConfigProductPageImageNotDefault1"/> + <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductOptionloaded" after="cartConfigProductFillOption"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductWithOptionPage" after="waitForConfigurableProductOptionloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc2" after="cartAssertConfigProductWithOptionPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc2" stepKey="cartAssertConfigProductPageImageNotDefault2" after="cartGrabConfigProductPageImageSrc2"/> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddConfigProductToCart" after="cartAssertConfigProductPageImageNotDefault2"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + + <!-- Check configurable product in minicart --> + <comment userInput="Check configurable product in minicart" stepKey="commentCheckConfigurableProductInMinicart" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> + <actionGroup ref="StorefrontOpenMinicartAndCheckConfigurableProductActionGroup" stepKey="cartOpenMinicartAndCheckConfigProduct" after="commentCheckConfigurableProductInMinicart"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartMinicartGrabConfigProductImageSrc" after="cartOpenMinicartAndCheckConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabConfigProductImageSrc" stepKey="cartMinicartAssertConfigProductImageNotDefault" after="cartMinicartGrabConfigProductImageSrc"/> + <click selector="{{StorefrontMinicartSection.productOptionsDetailsByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProductDetails" after="cartMinicartAssertConfigProductImageNotDefault"/> + <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontMinicartSection.productOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartMinicartCheckConfigProductOption" after="cartMinicartClickConfigProductDetails"/> + <click selector="{{StorefrontMinicartSection.productLinkByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProduct" after="cartMinicartCheckConfigProductOption"/> + <waitForLoadingMaskToDisappear stepKey="waitForMinicartConfigProductloaded" after="cartMinicartClickConfigProduct"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertMinicartConfigProductPage" after="waitForMinicartConfigProductloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabConfigProductPageImageSrc" after="cartAssertMinicartConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabConfigProductPageImageSrc" stepKey="cartMinicartAssertConfigProductPageImageNotDefault" after="cartMinicartGrabConfigProductPageImageSrc"/> + + <!-- Check configurable product in cart --> + <comment userInput="Check configurable product in cart" stepKey="commentCheckConfigurableProductInCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart2" after="commentCheckConfigurableProductInCart"/> + <actionGroup ref="StorefrontCheckCartConfigurableProductActionGroup" stepKey="cartAssertCartConfigProduct" after="cartOpenCart2"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productQuantity" value="CONST.one"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartCartGrabConfigProduct2ImageSrc" after="cartAssertCartConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabConfigProduct2ImageSrc" stepKey="cartCartAssertConfigProduct2ImageNotDefault" after="cartCartGrabConfigProduct2ImageSrc"/> + <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{CheckoutCartProductSection.ProductOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartCheckConfigProductOption" after="cartCartAssertConfigProduct2ImageNotDefault"/> + <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createConfigProduct.name$$)}}" stepKey="cartClickCartConfigProduct" after="cartCheckConfigProductOption"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartConfigProductloaded" after="cartClickCartConfigProduct"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertCartConfigProductPage" after="waitForCartConfigProductloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabConfigProductPageImageSrc" after="cartAssertCartConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabConfigProductPageImageSrc" stepKey="cartCartAssertConfigProductPageImageNotDefault" after="cartCartGrabConfigProductPageImageSrc"/> + + <!-- Add Configurable Product to comparison --> + <comment userInput="Add Configurable Product to comparison" stepKey="commentAddConfigurableProductToComparison" after="compareAddSimpleProduct2ToCompare" /> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="compareAssertConfigProduct" after="commentAddConfigurableProductToComparison"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrc" after="compareAssertConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrc" stepKey="compareAssertConfigProductImageNotDefault" after="compareGrabConfigProductImageSrc"/> + <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddConfigProductToCompare" after="compareAssertConfigProductImageNotDefault"> + <argument name="productVar" value="$$createConfigProduct$$"/> + </actionGroup> + + <!-- Check configurable product in comparison sidebar --> + <comment userInput="Add Configurable Product in comparison sidebar" stepKey="commentAddConfigurableProductInComparisonSidebar" after="compareSimpleProduct2InSidebar" /> + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareConfigProductInSidebar" after="commentAddConfigurableProductInComparisonSidebar"> + <argument name="productVar" value="$$createConfigProduct$$"/> + </actionGroup> + + <!-- Check configurable product on comparison page --> + <comment userInput="Add Configurable Product on comparison page" stepKey="commentAddConfigurableProductOnComparisonPage" after="compareAssertSimpleProduct2ImageNotDefaultInComparison" /> + <actionGroup ref="StorefrontCheckCompareConfigurableProductActionGroup" stepKey="compareAssertConfigProductInComparison" after="commentAddConfigurableProductOnComparisonPage"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrcInComparison" after="compareAssertConfigProductInComparison"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrcInComparison" stepKey="compareAssertConfigProductImageNotDefaultInComparison" after="compareGrabConfigProductImageSrcInComparison"/> + </test> +</tests> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml new file mode 100644 index 0000000000000..c0e7c886d0cc1 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml @@ -0,0 +1,161 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="StorefrontConfigurableProductChildSearchTest"> + <annotations> + <features value="ConfigurableProduct"/> + <stories value="View configurable product details in storefront"/> + <title value="Guest customer should be able to search configurable product by attributes of child products"/> + <description value="Guest customer should be able to search configurable product by attributes of child products"/> + <severity value="MAJOR"/> + <testCaseId value="MC-249"/> + <group value="ConfigurableProduct"/> + </annotations> + <before> + <!-- TODO: This should be converted to an actionGroup once MQE-993 is fixed. --> + <!-- Create the category --> + <createData entity="ApiCategory" stepKey="createCategory"/> + + <!-- Create the configurable product and add it to the category --> + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Create an attribute with two options to be used in the first child product --> + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + + <!-- Create an attribute with two options to be used in the second child product --> + <createData entity="productAttributeMultiselectTwoOptions" stepKey="createConfigProductAttributeMultiSelect"/> + <createData entity="productAttributeOption3" stepKey="createConfigProductAttributeOption1Multiselect"> + <requiredEntity createDataKey="createConfigProductAttributeMultiSelect"/> + </createData> + <createData entity="productAttributeOption4" stepKey="createConfigProductAttributeOption2Multiselect"> + <requiredEntity createDataKey="createConfigProductAttributeMultiSelect"/> + </createData> + + <!-- Add the attribute we just created to default attribute set --> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + + <!-- Add the second attribute we just created to default attribute set --> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet2"> + <requiredEntity createDataKey="createConfigProductAttributeMultiSelect"/> + </createData> + + <!-- Get the first option of the attribute we created --> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + + <!-- Get the first option of the second attribute we created --> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttributeMultiSelect"/> + </getData> + + <!-- Create a simple product and give it the attribute with the first option --> + <createData entity="ApiSimpleOneHidden" stepKey="createConfigChildProduct1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct1" createDataKey="createConfigChildProduct1"/> + + <!-- Create a simple product and give it the attribute with the second option --> + <createData entity="ApiSimpleTwoHidden" stepKey="createConfigChildProduct2"> + <requiredEntity createDataKey="createConfigProductAttributeMultiSelect"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + + <!-- Create the configurable product --> + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + + <!-- Add the first simple product to the configurable product --> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + + <!-- Add the second simple product to the configurable product --> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + + <!-- Create an attribute with two options to be used in the first child product (in the UI) --> + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttributeSelect"/> + <createData entity="productAttributeOption5" stepKey="createConfigProductAttributeSelectOption1"> + <requiredEntity createDataKey="createConfigProductAttributeSelect"/> + </createData> + <createData entity="productAttributeOption6" stepKey="createConfigProductAttributeSelectOption2"> + <requiredEntity createDataKey="createConfigProductAttributeSelect"/> + </createData> + + <!-- Add the attribute we just created to default attribute set --> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet3"> + <requiredEntity createDataKey="createConfigProductAttributeSelect"/> + </createData> + + <actionGroup ref="LoginAsAdmin" stepKey="login"/> + + <!-- Go to the product page for the first product --> + <amOnPage stepKey="goToProductGrid" url="{{ProductCatalogPage.url}}"/> + <waitForPageLoad stepKey="waitForProductGridLoad"/> + <actionGroup stepKey="searchForSimpleProduct" ref="filterProductGridBySku2"> + <argument name="sku" value="$$createConfigChildProduct1.sku$$"/> + </actionGroup> + <actionGroup stepKey="openProductEditPage" ref="openProducForEditByClickingRowXColumnYInProductGrid"/> + + <!-- Edit the attribute for the first simple product --> + <selectOption stepKey="editSelectAttribute" selector="{{ModifyAttributes.nthExistingAttribute($$createConfigProductAttributeSelect.default_frontend_label$$)}}" userInput="$$createConfigProductAttributeSelectOption1.option[store_labels][0][label]$$"/> + <scrollToTopOfPage stepKey="scrollToTop"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/> + <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/> + </before> + + <after> + <amOnPage url="admin/admin/auth/logout/" stepKey="logout"/> + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> + <deleteData createDataKey="createConfigProductAttributeMultiSelect" stepKey="deleteConfigProductAttributeMultiSelect"/> + <deleteData createDataKey="createConfigProductAttributeSelect" stepKey="deleteConfigProductAttributeSelect"/> + <deleteData createDataKey="createCategory" stepKey="deleteApiCategory"/> + </after> + + <!-- Quick search the storefront for the first attribute option --> + <amOnPage stepKey="goToStoreFront" url="{{StorefrontHomePage.url}}"/> + <waitForPageLoad stepKey="waitForStorefront"/> + <fillField stepKey="searchStorefront1" selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createConfigProductAttributeSelectOption1.option[store_labels][0][label]$$"/> + <click stepKey="clickSearch1" selector="{{StorefrontQuickSearchSection.searchButton}}"/> + <seeElement stepKey="seeProduct1" selector="{{StorefrontCategoryProductSection.ProductTitleByName('$$createConfigProduct.name$$')}}"/> + + <!-- Quick search the storefront for the second attribute option --> + <fillField stepKey="searchStorefront2" selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createConfigProductAttributeOption1Multiselect.option[store_labels][0][label]$$"/> + <click stepKey="clickSearch2" selector="{{StorefrontQuickSearchSection.searchButton}}"/> + <seeElement stepKey="seeProduct2" selector="{{StorefrontCategoryProductSection.ProductTitleByName('$$createConfigProduct.name$$')}}"/> + + <!-- Quick search the storefront for the first product description --> + <fillField stepKey="searchStorefront3" selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="'$$createConfigChildProduct1.custom_attributes[short_description]$$'"/> + <click stepKey="clickSearch3" selector="{{StorefrontQuickSearchSection.searchButton}}"/> + <seeElement stepKey="seeProduct3" selector="{{StorefrontCategoryProductSection.ProductTitleByName('$$createConfigProduct.name$$')}}"/> + </test> +</tests> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/StorefrontConfigurableProductDetailsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest.xml similarity index 98% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/StorefrontConfigurableProductDetailsTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest.xml index e7f733cf010f3..3b0f5752ebf5d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/StorefrontConfigurableProductDetailsTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontConfigurableProductBasicInfoTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/StorefrontConfigurableProductViewTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/StorefrontConfigurableProductViewTest.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest.xml index baaa5c4ef938f..b8e894ccf3606 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/StorefrontConfigurableProductViewTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontConfigurableProductGridViewTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml new file mode 100644 index 0000000000000..e7091dbfae215 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="StorefrontConfigurableProductWithFileCustomOptionTest"> + <annotations> + <features value="ConfigurableProduct"/> + <stories value="Add configurable product to cart"/> + <title value="Correct error message and redirect with invalid file option"/> + <description value="Configurable product has file custom option. When adding to cart with an invalid filetype, the correct error message is shown, and options remain selected."/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-93059"/> + <group value="ConfigurableProduct"/> + </annotations> + + <before> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + </before> + + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + </after> + + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + + <!-- Create a configurable product via the UI --> + <actionGroup ref="createConfigurableProduct" stepKey="createProduct"> + <argument name="product" value="BaseConfigurableProduct"/> + <argument name="category" value="$$createCategory$$"/> + </actionGroup> + <!--Add custom option to configurable product--> + <actionGroup ref="AddProductCustomOptionFile" stepKey="addCustomOptionToProduct"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/> + + <!--Go to storefront--> + <amOnPage url="" stepKey="goToHomePage"/> + <waitForPageLoad stepKey="waitForHomePageLoad"/> + <click selector="{{StorefrontNavigationSection.topCategory($$createCategory.name$$)}}" stepKey="goToCategoryStorefront"/> + <waitForPageLoad stepKey="waitForCategoryPageLoad"/> + <see selector="{{StorefrontCategoryMainSection.CategoryTitle}}" userInput="$$createCategory.name$$" stepKey="seeOnCategoryPage"/> + <!--Add configurable product to cart--> + <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductTitleByName(BaseConfigurableProduct.name)}}" stepKey="hoverProductInGrid"/> + <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(BaseConfigurableProduct.name)}}" stepKey="tryAddToCartFromCategoryPage"/> + <waitForPageLoad stepKey="waitForRedirectToProductPage"/> + <seeInCurrentUrl url="{{StorefrontProductPage.url(BaseConfigurableProduct.urlKey)}}" stepKey="seeOnProductPage"/> + <selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="{{colorProductAttribute2.name}}" stepKey="selectColor"/> + <!--Try invalid file--> + <attachFile selector="{{StorefrontProductInfoMainSection.addLinkFileUploadFile(ProductOptionFile.title)}}" userInput="lorem_ipsum.docx" stepKey="attachInvalidFile"/> + <click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addToCartInvalidFile"/> + <waitForElementVisible selector="{{StorefrontProductPageSection.alertMessage}}" stepKey="waitForErrorMessageInvalidFile"/> + <see selector="{{StorefrontProductPageSection.messagesBlock}}" userInput="The file 'lorem_ipsum.docx' for '{{ProductOptionFile.title}}' has an invalid extension." stepKey="seeMessageInvalidFile"/> + <!--Option remains selected--> + <seeOptionIsSelected selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="{{colorProductAttribute2.name}}" stepKey="seeOptionRemainSelected"/> + <!--Try valid file--> + <attachFile selector="{{StorefrontProductInfoMainSection.addLinkFileUploadFile(ProductOptionFile.title)}}" userInput="{{MagentoLogo.file}}" stepKey="attachValidFile"/> + <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$11.99" stepKey="seePriceUpdated"/> + <click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addToCartValidFile"/> + <waitForElementVisible selector="{{StorefrontProductPageSection.successMsg}}" stepKey="waitForSuccessMessage"/> + <see selector="{{StorefrontProductPageSection.messagesBlock}}" userInput="You added {{BaseConfigurableProduct.name}} to your shopping cart." stepKey="seeSuccessMessage"/> + + <!--Check item in cart--> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/> + <waitForPageLoad stepKey="waitForCartPageLoad"/> + <seeElement selector="{{CheckoutCartProductSection.ProductLinkByName(BaseConfigurableProduct.name)}}" stepKey="seeProductInCart"/> + <see selector="{{CheckoutCartProductSection.ProductOptionByNameAndAttribute(BaseConfigurableProduct.name, colorProductAttribute.default_label)}}" userInput="{{colorProductAttribute2.name}}" stepKey="seeSelectedOption"/> + <see selector="{{CheckoutCartProductSection.ProductOptionByNameAndAttribute(BaseConfigurableProduct.name, ProductOptionFile.title)}}" userInput="{{MagentoLogo.file}}" stepKey="seeCorrectOptionFile"/> + <!--Delete cart item--> + <click selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="deleteCartItem"/> + </test> +</tests> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/composer.json b/app/code/Magento/ConfigurableProduct/Test/Mftf/composer.json new file mode 100644 index 0000000000000..78063660f0025 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/composer.json @@ -0,0 +1,34 @@ +{ + "name": "magento/functional-test-module-configurable-product", + "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-checkout": "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-media-storage": "100.0.0-dev", + "magento/functional-test-module-msrp": "100.0.0-dev", + "magento/functional-test-module-quote": "100.0.0-dev", + "magento/functional-test-module-store": "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-sales": "100.0.0-dev", + "magento/functional-test-module-product-video": "100.0.0-dev", + "magento/functional-test-module-configurable-sample-data": "100.0.0-dev", + "magento/functional-test-module-product-links-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Steps/SelectAttributesTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Steps/SelectAttributesTest.php index 040329dbb3d87..33b87467950fd 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Steps/SelectAttributesTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Steps/SelectAttributesTest.php @@ -114,6 +114,9 @@ public function testGetAddNewAttributeButton($isAllowed, $result) $this->assertEquals($result, $this->selectAttributes->getAddNewAttributeButton()); } + /** + * @return array + */ public function attributesDataProvider() { return [ diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Attribute/LockValidatorTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Attribute/LockValidatorTest.php index 090c464d49307..665f296fc9a94 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Attribute/LockValidatorTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Attribute/LockValidatorTest.php @@ -108,6 +108,10 @@ public function testValidateException() $this->validate(true); } + /** + * @param $exception + * @throws \Magento\Framework\Exception\LocalizedException + */ public function validate($exception) { $attrTable = 'someAttributeTable'; diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionRepositoryTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionRepositoryTest.php index 7ea55c51a5bb3..4b35182fb9e2f 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionRepositoryTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/OptionRepositoryTest.php @@ -390,6 +390,9 @@ public function testValidateNewOptionData($attributeId, $label, $optionValues, $ $this->model->validateNewOptionData($optionMock); } + /** + * @return array + */ public function validateOptionDataProvider() { return [ diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Observer/HideUnsupportedAttributeTypesTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Observer/HideUnsupportedAttributeTypesTest.php index 3bad81126f510..03c26fd949283 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Observer/HideUnsupportedAttributeTypesTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Observer/HideUnsupportedAttributeTypesTest.php @@ -59,6 +59,11 @@ private function createTarget(\PHPUnit_Framework_MockObject_MockObject $request, ); } + /** + * @param $popup + * @param string $productTab + * @return MockObject + */ private function createRequestMock($popup, $productTab = 'variations') { $request = $this->getMockBuilder(RequestInterface::class) @@ -107,6 +112,9 @@ public function testExecuteWithDefaultTypes(array $supportedTypes, array $origin $this->assertEquals(null, $target->execute($event)); } + /** + * @return array + */ public function executeDataProvider() { return [ @@ -143,11 +151,21 @@ public function executeDataProvider() ]; } + /** + * @param $value + * @param $label + * @return array + */ private function createFrontendInputValue($value, $label) { return ['value' => $value, 'label' => $label]; } + /** + * @param array $originalValues + * @param array $expectedValues + * @return MockObject + */ private function createForm(array $originalValues = [], array $expectedValues = []) { $form = $this->getMockBuilder(\Magento\Framework\Data\Form::class) diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Pricing/Price/ConfigurablePriceResolverTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Pricing/Price/ConfigurablePriceResolverTest.php index 99c31420473f5..189730e18080c 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Pricing/Price/ConfigurablePriceResolverTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Pricing/Price/ConfigurablePriceResolverTest.php @@ -55,24 +55,31 @@ protected function setUp() * situation: one product is supplying the price, which could be a price of zero (0) * * @dataProvider resolvePriceDataProvider + * + * @param $variantPrices + * @param $expectedPrice */ - public function testResolvePrice($expectedValue) + public function testResolvePrice($variantPrices, $expectedPrice) { - $price = $expectedValue; - $product = $this->getMockBuilder( \Magento\Catalog\Model\Product::class )->disableOriginalConstructor()->getMock(); $product->expects($this->never())->method('getSku'); - $this->lowestPriceOptionsProvider->expects($this->once())->method('getProducts')->willReturn([$product]); - $this->priceResolver->expects($this->once()) + $products = array_map(function () { + return $this->getMockBuilder(\Magento\Catalog\Model\Product::class) + ->disableOriginalConstructor() + ->getMock(); + }, $variantPrices); + + $this->lowestPriceOptionsProvider->expects($this->once())->method('getProducts')->willReturn($products); + $this->priceResolver ->method('resolvePrice') - ->with($product) - ->willReturn($price); + ->willReturnOnConsecutiveCalls(...$variantPrices); - $this->assertEquals($expectedValue, $this->resolver->resolvePrice($product)); + $actualPrice = $this->resolver->resolvePrice($product); + self::assertSame($expectedPrice, $actualPrice); } /** @@ -81,8 +88,40 @@ public function testResolvePrice($expectedValue) public function resolvePriceDataProvider() { return [ - 'price of zero' => [0.00], - 'price of five' => [5], + 'Single variant at price 0.00 (float), should return 0.00 (float)' => [ + $variantPrices = [ + 0.00, + ], + $expectedPrice = 0.00, + ], + 'Single variant at price 5 (integer), should return 5.00 (float)' => [ + $variantPrices = [ + 5, + ], + $expectedPrice = 5.00, + ], + 'Single variants at price null (null), should return 0.00 (float)' => [ + $variantPrices = [ + null, + ], + $expectedPrice = 0.00, + ], + 'Multiple variants at price 0, 10, 20, should return 0.00 (float)' => [ + $variantPrices = [ + 0, + 10, + 20, + ], + $expectedPrice = 0.00, + ], + 'Multiple variants at price 10, 0, 20, should return 0.00 (float)' => [ + $variantPrices = [ + 10, + 0, + 20, + ], + $expectedPrice = 0.00, + ], ]; } } diff --git a/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml b/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml index ba52b51d6b077..86baea3c0d296 100644 --- a/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml +++ b/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml @@ -9,7 +9,7 @@ <system> <section id="checkout"> <group id="cart"> - <field id="configurable_product_image" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <field id="configurable_product_image" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> <label>Configurable Product Image</label> <source_model>Magento\Catalog\Model\Config\Source\Product\Thumbnail</source_model> </field> diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml b/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml index 9b8e2c0c8c0bd..f5ed067967547 100644 --- a/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml +++ b/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml @@ -38,6 +38,9 @@ $_attributes = $block->decorateArray($block->getAllowAttributes()); "gallerySwitchStrategy": "<?php /* @escapeNotVerified */ echo $block->getVar('gallery_switch_strategy', 'Magento_ConfigurableProduct') ?: 'replace'; ?>" } + }, + "*" : { + "Magento_ConfigurableProduct/js/catalog-add-to-cart": {} } } </script> diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/web/js/catalog-add-to-cart.js b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/catalog-add-to-cart.js new file mode 100644 index 0000000000000..3e6a611c268af --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/catalog-add-to-cart.js @@ -0,0 +1,20 @@ +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +require([ + 'jquery' +], function ($) { + 'use strict'; + + /** + * Add selected configurable attributes to redirect url + * + * @see Magento_Catalog/js/catalog-add-to-cart + */ + $('body').on('catalogCategoryAddToCartRedirect', function (event, data) { + $(data.form).find('select[name*="super"]').each(function (index, item) { + data.redirectParameters.push(item.config.id + '=' + $(item).val()); + }); + }); +}); diff --git a/app/code/Magento/ConfigurableProductGraphQl/Test/Mftf/README.md b/app/code/Magento/ConfigurableProductGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..4204eeb6a0874 --- /dev/null +++ b/app/code/Magento/ConfigurableProductGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Configurable Product Graph Ql Functional Tests + +The Functional Test Module for **Magento Configurable Product Graph Ql** module. diff --git a/app/code/Magento/ConfigurableProductGraphQl/Test/Mftf/composer.json b/app/code/Magento/ConfigurableProductGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..6d32ef35f6eb2 --- /dev/null +++ b/app/code/Magento/ConfigurableProductGraphQl/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-configurable-product-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-configurable-product": "100.0.0-dev", + "magento/functional-test-module-catalog-graph-ql": "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/ConfigurableProductSales/LICENSE.txt b/app/code/Magento/ConfigurableProductSales/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductSales/LICENSE.txt rename to app/code/Magento/ConfigurableProductSales/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductSales/LICENSE_AFL.txt b/app/code/Magento/ConfigurableProductSales/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductSales/LICENSE_AFL.txt rename to app/code/Magento/ConfigurableProductSales/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/ConfigurableProductSales/Test/Mftf/README.md b/app/code/Magento/ConfigurableProductSales/Test/Mftf/README.md new file mode 100644 index 0000000000000..944286966a7ad --- /dev/null +++ b/app/code/Magento/ConfigurableProductSales/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Configurable Product Sales Functional Tests + +The Functional Test Module for **Magento Configurable Product Sales** module. diff --git a/app/code/Magento/ConfigurableProductSales/Test/Mftf/composer.json b/app/code/Magento/ConfigurableProductSales/Test/Mftf/composer.json new file mode 100644 index 0000000000000..416e6a0c45ce1 --- /dev/null +++ b/app/code/Magento/ConfigurableProductSales/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-configurable-product-sales", + "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-sales": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-configurable-product": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/LICENSE.txt b/app/code/Magento/Contact/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/LICENSE.txt rename to app/code/Magento/Contact/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/LICENSE_AFL.txt b/app/code/Magento/Contact/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/LICENSE_AFL.txt rename to app/code/Magento/Contact/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Contact/Test/Mftf/README.md b/app/code/Magento/Contact/Test/Mftf/README.md new file mode 100644 index 0000000000000..e2f9a58f72089 --- /dev/null +++ b/app/code/Magento/Contact/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Contact Functional Tests + +The Functional Test Module for **Magento Contact** module. diff --git a/app/code/Magento/Contact/Test/Mftf/composer.json b/app/code/Magento/Contact/Test/Mftf/composer.json new file mode 100644 index 0000000000000..824257ae8d0c4 --- /dev/null +++ b/app/code/Magento/Contact/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-contact", + "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-cms": "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-store": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php b/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php index 0e1ddf21c2a08..4b49373201e51 100644 --- a/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php +++ b/app/code/Magento/Contact/Test/Unit/Controller/Index/PostTest.php @@ -144,6 +144,9 @@ public function testExecutePostValidation($postData, $exceptionExpected) $this->controller->execute(); } + /** + * @return array + */ public function postDataProvider() { return [ diff --git a/app/code/Magento/Contact/Test/Unit/Controller/Stub/IndexStub.php b/app/code/Magento/Contact/Test/Unit/Controller/Stub/IndexStub.php index a238daafaafaf..cabcebda061f9 100644 --- a/app/code/Magento/Contact/Test/Unit/Controller/Stub/IndexStub.php +++ b/app/code/Magento/Contact/Test/Unit/Controller/Stub/IndexStub.php @@ -8,6 +8,9 @@ class IndexStub extends \Magento\Contact\Controller\Index { + /** + * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void + */ public function execute() { // Empty method stub for test diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/LICENSE.txt b/app/code/Magento/Cookie/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/LICENSE.txt rename to app/code/Magento/Cookie/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/LICENSE_AFL.txt b/app/code/Magento/Cookie/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/LICENSE_AFL.txt rename to app/code/Magento/Cookie/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Cookie/Test/Mftf/README.md b/app/code/Magento/Cookie/Test/Mftf/README.md new file mode 100644 index 0000000000000..c06fe5dcd60de --- /dev/null +++ b/app/code/Magento/Cookie/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Cookie Functional Tests + +The Functional Test Module for **Magento Cookie** module. diff --git a/app/code/Magento/Cookie/Test/Mftf/composer.json b/app/code/Magento/Cookie/Test/Mftf/composer.json new file mode 100644 index 0000000000000..54578425c5516 --- /dev/null +++ b/app/code/Magento/Cookie/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-cookie", + "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-store": "100.0.0-dev" + }, + "suggest": { + "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/Cookie/Test/Unit/Helper/CookieTest.php b/app/code/Magento/Cookie/Test/Unit/Helper/CookieTest.php index 5694f3f3cab56..62ce6baf6c101 100644 --- a/app/code/Magento/Cookie/Test/Unit/Helper/CookieTest.php +++ b/app/code/Magento/Cookie/Test/Unit/Helper/CookieTest.php @@ -79,6 +79,9 @@ public function testGetCookieRestrictionLifetime() $this->assertEquals($this->_object->getCookieRestrictionLifetime(), 60 * 60 * 24 * 365); } + /** + * @return $this + */ protected function _initMock() { $scopeConfig = $this->_getConfigStub(); diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/LICENSE.txt b/app/code/Magento/Cron/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/LICENSE.txt rename to app/code/Magento/Cron/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/LICENSE_AFL.txt b/app/code/Magento/Cron/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/LICENSE_AFL.txt rename to app/code/Magento/Cron/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Cron/Test/Mftf/README.md b/app/code/Magento/Cron/Test/Mftf/README.md new file mode 100644 index 0000000000000..76e02eadfb055 --- /dev/null +++ b/app/code/Magento/Cron/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Cron Functional Tests + +The Functional Test Module for **Magento Cron** module. diff --git a/app/code/Magento/Cron/Test/Mftf/composer.json b/app/code/Magento/Cron/Test/Mftf/composer.json new file mode 100644 index 0000000000000..a091882117d12 --- /dev/null +++ b/app/code/Magento/Cron/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-cron", + "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-store": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency.php b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency.php index c740b17ed008c..ec73ac0cf7aa5 100644 --- a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency.php +++ b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency.php @@ -20,7 +20,7 @@ class Currency extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'system/currency/rates.phtml'; + protected $_template = 'Magento_CurrencySymbol::system/currency/rates.phtml'; /** * Prepare layout diff --git a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php index 80415c9486898..e20054a5a8084 100644 --- a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php +++ b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Matrix.php @@ -16,7 +16,7 @@ class Matrix extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'system/currency/rate/matrix.phtml'; + protected $_template = 'Magento_CurrencySymbol::system/currency/rate/matrix.phtml'; /** * @var \Magento\Directory\Model\CurrencyFactory diff --git a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Services.php b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Services.php index 919a4d0ed6d7b..491ed93900bde 100644 --- a/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Services.php +++ b/app/code/Magento/CurrencySymbol/Block/Adminhtml/System/Currency/Rate/Services.php @@ -16,7 +16,7 @@ class Services extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'system/currency/rate/services.phtml'; + protected $_template = 'Magento_CurrencySymbol::system/currency/rate/services.phtml'; /** * @var \Magento\Directory\Model\Currency\Import\Source\ServiceFactory diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/LICENSE.txt b/app/code/Magento/CurrencySymbol/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/LICENSE.txt rename to app/code/Magento/CurrencySymbol/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/LICENSE_AFL.txt b/app/code/Magento/CurrencySymbol/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/LICENSE_AFL.txt rename to app/code/Magento/CurrencySymbol/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/README.md b/app/code/Magento/CurrencySymbol/Test/Mftf/README.md new file mode 100644 index 0000000000000..5a927d934494a --- /dev/null +++ b/app/code/Magento/CurrencySymbol/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Currency Symbol Functional Tests + +The Functional Test Module for **Magento Currency Symbol** module. diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/composer.json b/app/code/Magento/CurrencySymbol/Test/Mftf/composer.json new file mode 100644 index 0000000000000..ca14f3ebd0bf9 --- /dev/null +++ b/app/code/Magento/CurrencySymbol/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-currency-symbol", + "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-config": "100.0.0-dev", + "magento/functional-test-module-directory": "100.0.0-dev", + "magento/functional-test-module-page-cache": "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/CurrencySymbol/Test/Unit/Model/System/CurrencysymbolTest.php b/app/code/Magento/CurrencySymbol/Test/Unit/Model/System/CurrencysymbolTest.php index 453a06651f354..0ae099fd78edc 100644 --- a/app/code/Magento/CurrencySymbol/Test/Unit/Model/System/CurrencysymbolTest.php +++ b/app/code/Magento/CurrencySymbol/Test/Unit/Model/System/CurrencysymbolTest.php @@ -236,6 +236,9 @@ public function testGetCurrencySymbol( $this->assertEquals($expectedSymbol, $currencySymbol); } + /** + * @return array + */ public function getCurrencySymbolDataProvider() { return [ diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php index 032d1ae5d732f..46a8dcfb28f1b 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Newsletter.php @@ -17,7 +17,7 @@ class Newsletter extends \Magento\Backend\Block\Widget\Form\Generic implements T /** * @var string */ - protected $_template = 'tab/newsletter.phtml'; + protected $_template = 'Magento_Customer::tab/newsletter.phtml'; /** * @var \Magento\Newsletter\Model\SubscriberFactory diff --git a/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php b/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php index 4a0d0f66425bb..9ee856f6e0af9 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php @@ -24,7 +24,7 @@ class Vat extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Element /** * @var string */ - protected $_template = 'sales/order/create/address/form/renderer/vat.phtml'; + protected $_template = 'Magento_Customer::sales/order/create/address/form/renderer/vat.phtml'; /** * @var \Magento\Framework\Json\EncoderInterface diff --git a/app/code/Magento/Customer/Block/Newsletter.php b/app/code/Magento/Customer/Block/Newsletter.php index 7a34b1d892bc1..a5e768915f91b 100644 --- a/app/code/Magento/Customer/Block/Newsletter.php +++ b/app/code/Magento/Customer/Block/Newsletter.php @@ -20,7 +20,7 @@ class Newsletter extends \Magento\Customer\Block\Account\Dashboard /** * @var string */ - protected $_template = 'form/newsletter.phtml'; + protected $_template = 'Magento_Customer::form/newsletter.phtml'; /** * @return bool diff --git a/app/code/Magento/Customer/Model/Address/Validator/Country.php b/app/code/Magento/Customer/Model/Address/Validator/Country.php index ff1020eba70ef..d7fb51dbbd442 100644 --- a/app/code/Magento/Customer/Model/Address/Validator/Country.php +++ b/app/code/Magento/Customer/Model/Address/Validator/Country.php @@ -88,6 +88,8 @@ private function validateCountry(AbstractAddress $address) * * @param AbstractAddress $address * @return array + * @throws \Zend_Validate_Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function validateRegion(AbstractAddress $address) { @@ -107,7 +109,7 @@ private function validateRegion(AbstractAddress $address) //If country actually has regions and requires you to //select one then it must be selected. $errors[] = __('"%fieldName" is required. Enter and try again.', ['fieldName' => 'regionId']); - } elseif ($regionId && !in_array($regionId, $allowedRegions, true)) { + } elseif ($allowedRegions && $regionId && !in_array($regionId, $allowedRegions, true)) { //If a region is selected then checking if it exists. $errors[] = __( 'Invalid value of "%value" provided for the %fieldName field.', diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php b/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php index b7b462b3cc317..2d000ccfb4b93 100644 --- a/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php +++ b/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php @@ -45,7 +45,7 @@ public function aroundExecute(FlushFormKey $subject, callable $proceed, ...$args $currentFormKey = $this->dataFormKey->getFormKey(); $proceed(...$args); $beforeParams = $this->session->getBeforeRequestParams(); - if ($beforeParams['form_key'] == $currentFormKey) { + if (isset($beforeParams['form_key']) && $beforeParams['form_key'] === $currentFormKey) { $beforeParams['form_key'] = $this->dataFormKey->getFormKey(); $this->session->setBeforeRequestParams($beforeParams); } diff --git a/app/code/Magento/Customer/Model/ResourceModel/Group/Collection.php b/app/code/Magento/Customer/Model/ResourceModel/Group/Collection.php index 48710c46a5f1d..6e93210d04c3c 100644 --- a/app/code/Magento/Customer/Model/ResourceModel/Group/Collection.php +++ b/app/code/Magento/Customer/Model/ResourceModel/Group/Collection.php @@ -12,6 +12,11 @@ */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection { + /** + * @var string + */ + protected $_idFieldName = 'customer_group_id'; + /** * Resource initialization * diff --git a/app/code/Magento/Customer/Model/ResourceModel/Group/Grid/Collection.php b/app/code/Magento/Customer/Model/ResourceModel/Group/Grid/Collection.php index bf3400c3a2f68..f264245b30c4a 100644 --- a/app/code/Magento/Customer/Model/ResourceModel/Group/Grid/Collection.php +++ b/app/code/Magento/Customer/Model/ResourceModel/Group/Grid/Collection.php @@ -7,8 +7,62 @@ */ namespace Magento\Customer\Model\ResourceModel\Group\Grid; -class Collection extends \Magento\Customer\Model\ResourceModel\Group\Collection +use Magento\Customer\Model\ResourceModel\Group\Collection as GroupCollection; +use Magento\Framework\Api\Search\SearchResultInterface; +use Magento\Framework\Search\AggregationInterface; + +/** + * Collection for displaying grid of customer groups + */ +class Collection extends GroupCollection implements SearchResultInterface { + /** + * @var AggregationInterface + */ + protected $aggregations; + + /** + * @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory + * @param \Psr\Log\LoggerInterface $logger + * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy + * @param \Magento\Framework\Event\ManagerInterface $eventManager + * @param string $mainTable + * @param string $eventPrefix + * @param string $eventObject + * @param string $resourceModel + * @param string $model + * @param \Magento\Framework\DB\Adapter\AdapterInterface|string|null $connection + * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, + \Psr\Log\LoggerInterface $logger, + \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, + \Magento\Framework\Event\ManagerInterface $eventManager, + $mainTable, + $eventPrefix, + $eventObject, + $resourceModel, + $model = \Magento\Framework\View\Element\UiComponent\DataProvider\Document::class, + $connection = null, + \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null + ) { + parent::__construct( + $entityFactory, + $logger, + $fetchStrategy, + $eventManager, + $connection, + $resource + ); + $this->_eventPrefix = $eventPrefix; + $this->_eventObject = $eventObject; + $this->_init($model, $resourceModel); + $this->setMainTable($mainTable); + } + /** * Resource initialization * @return $this @@ -19,4 +73,78 @@ protected function _initSelect() $this->addTaxClass(); return $this; } + + /** + * @return AggregationInterface + */ + public function getAggregations() + { + return $this->aggregations; + } + + /** + * @param AggregationInterface $aggregations + * @return $this + */ + public function setAggregations($aggregations) + { + $this->aggregations = $aggregations; + return $this; + } + + /** + * Get search criteria. + * + * @return \Magento\Framework\Api\SearchCriteriaInterface|null + */ + public function getSearchCriteria() + { + return null; + } + + /** + * Set search criteria. + * + * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria + * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria = null) + { + return $this; + } + + /** + * Get total count. + * + * @return int + */ + public function getTotalCount() + { + return $this->getSize(); + } + + /** + * Set total count. + * + * @param int $totalCount + * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function setTotalCount($totalCount) + { + return $this; + } + + /** + * Set items list. + * + * @param \Magento\Framework\Api\ExtensibleDataInterface[] $items + * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function setItems(array $items = null) + { + return $this; + } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/ActionGroup/LoginToStorefrontActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/LoginToStorefrontActionGroup.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/ActionGroup/LoginToStorefrontActionGroup.xml rename to app/code/Magento/Customer/Test/Mftf/ActionGroup/LoginToStorefrontActionGroup.xml index ee455a4c03984..1a4e9071d306b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/ActionGroup/LoginToStorefrontActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/LoginToStorefrontActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="LoginToStorefrontActionGroup"> <arguments> <argument name="Customer"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml rename to app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml index a050161af2f4c..3d6e0fb54b054 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="OpenEditCustomerFromAdminActionGroup"> <arguments> <argument name="customer"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml rename to app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml index 04c50378c6607..de8418774f794 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml @@ -6,12 +6,13 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="SignUpNewUserFromStorefrontActionGroup"> <arguments> <argument name="Customer"/> </arguments> <amOnPage stepKey="amOnStorefrontPage" url="/"/> + <waitForPageLoad stepKey="waitForStorefrontPage"/> <click stepKey="clickOnCreateAccountLink" selector="{{StorefrontPanelHeaderSection.createAnAccountLink}}"/> <fillField stepKey="fillFirstName" userInput="{{Customer.firstname}}" selector="{{StorefrontCustomerCreateFormSection.firstnameField}}"/> <fillField stepKey="fillLastName" userInput="{{Customer.lastname}}" selector="{{StorefrontCustomerCreateFormSection.lastnameField}}"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml b/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml new file mode 100644 index 0000000000000..a1f0277ec40ec --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="CustomerAddressSimple" type="address"> + <data key="id">0</data> + <data key="customer_id">12</data> + <requiredEntity type="region">CustomerRegionOne</requiredEntity> + <data key="region_id">0</data> + <data key="country_id">USA</data> + <array key="street"> + <item>7700 W Parmer Ln</item> + <item>Bld D</item> + </array> + <data key="company">Magento</data> + <data key="telephone">1234568910</data> + <data key="fax">1234568910</data> + <data key="postcode">78729</data> + <data key="city">Austin</data> + <data key="state">Texas</data> + <data key="firstname">John</data> + <data key="lastname">Doe</data> + <data key="middlename">string</data> + <data key="prefix">Mr</data> + <data key="suffix">Sr</data> + <data key="vat_id">vatData</data> + <data key="default_shipping">true</data> + <data key="default_billing">true</data> + </entity> + <entity name="US_Address_TX" type="address"> + <data key="firstname">John</data> + <data key="lastname">Doe</data> + <data key="company">Magento</data> + <array key="street"> + <item>7700 West Parmer Lane</item> + </array> + <data key="city">Austin</data> + <data key="state">Texas</data> + <data key="country_id">US</data> + <data key="postcode">78729</data> + <data key="telephone">512-345-6789</data> + <data key="default_billing">Yes</data> + <data key="default_shipping">Yes</data> + <requiredEntity type="region">RegionTX</requiredEntity> + </entity> + <entity name="US_Address_NY" type="address"> + <data key="firstname">John</data> + <data key="lastname">Doe</data> + <data key="company">368</data> + <array key="street"> + <item>368 Broadway St.</item> + <item>113</item> + </array> + <data key="city">New York</data> + <data key="state">New York</data> + <data key="country_id">US</data> + <data key="postcode">10001</data> + <data key="telephone">512-345-6789</data> + <data key="default_billing">Yes</data> + <data key="default_shipping">Yes</data> + <requiredEntity type="region">RegionNY</requiredEntity> + </entity> + <entity name="US_Address_CA" type="address"> + <data key="firstname">John</data> + <data key="lastname">Doe</data> + <data key="company">Magento</data> + <array key="street"> + <item>7700 West Parmer Lane</item> + <item>113</item> + </array> + <data key="city">Los Angeles</data> + <data key="state">California</data> + <data key="country_id">US</data> + <data key="postcode">90001</data> + <data key="telephone">512-345-6789</data> + <data key="default_billing">Yes</data> + <data key="default_shipping">Yes</data> + <requiredEntity type="region">RegionCA</requiredEntity> + </entity> + <!--If required other field can be added to UK_Address entity, dont modify any existing data--> + <entity name="UK_Address" type="address"> + <data key="country_id">GB</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/CustomerData.xml b/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/CustomerData.xml rename to app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml index 4d65f2aa56b65..1827824ba4b92 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/CustomerData.xml +++ b/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="CustomerEntityOne" type="customer"> <data key="group_id">0</data> <data key="default_billing">defaultBillingValue</data> diff --git a/app/code/Magento/Customer/Test/Mftf/Data/CustomerGroupData.xml b/app/code/Magento/Customer/Test/Mftf/Data/CustomerGroupData.xml new file mode 100644 index 0000000000000..cc8e16f017f8e --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Data/CustomerGroupData.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="GeneralCustomerGroup" type="customerGroup"> + <data key="code">General</data> + <data key="tax_class_id">3</data> + <data key="tax_class_name">Retail Customer</data> + </entity> + <entity name="DefaultCustomerGroup" type="customerGroup"> + <array key="group_names"> + <item>General</item> + </array> + </entity> +</entities> diff --git a/app/code/Magento/Customer/Test/Mftf/Data/ExtensionAttributeSimple.xml b/app/code/Magento/Customer/Test/Mftf/Data/ExtensionAttributeSimple.xml new file mode 100644 index 0000000000000..fee4463709dd5 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Data/ExtensionAttributeSimple.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="ExtensionAttributeSimple" type="extension_attribute"> + <data key="is_subscribed">true</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/RegionData.xml b/app/code/Magento/Customer/Test/Mftf/Data/RegionData.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/RegionData.xml rename to app/code/Magento/Customer/Test/Mftf/Data/RegionData.xml index 95e0362e84d71..747f2d59745a1 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/RegionData.xml +++ b/app/code/Magento/Customer/Test/Mftf/Data/RegionData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="CustomerRegionOne" type="region"> <data key="region_code">100</data> <data key="region_id">12</data> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/LICENSE.txt b/app/code/Magento/Customer/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/LICENSE.txt rename to app/code/Magento/Customer/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/LICENSE_AFL.txt b/app/code/Magento/Customer/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/LICENSE_AFL.txt rename to app/code/Magento/Customer/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/address-meta.xml b/app/code/Magento/Customer/Test/Mftf/Metadata/address-meta.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/address-meta.xml rename to app/code/Magento/Customer/Test/Mftf/Metadata/address-meta.xml index 62e075c8679e5..deb911f244f11 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/address-meta.xml +++ b/app/code/Magento/Customer/Test/Mftf/Metadata/address-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateAddress" dataType="address" type="create"> <field key="region">region</field> <field key="country_id">string</field> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/customer-meta.xml b/app/code/Magento/Customer/Test/Mftf/Metadata/customer-meta.xml similarity index 90% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/customer-meta.xml rename to app/code/Magento/Customer/Test/Mftf/Metadata/customer-meta.xml index 882b4cf6e4046..ab2ee2aeddb54 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/customer-meta.xml +++ b/app/code/Magento/Customer/Test/Mftf/Metadata/customer-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateCustomer" dataType="customer" type="create" auth="adminOauth" url="/V1/customers" method="POST"> <contentType>application/json</contentType> <object dataType="customer" key="customer"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/customer_extension_attribute-meta.xml b/app/code/Magento/Customer/Test/Mftf/Metadata/customer_extension_attribute-meta.xml similarity index 78% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/customer_extension_attribute-meta.xml rename to app/code/Magento/Customer/Test/Mftf/Metadata/customer_extension_attribute-meta.xml index 83028f3dbc13f..8561e937221a9 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/customer_extension_attribute-meta.xml +++ b/app/code/Magento/Customer/Test/Mftf/Metadata/customer_extension_attribute-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateCustomerExtensionAttribute" dataType="customer_extension_attribute" type="create"> <field key="is_subscribed">boolean</field> <field key="extension_attribute">customer_nested_extension_attribute</field> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/customer_nested_extension_attribute-meta.xml b/app/code/Magento/Customer/Test/Mftf/Metadata/customer_nested_extension_attribute-meta.xml similarity index 78% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/customer_nested_extension_attribute-meta.xml rename to app/code/Magento/Customer/Test/Mftf/Metadata/customer_nested_extension_attribute-meta.xml index 0db3b0d9e7c92..eb9829cca4981 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/customer_nested_extension_attribute-meta.xml +++ b/app/code/Magento/Customer/Test/Mftf/Metadata/customer_nested_extension_attribute-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateNestedExtensionAttribute" dataType="customer_nested_extension_attribute" type="create"> <field key="id">integer</field> <field key="customer_id">integer</field> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/region-meta.xml b/app/code/Magento/Customer/Test/Mftf/Metadata/region-meta.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/region-meta.xml rename to app/code/Magento/Customer/Test/Mftf/Metadata/region-meta.xml index 1815eb54b2a91..3dd019462c846 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Metadata/region-meta.xml +++ b/app/code/Magento/Customer/Test/Mftf/Metadata/region-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateRegion" dataType="region" type="create"> <field key="region_code">string</field> <field key="region">string</field> diff --git a/app/code/Magento/Customer/Test/Mftf/Page/AdminCustomerPage.xml b/app/code/Magento/Customer/Test/Mftf/Page/AdminCustomerPage.xml new file mode 100644 index 0000000000000..06ab646aa4c75 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Page/AdminCustomerPage.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminCustomerPage" url="/customer/index/" area="admin" module="Magento_Customer"> + <section name="AdminCustomerGridMainActionsSection"/> + <section name="AdminCustomerMessagesSection"/> + <section name="AdminCustomerGridSection"/> + <section name="AdminCustomerFiltersSection"/> + </page> +</pages> diff --git a/app/code/Magento/Customer/Test/Mftf/Page/AdminEditCustomerPage.xml b/app/code/Magento/Customer/Test/Mftf/Page/AdminEditCustomerPage.xml new file mode 100644 index 0000000000000..9a28bad4e0d6a --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Page/AdminEditCustomerPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminEditCustomerPage" url="/customer/index/edit/id/{{var1}}" area="admin" module="Magento_Customer" parameterized="true"> + <section name="AdminCustomerAccountInformationSection"/> + <section name="AdminCustomerMainActionsSection"/> + </page> +</pages> diff --git a/app/code/Magento/Customer/Test/Mftf/Page/AdminNewCustomerPage.xml b/app/code/Magento/Customer/Test/Mftf/Page/AdminNewCustomerPage.xml new file mode 100644 index 0000000000000..646f03181d8fa --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Page/AdminNewCustomerPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminNewCustomerPage" url="/customer/index/new" area="admin" module="Magento_Customer"> + <section name="AdminCustomerAccountInformationSection"/> + <section name="AdminCustomerMainActionsSection"/> + </page> +</pages> diff --git a/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerCreatePage.xml b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerCreatePage.xml new file mode 100644 index 0000000000000..ba61cbb0bca42 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerCreatePage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCustomerCreatePage" url="/customer/account/create/" area="storefront" module="Magento_Customer"> + <section name="StorefrontCustomerCreateFormSection" /> + </page> +</pages> diff --git a/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerDashboardPage.xml b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerDashboardPage.xml new file mode 100644 index 0000000000000..941e247e18b8c --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerDashboardPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCustomerDashboardPage" url="/customer/account/" area="storefront" module="Magento_Customer"> + <section name="StorefrontCustomerDashboardAccountInformationSection" /> + </page> +</pages> diff --git a/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerOrderPage.xml b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerOrderPage.xml new file mode 100644 index 0000000000000..bd25c67c8c907 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerOrderPage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCustomerOrderPage" url="sales/order/view/order_id/" area="storefront" module="Magento_Customer"> + <section name="StorefrontCustomerOrderViewSection"/> + </page> +</pages> diff --git a/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerOrderViewPage.xml b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerOrderViewPage.xml new file mode 100644 index 0000000000000..7e6cebe6f3c78 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerOrderViewPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCustomerOrderViewPage" url="sales/order/view/order_id/{{var1}}" area="storefront" module="Magento_Customer" parameterized="true"> + <section name="StorefrontCustomerOrderSection" /> + </page> +</pages> diff --git a/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerSignInPage.xml b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerSignInPage.xml new file mode 100644 index 0000000000000..f6673227beada --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerSignInPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCustomerSignInPage" url="/customer/account/login/" area="storefront" module="Magento_Customer"> + <section name="StorefrontCustomerSignInFormSection" /> + </page> +</pages> diff --git a/app/code/Magento/Customer/Test/Mftf/Page/StorefrontHomePage.xml b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontHomePage.xml new file mode 100644 index 0000000000000..6b65bd97e8cb3 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontHomePage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontHomePage" url="/" area="storefront" module="Magento_Customer"> + <section name="StorefrontPanelHeader" /> + </page> +</pages> diff --git a/app/code/Magento/Customer/Test/Mftf/README.md b/app/code/Magento/Customer/Test/Mftf/README.md new file mode 100644 index 0000000000000..f9fe1cd5b4a39 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Customer Functional Tests + +The Functional Test Module for **Magento Customer** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerAccountInformationSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerAccountInformationSection.xml similarity index 78% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerAccountInformationSection.xml rename to app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerAccountInformationSection.xml index 4c72be870f161..647cc6e3ee11f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerAccountInformationSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerAccountInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCustomerAccountInformationSection"> <element name="accountInformationTitle" type="text" selector=".admin__page-nav-title"/> <element name="firstName" type="input" selector="input[name='customer[firstname]']"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerFiltersSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml similarity index 78% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerFiltersSection.xml rename to app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml index f5fefb156b8b6..7d106a35f0e13 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerFiltersSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml @@ -1,17 +1,17 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminCustomerFiltersSection"> - <element name="filtersButton" type="button" selector="#container > div > div.admin__data-grid-header > div:nth-child(1) > div.data-grid-filters-actions-wrap > div > button" timeout="30"/> - <element name="nameInput" type="input" selector="input[name=name]"/> - <element name="emailInput" type="input" selector="input[name=email]"/> - <element name="apply" type="button" selector="button[data-action=grid-filter-apply]" timeout="30"/> - </section> -</sections> +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminCustomerFiltersSection"> + <element name="filtersButton" type="button" selector="#container > div > div.admin__data-grid-header > div:nth-child(1) > div.data-grid-filters-actions-wrap > div > button" timeout="30"/> + <element name="nameInput" type="input" selector="input[name=name]"/> + <element name="emailInput" type="input" selector="input[name=email]"/> + <element name="apply" type="button" selector="button[data-action=grid-filter-apply]" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridMainActionsSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridMainActionsSection.xml new file mode 100644 index 0000000000000..760b2c3663322 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridMainActionsSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminCustomerGridMainActionsSection"> + <element name="addNewCustomer" type="button" selector="#add" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml new file mode 100644 index 0000000000000..515d5eed1124b --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminCustomerGridSection"> + <element name="customerGrid" type="text" selector="table[data-role='grid']"/> + <element name="firstRowEditLink" type="text" selector="tr[data-repeat-index='0'] .action-menu-item" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerMainActionsSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerMainActionsSection.xml new file mode 100644 index 0000000000000..1aadcb2fa469f --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerMainActionsSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminCustomerMainActionsSection"> + <element name="saveButton" type="button" selector="#save" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerMessagesSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerMessagesSection.xml new file mode 100644 index 0000000000000..08c29473a7ee6 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerMessagesSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminCustomerMessagesSection"> + <element name="successMessage" type="text" selector=".message-success"/> + </section> +</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerInformationSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerInformationSection.xml new file mode 100644 index 0000000000000..76feb2624b5ed --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerInformationSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminEditCustomerInformationSection"> + <element name="orders" type="button" selector="#tab_orders_content" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerOrdersSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerOrdersSection.xml new file mode 100644 index 0000000000000..bce4a7e848c13 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminEditCustomerOrdersSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminEditCustomerOrdersSection"> + <element name="orderGrid" type="text" selector="#customer_orders_grid_table"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerCreateFormSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerCreateFormSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerCreateFormSection.xml rename to app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerCreateFormSection.xml index 7cc7188e285dd..adf898a65f212 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerCreateFormSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerCreateFormSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCustomerCreateFormSection"> <element name="firstnameField" type="input" selector="#firstname"/> <element name="lastnameField" type="input" selector="#lastname"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerDashboardAccountInformationSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerDashboardAccountInformationSection.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerDashboardAccountInformationSection.xml rename to app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerDashboardAccountInformationSection.xml index 001dde0b98afd..21205c6d5d91e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerDashboardAccountInformationSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerDashboardAccountInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCustomerDashboardAccountInformationSection"> <element name="ContactInformation" type="textarea" selector=".box.box-information .box-content"/> </section> @@ -22,6 +22,6 @@ <element name="stateProvince" type="select" selector="#region_id"/> <element name="zip" type="input" selector="#zip"/> <element name="country" type="select" selector="#country"/> - <element name="saveAddress" type="button" selector="[data-action='save-address']"/> + <element name="saveAddress" type="button" selector="[data-action='save-address']" timeout="30"/> </section> </sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerOrderSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderSection.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerOrderSection.xml rename to app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderSection.xml index e12cbe0aa3ed4..c39dfef5f74e7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerOrderSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCustomerOrderSection"> <element name="productCustomOptions" type="text" selector="//strong[contains(@class, 'product-item-name') and normalize-space(.)='{{var1}}']/following-sibling::*[contains(@class, 'item-options')]/dt[normalize-space(.)='{{var2}}']/following-sibling::dd[normalize-space(.)='{{var3}}']" parameterized="true"/> <element name="productCustomOptionsFile" type="text" selector="//strong[contains(@class, 'product-item-name') and normalize-space(.)='{{var1}}']/following-sibling::*[contains(@class, 'item-options')]/dt[normalize-space(.)='{{var2}}']/following-sibling::dd[contains(.,'{{var3}}')]" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerOrderViewSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderViewSection.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerOrderViewSection.xml rename to app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderViewSection.xml index 4dee05cb28ed4..9ea271dad7b21 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerOrderViewSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderViewSection.xml @@ -6,7 +6,7 @@ */ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCustomerOrderViewSection"> <element name="reorder" type="text" selector="a.action.order" timeout="30"/> <element name="orderTitle" type="text" selector=".page-title span"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection.xml new file mode 100644 index 0000000000000..9cc4a43d31bc6 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontCustomerSignInFormSection"> + <element name="emailField" type="input" selector="#email"/> + <element name="passwordField" type="input" selector="#pass"/> + <element name="signInAccountButton" type="button" selector="#send2" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml new file mode 100644 index 0000000000000..65e7aa7a12113 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontPanelHeaderSection"> + <element name="WelcomeMessage" type="text" selector=".greet.welcome span"/> + <element name="createAnAccountLink" type="select" selector=".panel.header li:nth-child(3)" timeout="30"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/AdminCreateCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/AdminCreateCustomerTest.xml rename to app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml index 17c7b8410b705..bde15b31ff1e6 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/AdminCreateCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateCustomerTest"> <annotations> <features value="Customer"/> @@ -25,6 +25,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> <amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/> + <waitForPageLoad stepKey="waitForLoad1"/> <click selector="{{AdminCustomerGridMainActionsSection.addNewCustomer}}" stepKey="clickCreateCustomer"/> <waitForElement selector="{{AdminCustomerAccountInformationSection.firstName}}" stepKey="wait1"/> <fillField userInput="{{CustomerEntityOne.firstname}}" selector="{{AdminCustomerAccountInformationSection.firstName}}" stepKey="fillFirstName"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml new file mode 100644 index 0000000000000..a9563c4cc93d8 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CLoggedInUserTest"> + <annotations> + <features value="End to End scenarios"/> + <stories value="B2C logged in user - MAGETWO-72524"/> + <group value="e2e"/> + <title value="You should be able to pass End to End B2C Logged In User scenario"/> + <description value="New user signup and browses catalog, searches for product, adds product to cart, adds product to wishlist, compares products, uses coupon code and checks out."/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-87653"/> + </annotations> + <before> + <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> + </before> + <after> + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + </after> + <!-- Step 0: User signs up an account --> + <comment userInput="Start of signing up user account" stepKey="startOfSigningUpUserAccount" /> + <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> + <argument name="Customer" value="CustomerEntityOne"/> + </actionGroup> + <comment userInput="End of signing up user account" stepKey="endOfSigningUpUserAccount" /> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/StorefrontCreateCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml similarity index 84% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/StorefrontCreateCustomerTest.xml rename to app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml index 92893e76d42c2..3670cdba3872d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/StorefrontCreateCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontCreateCustomerTest"> <annotations> <features value="Customer"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/StorefrontPersistedCustomerLoginTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontPersistedCustomerLoginTest.xml similarity index 90% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/StorefrontPersistedCustomerLoginTest.xml rename to app/code/Magento/Customer/Test/Mftf/Test/StorefrontPersistedCustomerLoginTest.xml index 27e4db958cbfe..ec669be165e68 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/StorefrontPersistedCustomerLoginTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontPersistedCustomerLoginTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontPersistedCustomerLoginTest"> <annotations> <features value="Customer"/> diff --git a/app/code/Magento/Customer/Test/Mftf/composer.json b/app/code/Magento/Customer/Test/Mftf/composer.json new file mode 100644 index 0000000000000..4bf83a4bf800a --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/composer.json @@ -0,0 +1,39 @@ +{ + "name": "magento/functional-test-module-customer", + "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-authorization": "100.0.0-dev", + "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-config": "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-integration": "100.0.0-dev", + "magento/functional-test-module-media-storage": "100.0.0-dev", + "magento/functional-test-module-newsletter": "100.0.0-dev", + "magento/functional-test-module-page-cache": "100.0.0-dev", + "magento/functional-test-module-quote": "100.0.0-dev", + "magento/functional-test-module-review": "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-theme": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev", + "magento/functional-test-module-wishlist": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-cookie": "100.0.0-dev", + "magento/functional-test-module-customer-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Customer/Test/Unit/Block/Account/AuthenticationPopupTest.php b/app/code/Magento/Customer/Test/Unit/Block/Account/AuthenticationPopupTest.php index b43b1d1aa39a9..618173e886e66 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Account/AuthenticationPopupTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Account/AuthenticationPopupTest.php @@ -128,6 +128,9 @@ public function testGetConfig($isAutocomplete, $baseUrl, $registerUrl, $forgotUr $this->assertEquals($result, $this->model->getConfig()); } + /** + * @return array + */ public function dataProviderGetConfig() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Block/Account/CustomerTest.php b/app/code/Magento/Customer/Test/Unit/Block/Account/CustomerTest.php index 6489fea91e43e..793975c0b3191 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Account/CustomerTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Account/CustomerTest.php @@ -22,6 +22,9 @@ protected function setUp() ->getObject(\Magento\Customer\Block\Account\Customer::class, ['httpContext' => $this->httpContext]); } + /** + * @return array + */ public function customerLoggedInDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php b/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php index 66c686239e974..f04c10fa31576 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Account/Dashboard/InfoTest.php @@ -184,6 +184,9 @@ public function testIsNewsletterEnabled($isNewsletterEnabled, $expectedValue) $this->assertEquals($expectedValue, $this->_block->isNewsletterEnabled()); } + /** + * @return array + */ public function isNewsletterEnabledProvider() { return [[true, true], [false, false]]; diff --git a/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php b/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php index c12da66cdc616..92c2bcfeb8e59 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/Grid/Renderer/ItemTest.php @@ -14,6 +14,10 @@ class ItemTest extends \PHPUnit\Framework\TestCase /** @var \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Grid\Renderer\Item */ protected $itemBlock; + /** + * @param $amountOption + * @param bool $withoutOptions + */ public function configure($amountOption, $withoutOptions = false) { $options = []; @@ -95,6 +99,9 @@ public function testRender($amountOption, $expectedHtml) $this->assertXmlStringEqualsXmlString($expectedHtml, $realHtml); } + /** + * @return array + */ public function optionHtmlProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php index aff9aeeb59cf8..11222635d210d 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/NameTest.php @@ -157,6 +157,9 @@ public function testMethodWithNoSuchEntityException($method) $this->assertFalse($this->_block->{$method}()); } + /** + * @return array + */ public function methodDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Account/CreatePostTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Account/CreatePostTest.php index 2205bcd6f0a24..f8f47eedba3ef 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Account/CreatePostTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Account/CreatePostTest.php @@ -533,6 +533,9 @@ public function testSuccessRedirect( $this->model->execute(); } + /** + * @return array + */ public function getSuccessRedirectDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Address/FormPostTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Address/FormPostTest.php index 2b5438991b113..4ad1b5cbc96bd 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Address/FormPostTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Address/FormPostTest.php @@ -578,6 +578,9 @@ public function testExecute( $this->assertEquals($this->resultRedirect, $this->model->execute()); } + /** + * @return array + */ public function dataProviderTestExecute() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php index 22c5003544bed..913c41070856e 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/InlineEditTest.php @@ -164,6 +164,9 @@ protected function setUp() ]; } + /** + * @param int $populateSequence + */ protected function prepareMocksForTesting($populateSequence = 0) { $this->resultJsonFactory->expects($this->once()) diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php index 3e9089c473212..f4bf184f9ebf2 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php @@ -125,6 +125,9 @@ public function testExecute($sectionNames, $updateSectionID, $sectionNamesAsArra $this->loadAction->execute(); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/CustomerData/Plugin/SessionCheckerTest.php b/app/code/Magento/Customer/Test/Unit/CustomerData/Plugin/SessionCheckerTest.php index a4246b6398fd1..5beea22bda3d7 100644 --- a/app/code/Magento/Customer/Test/Unit/CustomerData/Plugin/SessionCheckerTest.php +++ b/app/code/Magento/Customer/Test/Unit/CustomerData/Plugin/SessionCheckerTest.php @@ -86,6 +86,9 @@ public function testBeforeStart($result, $callCount) $this->plugin->beforeStart($this->sessionManager); } + /** + * @return array + */ public function beforeStartDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Helper/AddressTest.php b/app/code/Magento/Customer/Test/Unit/Helper/AddressTest.php index e41831a1ced60..74af4ec57c77f 100644 --- a/app/code/Magento/Customer/Test/Unit/Helper/AddressTest.php +++ b/app/code/Magento/Customer/Test/Unit/Helper/AddressTest.php @@ -78,6 +78,9 @@ public function testGetStreetLines($numLines, $expectedNumLines) $this->assertEquals($expectedNumLines, $this->helper->getStreetLines()); } + /** + * @return array + */ public function providerGetStreetLines() { return [ @@ -190,6 +193,9 @@ public function testConvertStreetLines($origStreets, $toCount, $result) $this->assertEquals($result, $this->helper->convertStreetLines($origStreets, $toCount)); } + /** + * @return array + */ public function getConvertStreetLinesDataProvider() { return [ @@ -328,6 +334,9 @@ public function testGetFormatTypeRenderer($code, $result) $this->assertEquals($result, $this->helper->getFormatTypeRenderer($code)); } + /** + * @return array + */ public function getFormatTypeRendererDataProvider() { $renderer = $this->getMockBuilder(\Magento\Customer\Block\Address\Renderer\RendererInterface::class) @@ -362,6 +371,9 @@ public function testGetFormat($code, $result) $this->assertEquals($result, $this->helper->getFormat($code)); } + /** + * @return array + */ public function getFormatDataProvider() { return [ @@ -392,6 +404,9 @@ public function testIsAttributeVisible($attributeCode, $isMetadataExists) $this->assertEquals($isMetadataExists, $this->helper->isAttributeVisible($attributeCode)); } + /** + * @return array + */ public function isAttributeVisibleDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php b/app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php index 1b013a913b9f8..c64f7aca96fe6 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php @@ -39,6 +39,9 @@ public function testExemplarXml($fixtureXml, array $expectedErrors) $this->assertEquals($expectedErrors, $actualErrors); } + /** + * @return array + */ public function exemplarXmlDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Address/Validator/CountryTest.php b/app/code/Magento/Customer/Test/Unit/Model/Address/Validator/CountryTest.php index 9ab35f2d301d4..d8148543a55db 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Address/Validator/CountryTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Address/Validator/CountryTest.php @@ -161,7 +161,13 @@ public function validateDataProvider() 'region_id2' => [ array_merge($data, ['country_id' => $countryId, 'region_id' => 2]), [$countryId++], - [1], + [], + [], + ], + 'region_id3' => [ + array_merge($data, ['country_id' => $countryId, 'region_id' => 2]), + [$countryId++], + [1, 3], ['Invalid value of "2" provided for the regionId field.'], ], 'validated' => [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/AuthenticationTest.php b/app/code/Magento/Customer/Test/Unit/Model/AuthenticationTest.php index ee788913373e5..14adc7bcf8795 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/AuthenticationTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/AuthenticationTest.php @@ -196,6 +196,9 @@ public function testProcessAuthenticationFailureFirstAttempt( $this->authentication->processAuthenticationFailure($customerId); } + /** + * @return array + */ public function processAuthenticationFailureDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php index 9a9449a64ecbd..368e7cfd47f2f 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/PasswordTest.php @@ -39,6 +39,9 @@ public function testValidatePositive() $this->assertTrue($this->testable->validate($object)); } + /** + * @return array + */ public function passwordNegativeDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php index 029949c5f35b0..50c21379054bf 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php @@ -493,6 +493,9 @@ private function attributeGetUsingMethodCallback() }; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getCountryAttrMock() { $countryByWebsiteMock = $this->getMockBuilder(CountryWithWebsites::class) @@ -1266,7 +1269,7 @@ public function testGetDataWithVisibleAttributesWithAccountEdit() $helper = new ObjectManager($this); $context = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class) ->setMethods(['getRequestParam']) - ->getMockforAbstractClass(); + ->getMockForAbstractClass(); $context->expects($this->any()) ->method('getRequestParam') ->with('request-field-name') diff --git a/app/code/Magento/Customer/Test/Unit/Model/FileProcessorTest.php b/app/code/Magento/Customer/Test/Unit/Model/FileProcessorTest.php index f2db8c6cab6be..ea400933ea4c2 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/FileProcessorTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/FileProcessorTest.php @@ -71,6 +71,11 @@ protected function setUp() ->getMock(); } + /** + * @param $entityTypeCode + * @param array $allowedExtensions + * @return FileProcessor + */ private function getModel($entityTypeCode, array $allowedExtensions = []) { $model = new FileProcessor( diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/AbstractDataTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/AbstractDataTest.php index b9f8564d3616a..e4dc22ba40e31 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/AbstractDataTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/AbstractDataTest.php @@ -94,6 +94,9 @@ public function testSetRequestScopeOnly($bool) $this->assertSame($bool, $this->_model->isRequestScopeOnly()); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; @@ -122,6 +125,9 @@ public function testApplyInputFilter($input, $output, $filter) $this->assertEquals($output, $this->_model->applyInputFilter($input)); } + /** + * @return array + */ public function applyInputFilterProvider() { return [ @@ -160,6 +166,9 @@ public function testDateFilterFormat($format, $output) $this->assertEquals($output, $actual); } + /** + * @return array + */ public function dateFilterFormatProvider() { return [[null, 'Whatever I put'], [false, self::MODEL], ['something else', self::MODEL]]; @@ -231,6 +240,9 @@ public function testValidateInputRule($value, $label, $inputValidation, $expecte $this->assertEquals($expectedOutput, $this->_model->validateInputRule($value)); } + /** + * @return array + */ public function validateInputRuleDataProvider() { return [ @@ -319,6 +331,9 @@ public function testGetRequestValue($request, $attributeCode, $requestScope, $re $this->assertEquals($expectedValue, $this->_model->getRequestValue($request)); } + /** + * @return array + */ public function getRequestValueDataProvider() { $expectedValue = 'EXPECTED_VALUE'; diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/BooleanTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/BooleanTest.php index 4315340d65bff..d9f101b922cc8 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/BooleanTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/BooleanTest.php @@ -28,6 +28,9 @@ public function testGetOptionText($value, $expected) $this->assertSame($expected, (string)$boolean->outputValue()); } + /** + * @return array + */ public function getOptionTextDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php index 2c09555374aef..6329970e0ca9c 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php @@ -112,6 +112,9 @@ public function testValidateValue($value, $validation, $required, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function validateValueDataProvider() { return [ @@ -163,6 +166,9 @@ public function testCompactValue($value, $expected) $this->assertSame($expected, $this->date->compactValue($value)); } + /** + * @return array + */ public function compactAndRestoreValueDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/FileTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/FileTest.php index 97452b995ba0b..1cffaa6fe0379 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/FileTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/FileTest.php @@ -118,6 +118,9 @@ public function testExtractValueNoRequestScope($expected, $attributeCode = '', $ } } + /** + * @return array + */ public function extractValueNoRequestScopeDataProvider() { return [ @@ -178,6 +181,9 @@ public function testExtractValueWithRequestScope($expected, $requestScope, $main } } + /** + * @return array + */ public function extractValueWithRequestScopeDataProvider() { return [ @@ -228,6 +234,9 @@ public function testValidateValueNotToUpload($expected, $value, $isAjax = false, $this->assertEquals($expected, $model->validateValue($value)); } + /** + * @return array + */ public function validateValueNotToUploadDataProvider() { return [ @@ -285,6 +294,9 @@ public function testValidateValueToUpload($expected, $value, $parameters = []) $this->assertEquals($expected, $model->validateValue($value)); } + /** + * @return array + */ public function validateValueToUploadDataProvider() { return [ @@ -429,6 +441,9 @@ public function testOutputValueNonJson($format) $this->assertSame('', $model->outputValue($format)); } + /** + * @return array + */ public function outputValueDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/MultilineTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/MultilineTest.php index 25f10d7bb93c6..e74ddebdb597b 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/MultilineTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/MultilineTest.php @@ -42,6 +42,9 @@ public function testValidateValueRequired($value, $expected) parent::testValidateValueRequired($value, $expected); } + /** + * @return array + */ public function validateValueRequiredDataProvider() { return array_merge( @@ -66,6 +69,9 @@ public function testValidateValueLength($value, $expected) parent::testValidateValueLength($value, $expected); } + /** + * @return array + */ public function validateValueLengthDataProvider() { return array_merge( diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/SelectTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/SelectTest.php index c8564df6b086f..5861ef1f93784 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/SelectTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/SelectTest.php @@ -42,6 +42,9 @@ public function testValidateValue($value, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function validateValueDataProvider() { return [ @@ -74,6 +77,9 @@ public function testValidateValueRequired($value, $expected) } } + /** + * @return array + */ public function validateValueRequiredDataProvider() { return [ @@ -145,6 +151,9 @@ public function testOutputValue($value, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function outputValueDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/TextTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/TextTest.php index 9a3e1c1d8a7cb..b95987cba1dcf 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/TextTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/TextTest.php @@ -52,6 +52,9 @@ public function testValidateValue($value, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function validateValueDataProvider() { return [ @@ -84,6 +87,9 @@ public function testValidateValueRequired($value, $expected) } } + /** + * @return array + */ public function validateValueRequiredDataProvider() { return [ @@ -150,6 +156,9 @@ public function testValidateValueLength($value, $expected) } } + /** + * @return array + */ public function validateValueLengthDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php index bef2db9bf2694..354932b0ede0b 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/ValidatorTest.php @@ -79,6 +79,9 @@ public function testIsValid($isValid) $this->assertEquals($isValid, $this->validator->isValid(new \Magento\Framework\DataObject($data))); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php b/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php index 759c823eec7f9..c655ff7056ed6 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php @@ -90,6 +90,9 @@ public function testRender($regionCollection) $this->assertContains('required-entry', $html); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php index 87cfb092997e8..f1bc0b402c615 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php @@ -242,6 +242,9 @@ protected function prepareValidatorFactory() return $validatorFactory; } + /** + * @return \Magento\Customer\Model\CustomerFactory|\PHPUnit_Framework_MockObject_MockObject + */ protected function prepareCustomerFactory() { $this->customerFactory = $this->createPartialMock(\Magento\Customer\Model\CustomerFactory::class, ['create']); @@ -264,16 +267,26 @@ class SubResourceModelAddress extends \Magento\Customer\Model\ResourceModel\Addr { protected $attributeLoader; + /** + * @param null $object + * @return \Magento\Customer\Model\ResourceModel\Address|\Magento\Eav\Model\Entity\AbstractEntity + */ public function loadAllAttributes($object = null) { return $this->getAttributeLoader()->loadAllAttributes($this, $object); } + /** + * @param $attributeLoader + */ public function setAttributeLoader($attributeLoader) { $this->attributeLoader = $attributeLoader; } + /** + * @return \Magento\Eav\Model\Entity\AttributeLoaderInterface + */ protected function getAttributeLoader() { return $this->attributeLoader; diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/CollectionTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/CollectionTest.php new file mode 100644 index 0000000000000..fc4f762afb0bb --- /dev/null +++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/CollectionTest.php @@ -0,0 +1,136 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Customer\Test\Unit\Model\ResourceModel\Group\Grid; + +use Magento\Customer\Model\ResourceModel\Group\Grid\Collection; +use Magento\Framework\Api\Search\AggregationInterface; +use Magento\Framework\Data\Collection\Db\FetchStrategyInterface; +use Magento\Framework\Data\Collection\EntityFactoryInterface; +use Magento\Framework\DB\Adapter\AdapterInterface; +use Magento\Framework\Event\ManagerInterface; +use Magento\Framework\Model\ResourceModel\Db\AbstractDb; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Psr\Log\LoggerInterface; +use Magento\Framework\DB\Select; + +/** + * CollectionTest contains unit tests for \Magento\Customer\Model\ResourceModel\Group\Grid\Collection class + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class CollectionTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var EntityFactoryInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $entityFactoryMock; + + /** + * @var LoggerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $loggerMock; + + /** + * @var FetchStrategyInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $fetchStrategyMock; + + /** + * @var ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $eventManagerMock; + + /** + * @var AdapterInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $connectionMock; + + /** + * @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject + */ + protected $resourceMock; + + /** + * @var AggregationInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $aggregationsMock; + + /** + * @var Select + */ + protected $selectMock; + + /** + * @var Collection + */ + protected $model; + + /** + * SetUp method + * + * @return void + */ + protected function setUp() + { + $this->entityFactoryMock = $this->getMockBuilder(EntityFactoryInterface::class) + ->getMockForAbstractClass(); + $this->loggerMock = $this->getMockBuilder(LoggerInterface::class) + ->getMockForAbstractClass(); + $this->fetchStrategyMock = $this->getMockBuilder(FetchStrategyInterface::class) + ->getMockForAbstractClass(); + $this->eventManagerMock = $this->getMockBuilder(ManagerInterface::class) + ->getMockForAbstractClass(); + $this->resourceMock = $this->getMockBuilder(AbstractDb::class) + ->disableOriginalConstructor() + ->getMock(); + $this->aggregationsMock = $this->getMockBuilder(AggregationInterface::class) + ->getMockForAbstractClass(); + $this->connectionMock = $this->getMockBuilder(AdapterInterface::class) + ->getMockForAbstractClass(); + $this->selectMock = $this->getMockBuilder(Select::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->resourceMock->expects($this->any()) + ->method('getConnection') + ->willReturn($this->connectionMock); + $this->connectionMock->expects($this->once()) + ->method('select') + ->willReturn($this->selectMock); + + $this->model = (new ObjectManager($this))->getObject(Collection::class, [ + 'entityFactory' => $this->entityFactoryMock, + 'logger' => $this->loggerMock, + 'fetchStrategy' => $this->fetchStrategyMock, + 'eventManager' => $this->eventManagerMock, + 'mainTable' => null, + 'eventPrefix' => 'test_event_prefix', + 'eventObject' => 'test_event_object', + 'resourceModel' => null, + 'resource' => $this->resourceMock, + ]); + } + + /** + * @covers \Magento\Customer\Model\ResourceModel\Group\Grid\Collection::setSearchCriteria + * @covers \Magento\Customer\Model\ResourceModel\Group\Grid\Collection::getAggregations + */ + public function testSetGetAggregations() + { + $this->model->setAggregations($this->aggregationsMock); + $this->assertInstanceOf(AggregationInterface::class, $this->model->getAggregations()); + } + + /** + * @covers \Magento\Customer\Model\ResourceModel\Group\Grid\Collection::setSearchCriteria + */ + public function testSetSearchCriteria() + { + $this->assertEquals($this->model, $this->model->setSearchCriteria()); + } +} diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php index 524ae9065f67e..31646437bfc4c 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/Group/Grid/ServiceCollectionTest.php @@ -227,6 +227,9 @@ public function testAddFieldToFilterInconsistentArrays($fields, $conditions) $this->serviceCollection->addFieldToFilter($fields, $conditions); } + /** + * @return array + */ public function addFieldToFilterInconsistentArraysDataProvider() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php b/app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php index 939e2856f5eaa..8592d1bda66c1 100644 --- a/app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php +++ b/app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php @@ -411,6 +411,9 @@ public function testAfterAddressSaveDefaultGroup( $this->model->execute($observer); } + /** + * @return array + */ public function dataProviderAfterAddressSaveDefaultGroup() { return [ @@ -600,6 +603,9 @@ public function testAfterAddressSaveNewGroup( $this->model->execute($observer); } + /** + * @return array + */ public function dataProviderAfterAddressSaveNewGroup() { return [ diff --git a/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/Column/GroupActionsTest.php b/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/Column/GroupActionsTest.php new file mode 100644 index 0000000000000..fdd841ea88cf8 --- /dev/null +++ b/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/Column/GroupActionsTest.php @@ -0,0 +1,141 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Customer\Test\Unit\Ui\Component\Listing\Column; + +use Magento\Customer\Ui\Component\Listing\Column\GroupActions; +use Magento\Framework\Escaper; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Framework\UrlInterface; +use Magento\Framework\View\Element\UiComponent\ContextInterface; +use Magento\Framework\View\Element\UiComponent\Processor; +use PHPUnit_Framework_MockObject_MockObject as MockObject; + +/** + * GroupActionsTest contains unit tests for \Magento\Customer\Ui\Component\Listing\Column\GroupActions class + */ +class GroupActionsTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var GroupActions + */ + protected $groupActions; + + /** + * @var Escaper|MockObject + */ + protected $escaper; + + /** + * @var UrlInterface|MockObject + */ + protected $urlBuilder; + + /** + * SetUp method + * + * @return void + */ + protected function setUp() + { + $objectManager = new ObjectManager($this); + + $context = $this->createMock(ContextInterface::class); + + $processor = $this->getMockBuilder(Processor::class) + ->disableOriginalConstructor() + ->getMock(); + $context->expects(static::never()) + ->method('getProcessor') + ->willReturn($processor); + + $this->urlBuilder = $this->createMock(UrlInterface::class); + + $this->escaper = $this->getMockBuilder(Escaper::class) + ->disableOriginalConstructor() + ->setMethods(['escapeHtml']) + ->getMock(); + + $this->groupActions = $objectManager->getObject(GroupActions::class, [ + 'context' => $context, + 'urlBuilder' => $this->urlBuilder, + 'escaper' => $this->escaper, + ]); + } + + /** + * @covers \Magento\Customer\Ui\Component\Listing\Column\GroupActions::prepareDataSource + */ + public function testPrepareDataSource() + { + $groupId = 1; + $groupCode = 'group code'; + $items = [ + 'data' => [ + 'items' => [ + [ + 'customer_group_id' => $groupId, + 'customer_group_code' => $groupCode + ] + ] + ] + ]; + $name = 'item_name'; + $expectedItems = [ + [ + 'customer_group_id' => $groupId, + 'customer_group_code' => $groupCode, + $name => [ + 'edit' => [ + 'href' => 'test/url/edit', + 'label' => __('Edit'), + ], + 'delete' => [ + 'href' => 'test/url/delete', + 'label' => __('Delete'), + 'confirm' => [ + 'title' => __('Delete %1', $groupCode), + 'message' => __('Are you sure you want to delete a %1 record?', $groupCode) + ], + ] + ], + ] + ]; + + $this->escaper->expects(static::once()) + ->method('escapeHtml') + ->with($groupCode) + ->willReturn($groupCode); + + $this->urlBuilder->expects(static::exactly(2)) + ->method('getUrl') + ->willReturnMap( + [ + [ + GroupActions::URL_PATH_EDIT, + [ + 'id' => $groupId + ], + 'test/url/edit', + ], + [ + GroupActions::URL_PATH_DELETE, + [ + 'id' => $groupId + ], + 'test/url/delete', + ], + ] + ); + + $this->groupActions->setData('name', $name); + + $actual = $this->groupActions->prepareDataSource($items); + static::assertEquals($expectedItems, $actual['data']['items']); + } +} diff --git a/app/code/Magento/Customer/Ui/Component/Listing/Column/GroupActions.php b/app/code/Magento/Customer/Ui/Component/Listing/Column/GroupActions.php new file mode 100644 index 0000000000000..a8a3429ebadb0 --- /dev/null +++ b/app/code/Magento/Customer/Ui/Component/Listing/Column/GroupActions.php @@ -0,0 +1,109 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Customer\Ui\Component\Listing\Column; + +use Magento\Framework\UrlInterface; +use Magento\Framework\View\Element\UiComponent\ContextInterface; +use Magento\Framework\View\Element\UiComponentFactory; +use Magento\Ui\Component\Listing\Columns\Column; +use Magento\Framework\Escaper; + +/** + * Class GroupActions + */ +class GroupActions extends Column +{ + /** + * Url path + */ + const URL_PATH_EDIT = 'customer/group/edit'; + const URL_PATH_DELETE = 'customer/group/delete'; + + /** + * @var UrlInterface + */ + private $urlBuilder; + + /** + * @var Escaper + */ + private $escaper; + + /** + * Constructor + * + * @param ContextInterface $context + * @param UiComponentFactory $uiComponentFactory + * @param UrlInterface $urlBuilder + * @param Escaper $escaper + * @param array $components + * @param array $data + */ + public function __construct( + ContextInterface $context, + UiComponentFactory $uiComponentFactory, + UrlInterface $urlBuilder, + Escaper $escaper, + array $components = [], + array $data = [] + ) { + $this->urlBuilder = $urlBuilder; + $this->escaper = $escaper; + parent::__construct($context, $uiComponentFactory, $components, $data); + } + + /** + * Prepare Data Source + * + * @param array $dataSource + * @return array + */ + public function prepareDataSource(array $dataSource) + { + if (isset($dataSource['data']['items'])) { + foreach ($dataSource['data']['items'] as & $item) { + if (isset($item['customer_group_id'])) { + $title = $this->escaper->escapeHtml($item['customer_group_code']); + $item[$this->getData('name')] = [ + 'edit' => [ + 'href' => $this->urlBuilder->getUrl( + static::URL_PATH_EDIT, + [ + 'id' => $item['customer_group_id'] + ] + ), + 'label' => __('Edit'), + ], + ]; + + // hide delete action for 'NOT LOGGED IN' group + if ($item['customer_group_id'] == 0 && $item['customer_group_code']) { + continue; + } + + $item[$this->getData('name')]['delete'] = [ + 'href' => $this->urlBuilder->getUrl( + static::URL_PATH_DELETE, + [ + 'id' => $item['customer_group_id'] + ] + ), + 'label' => __('Delete'), + 'confirm' => [ + 'title' => __('Delete %1', $title), + 'message' => __('Are you sure you want to delete a %1 record?', $title) + ] + ]; + } + } + } + + return $dataSource; + } +} diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml index 86ed633790491..717b2b6c67e20 100644 --- a/app/code/Magento/Customer/etc/di.xml +++ b/app/code/Magento/Customer/etc/di.xml @@ -215,6 +215,7 @@ <argument name="collections" xsi:type="array"> <item name="customer_listing_data_source" xsi:type="string">Magento\Customer\Model\ResourceModel\Grid\Collection</item> <item name="customer_online_grid_data_source" xsi:type="string">Magento\Customer\Model\ResourceModel\Online\Grid\Collection</item> + <item name="customer_group_listing_data_source" xsi:type="string">Magento\Customer\Model\ResourceModel\Group\Grid\Collection</item> </argument> </arguments> </type> @@ -433,6 +434,14 @@ </argument> </arguments> </type> + <type name="Magento\Customer\Model\ResourceModel\Group\Grid\Collection"> + <arguments> + <argument name="mainTable" xsi:type="string">customer_group</argument> + <argument name="eventPrefix" xsi:type="string">customer_group_grid_collection</argument> + <argument name="eventObject" xsi:type="string">customer_group_collection</argument> + <argument name="resourceModel" xsi:type="string">Magento\Customer\Model\ResourceModel\Group</argument> + </arguments> + </type> <preference for="Magento\Customer\Api\AccountDelegationInterface" type="Magento\Customer\Model\Delegation\AccountDelegation" /> diff --git a/app/code/Magento/Customer/etc/frontend/page_types.xml b/app/code/Magento/Customer/etc/frontend/page_types.xml index 2c0feeac532a1..a49d735b4467e 100644 --- a/app/code/Magento/Customer/etc/frontend/page_types.xml +++ b/app/code/Magento/Customer/etc/frontend/page_types.xml @@ -11,7 +11,7 @@ <type id="customer_account_createpassword" label="Reset a Password"/> <type id="customer_account_edit" label="Customer Account Edit Form"/> <type id="customer_account_forgotpassword" label="Customer Forgot Password Form"/> - <type id="customer_account_index" label="Customer My Account Dashboard"/> + <type id="customer_account_index" label="Customer My Account"/> <type id="customer_account_login" label="Customer Account Login Form"/> <type id="customer_account_logoutsuccess" label="Customer Account Logout Success"/> <type id="customer_address_form" label="Customer My Account Address Edit Form"/> diff --git a/app/code/Magento/Customer/i18n/en_US.csv b/app/code/Magento/Customer/i18n/en_US.csv index 5d7d8b2bf30a4..bf73d6361d4c7 100644 --- a/app/code/Magento/Customer/i18n/en_US.csv +++ b/app/code/Magento/Customer/i18n/en_US.csv @@ -531,10 +531,8 @@ Type,Type "Send Welcome Email From","Send Welcome Email From" "Are you sure you want to delete this item?","Are you sure you want to delete this item?" Addresses,Addresses -"Account Dashboard","Account Dashboard" "Edit Account Information","Edit Account Information" "Password forgotten","Password forgotten" -"My Dashboard","My Dashboard" "You are signed out","You are signed out" "Associate to Website","Associate to Website" "Prefix","Prefix" diff --git a/app/code/Magento/Customer/view/adminhtml/layout/customer_group_index.xml b/app/code/Magento/Customer/view/adminhtml/layout/customer_group_index.xml index ecb64711bdb94..a65ef3cd395d0 100644 --- a/app/code/Magento/Customer/view/adminhtml/layout/customer_group_index.xml +++ b/app/code/Magento/Customer/view/adminhtml/layout/customer_group_index.xml @@ -8,48 +8,7 @@ <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="content"> - <block class="Magento\Customer\Block\Adminhtml\Group" name="adminhtml.block.customer.group.grid.container"> - <block class="Magento\Backend\Block\Widget\Grid" name="adminhtml.block.customer.group.grid" as="grid"> - <arguments> - <argument name="id" xsi:type="string">customerGroupGrid</argument> - <argument name="dataSource" xsi:type="object">Magento\Customer\Model\ResourceModel\Group\Grid\ServiceCollection</argument> - <argument name="default_sort" xsi:type="string">type</argument> - <argument name="default_dir" xsi:type="string">asc</argument> - <argument name="save_parameters_in_session" xsi:type="string">1</argument> - </arguments> - <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="adminhtml.customer.group.grid.columnSet"> - <arguments> - <argument name="rowUrl" xsi:type="array"> - <item name="path" xsi:type="string">customer/*/edit</item> - <item name="extraParamsTemplate" xsi:type="array"> - <item name="id" xsi:type="string">getId</item> - </item> - </argument> - </arguments> - <block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.customer.group.grid.columnSet.time" as="time"> - <arguments> - <argument name="header" xsi:type="string" translate="true">ID</argument> - <argument name="id" xsi:type="string">id</argument> - <argument name="index" xsi:type="string">id</argument> - <argument name="column_css_class" xsi:type="string">col-id</argument> - <argument name="header_css_class" xsi:type="string">col-id</argument> - </arguments> - </block> - <block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.customer.group.grid.columnSet.type" as="type"> - <arguments> - <argument name="header" xsi:type="string" translate="true">Group</argument> - <argument name="index" xsi:type="string">code</argument> - </arguments> - </block> - <block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.customer.group.grid.columnSet.class_name" as="class_name"> - <arguments> - <argument name="header" xsi:type="string" translate="true">Tax Class</argument> - <argument name="index" xsi:type="string">tax_class_name</argument> - </arguments> - </block> - </block> - </block> - </block> + <uiComponent name="customer_group_listing"/> </referenceContainer> </body> </page> diff --git a/app/code/Magento/Customer/view/adminhtml/ui_component/customer_group_listing.xml b/app/code/Magento/Customer/view/adminhtml/ui_component/customer_group_listing.xml new file mode 100644 index 0000000000000..0787e0713aa9f --- /dev/null +++ b/app/code/Magento/Customer/view/adminhtml/ui_component/customer_group_listing.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> + <argument name="data" xsi:type="array"> + <item name="js_config" xsi:type="array"> + <item name="provider" xsi:type="string">customer_group_listing.customer_group_listing_data_source</item> + </item> + </argument> + <settings> + <buttons> + <button name="add"> + <url path="*/*/new"/> + <class>primary</class> + <label translate="true">Add New Customer Group</label> + </button> + </buttons> + <spinner>customer_group_columns</spinner> + <deps> + <dep>customer_group_listing.customer_group_listing_data_source</dep> + </deps> + </settings> + <dataSource name="customer_group_listing_data_source" component="Magento_Ui/js/grid/provider"> + <settings> + <storageConfig> + <param name="indexField" xsi:type="string">customer_group_id</param> + </storageConfig> + <updateUrl path="mui/index/render"/> + </settings> + <aclResource>Magento_Customer::group</aclResource> + <dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="customer_group_listing_data_source"> + <settings> + <requestFieldName>id</requestFieldName> + <primaryFieldName>customer_group_id</primaryFieldName> + </settings> + </dataProvider> + </dataSource> + <listingToolbar name="listing_top"> + <bookmark name="bookmarks"/> + <columnsControls name="columns_controls"/> + <filters name="listing_filters"/> + <paging name="listing_paging"/> + </listingToolbar> + <columns name="customer_group_columns"> + <column name="customer_group_id"> + <settings> + <filter>textRange</filter> + <label translate="true">ID</label> + <sorting>asc</sorting> + </settings> + </column> + <column name="customer_group_code"> + <settings> + <filter>text</filter> + <label translate="true">Group</label> + </settings> + </column> + <column name="tax_class_id" component="Magento_Ui/js/grid/columns/select"> + <settings> + <options class="Magento\Tax\Model\TaxClass\Source\Customer"/> + <filter>select</filter> + <dataType>select</dataType> + <label translate="true">Tax Class</label> + </settings> + </column> + <actionsColumn name="actions" class="Magento\Customer\Ui\Component\Listing\Column\GroupActions"> + <settings> + <indexField>customer_group_id</indexField> + </settings> + </actionsColumn> + </columns> +</listing> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account.xml index 4224e84972f88..a2a15a4166b73 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account.xml @@ -22,7 +22,7 @@ </arguments> <block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-account-navigation-account-link"> <arguments> - <argument name="label" xsi:type="string" translate="true">Account Dashboard</argument> + <argument name="label" xsi:type="string" translate="true">My Account</argument> <argument name="path" xsi:type="string">customer/account</argument> <argument name="sortOrder" xsi:type="number">250</argument> </arguments> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml index 6384ee9c6562c..4494a5dd67103 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_index.xml @@ -10,7 +10,7 @@ <body> <referenceBlock name="page.main.title"> <action method="setPageTitle"> - <argument translate="true" name="title" xsi:type="string">My Dashboard</argument> + <argument translate="true" name="title" xsi:type="string">My Account</argument> </action> </referenceBlock> <referenceContainer name="content"> diff --git a/app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml b/app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml index 10223df489e90..24657a6846cae 100644 --- a/app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml @@ -13,7 +13,7 @@ if ($block->isLoggedIn()) { $dataPostParam = sprintf(" data-post='%s'", $block->getPostParams()); } ?> -<li class="authorization-link" data-label="<?= $block->escapeHtmlAttr(__('or')) ?>"> +<li class="authorization-link" data-label="<?= $block->escapeHtml(__('or')) ?>"> <a <?= /* @noEscape */ $block->getLinkAttributes() ?><?= /* @noEscape */ $dataPostParam ?>> <?= $block->escapeHtml($block->getLabel()) ?> </a> diff --git a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml index 1f1f078504524..6a129a3aa4b44 100644 --- a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml @@ -112,7 +112,7 @@ name="region" value="<?= $block->escapeHtmlAttr($block->getRegion()) ?>" title="<?= $block->escapeHtmlAttr(__('State/Province')) ?>" - class="input-text <?= $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region')) ?>"<?= !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : '' ?>/> + class="input-text validate-not-number-first <?= $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region')) ?>"<?= !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : '' ?>/> </div> </div> <div class="field zip required"> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml index 5bc4a929d6d94..f8eb0bd44b681 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml @@ -20,7 +20,7 @@ <div class="field email required"> <label for="email_address" class="label"><span><?= $block->escapeHtml(__('Email')) ?></span></label> <div class="control"> - <input type="email" name="email" alt="email" id="email_address" class="input-text" value="<?= $block->escapeHtmlAttr($block->getEmailValue()) ?>" data-validate="{required:true, 'validate-email':true}"> + <input type="email" name="email" alt="email" id="email_address" class="input-text" value="<?= $block->escapeHtmlAttr($block->getEmailValue()) ?>" data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}"> </div> </div> <?= $block->getChildHtml('form_additional_info') ?> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/login.phtml b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml index 2d44dde215139..d85e76e4cbc3f 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/login.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml @@ -19,7 +19,7 @@ id="login-form" data-mage-init='{"validation":{}}'> <?= $block->getBlockHtml('formkey') ?> - <fieldset class="fieldset login" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>"> + <fieldset class="fieldset login" data-hasrequired="<?= $block->escapeHtml(__('* Required Fields')) ?>"> <div class="field note"><?= $block->escapeHtml(__('If you have an account, sign in with your email address.')) ?></div> <div class="field email required"> <label class="label" for="email"><span><?= $block->escapeHtml(__('Email')) ?></span></label> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/LICENSE.txt b/app/code/Magento/CustomerAnalytics/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/LICENSE.txt rename to app/code/Magento/CustomerAnalytics/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/LICENSE_AFL.txt b/app/code/Magento/CustomerAnalytics/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/LICENSE_AFL.txt rename to app/code/Magento/CustomerAnalytics/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CustomerAnalytics/Test/Mftf/README.md b/app/code/Magento/CustomerAnalytics/Test/Mftf/README.md new file mode 100644 index 0000000000000..85cd1aea0e5bd --- /dev/null +++ b/app/code/Magento/CustomerAnalytics/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Customer Analytics Functional Tests + +The Functional Test Module for **Magento Customer Analytics** module. diff --git a/app/code/Magento/CustomerAnalytics/Test/Mftf/composer.json b/app/code/Magento/CustomerAnalytics/Test/Mftf/composer.json new file mode 100644 index 0000000000000..9b90f06de29c6 --- /dev/null +++ b/app/code/Magento/CustomerAnalytics/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-customer-analytics", + "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-customer": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CustomerGraphQl/Test/Mftf/README.md b/app/code/Magento/CustomerGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..ae023224f4d9b --- /dev/null +++ b/app/code/Magento/CustomerGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Customer Graph Ql Functional Tests + +The Functional Test Module for **Magento Customer Graph Ql** module. diff --git a/app/code/Magento/CustomerGraphQl/Test/Mftf/composer.json b/app/code/Magento/CustomerGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..b173084a84d10 --- /dev/null +++ b/app/code/Magento/CustomerGraphQl/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-customer-graph-ql", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/functional-test-module-customer": "100.0.0-dev", + "magento/functional-test-module-authorization": "100.0.0-dev", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php index e5cc543db6aac..ab940c9e84533 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php @@ -593,6 +593,18 @@ protected function _validateRowForUpdate(array $rowData, $rowNumber) if (in_array($attributeCode, $this->_ignoredAttributes)) { continue; } + + $isFieldRequired = $attributeParams['is_required']; + $isFieldNotSetAndCustomerDoesNotExist = + !isset($rowData[$attributeCode]) && !$this->_getCustomerId($email, $website); + $isFieldSetAndTrimmedValueIsEmpty + = isset($rowData[$attributeCode]) && '' === trim($rowData[$attributeCode]); + + if ($isFieldRequired && ($isFieldNotSetAndCustomerDoesNotExist || $isFieldSetAndTrimmedValueIsEmpty)) { + $this->addRowError(self::ERROR_VALUE_IS_REQUIRED, $rowNumber, $attributeCode); + continue; + } + if (isset($rowData[$attributeCode]) && strlen($rowData[$attributeCode])) { $this->isAttributeValid( $attributeCode, @@ -603,8 +615,6 @@ protected function _validateRowForUpdate(array $rowData, $rowNumber) ? $this->_parameters[Import::FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR] : Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR ); - } elseif ($attributeParams['is_required'] && !$this->_getCustomerId($email, $website)) { - $this->addRowError(self::ERROR_VALUE_IS_REQUIRED, $rowNumber, $attributeCode); } } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/LICENSE.txt b/app/code/Magento/CustomerImportExport/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/LICENSE.txt rename to app/code/Magento/CustomerImportExport/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/LICENSE_AFL.txt b/app/code/Magento/CustomerImportExport/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/LICENSE_AFL.txt rename to app/code/Magento/CustomerImportExport/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/CustomerImportExport/Test/Mftf/README.md b/app/code/Magento/CustomerImportExport/Test/Mftf/README.md new file mode 100644 index 0000000000000..65dfc18397eda --- /dev/null +++ b/app/code/Magento/CustomerImportExport/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Customer Import Export Functional Tests + +The Functional Test Module for **Magento Customer Import Export** module. diff --git a/app/code/Magento/CustomerImportExport/Test/Mftf/composer.json b/app/code/Magento/CustomerImportExport/Test/Mftf/composer.json new file mode 100644 index 0000000000000..adddda9ff7370 --- /dev/null +++ b/app/code/Magento/CustomerImportExport/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-customer-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-backend": "100.0.0-dev", + "magento/functional-test-module-customer": "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-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/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/LICENSE.txt b/app/code/Magento/Deploy/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/LICENSE.txt rename to app/code/Magento/Deploy/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/LICENSE_AFL.txt b/app/code/Magento/Deploy/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/LICENSE_AFL.txt rename to app/code/Magento/Deploy/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Deploy/Test/Mftf/README.md b/app/code/Magento/Deploy/Test/Mftf/README.md new file mode 100644 index 0000000000000..c1852362d4ca3 --- /dev/null +++ b/app/code/Magento/Deploy/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Deploy Functional Tests + +The Functional Test Module for **Magento Deploy** module. diff --git a/app/code/Magento/Deploy/Test/Mftf/composer.json b/app/code/Magento/Deploy/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7e18c4d1d1222 --- /dev/null +++ b/app/code/Magento/Deploy/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-deploy", + "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-config": "100.0.0-dev", + "magento/functional-test-module-require-js": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-user": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Deploy/Test/Unit/Console/Command/App/ConfigStatusCommandTest.php b/app/code/Magento/Deploy/Test/Unit/Console/Command/App/ConfigStatusCommandTest.php index 7822e75930eba..737ad55d5e09b 100644 --- a/app/code/Magento/Deploy/Test/Unit/Console/Command/App/ConfigStatusCommandTest.php +++ b/app/code/Magento/Deploy/Test/Unit/Console/Command/App/ConfigStatusCommandTest.php @@ -57,6 +57,9 @@ public function testExecute(bool $hasChanges, $expectedMessage, $expectedCode) $this->assertSame($expectedCode, $tester->getStatusCode()); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php b/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php index 3fe1c9800a730..75edc8cb4f6ee 100644 --- a/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php +++ b/app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php @@ -187,6 +187,9 @@ public function testDeploy($options, $expectedContentVersion) $this->assertEquals(null, $this->service->deploy($options)); } + /** + * @return array + */ public function deployDataProvider() { return [ diff --git a/app/code/Magento/Developer/Model/Di/PluginList.php b/app/code/Magento/Developer/Model/Di/PluginList.php index 0a1df8a974242..fc342b5051000 100644 --- a/app/code/Magento/Developer/Model/Di/PluginList.php +++ b/app/code/Magento/Developer/Model/Di/PluginList.php @@ -145,7 +145,10 @@ private function addPluginToList($pluginInstance, $pluginMethod, $methodTypes, $ if (!array_key_exists($pluginInstance, $this->pluginList[$this->pluginTypeMapping[$typeCode]])) { $this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance] = []; } - $this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance][] = $pluginMethod ; + + if (!in_array($pluginMethod, $this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance])) { + $this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance][] = $pluginMethod; + } } } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/LICENSE.txt b/app/code/Magento/Developer/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/LICENSE.txt rename to app/code/Magento/Developer/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/LICENSE_AFL.txt b/app/code/Magento/Developer/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/LICENSE_AFL.txt rename to app/code/Magento/Developer/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Developer/Test/Mftf/README.md b/app/code/Magento/Developer/Test/Mftf/README.md new file mode 100644 index 0000000000000..a3510344ff79c --- /dev/null +++ b/app/code/Magento/Developer/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Developer Functional Tests + +The Functional Test Module for **Magento Developer** module. diff --git a/app/code/Magento/Developer/Test/Mftf/composer.json b/app/code/Magento/Developer/Test/Mftf/composer.json new file mode 100644 index 0000000000000..ebd6230526271 --- /dev/null +++ b/app/code/Magento/Developer/Test/Mftf/composer.json @@ -0,0 +1,18 @@ +{ + "name": "magento/functional-test-module-developer", + "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-config": "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/Developer/Test/Unit/Console/Command/DevTestsRunCommandTest.php b/app/code/Magento/Developer/Test/Unit/Console/Command/DevTestsRunCommandTest.php index 862cdc336b803..dcd79cc0521a0 100644 --- a/app/code/Magento/Developer/Test/Unit/Console/Command/DevTestsRunCommandTest.php +++ b/app/code/Magento/Developer/Test/Unit/Console/Command/DevTestsRunCommandTest.php @@ -4,50 +4,101 @@ * See COPYING.txt for license details. */ -namespace Magento\Developer\Test\Unit\Console\Command; +// @codingStandardsIgnoreStart -use Magento\Developer\Console\Command\DevTestsRunCommand; -use Symfony\Component\Console\Tester\CommandTester; +namespace Magento\Developer\Console\Command { + use Symfony\Component\Console\Tester\CommandTester; -/** - * Class DevTestsRunCommandTest - * - * Tests dev:tests:run command. Only tests error case because DevTestsRunCommand calls phpunit with - * passthru, so there is no good way to mock out running the tests. - */ -class DevTestsRunCommandTest extends \PHPUnit\Framework\TestCase -{ + $devTestsRunCommandTestPassthruReturnVar = null; /** - * @var DevTestsRunCommand + * Mock for PHP builtin passthtru function + * + * @param string $command + * @param int|null $return_var + * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - private $command; - - protected function setUp() + function passthru($command, &$return_var = null) { - $this->command = new DevTestsRunCommand(); + global $devTestsRunCommandTestPassthruReturnVar; + $return_var = $devTestsRunCommandTestPassthruReturnVar; } - public function testExecuteBadType() + /** + * Class DevTestsRunCommandTest + * + * Tests dev:tests:run command. Only tests error case because DevTestsRunCommand calls phpunit with + * passthru, so there is no good way to mock out running the tests. + */ + class DevTestsRunCommandTest extends \PHPUnit\Framework\TestCase { - $commandTester = new CommandTester($this->command); - $commandTester->execute([DevTestsRunCommand::INPUT_ARG_TYPE => 'bad']); - $this->assertContains('Invalid type: "bad"', $commandTester->getDisplay()); - } - public function testPassArgumentsToPHPUnit() - { - $commandTester = new CommandTester($this->command); - $commandTester->execute( - [ - DevTestsRunCommand::INPUT_ARG_TYPE => 'unit', - '-' . DevTestsRunCommand::INPUT_OPT_COMMAND_ARGUMENTS_SHORT => '--list-suites', - ] - ); - $this->assertContains( - 'phpunit --list-suites', - $commandTester->getDisplay(), - 'Parameters should be passed to PHPUnit' - ); + /** + * @var DevTestsRunCommand + */ + private $command; + + protected function setUp() + { + $this->command = new DevTestsRunCommand(); + } + + public function testExecuteBadType() + { + $commandTester = new CommandTester($this->command); + $commandTester->execute([DevTestsRunCommand::INPUT_ARG_TYPE => 'bad']); + $this->assertContains('Invalid type: "bad"', $commandTester->getDisplay()); + } + + public function testPassArgumentsToPHPUnit() + { + global $devTestsRunCommandTestPassthruReturnVar; + + $devTestsRunCommandTestPassthruReturnVar = 0; + + $commandTester = new CommandTester($this->command); + $commandTester->execute( + [ + DevTestsRunCommand::INPUT_ARG_TYPE => 'unit', + '-' . DevTestsRunCommand::INPUT_OPT_COMMAND_ARGUMENTS_SHORT => '--list-suites', + ] + ); + $this->assertContains( + 'phpunit --list-suites', + $commandTester->getDisplay(), + 'Parameters should be passed to PHPUnit' + ); + $this->assertContains( + 'PASSED (', + $commandTester->getDisplay(), + 'PHPUnit runs should have passed' + ); + } + + public function testPassArgumentsToPHPUnitNegative() + { + global $devTestsRunCommandTestPassthruReturnVar; + + $devTestsRunCommandTestPassthruReturnVar = 255; + + $commandTester = new CommandTester($this->command); + $commandTester->execute( + [ + DevTestsRunCommand::INPUT_ARG_TYPE => 'unit', + '-' . DevTestsRunCommand::INPUT_OPT_COMMAND_ARGUMENTS_SHORT => '--list-suites', + ] + ); + $this->assertContains( + 'phpunit --list-suites', + $commandTester->getDisplay(), + 'Parameters should be passed to PHPUnit' + ); + $this->assertContains( + 'FAILED - ', + $commandTester->getDisplay(), + 'PHPUnit runs should have passed' + ); + } } } diff --git a/app/code/Magento/Developer/Test/Unit/Helper/DataTest.php b/app/code/Magento/Developer/Test/Unit/Helper/DataTest.php index 94d7cd250adda..9b964566f6093 100644 --- a/app/code/Magento/Developer/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Developer/Test/Unit/Helper/DataTest.php @@ -68,6 +68,9 @@ public function testIsDevAllowed($allowedIps, $expected, $callNum = 1) $this->assertEquals($expected, $this->helper->isDevAllowed($storeId)); } + /** + * @return array + */ public function isDevAllowedDataProvider() { return [ diff --git a/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php b/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php index d23fc89acc1b3..fd2475320261a 100644 --- a/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php +++ b/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php @@ -33,6 +33,9 @@ public function testRender($showBlockHints) $this->assertNotNull($actualResult); } + /** + * @return array + */ public function renderDataProvider() { return ['block hints disabled' => [false], 'block hints enabled' => [true]]; diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index 258dcbe9595d4..6262d71c4edcc 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -1263,8 +1263,20 @@ protected function _doShipmentRequest(\Magento\Framework\DataObject $request) * * @param \Magento\Framework\DataObject $request * @return $this|\Magento\Framework\DataObject|boolean + * @deprecated */ public function proccessAdditionalValidation(\Magento\Framework\DataObject $request) + { + return $this->processAdditionalValidation($request); + } + + /** + * Processing additional validation to check is carrier applicable. + * + * @param \Magento\Framework\DataObject $request + * @return $this|\Magento\Framework\DataObject|boolean + */ + public function processAdditionalValidation(\Magento\Framework\DataObject $request) { //Skip by item validation if there is no items in request if (!count($this->getAllItems($request))) { diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/LICENSE.txt b/app/code/Magento/Dhl/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/LICENSE.txt rename to app/code/Magento/Dhl/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/LICENSE_AFL.txt b/app/code/Magento/Dhl/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/LICENSE_AFL.txt rename to app/code/Magento/Dhl/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Dhl/Test/Mftf/README.md b/app/code/Magento/Dhl/Test/Mftf/README.md new file mode 100644 index 0000000000000..4be86fcefb775 --- /dev/null +++ b/app/code/Magento/Dhl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Dhl Functional Tests + +The Functional Test Module for **Magento Dhl** module. diff --git a/app/code/Magento/Dhl/Test/Mftf/composer.json b/app/code/Magento/Dhl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..0da17d213c84e --- /dev/null +++ b/app/code/Magento/Dhl/Test/Mftf/composer.json @@ -0,0 +1,28 @@ +{ + "name": "magento/functional-test-module-dhl", + "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-config": "100.0.0-dev", + "magento/functional-test-module-directory": "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-shipping": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-checkout": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/LICENSE.txt b/app/code/Magento/Directory/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/LICENSE.txt rename to app/code/Magento/Directory/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/LICENSE_AFL.txt b/app/code/Magento/Directory/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/LICENSE_AFL.txt rename to app/code/Magento/Directory/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Directory/Test/Mftf/README.md b/app/code/Magento/Directory/Test/Mftf/README.md new file mode 100644 index 0000000000000..ecbb2bd265402 --- /dev/null +++ b/app/code/Magento/Directory/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Directory Functional Tests + +The Functional Test Module for **Magento Directory** module. diff --git a/app/code/Magento/Directory/Test/Mftf/composer.json b/app/code/Magento/Directory/Test/Mftf/composer.json new file mode 100644 index 0000000000000..c23156f6d923e --- /dev/null +++ b/app/code/Magento/Directory/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-directory", + "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-config": "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/Directory/Test/Unit/Model/Currency/Import/ConfigTest.php b/app/code/Magento/Directory/Test/Unit/Model/Currency/Import/ConfigTest.php index 76b23e4e79ec2..7ec34f609a29f 100644 --- a/app/code/Magento/Directory/Test/Unit/Model/Currency/Import/ConfigTest.php +++ b/app/code/Magento/Directory/Test/Unit/Model/Currency/Import/ConfigTest.php @@ -34,6 +34,9 @@ public function testConstructorException(array $configData, $expectedException) new \Magento\Directory\Model\Currency\Import\Config($configData); } + /** + * @return array + */ public function constructorExceptionDataProvider() { return [ @@ -79,6 +82,9 @@ public function testGetServiceClass($serviceName, $expectedResult) $this->assertEquals($expectedResult, $this->_model->getServiceClass($serviceName)); } + /** + * @return array + */ public function getServiceClassDataProvider() { return ['known' => ['service_one', 'Service_One'], 'unknown' => ['unknown', null]]; @@ -94,6 +100,9 @@ public function testGetServiceLabel($serviceName, $expectedResult) $this->assertEquals($expectedResult, $this->_model->getServiceLabel($serviceName)); } + /** + * @return array + */ public function getServiceLabelDataProvider() { return ['known' => ['service_one', 'Service One'], 'unknown' => ['unknown', null]]; diff --git a/app/code/Magento/Directory/Test/Unit/Model/PriceCurrencyTest.php b/app/code/Magento/Directory/Test/Unit/Model/PriceCurrencyTest.php index 915c11fe1b787..c80bc4ce62070 100644 --- a/app/code/Magento/Directory/Test/Unit/Model/PriceCurrencyTest.php +++ b/app/code/Magento/Directory/Test/Unit/Model/PriceCurrencyTest.php @@ -183,6 +183,9 @@ public function testGetCurrencySymbol() $this->assertEquals($currencySymbol, $this->priceCurrency->getCurrencySymbol($storeId, $currencyMock)); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getCurrentCurrencyMock() { $currency = $this->getMockBuilder(\Magento\Directory\Model\Currency::class) @@ -192,6 +195,10 @@ protected function getCurrentCurrencyMock() return $currency; } + /** + * @param $baseCurrency + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getStoreMock($baseCurrency) { $store = $this->getMockBuilder(\Magento\Store\Model\Store::class) @@ -205,6 +212,12 @@ protected function getStoreMock($baseCurrency) return $store; } + /** + * @param $amount + * @param $convertedAmount + * @param $currency + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getBaseCurrencyMock($amount, $convertedAmount, $currency) { $baseCurrency = $this->getMockBuilder(\Magento\Directory\Model\Currency::class) diff --git a/app/code/Magento/Directory/etc/zip_codes.xml b/app/code/Magento/Directory/etc/zip_codes.xml index d9041d1ff50a7..3c540f7ce0ffd 100644 --- a/app/code/Magento/Directory/etc/zip_codes.xml +++ b/app/code/Magento/Directory/etc/zip_codes.xml @@ -196,7 +196,7 @@ </zip> <zip countryCode="IL"> <codes> - <code id="pattern_1" active="true" example="12345">^[0-9]{5}$</code> + <code id="pattern_1" active="true" example="6687865">^[0-9]{7}$</code> </codes> </zip> <zip countryCode="IT"> diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php index 4019def9e0cd0..e2694b3b93bb9 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php @@ -33,7 +33,7 @@ class Downloadable extends Widget implements TabInterface /** * @var string */ - protected $_template = 'product/edit/downloadable.phtml'; + protected $_template = 'Magento_Downloadable::product/edit/downloadable.phtml'; /** * Accordion block id diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php index fab33673e182d..947e6dc1e8339 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php @@ -30,7 +30,7 @@ class Links extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'product/edit/downloadable/links.phtml'; + protected $_template = 'Magento_Downloadable::product/edit/downloadable/links.phtml'; /** * Downloadable file diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php index 8b808c6020c5b..3c86bfb2f8d00 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php @@ -22,7 +22,7 @@ class Samples extends \Magento\Backend\Block\Widget /** * @var string */ - protected $_template = 'product/edit/downloadable/samples.phtml'; + protected $_template = 'Magento_Downloadable::product/edit/downloadable/samples.phtml'; /** * Downloadable file diff --git a/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php b/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php index 120c7a38a8f41..859d6a53d0618 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php @@ -6,7 +6,8 @@ namespace Magento\Downloadable\Block\Catalog\Product; -use Magento\Downloadable\Model\ResourceModel\Sample; +use Magento\Downloadable\Model\ResourceModel\Sample\Collection as SampleCollection; +use Magento\Downloadable\Api\Data\SampleInterface; /** * Downloadable Product Samples part block @@ -29,7 +30,7 @@ public function hasSamples() /** * Get downloadable product samples * - * @return array + * @return SampleCollection */ public function getSamples() { @@ -37,7 +38,7 @@ public function getSamples() } /** - * @param Sample $sample + * @param SampleInterface $sample * @return string */ public function getSampleUrl($sample) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/ActionGroup/AdminDownloadableProductActionGroup.xml b/app/code/Magento/Downloadable/Test/Mftf/ActionGroup/AdminDownloadableProductActionGroup.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/ActionGroup/AdminDownloadableProductActionGroup.xml rename to app/code/Magento/Downloadable/Test/Mftf/ActionGroup/AdminDownloadableProductActionGroup.xml index c1370ddcfb95e..2e1392eb0d2a8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/ActionGroup/AdminDownloadableProductActionGroup.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/ActionGroup/AdminDownloadableProductActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Fill main fields in product form--> <actionGroup name="fillMainDownloadableProductForm"> <arguments> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Data/LinkData.xml b/app/code/Magento/Downloadable/Test/Mftf/Data/LinkData.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Data/LinkData.xml rename to app/code/Magento/Downloadable/Test/Mftf/Data/LinkData.xml index 1498f4b96b3ab..16f32942a375f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Data/LinkData.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Data/LinkData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="downloadableData" type="downloadable_data"> <data key="link_title">Downloadable Links</data> <data key="sample_title">Downloadable Samples</data> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Downloadable/Test/Mftf/Data/ProductData.xml new file mode 100644 index 0000000000000..2c25c2c9b822b --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/Data/ProductData.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="DownloadableProduct" type="product"> + <data key="sku" unique="suffix">downloadableproduct</data> + <data key="type_id">downloadable</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">DownloadableProduct</data> + <data key="price">50.99</data> + <data key="quantity">100</data> + <data key="weight">0</data> + <data key="status">1</data> + <data key="urlKey" unique="suffix">downloadableproduct</data> + </entity> + <entity name="ApiDownloadableProduct" type="product"> + <data key="sku" unique="suffix">api-downloadable-product</data> + <data key="type_id">downloadable</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Downloadable Product</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-downloadable-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + <requiredEntity type="downloadable_link">apiDownloadableLink</requiredEntity> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/LICENSE.txt b/app/code/Magento/Downloadable/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/LICENSE.txt rename to app/code/Magento/Downloadable/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/LICENSE_AFL.txt b/app/code/Magento/Downloadable/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/LICENSE_AFL.txt rename to app/code/Magento/Downloadable/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Metadata/downloadable_link-meta.xml b/app/code/Magento/Downloadable/Test/Mftf/Metadata/downloadable_link-meta.xml similarity index 86% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Metadata/downloadable_link-meta.xml rename to app/code/Magento/Downloadable/Test/Mftf/Metadata/downloadable_link-meta.xml index dc86c4e8d7957..1138b56189137 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Metadata/downloadable_link-meta.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Metadata/downloadable_link-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateDownloadableLink" dataType="downloadable_link" type="create" auth="adminOauth" url="/V1/products/{sku}/downloadable-links" method="POST"> <contentType>application/json</contentType> <object dataType="downloadable_link" key="link"> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Metadata/link_file_content-meta.xml b/app/code/Magento/Downloadable/Test/Mftf/Metadata/link_file_content-meta.xml new file mode 100644 index 0000000000000..de899a9051022 --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/Metadata/link_file_content-meta.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreateLinkFileContent" dataType="link_file_content" type="create"> + <field key="file_data">string</field> + <field key="name">string</field> + </operation> +</operations> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Metadata/sample_file_content-meta.xml b/app/code/Magento/Downloadable/Test/Mftf/Metadata/sample_file_content-meta.xml new file mode 100644 index 0000000000000..5109263cfc242 --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/Metadata/sample_file_content-meta.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreateSampleFileContent" dataType="sample_file_content" type="create"> + <field key="file_data">string</field> + <field key="name">string</field> + </operation> +</operations> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Page/AdminProductCreatePage.xml b/app/code/Magento/Downloadable/Test/Mftf/Page/AdminProductCreatePage.xml new file mode 100644 index 0000000000000..7d5cc562bfb3c --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/Page/AdminProductCreatePage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true"> + <section name="AdminProductDownloadableSection"/> + </page> +</pages> diff --git a/app/code/Magento/Downloadable/Test/Mftf/README.md b/app/code/Magento/Downloadable/Test/Mftf/README.md new file mode 100644 index 0000000000000..11451fafa33a7 --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Downloadable Functional Tests + +The Functional Test Module for **Magento Downloadable** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Section/AdminProductDownloadableSection.xml b/app/code/Magento/Downloadable/Test/Mftf/Section/AdminProductDownloadableSection.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Section/AdminProductDownloadableSection.xml rename to app/code/Magento/Downloadable/Test/Mftf/Section/AdminProductDownloadableSection.xml index f2420f8719a6a..1c1ce0343c94d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Section/AdminProductDownloadableSection.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Section/AdminProductDownloadableSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductDownloadableSection"> <element name="sectionHeader" type="button" selector="div[data-index='downloadable']" timeout="30" /> <element name="isDownloadableProduct" type="input" selector="input[name='is_downloadable']" /> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Test/AdminAddDefaultImageDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminAddDefaultImageDownloadableProductTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Test/AdminAddDefaultImageDownloadableProductTest.xml rename to app/code/Magento/Downloadable/Test/Mftf/Test/AdminAddDefaultImageDownloadableProductTest.xml index e95e788957395..f2c7f6a61388f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Test/AdminAddDefaultImageDownloadableProductTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminAddDefaultImageDownloadableProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddDefaultImageDownloadableProductTest"> <annotations> <features value="Downloadable"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Test/AdminRemoveDefaultImageDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Test/AdminRemoveDefaultImageDownloadableProductTest.xml rename to app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml index 43d73e45a943f..370148c6a4167 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Test/AdminRemoveDefaultImageDownloadableProductTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminRemoveDefaultImageDownloadableProductTest"> <annotations> <features value="Downloadable"/> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/EndToEndB2CAdminTest.xml new file mode 100644 index 0000000000000..4a4242811a39c --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/EndToEndB2CAdminTest.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CAdminTest"> + <!--Create Downloadable Product--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitProductPageDownloadable" after="seeSimpleProductInGrid"/> + <waitForPageLoad stepKey="waitForProductPageLoadDownloadable" after="visitProductPageDownloadable"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateDownloadableProduct" after="waitForProductPageLoadDownloadable"> + <argument name="product" value="DownloadableProduct"/> + </actionGroup> + <actionGroup ref="fillMainDownloadableProductForm" stepKey="fillMainProductFormDownloadable" after="goToCreateDownloadableProduct"> + <argument name="product" value="DownloadableProduct"/> + </actionGroup> + + <click selector="{{AdminProductDownloadableSection.sectionHeader}}" stepKey="openDownloadableSection" after="fillMainProductFormDownloadable"/> + <checkOption selector="{{AdminProductDownloadableSection.isDownloadableProduct}}" stepKey="checkIsDownloadable" after="openDownloadableSection"/> + <fillField userInput="{{downloadableData.link_title}}" selector="{{AdminProductDownloadableSection.linksTitleInput}}" stepKey="fillDownloadableLinkTitle" after="checkIsDownloadable"/> + <checkOption selector="{{AdminProductDownloadableSection.isLinksPurchasedSeparately}}" stepKey="checkLinksPurchasedSeparately" after="fillDownloadableLinkTitle"/> + <fillField userInput="{{downloadableData.sample_title}}" selector="{{AdminProductDownloadableSection.samplesTitleInput}}" stepKey="fillDownloadableSampleTitle" after="checkLinksPurchasedSeparately"/> + + <!-- Link 1 --> + <actionGroup ref="addDownloadableProductLinkWithMaxDownloads" stepKey="addDownloadableLinkWithMaxDownloads" after="fillDownloadableSampleTitle"> + <argument name="link" value="downloadableLinkWithMaxDownloads"/> + </actionGroup> + + <!-- Link 2 --> + <actionGroup ref="addDownloadableProductLink" stepKey="addDownloadableLink" after="addDownloadableLinkWithMaxDownloads"> + <argument name="link" value="downloadableLink"/> + </actionGroup> + + <!-- Sample 1 --> + <actionGroup ref="addDownloadableSampleFile" stepKey="addDownloadSampleFile" after="addDownloadableLink"> + <argument name="sample" value="downloadableSampleFile"/> + </actionGroup> + + <!-- Sample 2 --> + <actionGroup ref="addDownloadableSampleUrl" stepKey="addDownloadableSampleUrl" after="addDownloadSampleFile"> + <argument name="sample" value="downloadableSampleUrl"/> + </actionGroup> + + <!--Save Product--> + <actionGroup ref="saveProductForm" stepKey="saveDownloadableProduct" after="addDownloadableSampleUrl"/> + <actionGroup ref="viewProductInAdminGrid" stepKey="viewDownloadableProductInGrid" after="saveDownloadableProduct"> + <argument name="product" value="DownloadableProduct"/> + </actionGroup> + + <!--@TODO Move cleanup to "after" when MQE-830 is resolved--> + <comment userInput="Clean up downloadable product" stepKey="cleanUpDownloadableProduct" after="deleteSimpleProduct"/> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteDownloadableProduct" after="cleanUpDownloadableProduct"> + <argument name="product" value="DownloadableProduct"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Downloadable/Test/Mftf/composer.json b/app/code/Magento/Downloadable/Test/Mftf/composer.json new file mode 100644 index 0000000000000..6a2a5bb00f01e --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/composer.json @@ -0,0 +1,35 @@ +{ + "name": "magento/functional-test-module-downloadable", + "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-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-directory": "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-theme": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-downloadable-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Downloadable/Test/Unit/Block/Catalog/Product/LinksTest.php b/app/code/Magento/Downloadable/Test/Unit/Block/Catalog/Product/LinksTest.php index 13f474e5f0bf8..c48dfc62a7d4f 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Block/Catalog/Product/LinksTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Block/Catalog/Product/LinksTest.php @@ -156,6 +156,11 @@ public function testGetJsonConfig() $this->assertEquals(json_encode($config), $encodedJsonConfig); } + /** + * @param $linkPrice + * @param $linkId + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getLinkMock($linkPrice, $linkId) { $linkMock = $this->createPartialMock(\Magento\Downloadable\Model\Link::class, ['getPrice', diff --git a/app/code/Magento/Downloadable/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php b/app/code/Magento/Downloadable/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php index 3b3683c6af3e7..25a5d86b0385c 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php @@ -99,6 +99,9 @@ public function testAfterInitializeWithNoDataToSave($downloadable) $this->downloadablePlugin->afterInitialize($this->subjectMock, $this->productMock); } + /** + * @return array + */ public function afterInitializeWithEmptyDataDataProvider() { return [ diff --git a/app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php b/app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php index 226660b865240..7cb5b03b0385f 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php @@ -155,6 +155,9 @@ public function testGetContentTypeThroughHelper($functionExistsResult, $mimeCont $this->assertEquals(self::MIME_TYPE, $this->_helper->getContentType()); } + /** + * @return array + */ public function dataProviderForTestGetContentTypeThroughHelper() { return [[false, ''], [true, false]]; @@ -187,6 +190,11 @@ public function testGetFileNameUrlWithContentDisposition() $this->assertEquals($fileName, $this->_helper->getFilename()); } + /** + * @param bool $doesExist + * @param int $size + * @param string $path + */ protected function _setupFileMocks($doesExist = true, $size = self::FILE_SIZE, $path = self::FILE_PATH) { $this->_handleMock->expects($this->any())->method('stat')->will($this->returnValue(['size' => $size])); @@ -199,6 +207,11 @@ protected function _setupFileMocks($doesExist = true, $size = self::FILE_SIZE, $ $this->_helper->setResource($path, DownloadHelper::LINK_TYPE_FILE); } + /** + * @param int $size + * @param string $url + * @param array $additionalStatData + */ protected function _setupUrlMocks($size = self::FILE_SIZE, $url = self::URL, $additionalStatData = []) { $this->_handleMock->expects( diff --git a/app/code/Magento/Downloadable/Test/Unit/Model/LinkRepositoryTest.php b/app/code/Magento/Downloadable/Test/Unit/Model/LinkRepositoryTest.php index f771233fad7bb..821f251929f8b 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Model/LinkRepositoryTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Model/LinkRepositoryTest.php @@ -540,6 +540,10 @@ public function testGetList() $this->assertEquals([$linkInterfaceMock], $this->service->getList($productSku)); } + /** + * @param $resource + * @param $inputData + */ protected function setLinkAssertions($resource, $inputData) { $resource->expects($this->any())->method('getId')->will($this->returnValue($inputData['id'])); diff --git a/app/code/Magento/Downloadable/Test/Unit/Observer/SetLinkStatusObserverTest.php b/app/code/Magento/Downloadable/Test/Unit/Observer/SetLinkStatusObserverTest.php index 5a138d83d2673..e63ce2437035b 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Observer/SetLinkStatusObserverTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Observer/SetLinkStatusObserverTest.php @@ -104,6 +104,9 @@ protected function setUp() ); } + /** + * @return array + */ public function setLinkStatusPendingDataProvider() { return [ diff --git a/app/code/Magento/Downloadable/Test/Unit/Ui/DataProvider/Product/Form/Modifier/Data/LinksTest.php b/app/code/Magento/Downloadable/Test/Unit/Ui/DataProvider/Product/Form/Modifier/Data/LinksTest.php index dd8e8ff38e931..93e691c931603 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Ui/DataProvider/Product/Form/Modifier/Data/LinksTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Ui/DataProvider/Product/Form/Modifier/Data/LinksTest.php @@ -98,8 +98,8 @@ protected function setUp() /** * @param int|null $id * @param string $typeId - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectedGetTitle - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectedGetValue + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectedGetTitle + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectedGetValue * @return void * @dataProvider getLinksTitleDataProvider */ diff --git a/app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php b/app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php index 467e1f428206b..e634f0ffa341d 100644 --- a/app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php +++ b/app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php @@ -7,11 +7,17 @@ use Magento\Downloadable\Test\Unit\Helper\DownloadTest; +/** + * @return bool + */ function function_exists() { return DownloadTest::$functionExists; } +/** + * @return string + */ function mime_content_type() { return DownloadTest::$mimeContentType; diff --git a/app/code/Magento/DownloadableGraphQl/Test/Mftf/README.md b/app/code/Magento/DownloadableGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..621abd2f1cba5 --- /dev/null +++ b/app/code/Magento/DownloadableGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Downloadable Graph Ql Functional Tests + +The Functional Test Module for **Magento Downloadable Graph Ql** module. diff --git a/app/code/Magento/DownloadableGraphQl/Test/Mftf/composer.json b/app/code/Magento/DownloadableGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..725f17975e581 --- /dev/null +++ b/app/code/Magento/DownloadableGraphQl/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-downloadable-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-downloadable": "100.0.0-dev", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-catalog-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/LICENSE.txt b/app/code/Magento/DownloadableImportExport/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/LICENSE.txt rename to app/code/Magento/DownloadableImportExport/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/LICENSE_AFL.txt b/app/code/Magento/DownloadableImportExport/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/LICENSE_AFL.txt rename to app/code/Magento/DownloadableImportExport/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/DownloadableImportExport/Test/Mftf/README.md b/app/code/Magento/DownloadableImportExport/Test/Mftf/README.md new file mode 100644 index 0000000000000..690273be9b8bc --- /dev/null +++ b/app/code/Magento/DownloadableImportExport/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Downloadable Import Export Functional Tests + +The Functional Test Module for **Magento Downloadable Import Export** module. diff --git a/app/code/Magento/DownloadableImportExport/Test/Mftf/composer.json b/app/code/Magento/DownloadableImportExport/Test/Mftf/composer.json new file mode 100644 index 0000000000000..da5caa42b87d5 --- /dev/null +++ b/app/code/Magento/DownloadableImportExport/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-downloadable-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-downloadable": "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/Eav/Api/AttributeOptionManagementInterface.php b/app/code/Magento/Eav/Api/AttributeOptionManagementInterface.php index aac6e2174b1ea..84aefa700a52a 100644 --- a/app/code/Magento/Eav/Api/AttributeOptionManagementInterface.php +++ b/app/code/Magento/Eav/Api/AttributeOptionManagementInterface.php @@ -20,7 +20,7 @@ interface AttributeOptionManagementInterface * @param \Magento\Eav\Api\Data\AttributeOptionInterface $option * @throws \Magento\Framework\Exception\StateException * @throws \Magento\Framework\Exception\InputException - * @return bool + * @return string */ public function add($entityType, $attributeCode, $option); diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php index 446285e4cee82..7dd6b0a19ec02 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php @@ -17,7 +17,8 @@ class Js extends \Magento\Backend\Block\Template * * @var string */ - protected $_template = 'attribute/edit/js.phtml'; + + protected $_template = 'Magento_Eav::attribute/edit/js.phtml'; /** * @var \Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php b/app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php index 938abdf30057b..a2c9611d26f5d 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php @@ -49,9 +49,10 @@ public function add($entityType, $attributeCode, $option) throw new StateException(__('The "%1" attribute doesn\'t work with options.', $attributeCode)); } + $optionLabel = $option->getLabel(); $optionId = $this->getOptionId($option); $options = []; - $options['value'][$optionId][0] = $option->getLabel(); + $options['value'][$optionId][0] = $optionLabel; $options['order'][$optionId] = $option->getSortOrder(); if (is_array($option->getStoreLabels())) { @@ -67,11 +68,14 @@ public function add($entityType, $attributeCode, $option) $attribute->setOption($options); try { $this->resourceModel->save($attribute); + if ($optionLabel && $attribute->getAttributeCode()) { + $this->setOptionValue($option, $attribute, $optionLabel); + } } catch (\Exception $e) { throw new StateException(__('The "%1" attribute can\'t be saved.', $attributeCode)); } - return true; + return $this->getOptionId($option); } /** @@ -147,8 +151,32 @@ protected function validateOption($attribute, $optionId) * @param \Magento\Eav\Api\Data\AttributeOptionInterface $option * @return string */ - private function getOptionId($option) + private function getOptionId(\Magento\Eav\Api\Data\AttributeOptionInterface $option) : string { return $option->getValue() ?: 'new_option'; } + + /** + * @param \Magento\Eav\Api\Data\AttributeOptionInterface $option + * @param \Magento\Eav\Api\Data\AttributeInterface $attribute + * @param string $optionLabel + * @return void + */ + private function setOptionValue( + \Magento\Eav\Api\Data\AttributeOptionInterface $option, + \Magento\Eav\Api\Data\AttributeInterface $attribute, + string $optionLabel + ) { + $optionId = $attribute->getSource()->getOptionId($optionLabel); + if ($optionId) { + $option->setValue($attribute->getSource()->getOptionId($optionId)); + } elseif (is_array($option->getStoreLabels())) { + foreach ($option->getStoreLabels() as $label) { + if ($optionId = $attribute->getSource()->getOptionId($label->getLabel())) { + $option->setValue($attribute->getSource()->getOptionId($optionId)); + break; + } + } + } + } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/LICENSE.txt b/app/code/Magento/Eav/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/LICENSE.txt rename to app/code/Magento/Eav/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/LICENSE_AFL.txt b/app/code/Magento/Eav/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/LICENSE_AFL.txt rename to app/code/Magento/Eav/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Eav/Test/Mftf/README.md b/app/code/Magento/Eav/Test/Mftf/README.md new file mode 100644 index 0000000000000..fe122f3227881 --- /dev/null +++ b/app/code/Magento/Eav/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Eav Functional Tests + +The Functional Test Module for **Magento Eav** module. diff --git a/app/code/Magento/Eav/Test/Mftf/composer.json b/app/code/Magento/Eav/Test/Mftf/composer.json new file mode 100644 index 0000000000000..8ad451d607263 --- /dev/null +++ b/app/code/Magento/Eav/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-eav", + "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-config": "100.0.0-dev", + "magento/functional-test-module-media-storage": "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/Eav/Test/Unit/Model/Adminhtml/System/Config/Source/InputtypeTest.php b/app/code/Magento/Eav/Test/Unit/Model/Adminhtml/System/Config/Source/InputtypeTest.php index a851ab4161093..d3c221bca5787 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Adminhtml/System/Config/Source/InputtypeTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Adminhtml/System/Config/Source/InputtypeTest.php @@ -25,6 +25,9 @@ public function testToOptionArray() $this->assertEquals($expectedResult, $this->model->toOptionArray()); } + /** + * @return array + */ private function getOptionsArray() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/AttributeFactoryTest.php b/app/code/Magento/Eav/Test/Unit/Model/AttributeFactoryTest.php index 572e7192d810e..a06e9030227e9 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/AttributeFactoryTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/AttributeFactoryTest.php @@ -50,6 +50,11 @@ public function testCreateAttribute() $this->assertEquals($this->_className, $this->_factory->createAttribute($this->_className, $this->_arguments)); } + /** + * @param $className + * @param $arguments + * @return mixed + */ public function getModelInstance($className, $arguments) { $this->assertInternalType('array', $arguments); diff --git a/app/code/Magento/Eav/Test/Unit/Model/CustomAttributesMapperTest.php b/app/code/Magento/Eav/Test/Unit/Model/CustomAttributesMapperTest.php index d2067bccef0bb..67cb65c21443e 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/CustomAttributesMapperTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/CustomAttributesMapperTest.php @@ -198,6 +198,9 @@ public function testDatabaseToEntity() $this->assertEquals($expected, $actual); } + /** + * @return array + */ private function getAttributes() { /* Attribute with the code we want to copy */ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/AbstractEntityTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/AbstractEntityTest.php index 67899dc3902eb..1203e2cecb477 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/AbstractEntityTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/AbstractEntityTest.php @@ -61,6 +61,9 @@ public function testCompareAttributes($attribute1Sort, $attribute2Sort, $expecte $this->assertEquals($expected, $this->_model->attributesCompare($attribute1, $attribute2)); } + /** + * @return array + */ public static function compareAttributesDataProvider() { return [ @@ -313,6 +316,9 @@ function ($entityType, $attributeCode) use ($attributes) { $model->save($object); } + /** + * @return array + */ public function productAttributesDataProvider() { $attributeSetId = 10; diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Backend/ArrayBackendTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Backend/ArrayBackendTest.php index 3c0e304dbf628..475ffea98e90e 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Backend/ArrayBackendTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Backend/ArrayBackendTest.php @@ -40,6 +40,9 @@ public function testValidate($data) $this->assertEquals(null, $product->getEmpty()); } + /** + * @return array + */ public static function attributeValueDataProvider() { return [[[1, 2, 3]], ['1,2,3']]; diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/OptionManagementTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/OptionManagementTest.php index 8900a22f6ab7e..2ae31a05d957f 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/OptionManagementTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/OptionManagementTest.php @@ -81,7 +81,7 @@ public function testAdd() $attributeMock->expects($this->once())->method('setDefault')->with(['new_option']); $attributeMock->expects($this->once())->method('setOption')->with($option); $this->resourceModelMock->expects($this->once())->method('save')->with($attributeMock); - $this->assertTrue($this->model->add($entityType, $attributeCode, $optionMock)); + $this->assertEquals('new_option', $this->model->add($entityType, $attributeCode, $optionMock)); } /** diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/TableTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/TableTest.php index 6f79e7ed06fad..b68446d22f910 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/TableTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/TableTest.php @@ -194,6 +194,9 @@ public function testGetSpecificOptions($optionIds, $withEmpty) $this->assertEquals($options, $this->model->getSpecificOptions($optionIds, $withEmpty)); } + /** + * @return array + */ public function specificOptionsProvider() { return [ @@ -249,6 +252,9 @@ public function testGetOptionText($optionsIds, $value, $options, $expectedResult $this->assertEquals($expectedResult, $this->model->getOptionText($value)); } + /** + * @return array + */ public function getOptionTextProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeTest.php index 27957e8090d3e..911aecf8e7cfb 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/AttributeTest.php @@ -33,6 +33,9 @@ public function testGetBackendTypeByInput($givenFrontendInput, $expectedBackendT $this->assertEquals($expectedBackendType, $this->_model->getBackendTypeByInput($givenFrontendInput)); } + /** + * @return array + */ public static function dataGetBackendTypeByInput() { return [ @@ -61,6 +64,9 @@ public function testGetDefaultValueByInput($givenFrontendInput, $expectedDefault $this->assertEquals($expectedDefaultValue, $this->_model->getDefaultValueByInput($givenFrontendInput)); } + /** + * @return array + */ public static function dataGetDefaultValueByInput() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/AbstractCollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/AbstractCollectionTest.php index 1581c445a3c76..bc4ed7d4bd9e4 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/AbstractCollectionTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/AbstractCollectionTest.php @@ -193,6 +193,9 @@ public function testRemoveItemByKey($values, $count) $this->assertNull($this->model->getItemById($testId)); } + /** + * @return array + */ public function getItemsDataProvider() { return [ @@ -202,6 +205,9 @@ public function getItemsDataProvider() ]; } + /** + * @return \Magento\Framework\DataObject + */ public function getMagentoObject() { return new \Magento\Framework\DataObject(); diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/VersionControl/AbstractCollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/VersionControl/AbstractCollectionTest.php index d281b8d1095f4..cce7b43786a76 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/VersionControl/AbstractCollectionTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Collection/VersionControl/AbstractCollectionTest.php @@ -68,6 +68,9 @@ public function testFetchItem(array $data) } } + /** + * @return array + */ public static function fetchItemDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/AlphanumTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/AlphanumTest.php index 16ba85f4905ea..50e7f185a24e5 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/AlphanumTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/AlphanumTest.php @@ -37,6 +37,9 @@ public function testGetNextId($lastId, $prefix, $expectedResult) $this->assertEquals($expectedResult, $this->model->getNextId()); } + /** + * @return array + */ public function getLastIdDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/NumericTest.php b/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/NumericTest.php index a976fc1f3e654..16767fb633028 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/NumericTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/Entity/Increment/NumericTest.php @@ -32,6 +32,9 @@ public function testGetNextId($lastId, $prefix, $expectedResult) $this->assertEquals($expectedResult, $this->model->getNextId()); } + /** + * @return array + */ public function getLastIdDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php index d988dfc63c959..f074fa22778b0 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php @@ -115,7 +115,7 @@ protected function setUp() $this->connectionMock->expects($this->any())->method('quoteIdentifier')->will($this->returnArgument(0)); $this->connectionMock->expects($this->any()) ->method('describeTable') - ->will($this->returnvalueMap( + ->will($this->returnValueMap( [ [ 'some_main_table', @@ -177,6 +177,9 @@ public function testInitSelect($column, $value) $this->model->getSelectCountSql()->assemble(); } + /** + * @return array + */ public function initSelectDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/AttributeLoaderTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/AttributeLoaderTest.php index 8e6fa3afd15b9..ea02ec71a7bbd 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/AttributeLoaderTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/AttributeLoaderTest.php @@ -90,6 +90,9 @@ public function testGetAttributes($entityType, $attributeSetId, $expectedConditi $this->assertEquals([$attributeMock], $this->attributeLoader->getAttributes($entityType, $attributeSetId)); } + /** + * @return array + */ public function getAttributesDataProvider() { return [ diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/ReadHandlerTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/ReadHandlerTest.php index 60c823cadfe89..eba73fa38d832 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/ReadHandlerTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/ReadHandlerTest.php @@ -115,6 +115,9 @@ public function testExecute($eavEntityType, $callNum, array $expected, $isStatic $this->assertEquals($expected, $this->readHandler->execute('entity_type', $entityData)); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/EavGraphQl/Test/Mftf/README.md b/app/code/Magento/EavGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..c8fb8f834c6b6 --- /dev/null +++ b/app/code/Magento/EavGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Eav Graph Ql Functional Tests + +The Functional Test Module for **Magento Eav Graph Ql** module. diff --git a/app/code/Magento/EavGraphQl/Test/Mftf/composer.json b/app/code/Magento/EavGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..f0390a211f3dc --- /dev/null +++ b/app/code/Magento/EavGraphQl/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-eav-graph-ql", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Elasticsearch/Model/Client/Elasticsearch.php b/app/code/Magento/Elasticsearch/Model/Client/Elasticsearch.php index f428bbf961e3b..b6ec06d48a487 100644 --- a/app/code/Magento/Elasticsearch/Model/Client/Elasticsearch.php +++ b/app/code/Magento/Elasticsearch/Model/Client/Elasticsearch.php @@ -293,7 +293,8 @@ public function deleteMapping($index, $entityType) */ public function query($query) { - return $this->client->search($query); + $params = array_merge($query, ['client' => ['timeout' => $this->clientOptions['timeout']]]); + return $this->client->search($params); } /** diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/LICENSE.txt b/app/code/Magento/Elasticsearch/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/LICENSE.txt rename to app/code/Magento/Elasticsearch/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/LICENSE_AFL.txt b/app/code/Magento/Elasticsearch/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/LICENSE_AFL.txt rename to app/code/Magento/Elasticsearch/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/README.md b/app/code/Magento/Elasticsearch/Test/Mftf/README.md new file mode 100644 index 0000000000000..de5e558e91cad --- /dev/null +++ b/app/code/Magento/Elasticsearch/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Elasticsearch Functional Tests + +The Functional Test Module for **Magento Elasticsearch** module. diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/composer.json b/app/code/Magento/Elasticsearch/Test/Mftf/composer.json new file mode 100644 index 0000000000000..4f0b74e9c5660 --- /dev/null +++ b/app/code/Magento/Elasticsearch/Test/Mftf/composer.json @@ -0,0 +1,26 @@ +{ + "name": "magento/functional-test-module-elasticsearch", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/functional-test-module-advanced-search": "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-customer": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-search": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-catalog-inventory": "100.0.0-dev", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "proprietary" + ] +} diff --git a/app/code/Magento/Email/Block/Adminhtml/Template.php b/app/code/Magento/Email/Block/Adminhtml/Template.php index e12a5f15ad624..25348f9638f3e 100644 --- a/app/code/Magento/Email/Block/Adminhtml/Template.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template.php @@ -22,7 +22,7 @@ class Template extends \Magento\Backend\Block\Template implements \Magento\Backe * * @var string */ - protected $_template = 'template/list.phtml'; + protected $_template = 'Magento_Email::template/list.phtml'; /** * @var \Magento\Backend\Block\Widget\Button\ButtonList diff --git a/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php b/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php index 1a28a299cc177..112813c3b096c 100644 --- a/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php +++ b/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php @@ -44,7 +44,7 @@ class Edit extends Widget implements ContainerInterface * * @var string */ - protected $_template = 'template/edit.phtml'; + protected $_template = 'Magento_Email::template/edit.phtml'; /** * @var \Magento\Framework\Json\EncoderInterface diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/LICENSE.txt b/app/code/Magento/Email/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/LICENSE.txt rename to app/code/Magento/Email/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/LICENSE_AFL.txt b/app/code/Magento/Email/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/LICENSE_AFL.txt rename to app/code/Magento/Email/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Email/Test/Mftf/README.md b/app/code/Magento/Email/Test/Mftf/README.md new file mode 100644 index 0000000000000..217c24a18afd4 --- /dev/null +++ b/app/code/Magento/Email/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Email Functional Tests + +The Functional Test Module for **Magento Email** module. diff --git a/app/code/Magento/Email/Test/Mftf/composer.json b/app/code/Magento/Email/Test/Mftf/composer.json new file mode 100644 index 0000000000000..9f9b087c5fc15 --- /dev/null +++ b/app/code/Magento/Email/Test/Mftf/composer.json @@ -0,0 +1,25 @@ +{ + "name": "magento/functional-test-module-email", + "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-cms": "100.0.0-dev", + "magento/functional-test-module-config": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-theme": "100.0.0-dev", + "magento/functional-test-module-variable": "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/Email/Test/Unit/Model/AbstractTemplateTest.php b/app/code/Magento/Email/Test/Unit/Model/AbstractTemplateTest.php index 4f545360616c6..0a0e9f780351d 100644 --- a/app/code/Magento/Email/Test/Unit/Model/AbstractTemplateTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/AbstractTemplateTest.php @@ -378,6 +378,9 @@ public function testSetDesignConfigWithValidInputParametersReturnsSuccess() $this->assertEquals($config, $model->getDesignConfig()->getData()); } + /** + * @return array + */ public function invalidInputParametersDataProvider() { return [[[]], [['area' => 'some_area']], [['store' => 'any_store']]]; diff --git a/app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php b/app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php index bb7ac6934106a..9851649c05e0c 100644 --- a/app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php @@ -27,6 +27,9 @@ public function testMergedXml($fixtureXml, array $expectedErrors) $this->_testXmlAgainstXsd($fixtureXml, $schemaFile, $expectedErrors); } + /** + * @return array + */ public function mergedXmlDataProvider() { // @codingStandardsIgnoreStart diff --git a/app/code/Magento/Email/Test/Unit/Model/Template/ConfigTest.php b/app/code/Magento/Email/Test/Unit/Model/Template/ConfigTest.php index b396f2ede8977..b0e181c4ac54c 100644 --- a/app/code/Magento/Email/Test/Unit/Model/Template/ConfigTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/Template/ConfigTest.php @@ -190,6 +190,9 @@ public function testParseTemplateIdParts($input, $expectedOutput) $this->assertEquals($this->model->parseTemplateIdParts($input), $expectedOutput); } + /** + * @return array + */ public function parseTemplateCodePartsDataProvider() { return [ @@ -302,6 +305,9 @@ public function testGetterMethodUnknownTemplate($getterMethod, $argument = null) } } + /** + * @return array + */ public function getterMethodUnknownTemplateDataProvider() { return [ @@ -349,6 +355,9 @@ public function testGetterMethodUnknownField( } } + /** + * @return array + */ public function getterMethodUnknownFieldDataProvider() { return [ diff --git a/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php b/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php index 7b22798eac49b..5464ca51cbe35 100644 --- a/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/TemplateTest.php @@ -299,6 +299,9 @@ public function testLoadDefault( $this->assertEquals($expectedTemplateStyles, $model->getTemplateStyles()); } + /** + * @return array + */ public function loadDefaultDataProvider() { return [ @@ -454,6 +457,9 @@ public function testIsValidForSend($senderName, $senderEmail, $templateSubject, $this->assertEquals($expectedValue, $model->isValidForSend()); } + /** + * @return array + */ public function isValidForSendDataProvider() { return [ @@ -549,6 +555,9 @@ public function testGetVariablesOptionArray($withGroup, $templateVariables, $exp $this->assertEquals($expectedResult, $model->getVariablesOptionArray($withGroup)); } + /** + * @return array + */ public function getVariablesOptionArrayDataProvider() { return [ @@ -649,6 +658,9 @@ public function testProcessTemplate($templateId, $expectedResult) $this->assertTrue($model->getUseAbsoluteLinks()); } + /** + * @return array + */ public function processTemplateVariable() { return [ @@ -745,6 +757,9 @@ public function testGetType($templateType, $expectedResult) $this->assertEquals($expectedResult, $model->getType()); } + /** + * @return array + */ public function getTypeDataProvider() { return [['text', 1], ['html', 2]]; diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/LICENSE.txt b/app/code/Magento/EncryptionKey/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/LICENSE.txt rename to app/code/Magento/EncryptionKey/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/LICENSE_AFL.txt b/app/code/Magento/EncryptionKey/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/LICENSE_AFL.txt rename to app/code/Magento/EncryptionKey/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/EncryptionKey/Test/Mftf/README.md b/app/code/Magento/EncryptionKey/Test/Mftf/README.md new file mode 100644 index 0000000000000..ba2ec0103b0b3 --- /dev/null +++ b/app/code/Magento/EncryptionKey/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Encryption Key Functional Tests + +The Functional Test Module for **Magento Encryption Key** module. diff --git a/app/code/Magento/EncryptionKey/Test/Mftf/composer.json b/app/code/Magento/EncryptionKey/Test/Mftf/composer.json new file mode 100644 index 0000000000000..732a18753779f --- /dev/null +++ b/app/code/Magento/EncryptionKey/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-encryption-key", + "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-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "proprietary" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/LICENSE.txt b/app/code/Magento/Fedex/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/LICENSE.txt rename to app/code/Magento/Fedex/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/LICENSE_AFL.txt b/app/code/Magento/Fedex/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/LICENSE_AFL.txt rename to app/code/Magento/Fedex/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Fedex/Test/Mftf/README.md b/app/code/Magento/Fedex/Test/Mftf/README.md new file mode 100644 index 0000000000000..eeba819913c94 --- /dev/null +++ b/app/code/Magento/Fedex/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Fedex Functional Tests + +The Functional Test Module for **Magento Fedex** module. diff --git a/app/code/Magento/Fedex/Test/Mftf/composer.json b/app/code/Magento/Fedex/Test/Mftf/composer.json new file mode 100644 index 0000000000000..6152c679ec796 --- /dev/null +++ b/app/code/Magento/Fedex/Test/Mftf/composer.json @@ -0,0 +1,24 @@ +{ + "name": "magento/functional-test-module-fedex", + "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-inventory": "100.0.0-dev", + "magento/functional-test-module-config": "100.0.0-dev", + "magento/functional-test-module-directory": "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-shipping": "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/GiftMessage/Block/Message/Inline.php b/app/code/Magento/GiftMessage/Block/Message/Inline.php index fa0c8ef85e13a..e5b80848661fd 100644 --- a/app/code/Magento/GiftMessage/Block/Message/Inline.php +++ b/app/code/Magento/GiftMessage/Block/Message/Inline.php @@ -33,7 +33,7 @@ class Inline extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'inline.phtml'; + protected $_template = 'Magento_GiftMessage::inline.phtml'; /** * Gift message message diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/LICENSE.txt b/app/code/Magento/GiftMessage/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/LICENSE.txt rename to app/code/Magento/GiftMessage/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/LICENSE_AFL.txt b/app/code/Magento/GiftMessage/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/LICENSE_AFL.txt rename to app/code/Magento/GiftMessage/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/GiftMessage/Test/Mftf/README.md b/app/code/Magento/GiftMessage/Test/Mftf/README.md new file mode 100644 index 0000000000000..ebc0422df170d --- /dev/null +++ b/app/code/Magento/GiftMessage/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Gift Message Functional Tests + +The Functional Test Module for **Magento Gift Message** module. diff --git a/app/code/Magento/GiftMessage/Test/Mftf/composer.json b/app/code/Magento/GiftMessage/Test/Mftf/composer.json new file mode 100644 index 0000000000000..06f8c507d25c9 --- /dev/null +++ b/app/code/Magento/GiftMessage/Test/Mftf/composer.json @@ -0,0 +1,27 @@ +{ + "name": "magento/functional-test-module-gift-message", + "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-customer": "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-ui": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-multishipping": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/GiftMessage/Test/Unit/Block/Cart/Item/Renderer/Actions/ItemIdProcessorTest.php b/app/code/Magento/GiftMessage/Test/Unit/Block/Cart/Item/Renderer/Actions/ItemIdProcessorTest.php index 35759f4d3f44a..f83f2304143a1 100644 --- a/app/code/Magento/GiftMessage/Test/Unit/Block/Cart/Item/Renderer/Actions/ItemIdProcessorTest.php +++ b/app/code/Magento/GiftMessage/Test/Unit/Block/Cart/Item/Renderer/Actions/ItemIdProcessorTest.php @@ -39,6 +39,9 @@ public function testProcess($itemId, array $jsLayout, array $result) $this->assertEquals($result, $this->model->process($jsLayout, $itemMock)); } + /** + * @return array + */ public function dataProviderProcess() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/LICENSE.txt b/app/code/Magento/GoogleAdwords/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/LICENSE.txt rename to app/code/Magento/GoogleAdwords/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/LICENSE_AFL.txt b/app/code/Magento/GoogleAdwords/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/LICENSE_AFL.txt rename to app/code/Magento/GoogleAdwords/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/GoogleAdwords/Test/Mftf/README.md b/app/code/Magento/GoogleAdwords/Test/Mftf/README.md new file mode 100644 index 0000000000000..37f70104c1d28 --- /dev/null +++ b/app/code/Magento/GoogleAdwords/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Google Adwords Functional Tests + +The Functional Test Module for **Magento Google Adwords** module. diff --git a/app/code/Magento/GoogleAdwords/Test/Mftf/composer.json b/app/code/Magento/GoogleAdwords/Test/Mftf/composer.json new file mode 100644 index 0000000000000..d40fb323175fe --- /dev/null +++ b/app/code/Magento/GoogleAdwords/Test/Mftf/composer.json @@ -0,0 +1,18 @@ +{ + "name": "magento/functional-test-module-google-adwords", + "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-sales": "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/GoogleAdwords/Test/Unit/Helper/DataTest.php b/app/code/Magento/GoogleAdwords/Test/Unit/Helper/DataTest.php index e45ff12a9e206..55811191affbf 100644 --- a/app/code/Magento/GoogleAdwords/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/GoogleAdwords/Test/Unit/Helper/DataTest.php @@ -91,6 +91,9 @@ public function testGetLanguageCodes() $this->assertEquals($languages, $this->_helper->getLanguageCodes()); } + /** + * @return array + */ public function dataProviderForTestConvertLanguage() { return [ diff --git a/app/code/Magento/GoogleAdwords/Test/Unit/Model/Filter/UppercaseTitleTest.php b/app/code/Magento/GoogleAdwords/Test/Unit/Model/Filter/UppercaseTitleTest.php index cf013780105a7..76a746ea77b92 100644 --- a/app/code/Magento/GoogleAdwords/Test/Unit/Model/Filter/UppercaseTitleTest.php +++ b/app/code/Magento/GoogleAdwords/Test/Unit/Model/Filter/UppercaseTitleTest.php @@ -17,6 +17,9 @@ protected function setUp() $this->_model = new \Magento\GoogleAdwords\Model\Filter\UppercaseTitle(); } + /** + * @return array + */ public function dataProviderForFilterValues() { return [['some name', 'Some Name'], ['test', 'Test']]; diff --git a/app/code/Magento/GoogleAdwords/Test/Unit/Observer/SetConversionValueObserverTest.php b/app/code/Magento/GoogleAdwords/Test/Unit/Observer/SetConversionValueObserverTest.php index 4e8d8e34fbea7..a514787660559 100644 --- a/app/code/Magento/GoogleAdwords/Test/Unit/Observer/SetConversionValueObserverTest.php +++ b/app/code/Magento/GoogleAdwords/Test/Unit/Observer/SetConversionValueObserverTest.php @@ -58,6 +58,9 @@ protected function setUp() ); } + /** + * @return array + */ public function dataProviderForDisabled() { return [[false, false], [false, true], [true, false]]; @@ -90,6 +93,9 @@ function () use ($isDynamic) { $this->assertSame($this->_model, $this->_model->execute($this->_eventObserverMock)); } + /** + * @return array + */ public function dataProviderForOrdersIds() { return [[[]], ['']]; diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/LICENSE.txt b/app/code/Magento/GoogleAnalytics/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/LICENSE.txt rename to app/code/Magento/GoogleAnalytics/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/LICENSE_AFL.txt b/app/code/Magento/GoogleAnalytics/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/LICENSE_AFL.txt rename to app/code/Magento/GoogleAnalytics/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/GoogleAnalytics/Test/Mftf/README.md b/app/code/Magento/GoogleAnalytics/Test/Mftf/README.md new file mode 100644 index 0000000000000..d711849909d43 --- /dev/null +++ b/app/code/Magento/GoogleAnalytics/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Google Analytics Functional Tests + +The Functional Test Module for **Magento Google Analytics** module. diff --git a/app/code/Magento/GoogleAnalytics/Test/Mftf/composer.json b/app/code/Magento/GoogleAnalytics/Test/Mftf/composer.json new file mode 100644 index 0000000000000..3413ffcac6e42 --- /dev/null +++ b/app/code/Magento/GoogleAnalytics/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-google-analytics", + "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-cookie": "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": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/LICENSE.txt b/app/code/Magento/GoogleOptimizer/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/LICENSE.txt rename to app/code/Magento/GoogleOptimizer/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/LICENSE_AFL.txt b/app/code/Magento/GoogleOptimizer/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/LICENSE_AFL.txt rename to app/code/Magento/GoogleOptimizer/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/GoogleOptimizer/Test/Mftf/README.md b/app/code/Magento/GoogleOptimizer/Test/Mftf/README.md new file mode 100644 index 0000000000000..c0338246ba9fd --- /dev/null +++ b/app/code/Magento/GoogleOptimizer/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Google Optimizer Functional Tests + +The Functional Test Module for **Magento Google Optimizer** module. diff --git a/app/code/Magento/GoogleOptimizer/Test/Mftf/composer.json b/app/code/Magento/GoogleOptimizer/Test/Mftf/composer.json new file mode 100644 index 0000000000000..2378140ac272a --- /dev/null +++ b/app/code/Magento/GoogleOptimizer/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-google-optimizer", + "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-cms": "100.0.0-dev", + "magento/functional-test-module-google-analytics": "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/GraphQl/Test/Mftf/README.md b/app/code/Magento/GraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..34fee7717fd31 --- /dev/null +++ b/app/code/Magento/GraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Graph Ql Functional Tests + +The Functional Test Module for **Magento Graph Ql** module. diff --git a/app/code/Magento/GraphQl/Test/Mftf/composer.json b/app/code/Magento/GraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..e86f458e9e6a4 --- /dev/null +++ b/app/code/Magento/GraphQl/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-graph-ql", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/functional-test-module-authorization": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-webapi": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/GraphQl/etc/schema.graphqls b/app/code/Magento/GraphQl/etc/schema.graphqls index 37ca2d8d7b378..c6651cdde0cb3 100644 --- a/app/code/Magento/GraphQl/etc/schema.graphqls +++ b/app/code/Magento/GraphQl/etc/schema.graphqls @@ -4,6 +4,10 @@ type Query { } +type Mutation { + placeholderMutation: String @doc(description: "Mutation type cannot be declared without fields. The placeholder will be removed when at least one mutation field is declared.") +} + input FilterTypeInput @doc(description: "FilterTypeInput specifies which action will be performed in a query ") { eq: String @doc(description: "Equals") finset: [String] @doc(description: "Find in set. The value can contain a set of comma-separated values") @@ -30,4 +34,4 @@ type SearchResultPageInfo @doc(description: "SearchResultPageInfo provides navig enum SortEnum @doc(description: "This enumeration indicates whether to return results in ascending or descending order") { ASC DESC -} \ No newline at end of file +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/LICENSE.txt b/app/code/Magento/GroupedImportExport/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/LICENSE.txt rename to app/code/Magento/GroupedImportExport/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/LICENSE_AFL.txt b/app/code/Magento/GroupedImportExport/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/LICENSE_AFL.txt rename to app/code/Magento/GroupedImportExport/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/GroupedImportExport/Test/Mftf/README.md b/app/code/Magento/GroupedImportExport/Test/Mftf/README.md new file mode 100644 index 0000000000000..f15893e5138d0 --- /dev/null +++ b/app/code/Magento/GroupedImportExport/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Grouped Import Export Functional Tests + +The Functional Test Module for **Magento Grouped Import Export** module. diff --git a/app/code/Magento/GroupedImportExport/Test/Mftf/composer.json b/app/code/Magento/GroupedImportExport/Test/Mftf/composer.json new file mode 100644 index 0000000000000..37d7a9ffe9f52 --- /dev/null +++ b/app/code/Magento/GroupedImportExport/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-grouped-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-eav": "100.0.0-dev", + "magento/functional-test-module-grouped-product": "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/app/code/Magento/GroupedImportExport/Test/Unit/Model/Import/Product/Type/Grouped/LinksTest.php b/app/code/Magento/GroupedImportExport/Test/Unit/Model/Import/Product/Type/Grouped/LinksTest.php index ffcfa5c0a90d7..9a4ddeb4f55f5 100644 --- a/app/code/Magento/GroupedImportExport/Test/Unit/Model/Import/Product/Type/Grouped/LinksTest.php +++ b/app/code/Magento/GroupedImportExport/Test/Unit/Model/Import/Product/Type/Grouped/LinksTest.php @@ -57,6 +57,9 @@ protected function setUp() ); } + /** + * @return array + */ public function linksDataProvider() { return [ @@ -107,6 +110,9 @@ public function testSaveLinksDataWithProductsAttrs($linksData) $this->links->saveLinksData($linksData); } + /** + * @return array + */ public function attributesDataProvider() { return [ @@ -135,6 +141,9 @@ public function attributesDataProvider() ]; } + /** + * @param $dbAttributes + */ protected function processAttributeGetter($dbAttributes) { $select = $this->createMock(\Magento\Framework\DB\Select::class); @@ -162,6 +171,9 @@ public function testGetAttributes($dbAttributes, $returnedAttributes) $this->assertEquals($returnedAttributes, $actualAttributes); } + /** + * @param $behavior + */ protected function processBehaviorGetter($behavior) { $dataSource = $this->createMock(\Magento\ImportExport\Model\ResourceModel\Import\Data::class); diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/ActionGroup/AdminGroupedProductActionGroup.xml b/app/code/Magento/GroupedProduct/Test/Mftf/ActionGroup/AdminGroupedProductActionGroup.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/ActionGroup/AdminGroupedProductActionGroup.xml rename to app/code/Magento/GroupedProduct/Test/Mftf/ActionGroup/AdminGroupedProductActionGroup.xml index 85762fd45e16d..720f5a2c2b949 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/ActionGroup/AdminGroupedProductActionGroup.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/ActionGroup/AdminGroupedProductActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Check that required fields are actually required--> <actionGroup name="checkRequiredFieldsInGroupedProductForm"> <clearField selector="{{AdminProductFormSection.productName}}" stepKey="clearProductSku"/> @@ -43,4 +43,13 @@ <see selector="{{AdminProductGridSection.firstProductRow}}" userInput="{{product.name}}" stepKey="seeProductNameInGrid"/> <click selector="{{AdminProductGridFilterSection.clearFilters}}" stepKey="clickClearFiltersAfter"/> </actionGroup> + + <!--Fill product min quantity in group products grid--> + <actionGroup name="fillDefaultQuantityForLinkedToGroupProductInGrid"> + <arguments> + <argument name="productName" type="string"/> + <argument name="qty" type="string"/> + </arguments> + <fillField selector="{{AdminAddedProductsToGroupGrid.inputByProductName(productName)}}" userInput="{{qty}}" stepKey="fillDefaultQtyForLinkedProduct"/> + </actionGroup> </actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/GroupedProductData.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Data/GroupedProductData.xml similarity index 86% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/GroupedProductData.xml rename to app/code/Magento/GroupedProduct/Test/Mftf/Data/GroupedProductData.xml index 9960d698a7861..1f9f1594f8fcb 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/GroupedProductData.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Data/GroupedProductData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="GroupedProduct" type="product"> <data key="sku" unique="suffix">groupedproduct</data> <data key="type_id">grouped</data> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/ProductLinkData.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Data/ProductLinkData.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/ProductLinkData.xml rename to app/code/Magento/GroupedProduct/Test/Mftf/Data/ProductLinkData.xml index 9a5df1e379a86..2c7cc254c855d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/ProductLinkData.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Data/ProductLinkData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="ProductLinkSimple1" type="product_link"> <var key="sku" entityKey="sku" entityType="product3"/> <var key="linked_product_sku" entityKey="sku" entityType="product"/> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Data/ProductLinkExtensionAttributeData.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Data/ProductLinkExtensionAttributeData.xml new file mode 100644 index 0000000000000..433dc920502d4 --- /dev/null +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Data/ProductLinkExtensionAttributeData.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="Qty1000" type="product_link_extension_attribute"> + <data key="qty">1000</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/ProductLinksData.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Data/ProductLinksData.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/ProductLinksData.xml rename to app/code/Magento/GroupedProduct/Test/Mftf/Data/ProductLinksData.xml index 523517aa70080..b712e3f40afd1 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/ProductLinksData.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Data/ProductLinksData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="OneSimpleProductLink" type="product_links"> <requiredEntity type="product_link">ProductLinkSimple1</requiredEntity> </entity> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/LICENSE.txt b/app/code/Magento/GroupedProduct/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/LICENSE.txt rename to app/code/Magento/GroupedProduct/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/LICENSE_AFL.txt b/app/code/Magento/GroupedProduct/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/LICENSE_AFL.txt rename to app/code/Magento/GroupedProduct/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Page/AdminProductCreatePage.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Page/AdminProductCreatePage.xml new file mode 100644 index 0000000000000..d8edc37160bab --- /dev/null +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Page/AdminProductCreatePage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true"> + <section name="AdminProductFormGroupedProductsSection"/> + <section name="AdminAddProductsToGroupPanel"/> + </page> +</pages> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/README.md b/app/code/Magento/GroupedProduct/Test/Mftf/README.md new file mode 100644 index 0000000000000..471745bd46e36 --- /dev/null +++ b/app/code/Magento/GroupedProduct/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Grouped Product Functional Tests + +The Functional Test Module for **Magento Grouped Product** module. diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminAddProductsToGroupPanelSection.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminAddProductsToGroupPanelSection.xml new file mode 100644 index 0000000000000..d21a067d34e20 --- /dev/null +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminAddProductsToGroupPanelSection.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminAddProductsToGroupPanel"> + <element name="addSelectedProducts" type="button" selector=".product_form_product_form_grouped_grouped_products_modal button.action-primary" timeout="30"/> + <element name="filters" type="button" selector=".product_form_product_form_grouped_grouped_products_modal [data-action='grid-filter-expand']" timeout="30"/> + <element name="applyFilters" type="button" selector=".product_form_product_form_grouped_grouped_products_modal [data-action='grid-filter-apply']" timeout="30"/> + <element name="nameFilter" type="input" selector=".product_form_product_form_grouped_grouped_products_modal [name='name']"/> + <element name="firstCheckbox" type="input" selector="tr[data-repeat-index='0'] .admin__control-checkbox"/> + <element name="nThCheckbox" type="input" selector="tr[data-repeat-index='{{n}}'] .admin__control-checkbox" parameterized="true"/> + </section> + + <section name="AdminAddedProductsToGroupGrid"> + <element name="inputByProductName" type="input" selector="//div[@data-index='grouped']//table//tr[td[@data-index='name']//span[text()='{{productName}}']]//td[@data-index='qty']//input" parameterized="true"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminProductFormGroupedProductsSection.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminProductFormGroupedProductsSection.xml new file mode 100644 index 0000000000000..adb0ac5a984a1 --- /dev/null +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminProductFormGroupedProductsSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductFormGroupedProductsSection"> + <element name="toggleGroupedProduct" type="button" selector="div[data-index=grouped] .admin__collapsible-title"/> + <element name="addProductsToGroup" type="button" selector="button[data-index='grouped_products_button']" timeout="30"/> + </section> +</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Test/AdminAddDefaultImageGroupedProductTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Test/AdminAddDefaultImageGroupedProductTest.xml rename to app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml index 2120045513e13..1bee1846ac0f5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Test/AdminAddDefaultImageGroupedProductTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddDefaultImageGroupedProductTest"> <annotations> <features value="GroupedProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Test/AdminRemoveDefaultImageGroupedProductTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminRemoveDefaultImageGroupedProductTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Test/AdminRemoveDefaultImageGroupedProductTest.xml rename to app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminRemoveDefaultImageGroupedProductTest.xml index b1105369b2ff5..a0408a744cc7e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Test/AdminRemoveDefaultImageGroupedProductTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminRemoveDefaultImageGroupedProductTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminRemoveDefaultImageGroupedProductTest"> <annotations> <features value="GroupedProduct"/> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/EndToEndB2CAdminTest.xml new file mode 100644 index 0000000000000..60aa666224550 --- /dev/null +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/EndToEndB2CAdminTest.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CAdminTest"> + <!--Create Grouped Product--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageGrouped" after="seeSimpleProductInGrid"/> + <waitForPageLoad stepKey="waitForProductPageLoadGrouped" after="visitAdminProductPageGrouped"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateGroupedProduct" after="waitForProductPageLoadGrouped"> + <argument name="product" value="GroupedProduct"/> + </actionGroup> + <actionGroup ref="checkRequiredFieldsInGroupedProductForm" stepKey="checkRequiredFieldsProductGrouped" after="goToCreateGroupedProduct"/> + <actionGroup ref="fillGroupedProductForm" stepKey="fillGroupedProductForm" after="checkRequiredFieldsProductGrouped"> + <argument name="product" value="GroupedProduct"/> + </actionGroup> + <scrollTo selector="{{AdminProductFormGroupedProductsSection.toggleGroupedProduct}}" x="0" y="-100" stepKey="scrollToGroupedSection" after="fillGroupedProductForm"/> + <conditionalClick selector="{{AdminProductFormGroupedProductsSection.toggleGroupedProduct}}" dependentSelector="{{AdminProductFormGroupedProductsSection.addProductsToGroup}}" visible="false" stepKey="openGroupedProductsSection" after="scrollToGroupedSection"/> + <click selector="body" stepKey="clickBodyToCorrectFocusGrouped" after="openGroupedProductsSection"/> + <click selector="{{AdminProductFormGroupedProductsSection.addProductsToGroup}}" stepKey="clickAddProductsToGroup" after="clickBodyToCorrectFocusGrouped"/> + <waitForElementVisible selector="{{AdminAddProductsToGroupPanel.filters}}" stepKey="waitForGroupedProductModal" after="clickAddProductsToGroup"/> + <actionGroup ref="filterProductGridBySku" stepKey="filterGroupedProductOptions" after="waitForGroupedProductModal"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <checkOption selector="{{AdminAddProductsToGroupPanel.firstCheckbox}}" stepKey="checkFilterResult" after="filterGroupedProductOptions"/> + <click selector="{{AdminAddProductsToGroupPanel.addSelectedProducts}}" stepKey="clickAddSelectedGroupProducts" after="checkFilterResult"/> + <actionGroup ref="saveProductForm" stepKey="saveGroupedProduct" after="clickAddSelectedGroupProducts"/> + <actionGroup ref="viewGroupedProductInAdminGrid" stepKey="viewGroupedProductInGrid" after="saveGroupedProduct"> + <argument name="product" value="GroupedProduct"/> + </actionGroup> + + <!--@TODO Move cleanup to "after" when MQE-830 is resolved--> + <comment userInput="Clean up grouped product" stepKey="cleanUpGroupedProduct" after="deleteSimpleProduct"/> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteGroupedProduct" after="cleanUpGroupedProduct"> + <argument name="product" value="GroupedProduct"/> + </actionGroup> + </test> +</tests> \ No newline at end of file diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/composer.json b/app/code/Magento/GroupedProduct/Test/Mftf/composer.json new file mode 100644 index 0000000000000..ebd0d3656952f --- /dev/null +++ b/app/code/Magento/GroupedProduct/Test/Mftf/composer.json @@ -0,0 +1,31 @@ +{ + "name": "magento/functional-test-module-grouped-product", + "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-checkout": "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-media-storage": "100.0.0-dev", + "magento/functional-test-module-msrp": "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-ui": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-grouped-product-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Block/Product/View/Type/GroupedTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Block/Product/View/Type/GroupedTest.php index 77ffb200f84e0..e8ed2e5d6f880 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Block/Product/View/Type/GroupedTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Block/Product/View/Type/GroupedTest.php @@ -111,6 +111,9 @@ public function testSetPreconfiguredValue($id) $this->groupedView->setPreconfiguredValue(); } + /** + * @return array + */ public function setPreconfiguredValueDataProvider() { return ['item_id_exist_in_config' => ['id_one'], 'item_id_not_exist_in_config' => ['id_two']]; diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php index 309794a6cc37d..2dbdbb551f97a 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php @@ -92,6 +92,9 @@ public function testBeforeInitializeLinksRequestDoesNotHaveGrouped($productType) $this->model->beforeInitializeLinks($this->subjectMock, $this->productMock, []); } + /** + * @return array + */ public function productTypeDataProvider() { return [ @@ -141,6 +144,9 @@ public function testBeforeInitializeLinksRequestHasGrouped($linksData) $this->model->beforeInitializeLinks($this->subjectMock, $this->productMock, ['associated' => $linksData]); } + /** + * @return array + */ public function linksDataProvider() { return [ diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Pricing/Price/FinalPriceTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Pricing/Price/FinalPriceTest.php index 13e1dde0c526c..97727b286c9cb 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Pricing/Price/FinalPriceTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Pricing/Price/FinalPriceTest.php @@ -102,6 +102,10 @@ public function testGetValueWithoutMinProduct() $this->assertEquals(0.00, $this->finalPrice->getValue()); } + /** + * @param $price + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getProductMock($price) { $priceTypeMock = $this->createMock(\Magento\Catalog\Pricing\Price\FinalPrice::class); diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Ui/DataProvider/Product/GroupedProductDataProviderTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Ui/DataProvider/Product/GroupedProductDataProviderTest.php index 8dc8fc0483d41..9a4662ffa42cc 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Ui/DataProvider/Product/GroupedProductDataProviderTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Ui/DataProvider/Product/GroupedProductDataProviderTest.php @@ -75,6 +75,9 @@ protected function setUp() ->getMockForAbstractClass(); } + /** + * @return object + */ protected function getModel() { return $this->objectManager->getObject(GroupedProductDataProvider::class, [ diff --git a/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml b/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml index bbb2054abb14f..5854928afc2fd 100644 --- a/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml +++ b/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml @@ -9,7 +9,7 @@ <system> <section id="checkout" translate="label" type="text" sortOrder="305" showInDefault="1" showInWebsite="1" showInStore="1"> <group id="cart" translate="label" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> - <field id="grouped_product_image" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <field id="grouped_product_image" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> <label>Grouped Product Image</label> <source_model>Magento\Catalog\Model\Config\Source\Product\Thumbnail</source_model> </field> diff --git a/app/code/Magento/GroupedProductGraphQl/Test/Mftf/README.md b/app/code/Magento/GroupedProductGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..1c950e855cac0 --- /dev/null +++ b/app/code/Magento/GroupedProductGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Grouped Product Graph Ql Functional Tests + +The Functional Test Module for **Magento Grouped Product Graph Ql** module. diff --git a/app/code/Magento/GroupedProductGraphQl/Test/Mftf/composer.json b/app/code/Magento/GroupedProductGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..6335b45595db7 --- /dev/null +++ b/app/code/Magento/GroupedProductGraphQl/Test/Mftf/composer.json @@ -0,0 +1,18 @@ +{ + "name": "magento/functional-test-module-grouped-product-graph-ql", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/functional-test-module-grouped-product": "100.0.0-dev", + "magento/functional-test-module-catalog-graph-ql": "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/ImportExport/Block/Adminhtml/Import/Edit/Form.php b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php index 822795abb0b44..39d0d5c7feaee 100644 --- a/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php +++ b/app/code/Magento/ImportExport/Block/Adminhtml/Import/Edit/Form.php @@ -174,6 +174,19 @@ protected function _prepareForm() 'value' => Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, ] ); + $fieldsets[$behaviorCode]->addField( + $behaviorCode . \Magento\ImportExport\Model\Import::FIELD_EMPTY_ATTRIBUTE_VALUE_CONSTANT, + 'text', + [ + 'name' => \Magento\ImportExport\Model\Import::FIELD_EMPTY_ATTRIBUTE_VALUE_CONSTANT, + 'label' => __('Empty attribute value constant'), + 'title' => __('Empty attribute value constant'), + 'required' => true, + 'disabled' => true, + 'class' => $behaviorCode, + 'value' => Import::DEFAULT_EMPTY_ATTRIBUTE_VALUE_CONSTANT, + ] + ); $fieldsets[$behaviorCode]->addField( $behaviorCode . \Magento\ImportExport\Model\Import::FIELDS_ENCLOSURE, 'checkbox', diff --git a/app/code/Magento/ImportExport/Files/Sample/customer.csv b/app/code/Magento/ImportExport/Files/Sample/customer.csv index 64c09574aea73..522e59f566739 100644 --- a/app/code/Magento/ImportExport/Files/Sample/customer.csv +++ b/app/code/Magento/ImportExport/Files/Sample/customer.csv @@ -1,2 +1,2 @@ -email,_website,_store,confirmation,created_at,created_in,disable_auto_group_change,dob,firstname,gender,group_id,lastname,middlename,password_hash,prefix,reward_update_notification,reward_warning_notification,rp_token,rp_token_created_at,store_id,suffix,taxvat,updated_at,website_id,password -jondoe@example.com,base,default,,"2015-10-30 12:49:47","Default Store View",0,,Jon,,1,Doe,,d708be3fe0fe0120840e8b13c8faae97424252c6374227ff59c05814f1aecd79:mgLqkqgTwLPLlCljzvF8hp67fNOOvOZb:1,,,,07e71459c137f4da15292134ff459cba,"2015-10-30 12:49:48",1,,,"2015-10-30 12:49:48",1, +email,_website,_store,confirmation,created_at,created_in,disable_auto_group_change,dob,firstname,gender,group_id,lastname,middlename,password_hash,prefix,rp_token,rp_token_created_at,store_id,suffix,taxvat,updated_at,website_id,password +jondoe@example.com,base,default,,"2015-10-30 12:49:47","Default Store View",0,,Jon,,1,Doe,,d708be3fe0fe0120840e8b13c8faae97424252c6374227ff59c05814f1aecd79:mgLqkqgTwLPLlCljzvF8hp67fNOOvOZb:1,,07e71459c137f4da15292134ff459cba,"2015-10-30 12:49:48",1,,,"2015-10-30 12:49:48",1, diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php index 12f34955f81f0..b5e8220e0e9b0 100644 --- a/app/code/Magento/ImportExport/Model/Import.php +++ b/app/code/Magento/ImportExport/Model/Import.php @@ -77,6 +77,11 @@ class Import extends \Magento\ImportExport\Model\AbstractModel */ const FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR = '_import_multiple_value_separator'; + /** + * Import empty attribute value constant. + */ + const FIELD_EMPTY_ATTRIBUTE_VALUE_CONSTANT = '_import_empty_attribute_value_constant'; + /** * Allow multiple values wrapping in double quotes for additional attributes. */ @@ -89,6 +94,11 @@ class Import extends \Magento\ImportExport\Model\AbstractModel */ const DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR = ','; + /** + * default empty attribute value constant + */ + const DEFAULT_EMPTY_ATTRIBUTE_VALUE_CONSTANT = '__EMPTY__VALUE__'; + /**#@+ * Import constants */ diff --git a/app/code/Magento/ImportExport/Model/Import/ErrorProcessing/ProcessingErrorAggregator.php b/app/code/Magento/ImportExport/Model/Import/ErrorProcessing/ProcessingErrorAggregator.php index 079b2e60c4785..7f49e2022c410 100644 --- a/app/code/Magento/ImportExport/Model/Import/ErrorProcessing/ProcessingErrorAggregator.php +++ b/app/code/Magento/ImportExport/Model/Import/ErrorProcessing/ProcessingErrorAggregator.php @@ -77,7 +77,7 @@ public function addError( $errorMessage = null, $errorDescription = null ) { - if ($this->isErrorAlreadyAdded($rowNumber, $errorCode)) { + if ($this->isErrorAlreadyAdded($rowNumber, $errorCode, $columnName)) { return $this; } $this->processErrorStatistics($errorLevel); @@ -333,13 +333,14 @@ public function clear() /** * @param int $rowNum * @param string $errorCode + * @param string $columnName * @return bool */ - protected function isErrorAlreadyAdded($rowNum, $errorCode) + protected function isErrorAlreadyAdded($rowNum, $errorCode, $columnName = null) { $errors = $this->getErrorsByCode([$errorCode]); foreach ($errors as $error) { - if ($rowNum == $error->getRowNumber()) { + if ($rowNum == $error->getRowNumber() && $columnName == $error->getColumnName()) { return true; } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/LICENSE.txt b/app/code/Magento/ImportExport/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/LICENSE.txt rename to app/code/Magento/ImportExport/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/LICENSE_AFL.txt b/app/code/Magento/ImportExport/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/LICENSE_AFL.txt rename to app/code/Magento/ImportExport/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/ImportExport/Test/Mftf/README.md b/app/code/Magento/ImportExport/Test/Mftf/README.md new file mode 100644 index 0000000000000..f226f9e433316 --- /dev/null +++ b/app/code/Magento/ImportExport/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Import Export Functional Tests + +The Functional Test Module for **Magento Import Export** module. diff --git a/app/code/Magento/ImportExport/Test/Mftf/composer.json b/app/code/Magento/ImportExport/Test/Mftf/composer.json new file mode 100644 index 0000000000000..fcce7ec7e84ff --- /dev/null +++ b/app/code/Magento/ImportExport/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-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-backend": "100.0.0-dev", + "magento/functional-test-module-catalog": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-media-storage": "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/ImportExport/Test/Unit/Model/Export/ConfigTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/Export/ConfigTest.php index 953f76f6cf702..f9d0cf11179dc 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Export/ConfigTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Export/ConfigTest.php @@ -65,6 +65,9 @@ public function testGetEntities($value, $expected) $this->assertEquals($expected, $this->model->getEntities('entities')); } + /** + * @return array + */ public function getEntitiesDataProvider() { return [ @@ -100,6 +103,9 @@ public function testGetEntityTypes($configData, $entity, $expectedResult) $this->assertEquals($expectedResult, $this->model->getEntityTypes($entity)); } + /** + * @return array + */ public function getEntityTypesDataProvider() { return [ @@ -154,6 +160,9 @@ public function testGetFileFormats($value, $expected) $this->assertEquals($expected, $this->model->getFileFormats('fileFormats')); } + /** + * @return array + */ public function getFileFormatsDataProvider() { return [ diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/ConfigTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/ConfigTest.php index 688e3a2659c6d..aa37551034a25 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/ConfigTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/ConfigTest.php @@ -65,6 +65,9 @@ public function testGetEntities($value, $expected) $this->assertEquals($expected, $this->model->getEntities('entities')); } + /** + * @return array + */ public function getEntitiesDataProvider() { return [ @@ -100,6 +103,9 @@ public function testGetEntityTypes($configData, $entity, $expectedResult) $this->assertEquals($expectedResult, $this->model->getEntityTypes($entity)); } + /** + * @return array + */ public function getEntityTypesDataProvider() { return [ diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php index 6ef2ef02865f1..7fb9457c2d704 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php @@ -39,6 +39,9 @@ public function testConstructorFileDestinationMatch($fileName, $expectedfileName $this->_invokeConstructor($fileName); } + /** + * @return array + */ public function constructorFileDestinationMatchDataProvider() { return [ diff --git a/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml index 093830d6fdb1c..fbdd394783608 100644 --- a/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml +++ b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml @@ -64,6 +64,7 @@ require([ this.modifyFilterGrid(); } } else { + this.previousGridEntity = ''; $('export_filter_container').hide(); } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/LICENSE.txt b/app/code/Magento/Indexer/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/LICENSE.txt rename to app/code/Magento/Indexer/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/LICENSE_AFL.txt b/app/code/Magento/Indexer/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/LICENSE_AFL.txt rename to app/code/Magento/Indexer/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Indexer/Test/Mftf/README.md b/app/code/Magento/Indexer/Test/Mftf/README.md new file mode 100644 index 0000000000000..df1044b36de0c --- /dev/null +++ b/app/code/Magento/Indexer/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Indexer Functional Tests + +The Functional Test Module for **Magento Indexer** module. diff --git a/app/code/Magento/Indexer/Test/Mftf/composer.json b/app/code/Magento/Indexer/Test/Mftf/composer.json new file mode 100644 index 0000000000000..487c2ac1abc85 --- /dev/null +++ b/app/code/Magento/Indexer/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-indexer", + "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" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Indexer/Test/Unit/App/IndexerTest.php b/app/code/Magento/Indexer/Test/Unit/App/IndexerTest.php index 5bc20e0633191..490d9437941f6 100644 --- a/app/code/Magento/Indexer/Test/Unit/App/IndexerTest.php +++ b/app/code/Magento/Indexer/Test/Unit/App/IndexerTest.php @@ -62,6 +62,9 @@ public function testExecute($isExist, $callCount) $this->assertEquals(0, $this->entryPoint->launch()->getCode()); } + /** + * @return array + */ public function executeProvider() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/ScheduledTest.php b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/ScheduledTest.php index 6ae005efa0550..1a226e073ca5e 100644 --- a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/ScheduledTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/ScheduledTest.php @@ -31,6 +31,9 @@ public function testRender($rowValue, $class, $text) $this->assertEquals($result, $html); } + /** + * @return array + */ public function typeProvider() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php index e419a010ad96d..705a9e3998ae8 100644 --- a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php @@ -33,6 +33,9 @@ public function testRender($indexValues, $expectedResult) ); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/UpdatedTest.php b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/UpdatedTest.php index e1ad5c50f3c91..369a4d46abf49 100644 --- a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/UpdatedTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/UpdatedTest.php @@ -27,6 +27,9 @@ public function testRender($defaultValue, $assert) $this->assertEquals($result, $assert); } + /** + * @return array + */ public function renderProvider() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php b/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php index e9c82906121cc..6b7cc12218990 100644 --- a/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Model/IndexerTest.php @@ -323,6 +323,9 @@ function () { $this->model->reindexAll(); } + /** + * @return array + */ protected function getIndexerData() { return [ diff --git a/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php b/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php index f7b99fdb8d23f..46ae79fc92f4a 100644 --- a/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Model/ResourceModel/AbstractResourceTest.php @@ -165,6 +165,9 @@ public function testInsertFromTable($readToIndex) ); } + /** + * @return array + */ public function insertFromTableData() { return [[false], [true]]; diff --git a/app/code/Magento/InstantPurchase/Test/Mftf/README.md b/app/code/Magento/InstantPurchase/Test/Mftf/README.md new file mode 100644 index 0000000000000..b6fd2db87500b --- /dev/null +++ b/app/code/Magento/InstantPurchase/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Instant Purchase Functional Tests + +The Functional Test Module for **Magento Instant Purchase** module. diff --git a/app/code/Magento/InstantPurchase/Test/Mftf/composer.json b/app/code/Magento/InstantPurchase/Test/Mftf/composer.json new file mode 100644 index 0000000000000..465002e5c4244 --- /dev/null +++ b/app/code/Magento/InstantPurchase/Test/Mftf/composer.json @@ -0,0 +1,23 @@ +{ + "name": "magento/functional-test-module-instant-purchase", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-catalog": "100.0.0-dev", + "magento/functional-test-module-customer": "100.0.0-dev", + "magento/functional-test-module-sales": "100.0.0-dev", + "magento/functional-test-module-shipping": "100.0.0-dev", + "magento/functional-test-module-quote": "100.0.0-dev", + "magento/functional-test-module-vault": "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/Indexer/LICENSE.txt b/app/code/Magento/Integration/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Indexer/LICENSE.txt rename to app/code/Magento/Integration/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Indexer/LICENSE_AFL.txt b/app/code/Magento/Integration/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Indexer/LICENSE_AFL.txt rename to app/code/Magento/Integration/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Integration/Test/Mftf/README.md b/app/code/Magento/Integration/Test/Mftf/README.md new file mode 100644 index 0000000000000..bee16720d3c4a --- /dev/null +++ b/app/code/Magento/Integration/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Integration Functional Tests + +The Functional Test Module for **Magento Integration** module. diff --git a/app/code/Magento/Integration/Test/Mftf/composer.json b/app/code/Magento/Integration/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7168fc1945dab --- /dev/null +++ b/app/code/Magento/Integration/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-integration", + "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-authorization": "100.0.0-dev", + "magento/functional-test-module-backend": "100.0.0-dev", + "magento/functional-test-module-customer": "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-user": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php index b5f2b22186187..7738e9939fcdd 100644 --- a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php +++ b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php @@ -83,6 +83,9 @@ public function testCanShowTab($integrationData, $expectedValue) $this->assertEquals($expectedValue, $this->webapiBlock->canShowTab()); } + /** + * @return array + */ public function canShowTabProvider() { return [ @@ -127,6 +130,9 @@ public function testIsEverythingAllowed($rootResourceId, $integrationData, $sele $this->assertEquals($expectedValue, $this->webapiBlock->isEverythingAllowed()); } + /** + * @return array + */ public function isEverythingAllowedProvider() { return [ diff --git a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/NameTest.php b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/NameTest.php index 91f56279a89e5..30f1dc1d90bdc 100644 --- a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/NameTest.php +++ b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/NameTest.php @@ -87,6 +87,9 @@ public function testRender($endpoint, $name, $expectedResult) $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function endpointDataProvider() { return [ diff --git a/app/code/Magento/Integration/Test/Unit/Helper/DataTest.php b/app/code/Magento/Integration/Test/Unit/Helper/DataTest.php index ca79393efb113..0cb550913ba60 100644 --- a/app/code/Magento/Integration/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Integration/Test/Unit/Helper/DataTest.php @@ -33,6 +33,9 @@ public function testIsConfigType($integrationsData, $expectedResult) $this->assertEquals($expectedResult, $this->dataHelper->isConfigType($integrationsData)); } + /** + * @return array + */ public function integrationDataProvider() { return [ diff --git a/app/code/Magento/Integration/Test/Unit/Helper/Oauth/ConsumerTest.php b/app/code/Magento/Integration/Test/Unit/Helper/Oauth/ConsumerTest.php index ebdac167d257c..10bd5689a7c30 100644 --- a/app/code/Magento/Integration/Test/Unit/Helper/Oauth/ConsumerTest.php +++ b/app/code/Magento/Integration/Test/Unit/Helper/Oauth/ConsumerTest.php @@ -197,6 +197,10 @@ public function testPostToConsumer() $this->assertEquals($oauthVerifier, $verifier, 'Checking Oauth Verifier'); } + /** + * @param $length + * @return bool|string + */ private function _generateRandomString($length) { return substr( diff --git a/app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php b/app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php index 966a6b293196f..7ca29e99d9ba9 100644 --- a/app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php +++ b/app/code/Magento/Integration/Test/Unit/Oauth/OauthTest.php @@ -154,6 +154,10 @@ public function tearDown() unset($this->_oauth); } + /** + * @param array $amendments + * @return array + */ protected function _getRequestTokenParams($amendments = []) { $requiredParams = [ @@ -231,6 +235,9 @@ public function testGetRequestTokenOutdatedConsumerKey() $this->_oauth->getRequestToken($this->_getRequestTokenParams(), self::REQUEST_URL); } + /** + * @param bool $isLoadable + */ protected function _setupConsumer($isLoadable = true) { $this->_consumerMock->expects($this->any())->method('loadByKey')->will($this->returnSelf()); @@ -291,6 +298,9 @@ public function testGetRequestTokenOauthTimestampRefused($timestamp) ); } + /** + * @return array + */ public function dataProviderForGetRequestTokenNonceTimestampRefusedTest() { return [ @@ -300,6 +310,10 @@ public function dataProviderForGetRequestTokenNonceTimestampRefusedTest() ]; } + /** + * @param bool $isUsed + * @param int $timestamp + */ protected function _setupNonce($isUsed = false, $timestamp = 0) { $nonceMock = $this->getMockBuilder( @@ -359,6 +373,13 @@ public function testGetRequestTokenNoConsumer() $this->_oauth->getRequestToken($this->_getRequestTokenParams(), self::REQUEST_URL); } + /** + * @param bool $doesExist + * @param string $type + * @param int $consumerId + * @param null $verifier + * @param bool $isRevoked + */ protected function _setupToken( $doesExist = true, $type = \Magento\Integration\Model\Oauth\Token::TYPE_VERIFIER, @@ -602,6 +623,9 @@ public function testGetAccessTokenVerifierInvalid($verifier, $verifierFromToken) ); } + /** + * @return array + */ public function dataProviderForGetAccessTokenVerifierInvalidTest() { // Verifier is not a string @@ -785,6 +809,9 @@ public function testMissingParamForBuildAuthorizationHeader($expectedMessage, $r $this->_oauth->buildAuthorizationHeader($request, $requestUrl); } + /** + * @return array + */ public function dataProviderMissingParamForBuildAuthorizationHeaderTest() { return [ @@ -834,6 +861,10 @@ public function dataProviderMissingParamForBuildAuthorizationHeaderTest() ]; } + /** + * @param array $amendments + * @return array + */ protected function _getAccessTokenRequiredParams($amendments = []) { $requiredParams = [ @@ -851,6 +882,10 @@ protected function _getAccessTokenRequiredParams($amendments = []) return array_merge($requiredParams, $amendments); } + /** + * @param $length + * @return bool|string + */ private function _generateRandomString($length) { return substr( diff --git a/app/code/Magento/LayeredNavigation/Block/Navigation/State.php b/app/code/Magento/LayeredNavigation/Block/Navigation/State.php index ff3ab124a65ad..1f868a5b71754 100644 --- a/app/code/Magento/LayeredNavigation/Block/Navigation/State.php +++ b/app/code/Magento/LayeredNavigation/Block/Navigation/State.php @@ -18,7 +18,7 @@ class State extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'layer/state.phtml'; + protected $_template = 'Magento_LayeredNavigation::layer/state.phtml'; /** * Catalog layer diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/LICENSE.txt b/app/code/Magento/LayeredNavigation/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/LICENSE.txt rename to app/code/Magento/LayeredNavigation/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/LICENSE_AFL.txt b/app/code/Magento/LayeredNavigation/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/LICENSE_AFL.txt rename to app/code/Magento/LayeredNavigation/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/README.md b/app/code/Magento/LayeredNavigation/Test/Mftf/README.md new file mode 100644 index 0000000000000..6a6f97798b13c --- /dev/null +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Layered Navigation Functional Tests + +The Functional Test Module for **Magento Layered Navigation** module. diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/composer.json b/app/code/Magento/LayeredNavigation/Test/Mftf/composer.json new file mode 100644 index 0000000000000..9d046b8c2a105 --- /dev/null +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/composer.json @@ -0,0 +1,18 @@ +{ + "name": "magento/functional-test-module-layered-navigation", + "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-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/LICENSE.txt b/app/code/Magento/Marketplace/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/LICENSE.txt rename to app/code/Magento/Marketplace/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/LICENSE_AFL.txt b/app/code/Magento/Marketplace/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/LICENSE_AFL.txt rename to app/code/Magento/Marketplace/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Marketplace/Test/Mftf/README.md b/app/code/Magento/Marketplace/Test/Mftf/README.md new file mode 100644 index 0000000000000..3612b519cb5be --- /dev/null +++ b/app/code/Magento/Marketplace/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Marketplace Functional Tests + +The Functional Test Module for **Magento Marketplace** module. diff --git a/app/code/Magento/Marketplace/Test/Mftf/composer.json b/app/code/Magento/Marketplace/Test/Mftf/composer.json new file mode 100644 index 0000000000000..3d4fd741bc4ad --- /dev/null +++ b/app/code/Magento/Marketplace/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-marketplace", + "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" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/MediaStorage/Model/File/Storage/Response.php b/app/code/Magento/MediaStorage/Model/File/Storage/Response.php index 216068c9fc32a..1125dfd81ad84 100644 --- a/app/code/Magento/MediaStorage/Model/File/Storage/Response.php +++ b/app/code/Magento/MediaStorage/Model/File/Storage/Response.php @@ -56,7 +56,11 @@ public function __construct( public function sendResponse() { if ($this->_filePath && $this->getHttpResponseCode() == 200) { - $this->_transferAdapter->send($this->_filePath); + $options = [ + 'filepath' => $this->_filePath, + 'headers' => $this->getHeaders(), + ]; + $this->_transferAdapter->send($options); } else { parent::sendResponse(); } diff --git a/app/code/Magento/MediaStorage/Service/ImageResize.php b/app/code/Magento/MediaStorage/Service/ImageResize.php index 37dd6f485f1a8..6e3929296e252 100644 --- a/app/code/Magento/MediaStorage/Service/ImageResize.php +++ b/app/code/Magento/MediaStorage/Service/ImageResize.php @@ -202,7 +202,7 @@ private function getViewImages(array $themes): array ]); $images = $config->getMediaEntities('Magento_Catalog', ImageHelper::MEDIA_TYPE_CONFIG_NODE); foreach ($images as $imageId => $imageData) { - $uniqIndex = $this->getUniqImageIndex($imageData); + $uniqIndex = $this->getUniqueImageIndex($imageData); $imageData['id'] = $imageId; $viewImages[$uniqIndex] = $imageData; } @@ -211,11 +211,11 @@ private function getViewImages(array $themes): array } /** - * Get uniq image index + * Get unique image index * @param array $imageData * @return string */ - private function getUniqImageIndex(array $imageData): string + private function getUniqueImageIndex(array $imageData): string { ksort($imageData); unset($imageData['type']); diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/LICENSE.txt b/app/code/Magento/MediaStorage/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/LICENSE.txt rename to app/code/Magento/MediaStorage/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/LICENSE_AFL.txt b/app/code/Magento/MediaStorage/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/LICENSE_AFL.txt rename to app/code/Magento/MediaStorage/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/MediaStorage/Test/Mftf/README.md b/app/code/Magento/MediaStorage/Test/Mftf/README.md new file mode 100644 index 0000000000000..f4a5cd473414a --- /dev/null +++ b/app/code/Magento/MediaStorage/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Media Storage Functional Tests + +The Functional Test Module for **Magento Media Storage** module. diff --git a/app/code/Magento/MediaStorage/Test/Mftf/composer.json b/app/code/Magento/MediaStorage/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7e7aeeef14517 --- /dev/null +++ b/app/code/Magento/MediaStorage/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-media-storage", + "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-config": "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-theme": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/MediaStorage/Test/Unit/App/MediaTest.php b/app/code/Magento/MediaStorage/Test/Unit/App/MediaTest.php index a94bb8ec5e489..90075d11c6af3 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/App/MediaTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/App/MediaTest.php @@ -218,6 +218,9 @@ public function testCatchException($isDeveloper, $setBodyCalls) $this->model->catchException($bootstrap, $exception); } + /** + * @return array + */ public function catchExceptionDataProvider() { return [ diff --git a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/MediaTest.php b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/MediaTest.php index 59f0d08ba3adb..d29d49eadb64b 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/MediaTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/MediaTest.php @@ -87,6 +87,9 @@ public function testCollectFileInfo($path, $expectedDir, $expectedFile) $this->assertEquals($expected, $this->helper->collectFileInfo($mediaDirectory, $path)); } + /** + * @return array + */ public function pathDataProvider() { return [ diff --git a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/Storage/DatabaseTest.php b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/Storage/DatabaseTest.php index 6ff2397f543fa..56f57a9d32c1f 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/Storage/DatabaseTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/Storage/DatabaseTest.php @@ -75,6 +75,9 @@ public function testCheckDbUsage($storage, $expected) $this->assertEquals($expected, $this->helper->checkDbUsage()); } + /** + * @return array + */ public function checkDbUsageDataProvider() { return [ @@ -144,6 +147,9 @@ public function testSaveFile($storage, $callNum) $this->helper->saveFile('media-dir/filename'); } + /** + * @return array + */ public function updateFileDataProvider() { return [ @@ -226,6 +232,9 @@ public function testFileExists($storage, $callNum, $expected) $this->assertEquals($expected, $this->helper->fileExists('media-dir/file')); } + /** + * @return array + */ public function fileExistsDataProvider() { return [ @@ -264,6 +273,9 @@ public function testGetUniqueFilename($storage, $callNum, $expected) $this->assertSame($expected, $this->helper->getUniqueFilename('media-dir/directory/', 'filename.ext')); } + /** + * @return array + */ public function getUniqueFilenameDataProvider() { return [ @@ -308,6 +320,9 @@ public function testSaveFileToFileSystem($expected, $storage, $callNum, $id = 0, $this->assertEquals($expected, $this->helper->saveFileToFilesystem('media-dir/filename')); } + /** + * @return array + */ public function saveFileToFileSystemDataProvider() { return [ @@ -430,6 +445,9 @@ public function testSaveUploadedFile($result, $expected, $expectedFullPath, $sto $this->assertEquals($expected, $this->helper->saveUploadedFile($result)); } + /** + * @return array + */ public function saveUploadedFileDataProvider() { return [ diff --git a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/StorageTest.php b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/StorageTest.php index 8725bf1f0f02f..d1ae631a351c3 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Helper/File/StorageTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Helper/File/StorageTest.php @@ -77,6 +77,9 @@ public function testIsInternalStorage($storage, $callNum, $expected) $this->assertEquals($expected, $this->helper->isInternalStorage($storage)); } + /** + * @return array + */ public function isInternalStorageDataProvider() { return [ @@ -146,6 +149,9 @@ public function testProcessStorageFile($expected, $storage, $callNum, $callSaveF $this->assertEquals($expected, $this->helper->processStorageFile($filename)); } + /** + * @return array + */ public function processStorageFileDataProvider() { return [ diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Storage/ResponseTest.php b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Storage/ResponseTest.php new file mode 100644 index 0000000000000..cdeb47d2b8490 --- /dev/null +++ b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Storage/ResponseTest.php @@ -0,0 +1,74 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\MediaStorage\Test\Unit\Model\File\Storage; + +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; + +/** Unit tests for \Magento\MediaStorage\Model\File\Storage\Response class */ +class ResponseTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var \Magento\MediaStorage\Model\File\Storage\Response + */ + private $response; + + /** + * @var \Magento\Framework\File\Transfer\Adapter\Http|\PHPUnit_Framework_MockObject_MockObject + */ + private $transferAdapter; + + /** + * @inheritdoc + */ + protected function setUp() + { + $objectManager = new ObjectManager($this); + $this->transferAdapter = $this->getMockBuilder(\Magento\Framework\File\Transfer\Adapter\Http::class) + ->disableOriginalConstructor() + ->setMethods(['send']) + ->getMock(); + $this->response = $objectManager->getObject( + \Magento\MediaStorage\Model\File\Storage\Response::class, + [ + 'transferAdapter' => $this->transferAdapter, + 'statusCode' => 200, + ] + ); + } + + /** + * @return void + */ + public function testSendResponse(): void + { + $filePath = 'file_path'; + $headers = $this->getMockBuilder(\Zend\Http\Headers::class)->getMock(); + $this->response->setFilePath($filePath); + $this->response->setHeaders($headers); + $this->transferAdapter + ->expects($this->atLeastOnce()) + ->method('send') + ->with( + [ + 'filepath' => $filePath, + 'headers' => $headers, + ] + ); + + $this->response->sendResponse(); + } + + /** + * @return void + */ + public function testSendResponseWithoutFilePath(): void + { + $this->transferAdapter->expects($this->never())->method('send'); + $this->response->sendResponse(); + } +} diff --git a/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php b/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php index c4620862b2e10..f301fb9289efb 100644 --- a/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php +++ b/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php @@ -139,6 +139,8 @@ private function canBeRun($consumerName, array $allowedConsumers = []) */ private function getPidFilePath($consumerName) { - return $consumerName . static::PID_FILE_EXT; + $sanitizedHostname = preg_replace('/[^a-z0-9]/i', '', gethostname()); + + return $consumerName . '-' . $sanitizedHostname . static::PID_FILE_EXT; } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/LICENSE.txt b/app/code/Magento/MessageQueue/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/LICENSE.txt rename to app/code/Magento/MessageQueue/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/LICENSE_AFL.txt b/app/code/Magento/MessageQueue/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/LICENSE_AFL.txt rename to app/code/Magento/MessageQueue/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/MessageQueue/Test/Mftf/README.md b/app/code/Magento/MessageQueue/Test/Mftf/README.md new file mode 100644 index 0000000000000..9f6fb3cb1caa5 --- /dev/null +++ b/app/code/Magento/MessageQueue/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Message Queue Functional Tests + +The Functional Test Module for **Magento Message Queue** module. diff --git a/app/code/Magento/MessageQueue/Test/Mftf/composer.json b/app/code/Magento/MessageQueue/Test/Mftf/composer.json new file mode 100644 index 0000000000000..e499fed390751 --- /dev/null +++ b/app/code/Magento/MessageQueue/Test/Mftf/composer.json @@ -0,0 +1,16 @@ +{ + "name": "magento/functional-test-module-message-queue", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "magento/magento2-functional-testing-framework": "2.2.0", + "magento/magento-composer-installer": "100.0.0-dev", + "php": "~7.1.3||~7.2.0" + }, + "type": "magento2-test", + "license": [ + "proprietary" + ] +} diff --git a/app/code/Magento/MessageQueue/Test/Unit/Model/Cron/ConsumersRunnerTest.php b/app/code/Magento/MessageQueue/Test/Unit/Model/Cron/ConsumersRunnerTest.php index 08c8f926522de..bf8796a03f52a 100644 --- a/app/code/Magento/MessageQueue/Test/Unit/Model/Cron/ConsumersRunnerTest.php +++ b/app/code/Magento/MessageQueue/Test/Unit/Model/Cron/ConsumersRunnerTest.php @@ -51,6 +51,8 @@ class ConsumersRunnerTest extends \PHPUnit\Framework\TestCase */ protected function setUp() { + require_once __DIR__ . '/../../_files/consumers_runner_functions_mocks.php'; + $this->phpExecutableFinderMock = $this->getMockBuilder(phpExecutableFinder::class) ->disableOriginalConstructor() ->getMock(); @@ -116,7 +118,7 @@ public function testRun( $isRunExpects ) { $consumerName = 'consumerName'; - $pidFilePath = 'consumerName.pid'; + $pidFilePath = 'consumerName-myHostName.pid'; $this->deploymentConfigMock->expects($this->exactly(3)) ->method('get') @@ -164,7 +166,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=20000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=20000'], 'allowedConsumers' => [], 'shellBackgroundExpects' => 1, 'isRunExpects' => 1, @@ -174,7 +176,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => [], 'shellBackgroundExpects' => 1, 'isRunExpects' => 1, @@ -184,7 +186,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => ['someConsumer'], 'shellBackgroundExpects' => 0, 'isRunExpects' => 0, @@ -194,7 +196,7 @@ public function runDataProvider() 'isRun' => true, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => ['someConsumer'], 'shellBackgroundExpects' => 0, 'isRunExpects' => 0, @@ -204,7 +206,7 @@ public function runDataProvider() 'isRun' => true, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => [], 'shellBackgroundExpects' => 0, 'isRunExpects' => 1, @@ -214,7 +216,7 @@ public function runDataProvider() 'isRun' => true, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => ['consumerName'], 'shellBackgroundExpects' => 0, 'isRunExpects' => 1, @@ -224,7 +226,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => ['consumerName'], 'shellBackgroundExpects' => 1, 'isRunExpects' => 1, @@ -234,7 +236,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '/bin/php', 'command' => '/bin/php '. BP . '/bin/magento queue:consumers:start %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid'], 'allowedConsumers' => ['consumerName'], 'shellBackgroundExpects' => 1, 'isRunExpects' => 1, diff --git a/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php b/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php new file mode 100644 index 0000000000000..788a8464a0ce4 --- /dev/null +++ b/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php @@ -0,0 +1,16 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\MessageQueue\Model\Cron; + +/** + * @return string + */ +function gethostname() +{ + return 'myHost@Name'; +} diff --git a/app/code/Magento/MessageQueue/Test/Unit/_files/pid_consumer_functions_mocks.php b/app/code/Magento/MessageQueue/Test/Unit/_files/pid_consumer_functions_mocks.php index 042c6012f80b3..33cd2757e4f5a 100644 --- a/app/code/Magento/MessageQueue/Test/Unit/_files/pid_consumer_functions_mocks.php +++ b/app/code/Magento/MessageQueue/Test/Unit/_files/pid_consumer_functions_mocks.php @@ -5,6 +5,10 @@ */ namespace Magento\MessageQueue\Model\Cron\ConsumersRunner; +/** + * @param $pid + * @return bool|int + */ function posix_getpgid($pid) { if ($pid === 11111) { @@ -14,6 +18,11 @@ function posix_getpgid($pid) return false; } +/** + * @param $command + * @param array|null $output + * @param null $return_var + */ function exec($command, array &$output = null, &$return_var = null) { $output = ['PID TTY TIME CMD']; diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/LICENSE.txt b/app/code/Magento/Msrp/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/LICENSE.txt rename to app/code/Magento/Msrp/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/LICENSE_AFL.txt b/app/code/Magento/Msrp/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/LICENSE_AFL.txt rename to app/code/Magento/Msrp/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Msrp/Test/Mftf/README.md b/app/code/Magento/Msrp/Test/Mftf/README.md new file mode 100644 index 0000000000000..731a425ac7450 --- /dev/null +++ b/app/code/Magento/Msrp/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Msrp Functional Tests + +The Functional Test Module for **Magento Msrp** module. diff --git a/app/code/Magento/Msrp/Test/Mftf/composer.json b/app/code/Magento/Msrp/Test/Mftf/composer.json new file mode 100644 index 0000000000000..cd85cb6cb268a --- /dev/null +++ b/app/code/Magento/Msrp/Test/Mftf/composer.json @@ -0,0 +1,26 @@ +{ + "name": "magento/functional-test-module-msrp", + "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-downloadable": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-grouped-product": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-tax": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-bundle": "100.0.0-dev", + "magento/functional-test-module-msrp-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/LICENSE.txt b/app/code/Magento/Multishipping/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/LICENSE.txt rename to app/code/Magento/Multishipping/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/LICENSE_AFL.txt b/app/code/Magento/Multishipping/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/LICENSE_AFL.txt rename to app/code/Magento/Multishipping/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Multishipping/Test/Mftf/README.md b/app/code/Magento/Multishipping/Test/Mftf/README.md new file mode 100644 index 0000000000000..8349d39c5522b --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Multishipping Functional Tests + +The Functional Test Module for **Magento Multishipping** module. diff --git a/app/code/Magento/Multishipping/Test/Mftf/composer.json b/app/code/Magento/Multishipping/Test/Mftf/composer.json new file mode 100644 index 0000000000000..344b2b1ef6525 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/composer.json @@ -0,0 +1,25 @@ +{ + "name": "magento/functional-test-module-multishipping", + "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-checkout": "100.0.0-dev", + "magento/functional-test-module-customer": "100.0.0-dev", + "magento/functional-test-module-directory": "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", + "magento/functional-test-module-tax": "100.0.0-dev", + "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/Multishipping/Test/Unit/Block/Checkout/Address/SelectTest.php b/app/code/Magento/Multishipping/Test/Unit/Block/Checkout/Address/SelectTest.php index 7d7307da05cf1..9fe5125eb8a53 100644 --- a/app/code/Magento/Multishipping/Test/Unit/Block/Checkout/Address/SelectTest.php +++ b/app/code/Magento/Multishipping/Test/Unit/Block/Checkout/Address/SelectTest.php @@ -114,6 +114,9 @@ public function testIsAddressDefaultShipping($id, $expectedValue) $this->assertEquals($expectedValue, $this->block->isAddressDefaultShipping($this->addressMock)); } + /** + * @return array + */ public function isDefaultAddressDataProvider() { return [ diff --git a/app/code/Magento/Multishipping/Test/Unit/Controller/Checkout/Address/NewShippingTest.php b/app/code/Magento/Multishipping/Test/Unit/Controller/Checkout/Address/NewShippingTest.php index 00940c426a6ac..9ffef2832a6bc 100644 --- a/app/code/Magento/Multishipping/Test/Unit/Controller/Checkout/Address/NewShippingTest.php +++ b/app/code/Magento/Multishipping/Test/Unit/Controller/Checkout/Address/NewShippingTest.php @@ -163,6 +163,9 @@ public function testExecute($backUrl, $shippingAddress, $url) $this->controller->execute(); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml index d8514ca77f9c2..da553b7823da9 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml @@ -79,7 +79,7 @@ if (isset($methodsForms[$code])) { $block->setMethodFormTemplate($code, $methodsForms[$code]); } - ?> + ?> <dt class="item-title"> <?php if ($methodsCount > 1) : ?> <input type="radio" diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/results.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/results.phtml index dacf96f9c0baf..68ff49b7b0dbb 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/results.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/results.phtml @@ -11,7 +11,7 @@ $orderIds = $block->getOrderIds(); <div class="multicheckout results"> <p class="block-content"> <?php if (!empty($orderIds)) : ?> - <?= $block->escapeHtml(__('Not all items were included.')); ?> + <?= $block->escapeHtml(__('Not all items were included.')); ?> <?php endif; ?> <?= $block->escapeHtml(__('For details, see')); ?> <a href="#failed"><?= $block->escapeHtml(__('Failed to Order')); ?></a> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml index 57c4afaee6541..0fe046800a80d 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml @@ -24,9 +24,9 @@ <?php if ($shippingAddress) : ?> <span class="shipping-label"><?= $block->escapeHtml(__('Ship to:')); ?></span> <span class="shipping-address"> - <?= $block->escapeHtml( - $block->getCheckoutData()->formatOrderShippingAddress($shippingAddress) - ); ?> + <?= $block->escapeHtml( + $block->getCheckoutData()->formatOrderShippingAddress($shippingAddress) + ); ?> </span> <?php else : ?> <span class="shipping-address"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/LICENSE.txt b/app/code/Magento/MysqlMq/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/LICENSE.txt rename to app/code/Magento/MysqlMq/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/LICENSE_AFL.txt b/app/code/Magento/MysqlMq/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/LICENSE_AFL.txt rename to app/code/Magento/MysqlMq/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/MysqlMq/Test/Mftf/README.md b/app/code/Magento/MysqlMq/Test/Mftf/README.md new file mode 100644 index 0000000000000..ddedc2d14946d --- /dev/null +++ b/app/code/Magento/MysqlMq/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Mysql Mq Functional Tests + +The Functional Test Module for **Magento Mysql Mq** module. diff --git a/app/code/Magento/MysqlMq/Test/Mftf/composer.json b/app/code/Magento/MysqlMq/Test/Mftf/composer.json new file mode 100644 index 0000000000000..0aa70a28428e4 --- /dev/null +++ b/app/code/Magento/MysqlMq/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-mysql-mq", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "magento/magento2-functional-testing-framework": "2.2.0", + "magento/magento-composer-installer": "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/Multishipping/LICENSE.txt b/app/code/Magento/NewRelicReporting/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Multishipping/LICENSE.txt rename to app/code/Magento/NewRelicReporting/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Multishipping/LICENSE_AFL.txt b/app/code/Magento/NewRelicReporting/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Multishipping/LICENSE_AFL.txt rename to app/code/Magento/NewRelicReporting/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/NewRelicReporting/Test/Mftf/README.md b/app/code/Magento/NewRelicReporting/Test/Mftf/README.md new file mode 100644 index 0000000000000..911d92102a572 --- /dev/null +++ b/app/code/Magento/NewRelicReporting/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# New Relic Reporting Functional Tests + +The Functional Test Module for **Magento New Relic Reporting** module. diff --git a/app/code/Magento/NewRelicReporting/Test/Mftf/composer.json b/app/code/Magento/NewRelicReporting/Test/Mftf/composer.json new file mode 100644 index 0000000000000..287475d097084 --- /dev/null +++ b/app/code/Magento/NewRelicReporting/Test/Mftf/composer.json @@ -0,0 +1,23 @@ +{ + "name": "magento/functional-test-module-new-relic-reporting", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0", + "magento/magento-composer-installer": "100.0.0-dev", + "magento/functional-test-module-backend": "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-configurable-product": "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/NewRelicReporting/Test/Unit/Model/Apm/DeploymentsTest.php b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Apm/DeploymentsTest.php index eb665773d5f4b..1193ac088633f 100644 --- a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Apm/DeploymentsTest.php +++ b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Apm/DeploymentsTest.php @@ -252,6 +252,9 @@ public function testSetDeploymentRequestFail() ); } + /** + * @return array + */ private function getDataVariables() { $description = 'Event description'; diff --git a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Module/CollectTest.php b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Module/CollectTest.php index 1c3b9e08f2e7e..8d8e6255ab8d3 100644 --- a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Module/CollectTest.php +++ b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Module/CollectTest.php @@ -360,6 +360,9 @@ public function testGetModuleDataRefreshOrStatement($data) ); } + /** + * @return array + */ public function itemDataProvider() { return [ diff --git a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Observer/ReportProductSavedToNewRelicTest.php b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Observer/ReportProductSavedToNewRelicTest.php index 20791511324bf..ba5f13d247fe0 100644 --- a/app/code/Magento/NewRelicReporting/Test/Unit/Model/Observer/ReportProductSavedToNewRelicTest.php +++ b/app/code/Magento/NewRelicReporting/Test/Unit/Model/Observer/ReportProductSavedToNewRelicTest.php @@ -140,6 +140,9 @@ public function testReportProductUpdatedToNewRelic($isNewObject) $this->model->execute($eventObserver); } + /** + * @return array + */ public function actionDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php index c5f4dc68d4dd2..61a17d7ad5e51 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php @@ -19,7 +19,7 @@ class Problem extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'problem/list.phtml'; + protected $_template = 'Magento_Newsletter::problem/list.phtml'; /** * @var \Magento\Newsletter\Model\ResourceModel\Problem\Collection diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php index f085b0f6c9c8b..ca90b5d84a10f 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php @@ -19,7 +19,7 @@ class Edit extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'queue/edit.phtml'; + protected $_template = 'Magento_Newsletter::queue/edit.phtml'; /** * Core registry diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php index 86e7e7ee4756d..4d5165db68736 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php @@ -29,7 +29,7 @@ class Subscriber extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'subscriber/list.phtml'; + protected $_template = 'Magento_Newsletter::subscriber/list.phtml'; /** * @var \Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template.php index 02b60e049f254..92ae6e6c3db04 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template.php @@ -16,7 +16,7 @@ class Template extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'template/list.phtml'; + protected $_template = 'Magento_Newsletter::template/list.phtml'; /** * @return $this diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php index c0c5dfef277b8..0d7ebd74f724f 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php @@ -165,8 +165,8 @@ protected function _addCustomersData() $customerName = $this->_customerView->getCustomerName($customer); foreach ($problems as $problem) { $problem->setCustomerName($customerName) - ->setCustomerFirstName($customer->getFirstName()) - ->setCustomerLastName($customer->getLastName()); + ->setCustomerFirstName($customer->getFirstname()) + ->setCustomerLastName($customer->getLastname()); } } catch (NoSuchEntityException $e) { // do nothing if customer is not found by id diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php index 9e98998f7f6ec..189549d2a73d2 100644 --- a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php +++ b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php @@ -221,7 +221,7 @@ public function addOnlyForSendingFilter() [\Magento\Newsletter\Model\Queue::STATUS_SENDING, \Magento\Newsletter\Model\Queue::STATUS_NEVER] )->where( 'main_table.queue_start_at < ?', - $this->_date->gmtdate() + $this->_date->gmtDate() )->where( 'main_table.queue_start_at IS NOT NULL' ); diff --git a/app/code/Magento/Newsletter/Test/Mftf/Data/NewsletterTemplateData.xml b/app/code/Magento/Newsletter/Test/Mftf/Data/NewsletterTemplateData.xml new file mode 100644 index 0000000000000..9719a892aa702 --- /dev/null +++ b/app/code/Magento/Newsletter/Test/Mftf/Data/NewsletterTemplateData.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="_defaultNewsletter" type="cms_page"> + <data key="name" unique="suffix">Test Newsletter Template</data> + <data key="subject">Test Newsletter Subject</data> + <data key="senderName">Admin</data> + <data key="senderEmail">admin@magento.com</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/LICENSE.txt b/app/code/Magento/Newsletter/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/LICENSE.txt rename to app/code/Magento/Newsletter/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/LICENSE_AFL.txt b/app/code/Magento/Newsletter/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/LICENSE_AFL.txt rename to app/code/Magento/Newsletter/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Page/NewsletterTemplatePage.xml b/app/code/Magento/Newsletter/Test/Mftf/Page/NewsletterTemplatePage.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Page/NewsletterTemplatePage.xml rename to app/code/Magento/Newsletter/Test/Mftf/Page/NewsletterTemplatePage.xml index 90c8ed93d2df2..b27bc5eee9f4d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Page/NewsletterTemplatePage.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Page/NewsletterTemplatePage.xml @@ -6,7 +6,7 @@ */ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="NewsletterTemplateForm" url="/newsletter/template/new/" area="admin" module="Magento_Cms"> <section name="StorefrontNewsletterSection"/> <section name="StorefrontNewsletterSection"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/README.md b/app/code/Magento/Newsletter/Test/Mftf/README.md new file mode 100644 index 0000000000000..266c5c5723f63 --- /dev/null +++ b/app/code/Magento/Newsletter/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Newsletter Functional Tests + +The Functional Test Module for **Magento Newsletter** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Section/NewsletterTemplateSection.xml b/app/code/Magento/Newsletter/Test/Mftf/Section/NewsletterTemplateSection.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Section/NewsletterTemplateSection.xml rename to app/code/Magento/Newsletter/Test/Mftf/Section/NewsletterTemplateSection.xml index e3be7570f87d4..ef897ef6421bb 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Section/NewsletterTemplateSection.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Section/NewsletterTemplateSection.xml @@ -6,7 +6,7 @@ */ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="BasicFieldNewsletterSection"> <element name="templateName" type="input" selector="#code"/> <element name="templateSubject" type="input" selector="#subject"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Section/StorefrontNewsletterSection.xml b/app/code/Magento/Newsletter/Test/Mftf/Section/StorefrontNewsletterSection.xml new file mode 100644 index 0000000000000..01d3a36bf29c5 --- /dev/null +++ b/app/code/Magento/Newsletter/Test/Mftf/Section/StorefrontNewsletterSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontNewsletterSection"> + <element name="mediaDescription" type="text" selector="body>p>img" /> + <element name="imageSource" type="text" selector="//img[contains(@src,'{{var1}}')]" parameterized="true"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddImageToWYSIWYGNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddImageToWYSIWYGNewsletterTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddImageToWYSIWYGNewsletterTest.xml rename to app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddImageToWYSIWYGNewsletterTest.xml index 118d774ec6afc..f397b84dfaeb1 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddImageToWYSIWYGNewsletterTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddImageToWYSIWYGNewsletterTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddImageToWYSIWYGNewsletterTest"> <annotations> <features value="Newsletter"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml rename to app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml index 2ad2709c8fb8e..353d33439f079 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddVariableToWYSIWYGNewsletterTest"> <annotations> <features value="Newsletter"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml rename to app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml index bfa8fc40eeb20..a447acc1b0fca 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminAddWidgetToWYSIWYGNewsletterTest"> <annotations> <features value="Newsletter"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml rename to app/code/Magento/Newsletter/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml index b7b9e21adde7f..69ea5677a09e8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml @@ -6,7 +6,7 @@ */ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest"> <annotations> <features value="Newsletter"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/composer.json b/app/code/Magento/Newsletter/Test/Mftf/composer.json new file mode 100644 index 0000000000000..2a2ab444dd08a --- /dev/null +++ b/app/code/Magento/Newsletter/Test/Mftf/composer.json @@ -0,0 +1,24 @@ +{ + "name": "magento/functional-test-module-newsletter", + "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-cms": "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-email": "100.0.0-dev", + "magento/functional-test-module-require-js": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-widget": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php index 5a4032dc4dffd..39beade9346d4 100644 --- a/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php +++ b/app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php @@ -363,6 +363,9 @@ public function testReceived() $this->assertEquals($this->subscriber, $this->subscriber->received($queue)); } + /** + * @return $this + */ protected function sendEmailCheck() { $storeModel = $this->getMockBuilder(\Magento\Store\Model\Store::class) diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php index 5773c77c5f7f9..52bb803dd377f 100644 --- a/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php +++ b/app/code/Magento/Newsletter/Test/Unit/Model/TemplateTest.php @@ -401,6 +401,9 @@ public function testIsValidForSend($senderName, $senderEmail, $templateSubject, $this->assertEquals($expectedValue, $model->isValidForSend()); } + /** + * @return array + */ public function isValidForSendDataProvider() { return [ diff --git a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml index b633c61d9dc35..c1a526ee95148 100644 --- a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml +++ b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml @@ -22,8 +22,9 @@ <label class="label" for="newsletter"><span><?= $block->escapeHtml(__('Sign Up for Our Newsletter:')) ?></span></label> <div class="control"> <input name="email" type="email" id="newsletter" - placeholder="<?= $block->escapeHtmlAttr(__('Enter your email address')) ?>" - data-validate="{required:true, 'validate-email':true}"/> + placeholder="<?= $block->escapeHtml(__('Enter your email address')) ?>" + data-mage-init='{"mage/trim-input":{}}' + data-validate="{required:true, 'validate-email':true}"/> </div> </div> <div class="actions"> diff --git a/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php b/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php index c4fe10c386645..d60348d9dc1c7 100644 --- a/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php +++ b/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php @@ -15,5 +15,5 @@ class Banktransfer extends \Magento\OfflinePayments\Block\Form\AbstractInstructi * * @var string */ - protected $_template = 'form/banktransfer.phtml'; + protected $_template = 'Magento_OfflinePayments::form/banktransfer.phtml'; } diff --git a/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php b/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php index 4e0f7d48ce09b..de0f7a57bae62 100644 --- a/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php +++ b/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php @@ -15,5 +15,5 @@ class Cashondelivery extends \Magento\OfflinePayments\Block\Form\AbstractInstruc * * @var string */ - protected $_template = 'form/cashondelivery.phtml'; + protected $_template = 'Magento_OfflinePayments::form/cashondelivery.phtml'; } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/LICENSE.txt b/app/code/Magento/OfflinePayments/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/LICENSE.txt rename to app/code/Magento/OfflinePayments/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/LICENSE_AFL.txt b/app/code/Magento/OfflinePayments/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/LICENSE_AFL.txt rename to app/code/Magento/OfflinePayments/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/OfflinePayments/Test/Mftf/README.md b/app/code/Magento/OfflinePayments/Test/Mftf/README.md new file mode 100644 index 0000000000000..f12b3518c5672 --- /dev/null +++ b/app/code/Magento/OfflinePayments/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Offline Payments Functional Tests + +The Functional Test Module for **Magento Offline Payments** module. diff --git a/app/code/Magento/OfflinePayments/Test/Mftf/composer.json b/app/code/Magento/OfflinePayments/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7ce98340d75ee --- /dev/null +++ b/app/code/Magento/OfflinePayments/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-offline-payments", + "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-checkout": "100.0.0-dev", + "magento/functional-test-module-payment": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoConfigProviderTest.php b/app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoConfigProviderTest.php index 7509ff03c3780..8d65146ec102b 100644 --- a/app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoConfigProviderTest.php +++ b/app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoConfigProviderTest.php @@ -63,6 +63,9 @@ public function testGetConfig($isAvailable, $mailingAddress, $payableTo, $result $this->assertEquals($result, $this->model->getConfig()); } + /** + * @return array + */ public function dataProviderGetConfig() { $checkmoCode = Checkmo::PAYMENT_METHOD_CHECKMO_CODE; diff --git a/app/code/Magento/OfflinePayments/Test/Unit/Model/InstructionsConfigProviderTest.php b/app/code/Magento/OfflinePayments/Test/Unit/Model/InstructionsConfigProviderTest.php index 120a7eb6ed88f..97a64d8ab59b9 100644 --- a/app/code/Magento/OfflinePayments/Test/Unit/Model/InstructionsConfigProviderTest.php +++ b/app/code/Magento/OfflinePayments/Test/Unit/Model/InstructionsConfigProviderTest.php @@ -82,6 +82,9 @@ public function testGetConfig($isOneAvailable, $instructionsOne, $isTwoAvailable $this->assertEquals($result, $this->model->getConfig()); } + /** + * @return array + */ public function dataProviderGetConfig() { $oneCode = Banktransfer::PAYMENT_METHOD_BANKTRANSFER_CODE; diff --git a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php index fc36eaf6a97db..0c4718245928b 100644 --- a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php @@ -320,7 +320,7 @@ public function getConditionName(\Magento\Framework\DataObject $object) */ private function getCsvFile($filePath) { - $pathInfo = pathInfo($filePath); + $pathInfo = pathinfo($filePath); $dirName = isset($pathInfo['dirname']) ? $pathInfo['dirname'] : ''; $fileName = isset($pathInfo['basename']) ? $pathInfo['basename'] : ''; diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/LICENSE.txt b/app/code/Magento/OfflineShipping/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/LICENSE.txt rename to app/code/Magento/OfflineShipping/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/LICENSE_AFL.txt b/app/code/Magento/OfflineShipping/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/LICENSE_AFL.txt rename to app/code/Magento/OfflineShipping/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/OfflineShipping/Test/Mftf/README.md b/app/code/Magento/OfflineShipping/Test/Mftf/README.md new file mode 100644 index 0000000000000..3928af293d336 --- /dev/null +++ b/app/code/Magento/OfflineShipping/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Offline Shipping Functional Tests + +The Functional Test Module for **Magento Offline Shipping** module. diff --git a/app/code/Magento/OfflineShipping/Test/Mftf/composer.json b/app/code/Magento/OfflineShipping/Test/Mftf/composer.json new file mode 100644 index 0000000000000..acca01f787402 --- /dev/null +++ b/app/code/Magento/OfflineShipping/Test/Mftf/composer.json @@ -0,0 +1,29 @@ +{ + "name": "magento/functional-test-module-offline-shipping", + "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-config": "100.0.0-dev", + "magento/functional-test-module-directory": "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-sales-rule": "100.0.0-dev", + "magento/functional-test-module-shipping": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-checkout": "100.0.0-dev", + "magento/functional-test-module-offline-shipping-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/OfflineShipping/Test/Unit/Model/Plugin/Checkout/Block/Cart/ShippingTest.php b/app/code/Magento/OfflineShipping/Test/Unit/Model/Plugin/Checkout/Block/Cart/ShippingTest.php index 185f393ad4d0b..5f0894874ca3c 100644 --- a/app/code/Magento/OfflineShipping/Test/Unit/Model/Plugin/Checkout/Block/Cart/ShippingTest.php +++ b/app/code/Magento/OfflineShipping/Test/Unit/Model/Plugin/Checkout/Block/Cart/ShippingTest.php @@ -52,6 +52,9 @@ public function testAfterGetStateActive($scopeConfigMockReturnValue, $result, $a $this->assertEquals($assertResult, $this->model->afterIsStateActive($subjectMock, $result)); } + /** + * @return array + */ public function afterGetStateActiveDataProvider() { return [ diff --git a/app/code/Magento/OfflineShipping/Test/Unit/Model/ResourceModel/Carrier/Tablerate/CSV/RowParserTest.php b/app/code/Magento/OfflineShipping/Test/Unit/Model/ResourceModel/Carrier/Tablerate/CSV/RowParserTest.php index 4807d4956d266..8c34e9a0d6510 100644 --- a/app/code/Magento/OfflineShipping/Test/Unit/Model/ResourceModel/Carrier/Tablerate/CSV/RowParserTest.php +++ b/app/code/Magento/OfflineShipping/Test/Unit/Model/ResourceModel/Carrier/Tablerate/CSV/RowParserTest.php @@ -128,6 +128,9 @@ public function testParseWithException(array $rowData, $conditionFullName, array throw $exception; } + /** + * @return array + */ public function parseWithExceptionDataProvider() { $rowData = ['a', 'b', 'c', 'd', 'e']; diff --git a/app/code/Magento/OfflineShipping/Test/Unit/Model/SalesRule/CalculatorTest.php b/app/code/Magento/OfflineShipping/Test/Unit/Model/SalesRule/CalculatorTest.php index b13a46a8fcdf0..2a886f20c42a7 100644 --- a/app/code/Magento/OfflineShipping/Test/Unit/Model/SalesRule/CalculatorTest.php +++ b/app/code/Magento/OfflineShipping/Test/Unit/Model/SalesRule/CalculatorTest.php @@ -20,6 +20,9 @@ protected function setUp() ); } + /** + * @return bool + */ public function testProcessFreeShipping() { $addressMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address::class) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/ActionGroup/ClearCacheActionGroup.xml b/app/code/Magento/PageCache/Test/Mftf/ActionGroup/ClearCacheActionGroup.xml similarity index 75% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/ActionGroup/ClearCacheActionGroup.xml rename to app/code/Magento/PageCache/Test/Mftf/ActionGroup/ClearCacheActionGroup.xml index f8d0cfb93f956..cf4bd4ff43c8e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/ActionGroup/ClearCacheActionGroup.xml +++ b/app/code/Magento/PageCache/Test/Mftf/ActionGroup/ClearCacheActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="ClearCacheActionGroup"> <amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}/admin/cache/" stepKey="goToNewCustomVarialePage" /> <waitForPageLoad stepKey="waitForPageLoad"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/ActionGroup/ClearPageCacheActionGroup.xml b/app/code/Magento/PageCache/Test/Mftf/ActionGroup/ClearPageCacheActionGroup.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/ActionGroup/ClearPageCacheActionGroup.xml rename to app/code/Magento/PageCache/Test/Mftf/ActionGroup/ClearPageCacheActionGroup.xml index f09ca7f1fe025..0293b1e10b8ce 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/ActionGroup/ClearPageCacheActionGroup.xml +++ b/app/code/Magento/PageCache/Test/Mftf/ActionGroup/ClearPageCacheActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="ClearPageCacheActionGroup"> <amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}/admin/cache/" stepKey="goToCacheManagementPage" /> <waitForPageLoad stepKey="waitForPageLoad"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/LICENSE.txt b/app/code/Magento/PageCache/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/LICENSE.txt rename to app/code/Magento/PageCache/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/LICENSE_AFL.txt b/app/code/Magento/PageCache/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/LICENSE_AFL.txt rename to app/code/Magento/PageCache/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/PageCache/Test/Mftf/README.md b/app/code/Magento/PageCache/Test/Mftf/README.md new file mode 100644 index 0000000000000..01c6ae4e4f483 --- /dev/null +++ b/app/code/Magento/PageCache/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Page Cache Functional Tests + +The Functional Test Module for **Magento Page Cache** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/Section/AdminCacheManagementSection.xml b/app/code/Magento/PageCache/Test/Mftf/Section/AdminCacheManagementSection.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/Section/AdminCacheManagementSection.xml rename to app/code/Magento/PageCache/Test/Mftf/Section/AdminCacheManagementSection.xml index d5d1e7bf65cb8..c91f021b5719b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/Section/AdminCacheManagementSection.xml +++ b/app/code/Magento/PageCache/Test/Mftf/Section/AdminCacheManagementSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCacheManagementSection"> <element name="FlushMagentoCache" type="button" selector="#flush_magento"/> <element name="actionDropDown" type="multiselect" selector="//*[@id='cache_grid_massaction-select']//option[contains(., 'Action')]" timeout="30"/> diff --git a/app/code/Magento/PageCache/Test/Mftf/composer.json b/app/code/Magento/PageCache/Test/Mftf/composer.json new file mode 100644 index 0000000000000..3bfe8f15ef64e --- /dev/null +++ b/app/code/Magento/PageCache/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-page-cache", + "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-config": "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/PageCache/Test/Unit/Block/JavascriptTest.php b/app/code/Magento/PageCache/Test/Unit/Block/JavascriptTest.php index a1c66c67b5524..42a9086daa442 100644 --- a/app/code/Magento/PageCache/Test/Unit/Block/JavascriptTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Block/JavascriptTest.php @@ -130,6 +130,9 @@ public function testGetScriptOptions($isSecure, $url, $expectedResult) $this->assertRegExp($expectedResult, $this->blockJavascript->getScriptOptions()); } + /** + * @return array + */ public function getScriptOptionsDataProvider() { return [ @@ -193,6 +196,9 @@ public function testGetScriptOptionsPrivateContent($url, $route, $controller, $a $this->assertRegExp($expectedResult, $this->blockJavascript->getScriptOptions()); } + /** + * @return array + */ public function getScriptOptionsPrivateContentDataProvider() { // @codingStandardsIgnoreStart diff --git a/app/code/Magento/PageCache/Test/Unit/Controller/Block/EsiTest.php b/app/code/Magento/PageCache/Test/Unit/Controller/Block/EsiTest.php index 387b3d031b70e..32964a3564999 100644 --- a/app/code/Magento/PageCache/Test/Unit/Controller/Block/EsiTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Controller/Block/EsiTest.php @@ -143,6 +143,9 @@ public function testExecute($blockClass, $shouldSetHeaders) $this->action->execute(); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php index 2811cb5316dc6..db0edfa6bd779 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/BuiltinPluginTest.php @@ -226,6 +226,9 @@ public function testAroundDispatchDisabled($state) ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/App/PageCachePluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/App/PageCachePluginTest.php index 033eb2501865b..2e69fdaf47910 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/App/PageCachePluginTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/App/PageCachePluginTest.php @@ -57,6 +57,9 @@ public function testAfterSaveDecompression($data, $initResult) $this->assertSame($data, $this->plugin->afterLoad($this->subjectMock, $initResult)); } + /** + * @return array + */ public function afterSaveDataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/App/Response/HttpPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/App/Response/HttpPluginTest.php index c9231f118fc75..59591c8ee957f 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/App/Response/HttpPluginTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/App/Response/HttpPluginTest.php @@ -26,6 +26,9 @@ public function testBeforeSendResponse($responseInstanceClass, $sendVaryCalled) $plugin->beforeSendResponse($responseMock); } + /** + * @return array + */ public function beforeSendResponseDataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php b/app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php index 2321a951aafe8..a57effe1f31ad 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php @@ -90,6 +90,9 @@ public function testGetUris( $this->assertEquals($uris, $this->model->getUris()); } + /** + * @return array + */ public function getUrisDataProvider() { return [ diff --git a/app/code/Magento/PageCache/Test/Unit/Model/Layout/LayoutPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/Layout/LayoutPluginTest.php index 8c04db7cb8390..6c39fe1e7979c 100644 --- a/app/code/Magento/PageCache/Test/Unit/Model/Layout/LayoutPluginTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Model/Layout/LayoutPluginTest.php @@ -70,6 +70,9 @@ public function testAfterGenerateXml($cacheState, $layoutIsCacheable) $this->assertSame($result, $output); } + /** + * @return array + */ public function afterGenerateXmlDataProvider() { return [ @@ -112,6 +115,9 @@ public function testAfterGetOutput($cacheState, $layoutIsCacheable, $expectedTag $this->assertSame($output, $html); } + /** + * @return array + */ public function afterGetOutputDataProvider() { $tags = 'identity1,identity2'; diff --git a/app/code/Magento/PageCache/Test/Unit/Observer/FlushCacheByTagsTest.php b/app/code/Magento/PageCache/Test/Unit/Observer/FlushCacheByTagsTest.php index 924c30439fddd..8019c6b2e810f 100644 --- a/app/code/Magento/PageCache/Test/Unit/Observer/FlushCacheByTagsTest.php +++ b/app/code/Magento/PageCache/Test/Unit/Observer/FlushCacheByTagsTest.php @@ -81,6 +81,9 @@ public function testExecute($cacheState) $this->assertNull($result); } + /** + * @return array + */ public function flushCacheByTagsDataProvider() { return [ diff --git a/app/code/Magento/Payment/Block/Info/Instructions.php b/app/code/Magento/Payment/Block/Info/Instructions.php index e3c74e020f8f6..687c6b54a2f4f 100644 --- a/app/code/Magento/Payment/Block/Info/Instructions.php +++ b/app/code/Magento/Payment/Block/Info/Instructions.php @@ -23,7 +23,7 @@ class Instructions extends \Magento\Payment\Block\Info /** * @var string */ - protected $_template = 'info/instructions.phtml'; + protected $_template = 'Magento_Payment::info/instructions.phtml'; /** * Get instructions text from order payment diff --git a/app/code/Magento/Payment/Test/Mftf/Data/PaymentMethodData.xml b/app/code/Magento/Payment/Test/Mftf/Data/PaymentMethodData.xml new file mode 100644 index 0000000000000..feaff74a3a985 --- /dev/null +++ b/app/code/Magento/Payment/Test/Mftf/Data/PaymentMethodData.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="PaymentMethodCheckMoneyOrder" type="payment_method"> + <data key="method">checkmo</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/LICENSE.txt b/app/code/Magento/Payment/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/LICENSE.txt rename to app/code/Magento/Payment/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/LICENSE_AFL.txt b/app/code/Magento/Payment/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/LICENSE_AFL.txt rename to app/code/Magento/Payment/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Payment/Test/Mftf/Metadata/payment_method-meta.xml b/app/code/Magento/Payment/Test/Mftf/Metadata/payment_method-meta.xml new file mode 100644 index 0000000000000..eb5f272e25e25 --- /dev/null +++ b/app/code/Magento/Payment/Test/Mftf/Metadata/payment_method-meta.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreatePaymentMethod" dataType="payment_method" type="create"> + <field key="method">string</field> + </operation> +</operations> diff --git a/app/code/Magento/Payment/Test/Mftf/README.md b/app/code/Magento/Payment/Test/Mftf/README.md new file mode 100644 index 0000000000000..fc489cbb253a0 --- /dev/null +++ b/app/code/Magento/Payment/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Payment Functional Tests + +The Functional Test Module for **Magento Payment** module. diff --git a/app/code/Magento/Payment/Test/Mftf/composer.json b/app/code/Magento/Payment/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7311dae6fb074 --- /dev/null +++ b/app/code/Magento/Payment/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-payment", + "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-checkout": "100.0.0-dev", + "magento/functional-test-module-config": "100.0.0-dev", + "magento/functional-test-module-directory": "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" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Payment/Test/Unit/Block/InfoTest.php b/app/code/Magento/Payment/Test/Unit/Block/InfoTest.php index 469d7971e21a9..5f9238ca4360a 100644 --- a/app/code/Magento/Payment/Test/Unit/Block/InfoTest.php +++ b/app/code/Magento/Payment/Test/Unit/Block/InfoTest.php @@ -83,6 +83,9 @@ public function testGetIsSecureMode($isSecureMode, $methodInstance, $store, $sto $this->assertEquals($result, $expectedResult); } + /** + * @return array + */ public function getIsSecureModeDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Data/Order/AddressAdapterTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Data/Order/AddressAdapterTest.php index 1cf19ff9292e9..faf4818965386 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Data/Order/AddressAdapterTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Data/Order/AddressAdapterTest.php @@ -54,6 +54,9 @@ public function testStreetLine1($street, $expected) $this->assertEquals($expected, $this->model->getStreetLine1()); } + /** + * @return array + */ public function streetLine1DataProvider() { return [ @@ -73,6 +76,9 @@ public function testStreetLine2($street, $expected) $this->assertEquals($expected, $this->model->getStreetLine2()); } + /** + * @return array + */ public function streetLine2DataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Data/Quote/AddressAdapterTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Data/Quote/AddressAdapterTest.php index 751d8c51b4410..1f5b1c2d87053 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Data/Quote/AddressAdapterTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Data/Quote/AddressAdapterTest.php @@ -54,6 +54,9 @@ public function testStreetLine1($street, $expected) $this->assertEquals($expected, $this->model->getStreetLine1()); } + /** + * @return array + */ public function streetLine1DataProvider() { return [ @@ -73,6 +76,9 @@ public function testStreetLine2($street, $expected) $this->assertEquals($expected, $this->model->getStreetLine2()); } + /** + * @return array + */ public function streetLine2DataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Validator/CountryValidatorTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Validator/CountryValidatorTest.php index 3054a705373e4..7259c59e5a1a5 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Validator/CountryValidatorTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Validator/CountryValidatorTest.php @@ -68,6 +68,9 @@ public function testValidateAllowspecificTrue($storeId, $country, $allowspecific $this->assertSame($this->resultMock, $this->model->validate($validationSubject)); } + /** + * @return array + */ public function validateAllowspecificTrueDataProvider() { return [ @@ -96,6 +99,9 @@ public function testValidateAllowspecificFalse($storeId, $allowspecific, $isVali $this->assertSame($this->resultMock, $this->model->validate($validationSubject)); } + /** + * @return array + */ public function validateAllowspecificFalseDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Gateway/Validator/ResultTest.php b/app/code/Magento/Payment/Test/Unit/Gateway/Validator/ResultTest.php index fb81137dea42b..562835e3199f1 100644 --- a/app/code/Magento/Payment/Test/Unit/Gateway/Validator/ResultTest.php +++ b/app/code/Magento/Payment/Test/Unit/Gateway/Validator/ResultTest.php @@ -29,6 +29,9 @@ public function testResult($isValid, $failsDescription, $expectedIsValid, $expec $this->assertEquals($expectedFailsDescription, $this->model->getFailsDescription()); } + /** + * @return array + */ public function resultDataProvider() { $phraseMock = $this->getMockBuilder(\Magento\Framework\Phrase::class)->disableOriginalConstructor()->getMock(); diff --git a/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php b/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php index 931c2b5fd93d5..3752e82fd1e5b 100644 --- a/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php @@ -253,6 +253,9 @@ public function testGetInfoBlockHtml() $this->assertEquals($blockHtml, $this->helper->getInfoBlockHtml($infoMock, $storeId)); } + /** + * @return array + */ public function getSortMethodsDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/FactoryTest.php b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/FactoryTest.php index c49f3da315908..64069ff4a1941 100644 --- a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/FactoryTest.php +++ b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/FactoryTest.php @@ -40,6 +40,9 @@ public function testCreate($salesModelClass, $expectedType) $this->assertEquals('some value', $this->_model->create($salesModel)); } + /** + * @return array + */ public function createDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/OrderTest.php b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/OrderTest.php index 7594d9ce501ac..3e3c4226d4fbe 100644 --- a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/OrderTest.php +++ b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/OrderTest.php @@ -19,6 +19,9 @@ protected function setUp() $this->_model = new \Magento\Payment\Model\Cart\SalesModel\Order($this->_orderMock); } + /** + * @return array + */ public function gettersDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/QuoteTest.php b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/QuoteTest.php index 95271569e994e..bdcc89840ac19 100644 --- a/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/QuoteTest.php +++ b/app/code/Magento/Payment/Test/Unit/Model/Cart/SalesModel/QuoteTest.php @@ -84,6 +84,9 @@ public function testGetAllItems($pItem, $name, $qty, $price) $this->assertEquals($expected, $this->_model->getAllItems()); } + /** + * @return array + */ public function getAllItemsDataProvider() { return [ @@ -135,6 +138,9 @@ public function testGetter($isVirtual, $getterMethod) $this->assertEquals($getterMethod, $model->{$getterMethod}()); } + /** + * @return array + */ public function getterDataProvider() { return [ diff --git a/app/code/Magento/Payment/Test/Unit/Model/ConfigTest.php b/app/code/Magento/Payment/Test/Unit/Model/ConfigTest.php index 8ac5bb61e7f8f..584da622b1aad 100644 --- a/app/code/Magento/Payment/Test/Unit/Model/ConfigTest.php +++ b/app/code/Magento/Payment/Test/Unit/Model/ConfigTest.php @@ -142,6 +142,9 @@ public function testGetActiveMethods($isActive) static::assertEquals($isActive ? ['active_method' => $adapter] : [], $this->config->getActiveMethods()); } + /** + * @return array + */ public function getActiveMethodsDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Form.php b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Form.php index 31b3e0c1d6b6f..396c66d4e748e 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Form.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Form.php @@ -13,5 +13,5 @@ class Form extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'billing/agreement/view/form.phtml'; + protected $_template = 'Magento_Paypal::billing/agreement/view/form.phtml'; } diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php index d133d19f9c202..39373017fa09a 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php @@ -15,7 +15,7 @@ class Info extends \Magento\Backend\Block\Template implements \Magento\Backend\B /** * @var string */ - protected $_template = 'billing/agreement/view/tab/info.phtml'; + protected $_template = 'Magento_Paypal::billing/agreement/view/tab/info.phtml'; /** * Core registry diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Advanced.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Advanced.php index fe4f6ee1f6757..793fad152bc7e 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Advanced.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Advanced.php @@ -16,5 +16,5 @@ class Advanced extends \Magento\Paypal\Block\Adminhtml\System\Config\Payflowlink * * @var string */ - protected $_template = 'system/config/payflowlink/advanced.phtml'; + protected $_template = 'Magento_Paypal::system/config/payflowlink/advanced.phtml'; } diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php index 30119063f5b5b..405de1ec03185 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php @@ -16,7 +16,7 @@ class Info extends \Magento\Config\Block\System\Config\Form\Field * * @var string */ - protected $_template = 'system/config/payflowlink/info.phtml'; + protected $_template = 'Magento_Paypal::system/config/payflowlink/info.phtml'; /** * Render fieldset html diff --git a/app/code/Magento/Paypal/Block/Hosted/Pro/Form.php b/app/code/Magento/Paypal/Block/Hosted/Pro/Form.php index 92281d3058eef..70eff8f83ba99 100644 --- a/app/code/Magento/Paypal/Block/Hosted/Pro/Form.php +++ b/app/code/Magento/Paypal/Block/Hosted/Pro/Form.php @@ -15,5 +15,5 @@ class Form extends \Magento\Payment\Block\Form /** * @var string */ - protected $_template = 'hss/info.phtml'; + protected $_template = 'Magento_Paypal::hss/info.phtml'; } diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php index d6edb1ed25231..98fc05d0d2f60 100644 --- a/app/code/Magento/Paypal/Block/Iframe.php +++ b/app/code/Magento/Paypal/Block/Iframe.php @@ -44,7 +44,7 @@ class Iframe extends \Magento\Payment\Block\Form /** * @var string */ - protected $_template = 'hss/js.phtml'; + protected $_template = 'Magento_Paypal::hss/js.phtml'; /** * @var \Magento\Sales\Model\OrderFactory diff --git a/app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php b/app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php index d777279ad47a8..159abd4e2f1bb 100644 --- a/app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php +++ b/app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php @@ -15,7 +15,7 @@ class Form extends \Magento\Paypal\Block\Payflow\Link\Form /** * @var string */ - protected $_template = 'payflowadvanced/info.phtml'; + protected $_template = 'Magento_Paypal::payflowadvanced/info.phtml'; /** * Get frame action URL diff --git a/app/code/Magento/Paypal/Block/Payflow/Link/Form.php b/app/code/Magento/Paypal/Block/Payflow/Link/Form.php index f414a63d69046..fc880f494c859 100644 --- a/app/code/Magento/Paypal/Block/Payflow/Link/Form.php +++ b/app/code/Magento/Paypal/Block/Payflow/Link/Form.php @@ -15,7 +15,7 @@ class Form extends \Magento\Payment\Block\Form /** * @var string */ - protected $_template = 'payflowlink/info.phtml'; + protected $_template = 'Magento_Paypal::payflowlink/info.phtml'; /** * Get frame action URL diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Data/PaypalData.xml b/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Data/PaypalData.xml rename to app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml index e60bc4f43b431..4cb6173a0273e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Data/PaypalData.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="SamplePaypalConfig" type="paypal_config_state"> <requiredEntity type="business_account">SampleBusinessAccount</requiredEntity> <requiredEntity type="api_username">SampleApiUsername</requiredEntity> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/LICENSE.txt b/app/code/Magento/Paypal/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/LICENSE.txt rename to app/code/Magento/Paypal/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/LICENSE_AFL.txt b/app/code/Magento/Paypal/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/LICENSE_AFL.txt rename to app/code/Magento/Paypal/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Metadata/paypal_config-meta.xml b/app/code/Magento/Paypal/Test/Mftf/Metadata/paypal_config-meta.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Metadata/paypal_config-meta.xml rename to app/code/Magento/Paypal/Test/Mftf/Metadata/paypal_config-meta.xml index bd93be7bdb464..37009297ddb30 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Metadata/paypal_config-meta.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Metadata/paypal_config-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreatePaypalConfigState" dataType="paypal_config_state" type="create" auth="adminFormKey" url="/admin/system_config/save/section/payment/" method="POST"> <object key="groups" dataType="paypal_config_state"> <object key="paypal_alternative_payment_methods" dataType="paypal_config_state"> diff --git a/app/code/Magento/Paypal/Test/Mftf/Page/AdminConfigPaymentMethodsPage.xml b/app/code/Magento/Paypal/Test/Mftf/Page/AdminConfigPaymentMethodsPage.xml new file mode 100644 index 0000000000000..111e0d8b01a93 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Page/AdminConfigPaymentMethodsPage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminConfigPaymentMethodsPage" url="admin/system_config/edit/section/payment/" area="admin" module="Magento_Config"> + <section name="OtherPaymentsConfigSection"/> + </page> +</pages> diff --git a/app/code/Magento/Paypal/Test/Mftf/README.md b/app/code/Magento/Paypal/Test/Mftf/README.md new file mode 100644 index 0000000000000..8059d5d010526 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Paypal Functional Tests + +The Functional Test Module for **Magento Paypal** module. diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/OtherPaymentsConfigSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/OtherPaymentsConfigSection.xml new file mode 100644 index 0000000000000..ec4f4f4ae09e8 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Section/OtherPaymentsConfigSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="OtherPaymentsConfigSection"> + <element name="expandedTab" type="button" selector="#payment_us_other_payment_methods-head.open"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Test/AdminConfigPaymentsSectionState.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml similarity index 82% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Test/AdminConfigPaymentsSectionState.xml rename to app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml index 90c8dd5896198..283bc32412646 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Test/AdminConfigPaymentsSectionState.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminConfigPaymentsSectionState"> <annotations> <description value="Other Payment Methods section in Admin expanded by default"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/composer.json b/app/code/Magento/Paypal/Test/Mftf/composer.json new file mode 100644 index 0000000000000..4822c694580ef --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/composer.json @@ -0,0 +1,34 @@ +{ + "name": "magento/functional-test-module-paypal", + "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-config": "100.0.0-dev", + "magento/functional-test-module-customer": "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-instant-purchase": "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", + "magento/functional-test-module-tax": "100.0.0-dev", + "magento/functional-test-module-theme": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev", + "magento/functional-test-module-vault": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-checkout-agreements": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "proprietary" + ] +} diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php index 39fc0c2dae5eb..d8487e63c6eca 100644 --- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php @@ -114,6 +114,9 @@ public function testRender($requestCountry, $requestDefaultCountry, $canUseDefau $this->_model->render($this->_element); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php index 461847771febd..cfdfe17b1e004 100644 --- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php @@ -91,6 +91,9 @@ public function testIsCollapseState($expanded, $expected) ); } + /** + * @return array + */ public function isCollapseStateDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php index d9ddd277a7df1..df9638ef47135 100644 --- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php @@ -85,6 +85,9 @@ public function testIsPaymentEnabled($groupConfig, $expected) $this->assertContains($expected, $html); } + /** + * @return array + */ public function isPaymentEnabledDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Express/ReviewTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Express/ReviewTest.php index 9a7a87b366fcf..27ed799a4adb7 100644 --- a/app/code/Magento/Paypal/Test/Unit/Block/Express/ReviewTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Block/Express/ReviewTest.php @@ -84,6 +84,9 @@ public function testGetViewFileUrl($isSecure) $this->assertEquals('result url', $this->model->getViewFileUrl('some file')); } + /** + * @return array + */ public function getViewFileUrlDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/Express/PlaceOrderTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/Express/PlaceOrderTest.php index 54d5acfce9f5f..f915dca23735d 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/Express/PlaceOrderTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/Express/PlaceOrderTest.php @@ -36,6 +36,9 @@ protected function _expectRedirect($path = '*/*/review') ->with($this->anything(), $path, []); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; @@ -79,6 +82,9 @@ public function testExecuteProcessableException($code, $paymentAction = null) $this->model->execute(); } + /** + * @return array + */ public function executeProcessableExceptionDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/Express/ReturnActionTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/Express/ReturnActionTest.php index fd0182bb88c06..65250ccce08bd 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/Express/ReturnActionTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/Express/ReturnActionTest.php @@ -34,6 +34,9 @@ public function testExecuteAuthorizationRetrial() $this->model->execute(); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/Express/StartTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/Express/StartTest.php index 5ca7156b6f01f..36a9ae3bd5cf9 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/Express/StartTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/Express/StartTest.php @@ -37,6 +37,9 @@ public function testStartAction($buttonParam) $this->model->execute(); } + /** + * @return array + */ public function startActionDataProvider() { return [['1'], [null]]; diff --git a/app/code/Magento/Paypal/Test/Unit/Helper/BackendTest.php b/app/code/Magento/Paypal/Test/Unit/Helper/BackendTest.php index fd8a8a3c41f11..ffa1bf027ab57 100644 --- a/app/code/Magento/Paypal/Test/Unit/Helper/BackendTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Helper/BackendTest.php @@ -92,6 +92,9 @@ public function testGetConfigurationCountryCodeFromConfig($request) $this->configurationCountryCodeAssertResult('GB'); } + /** + * @return array + */ public function getConfigurationCountryCodeFromConfigDataProvider() { return [ @@ -116,6 +119,9 @@ public function testGetConfigurationCountryCodeFromDefault($request, $config, $d $this->configurationCountryCodeAssertResult($default); } + /** + * @return array + */ public function getConfigurationCountryCodeFromDefaultDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php b/app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php index bb25bea63a8bc..9ec9318212614 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php @@ -273,6 +273,9 @@ public function testIsMethodAvailable($methodCode, $expectedFlag) $this->config->isMethodAvailable($methodCode); } + /** + * @return array + */ public function isMethodAvailableDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php index 2ef08e4d4226b..fcc7766ec298b 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/Api/NvpTest.php @@ -145,6 +145,9 @@ public function testCall($response, $processableErrors, $exception, $exceptionMe $this->model->call('some method', ['data' => 'some data']); } + /** + * @return array + */ public function callDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Model/CartTest.php b/app/code/Magento/Paypal/Test/Unit/Model/CartTest.php index f9bb74dba5b53..0f787f0f513a1 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/CartTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/CartTest.php @@ -85,6 +85,9 @@ public function testInvalidGetAllItems($items) $this->assertEquals(0.3, $this->_model->getDiscount()); } + /** + * @return array + */ public function invalidGetAllItemsDataProvider() { return [ @@ -150,6 +153,9 @@ public function testInvalidTotalsGetAllItems($values, $transferDiscount) $this->assertEquals($transferDiscount ? 0.0 : $values['base_discount_amount'], $this->_model->getDiscount()); } + /** + * @return array + */ public function invalidTotalsGetAllItemsDataProvider() { return [ @@ -222,6 +228,9 @@ public function testInvalidGetAmounts($values, $transferDiscount, $transferShipp $this->assertEquals([Cart::AMOUNT_SUBTOTAL => $expectedSubtotal], $result); } + /** + * @return array + */ public function invalidGetAmountsDataProvider() { $data = []; diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/PaymentSectionModifierTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/PaymentSectionModifierTest.php index 6a5b2676014cb..57534345f2541 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/PaymentSectionModifierTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/PaymentSectionModifierTest.php @@ -175,6 +175,9 @@ private function fetchAllAvailableGroups($structure) return $availableGroups; } + /** + * @return mixed + */ public function caseProvider() { return include __DIR__ . '/_files/payment_section_structure_variations.php'; diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Hostedpro/RequestTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Hostedpro/RequestTest.php index 2a3ac1adbc07a..ed834ae2b9c01 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/Hostedpro/RequestTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/Hostedpro/RequestTest.php @@ -371,6 +371,9 @@ public function amountWithoutTaxDataProvider() ]; } + /** + * @return array + */ public function amountWithoutTaxZeroSubtotalDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Model/PayflowproTest.php b/app/code/Magento/Paypal/Test/Unit/Model/PayflowproTest.php index c9689c8601a02..3e8af6b2ee766 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/PayflowproTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/PayflowproTest.php @@ -179,6 +179,9 @@ public function testSetTransStatus($response, $paymentExpected) $this->assertEquals($paymentExpected->getData(), $payment->getData()); } + /** + * @return array + */ public function setTransStatusDataProvider() { return [ diff --git a/app/code/Magento/Paypal/Test/Unit/Observer/AddBillingAgreementToSessionObserverTest.php b/app/code/Magento/Paypal/Test/Unit/Observer/AddBillingAgreementToSessionObserverTest.php index c1947c522b118..8e18b680ce9cd 100644 --- a/app/code/Magento/Paypal/Test/Unit/Observer/AddBillingAgreementToSessionObserverTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Observer/AddBillingAgreementToSessionObserverTest.php @@ -166,6 +166,9 @@ public function testAddBillingAgreementToSession($isValid) $this->_model->execute($this->_observer); } + /** + * @return array + */ public function addBillingAgreementToSessionDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Paypal/Test/Unit/Observer/RestrictAdminBillingAgreementUsageObserverTest.php b/app/code/Magento/Paypal/Test/Unit/Observer/RestrictAdminBillingAgreementUsageObserverTest.php index b61e66167661e..3e68f42fd5a66 100644 --- a/app/code/Magento/Paypal/Test/Unit/Observer/RestrictAdminBillingAgreementUsageObserverTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Observer/RestrictAdminBillingAgreementUsageObserverTest.php @@ -46,6 +46,9 @@ protected function setUp() $this->_model = new \Magento\Paypal\Observer\RestrictAdminBillingAgreementUsageObserver($this->_authorization); } + /** + * @return array + */ public function restrictAdminBillingAgreementUsageDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/Data/PersistentData.xml b/app/code/Magento/Persistent/Test/Mftf/Data/PersistentData.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/Data/PersistentData.xml rename to app/code/Magento/Persistent/Test/Mftf/Data/PersistentData.xml index 4ba2e1ae73824..a23d1169b6865 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/Data/PersistentData.xml +++ b/app/code/Magento/Persistent/Test/Mftf/Data/PersistentData.xml @@ -6,7 +6,7 @@ */ --> -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="PersistentConfigDefault" type="persistent_config_state"> <requiredEntity type="persistent_options_enabled">persistentDefaultState</requiredEntity> </entity> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/LICENSE.txt b/app/code/Magento/Persistent/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/LICENSE.txt rename to app/code/Magento/Persistent/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/LICENSE_AFL.txt b/app/code/Magento/Persistent/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/LICENSE_AFL.txt rename to app/code/Magento/Persistent/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/Metadata/persistent_config-meta.xml b/app/code/Magento/Persistent/Test/Mftf/Metadata/persistent_config-meta.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/Metadata/persistent_config-meta.xml rename to app/code/Magento/Persistent/Test/Mftf/Metadata/persistent_config-meta.xml index 69a835aa703eb..42aae658b2e27 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/Metadata/persistent_config-meta.xml +++ b/app/code/Magento/Persistent/Test/Mftf/Metadata/persistent_config-meta.xml @@ -6,7 +6,7 @@ */ --> -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreatePersistentConfigState" dataType="persistent_config_state" type="create" auth="adminFormKey" url="/admin/system_config/save/section/persistent/" method="POST"> <object key="groups" dataType="persistent_config_state"> <object key="options" dataType="persistent_config_state"> diff --git a/app/code/Magento/Persistent/Test/Mftf/README.md b/app/code/Magento/Persistent/Test/Mftf/README.md new file mode 100644 index 0000000000000..14b4ba423ba0b --- /dev/null +++ b/app/code/Magento/Persistent/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Persistent Functional Tests + +The Functional Test Module for **Magento Persistent** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/Test/GuestCheckoutWithEnabledPersistentTest.xml b/app/code/Magento/Persistent/Test/Mftf/Test/GuestCheckoutWithEnabledPersistentTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/Test/GuestCheckoutWithEnabledPersistentTest.xml rename to app/code/Magento/Persistent/Test/Mftf/Test/GuestCheckoutWithEnabledPersistentTest.xml index f7f76da7d3895..49d07992694d4 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/Test/GuestCheckoutWithEnabledPersistentTest.xml +++ b/app/code/Magento/Persistent/Test/Mftf/Test/GuestCheckoutWithEnabledPersistentTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="GuestCheckoutWithEnabledPersistentTest"> <annotations> <features value="Persistent"/> diff --git a/app/code/Magento/Persistent/Test/Mftf/composer.json b/app/code/Magento/Persistent/Test/Mftf/composer.json new file mode 100644 index 0000000000000..0ea42b2755a0d --- /dev/null +++ b/app/code/Magento/Persistent/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-persistent", + "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-checkout": "100.0.0-dev", + "magento/functional-test-module-cron": "100.0.0-dev", + "magento/functional-test-module-customer": "100.0.0-dev", + "magento/functional-test-module-page-cache": "100.0.0-dev", + "magento/functional-test-module-quote": "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/Persistent/Test/Unit/Observer/CheckExpirePersistentQuoteObserverTest.php b/app/code/Magento/Persistent/Test/Unit/Observer/CheckExpirePersistentQuoteObserverTest.php index 8cad0b9f2dd89..46dda1be365d4 100644 --- a/app/code/Magento/Persistent/Test/Unit/Observer/CheckExpirePersistentQuoteObserverTest.php +++ b/app/code/Magento/Persistent/Test/Unit/Observer/CheckExpirePersistentQuoteObserverTest.php @@ -113,18 +113,18 @@ public function testExecuteWhenPersistentIsNotEnabled() * * @param string $refererUri * @param string $requestUri - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expireCounter - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $dispatchCounter - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setCustomerIdCounter + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expireCounter + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $dispatchCounter + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setCustomerIdCounter * @return void * @dataProvider requestDataProvider */ public function testExecuteWhenPersistentIsEnabled( string $refererUri, string $requestUri, - \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expireCounter, - \PHPUnit_Framework_MockObject_Matcher_InvokedCount $dispatchCounter, - \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setCustomerIdCounter + \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expireCounter, + \PHPUnit\Framework\MockObject\Matcher\InvokedCount $dispatchCounter, + \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setCustomerIdCounter ): void { $this->persistentHelperMock ->expects($this->once()) diff --git a/app/code/Magento/Persistent/Test/Unit/Observer/RefreshCustomerDataTest.php b/app/code/Magento/Persistent/Test/Unit/Observer/RefreshCustomerDataTest.php index da60f8a3162ac..ca415a8fab5b3 100644 --- a/app/code/Magento/Persistent/Test/Unit/Observer/RefreshCustomerDataTest.php +++ b/app/code/Magento/Persistent/Test/Unit/Observer/RefreshCustomerDataTest.php @@ -80,6 +80,9 @@ public function testBeforeStart($result, $callCount) $this->observer->execute($observerMock); } + /** + * @return array + */ public function beforeStartDataProvider() { return [ diff --git a/app/code/Magento/ProductAlert/Block/Email/Price.php b/app/code/Magento/ProductAlert/Block/Email/Price.php index 982b0f7f63375..0430a21dc8bfd 100644 --- a/app/code/Magento/ProductAlert/Block/Email/Price.php +++ b/app/code/Magento/ProductAlert/Block/Email/Price.php @@ -15,7 +15,7 @@ class Price extends \Magento\ProductAlert\Block\Email\AbstractEmail /** * @var string */ - protected $_template = 'email/price.phtml'; + protected $_template = 'Magento_ProductAlert::email/price.phtml'; /** * Retrieve unsubscribe url for product diff --git a/app/code/Magento/ProductAlert/Block/Email/Stock.php b/app/code/Magento/ProductAlert/Block/Email/Stock.php index f424e7d7125c4..d01960b8eb855 100644 --- a/app/code/Magento/ProductAlert/Block/Email/Stock.php +++ b/app/code/Magento/ProductAlert/Block/Email/Stock.php @@ -15,7 +15,7 @@ class Stock extends \Magento\ProductAlert\Block\Email\AbstractEmail /** * @var string */ - protected $_template = 'email/stock.phtml'; + protected $_template = 'Magento_ProductAlert::email/stock.phtml'; /** * Retrieve unsubscribe url for product diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/LICENSE.txt b/app/code/Magento/ProductAlert/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/LICENSE.txt rename to app/code/Magento/ProductAlert/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/LICENSE_AFL.txt b/app/code/Magento/ProductAlert/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/LICENSE_AFL.txt rename to app/code/Magento/ProductAlert/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/ProductAlert/Test/Mftf/README.md b/app/code/Magento/ProductAlert/Test/Mftf/README.md new file mode 100644 index 0000000000000..c842458d761a1 --- /dev/null +++ b/app/code/Magento/ProductAlert/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Product Alert Functional Tests + +The Functional Test Module for **Magento Product Alert** module. diff --git a/app/code/Magento/ProductAlert/Test/Mftf/composer.json b/app/code/Magento/ProductAlert/Test/Mftf/composer.json new file mode 100644 index 0000000000000..37fda5965a0f8 --- /dev/null +++ b/app/code/Magento/ProductAlert/Test/Mftf/composer.json @@ -0,0 +1,23 @@ +{ + "name": "magento/functional-test-module-product-alert", + "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-customer": "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": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/ProductAlert/Test/Unit/Block/Email/StockTest.php b/app/code/Magento/ProductAlert/Test/Unit/Block/Email/StockTest.php index c948ceabd7a29..c5872701ef9c8 100644 --- a/app/code/Magento/ProductAlert/Test/Unit/Block/Email/StockTest.php +++ b/app/code/Magento/ProductAlert/Test/Unit/Block/Email/StockTest.php @@ -65,6 +65,9 @@ public function testGetFilteredContent($contentToFilter, $contentFiltered) $this->assertEquals($contentFiltered, $this->_block->getFilteredContent($contentToFilter)); } + /** + * @return array + */ public function getFilteredContentDataProvider() { return [ diff --git a/app/code/Magento/ProductAlert/Test/Unit/Block/Product/View/StockTest.php b/app/code/Magento/ProductAlert/Test/Unit/Block/Product/View/StockTest.php index 886ed6eb3fe27..b9f28bde15d07 100644 --- a/app/code/Magento/ProductAlert/Test/Unit/Block/Product/View/StockTest.php +++ b/app/code/Magento/ProductAlert/Test/Unit/Block/Product/View/StockTest.php @@ -126,6 +126,9 @@ public function testSetTemplateStockUrlNotAllowed($stockAlertAllowed, $productAv $this->assertNull($this->_block->getSignupUrl()); } + /** + * @return array + */ public function setTemplateStockUrlNotAllowedDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/ActionGroup/AdminProductVideoActionGroup.xml b/app/code/Magento/ProductVideo/Test/Mftf/ActionGroup/AdminProductVideoActionGroup.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/ActionGroup/AdminProductVideoActionGroup.xml rename to app/code/Magento/ProductVideo/Test/Mftf/ActionGroup/AdminProductVideoActionGroup.xml index 9fe81d56efa84..f28a9f9359def 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/ActionGroup/AdminProductVideoActionGroup.xml +++ b/app/code/Magento/ProductVideo/Test/Mftf/ActionGroup/AdminProductVideoActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!-- Add video in Admin Product page --> <actionGroup name="addProductVideo"> <arguments> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/ActionGroup/StorefrontProductVideoActionGroup.xml b/app/code/Magento/ProductVideo/Test/Mftf/ActionGroup/StorefrontProductVideoActionGroup.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/ActionGroup/StorefrontProductVideoActionGroup.xml rename to app/code/Magento/ProductVideo/Test/Mftf/ActionGroup/StorefrontProductVideoActionGroup.xml index 3aba592dee0b0..1f7750ab1f2cf 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/ActionGroup/StorefrontProductVideoActionGroup.xml +++ b/app/code/Magento/ProductVideo/Test/Mftf/ActionGroup/StorefrontProductVideoActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Assert product video in Storefront Product page --> <actionGroup name="assertProductVideoStorefrontProductPage"> <arguments> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Data/ProductVideoConfigData.xml b/app/code/Magento/ProductVideo/Test/Mftf/Data/ProductVideoConfigData.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Data/ProductVideoConfigData.xml rename to app/code/Magento/ProductVideo/Test/Mftf/Data/ProductVideoConfigData.xml index 2873febbe1e97..b21ac404711f7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Data/ProductVideoConfigData.xml +++ b/app/code/Magento/ProductVideo/Test/Mftf/Data/ProductVideoConfigData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <!-- mftf test youtube api key configuration --> <entity name="ProductVideoYoutubeApiKeyConfig" type="product_video_config"> <requiredEntity type="youtube_api_key_config">YouTubeApiKey</requiredEntity> diff --git a/app/code/Magento/ProductVideo/Test/Mftf/Data/ProductVideoData.xml b/app/code/Magento/ProductVideo/Test/Mftf/Data/ProductVideoData.xml new file mode 100644 index 0000000000000..93d3f93ff429f --- /dev/null +++ b/app/code/Magento/ProductVideo/Test/Mftf/Data/ProductVideoData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="mftfTestProductVideo" type="product_video"> + <data key="videoUrl">https://youtu.be/bpOSxM0rNPM</data> + <data key="videoTitle">Arctic Monkeys - Do I Wanna Know? (Official Video)</data> + <data key="videoShortTitle">Arctic Monkeys</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/LICENSE.txt b/app/code/Magento/ProductVideo/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/LICENSE.txt rename to app/code/Magento/ProductVideo/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/LICENSE_AFL.txt b/app/code/Magento/ProductVideo/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/LICENSE_AFL.txt rename to app/code/Magento/ProductVideo/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Metadata/product_video_config-meta.xml b/app/code/Magento/ProductVideo/Test/Mftf/Metadata/product_video_config-meta.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Metadata/product_video_config-meta.xml rename to app/code/Magento/ProductVideo/Test/Mftf/Metadata/product_video_config-meta.xml index be54d9038d0d1..07d91bc0a1e84 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Metadata/product_video_config-meta.xml +++ b/app/code/Magento/ProductVideo/Test/Mftf/Metadata/product_video_config-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateProductVideoYouTubeApiKeyConfig" dataType="product_video_config" type="create" auth="adminFormKey" url="admin/system_config/save/section/catalog/" method="POST"> <object key="groups" dataType="product_video_config"> <object key="product_video" dataType="product_video_config"> diff --git a/app/code/Magento/ProductVideo/Test/Mftf/README.md b/app/code/Magento/ProductVideo/Test/Mftf/README.md new file mode 100644 index 0000000000000..b2243ad32074c --- /dev/null +++ b/app/code/Magento/ProductVideo/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Product Video Functional Tests + +The Functional Test Module for **Magento Product Video** module. diff --git a/app/code/Magento/ProductVideo/Test/Mftf/Section/AdminProductImagesSection.xml b/app/code/Magento/ProductVideo/Test/Mftf/Section/AdminProductImagesSection.xml new file mode 100644 index 0000000000000..b232d24c51ee1 --- /dev/null +++ b/app/code/Magento/ProductVideo/Test/Mftf/Section/AdminProductImagesSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminProductImagesSection"> + <element name="addVideoButton" type="button" selector="#add_video_button" timeout="60"/> + <element name="removeVideoButton" type="button" selector="//*[@id='media_gallery_content']//button[@class='action-remove']" timeout="60"/> + <element name="videoUrlHiddenField" type="text" selector="//*[@id='media_gallery_content']//input[@value='{{url}}']" parameterized="true"/> + <element name="videoTitleText" type="text" selector="//*[@id='media_gallery_content']//div[contains(text(), '{{title}}')]" parameterized="true"/> + </section> +</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Section/AdminProductNewVideoSection.xml b/app/code/Magento/ProductVideo/Test/Mftf/Section/AdminProductNewVideoSection.xml similarity index 86% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Section/AdminProductNewVideoSection.xml rename to app/code/Magento/ProductVideo/Test/Mftf/Section/AdminProductNewVideoSection.xml index 8f55468a12748..89e6fd37b171b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Section/AdminProductNewVideoSection.xml +++ b/app/code/Magento/ProductVideo/Test/Mftf/Section/AdminProductNewVideoSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminProductNewVideoSection"> <element name="saveButton" type="button" selector=".action-primary.video-create-button" timeout="30"/> <element name="saveButtonDisabled" type="text" selector="//button[@class='action-primary video-create-button' and @disabled='disabled']"/> diff --git a/app/code/Magento/ProductVideo/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/ProductVideo/Test/Mftf/Section/StorefrontProductInfoMainSection.xml new file mode 100644 index 0000000000000..03e1d91df4d3e --- /dev/null +++ b/app/code/Magento/ProductVideo/Test/Mftf/Section/StorefrontProductInfoMainSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductInfoMainSection"> + <element name="productVideo" type="text" selector="//*[@class='product-video' and @data-type='{{videoType}}']" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/ProductVideo/Test/Mftf/composer.json b/app/code/Magento/ProductVideo/Test/Mftf/composer.json new file mode 100644 index 0000000000000..a2f1223db010d --- /dev/null +++ b/app/code/Magento/ProductVideo/Test/Mftf/composer.json @@ -0,0 +1,25 @@ +{ + "name": "magento/functional-test-module-product-video", + "description": "Add Video to Products", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0", + "magento/magento-composer-installer": "100.0.0-dev", + "magento/functional-test-module-backend": "100.0.0-dev", + "magento/functional-test-module-catalog": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-media-storage": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-customer": "100.0.0-dev", + "magento/functional-test-module-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "proprietary" + ] +} diff --git a/app/code/Magento/Quote/Model/CouponManagement.php b/app/code/Magento/Quote/Model/CouponManagement.php index 62515a17f268b..55c21c974d6dd 100644 --- a/app/code/Magento/Quote/Model/CouponManagement.php +++ b/app/code/Magento/Quote/Model/CouponManagement.php @@ -55,6 +55,9 @@ public function set($cartId, $couponCode) if (!$quote->getItemsCount()) { throw new NoSuchEntityException(__('The "%1" Cart doesn\'t contain products.', $cartId)); } + if (!$quote->getStoreId()) { + throw new NoSuchEntityException(__('Cart isn\'t assigned to correct store')); + } $quote->getShippingAddress()->setCollectShippingRates(true); try { diff --git a/app/code/Magento/Quote/Test/Mftf/Data/CartItemData.xml b/app/code/Magento/Quote/Test/Mftf/Data/CartItemData.xml new file mode 100644 index 0000000000000..d4032b5f1ac56 --- /dev/null +++ b/app/code/Magento/Quote/Test/Mftf/Data/CartItemData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="SimpleCartItem" type="CartItem"> + <data key="qty">1</data> + <var key="quote_id" entityKey="return" entityType="GuestCart"/> + <var key="sku" entityKey="sku" entityType="product"/> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Data/GuestCartData.xml b/app/code/Magento/Quote/Test/Mftf/Data/GuestCartData.xml similarity index 82% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Data/GuestCartData.xml rename to app/code/Magento/Quote/Test/Mftf/Data/GuestCartData.xml index bb65c1ade2e3f..062c4ebbad333 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Data/GuestCartData.xml +++ b/app/code/Magento/Quote/Test/Mftf/Data/GuestCartData.xml @@ -8,7 +8,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="GuestCart" type="GuestCart"> </entity> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/LICENSE.txt b/app/code/Magento/Quote/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/LICENSE.txt rename to app/code/Magento/Quote/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/LICENSE_AFL.txt b/app/code/Magento/Quote/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/LICENSE_AFL.txt rename to app/code/Magento/Quote/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Metadata/billing_address-meta.xml b/app/code/Magento/Quote/Test/Mftf/Metadata/billing_address-meta.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Metadata/billing_address-meta.xml rename to app/code/Magento/Quote/Test/Mftf/Metadata/billing_address-meta.xml index 488f8ba49e28e..a21c4a30e8077 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Metadata/billing_address-meta.xml +++ b/app/code/Magento/Quote/Test/Mftf/Metadata/billing_address-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateBillingAddress" dataType="billing_address" type="create"> <field key="city">string</field> <field key="region">string</field> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Metadata/guest_cart-meta.xml b/app/code/Magento/Quote/Test/Mftf/Metadata/guest_cart-meta.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Metadata/guest_cart-meta.xml rename to app/code/Magento/Quote/Test/Mftf/Metadata/guest_cart-meta.xml index 29d6266342fee..e08a30407889f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Metadata/guest_cart-meta.xml +++ b/app/code/Magento/Quote/Test/Mftf/Metadata/guest_cart-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateGuestCart" dataType="GuestCart" type="create" auth="anonymous" url="/V1/guest-carts" method="POST"> <contentType>application/json</contentType> </operation> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Metadata/shipping_address-meta.xml b/app/code/Magento/Quote/Test/Mftf/Metadata/shipping_address-meta.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Metadata/shipping_address-meta.xml rename to app/code/Magento/Quote/Test/Mftf/Metadata/shipping_address-meta.xml index e75f49537dad5..537f6c2a2f87d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Metadata/shipping_address-meta.xml +++ b/app/code/Magento/Quote/Test/Mftf/Metadata/shipping_address-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateShippingAddress" dataType="shipping_address" type="create"> <field key="city">string</field> <field key="region">string</field> diff --git a/app/code/Magento/Quote/Test/Mftf/README.md b/app/code/Magento/Quote/Test/Mftf/README.md new file mode 100644 index 0000000000000..f1021b8435cba --- /dev/null +++ b/app/code/Magento/Quote/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Quote Functional Tests + +The Functional Test Module for **Magento Quote** module. diff --git a/app/code/Magento/Quote/Test/Mftf/composer.json b/app/code/Magento/Quote/Test/Mftf/composer.json new file mode 100644 index 0000000000000..62932a84f3059 --- /dev/null +++ b/app/code/Magento/Quote/Test/Mftf/composer.json @@ -0,0 +1,33 @@ +{ + "name": "magento/functional-test-module-quote", + "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-authorization": "100.0.0-dev", + "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-checkout": "100.0.0-dev", + "magento/functional-test-module-customer": "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-payment": "100.0.0-dev", + "magento/functional-test-module-sales": "100.0.0-dev", + "magento/functional-test-module-sales-sequence": "100.0.0-dev", + "magento/functional-test-module-shipping": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-tax": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-webapi": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php index 287d2b3c8d4f0..d6338eb428657 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php @@ -92,6 +92,9 @@ public function testCollectTotalsNoShipping($shippingCarrierCode, $shippingMetho ); } + /** + * @return array + */ public function collectTotalsShippingData() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php index b1cec90e61e01..1e999cb5e523e 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalRepositoryTest.php @@ -163,6 +163,9 @@ public function testGet($isVirtual, $getAddressType) $this->assertEquals($totalsMock, $this->model->get($cartId)); } + /** + * @return array + */ public function getDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/CouponManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/CouponManagementTest.php index e6ba50e35b4c3..91211904c11eb 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/CouponManagementTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/CouponManagementTest.php @@ -47,6 +47,7 @@ protected function setUp() 'save', 'getShippingAddress', 'getCouponCode', + 'getStoreId', '__wakeup' ]); $this->quoteAddressMock = $this->createPartialMock(\Magento\Quote\Model\Quote\Address::class, [ @@ -98,6 +99,9 @@ public function testSetWhenCouldNotApplyCoupon() $cartId = 33; $couponCode = '153a-ABC'; + $this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(1)); + $this->quoteMock->expects($this->once())->method('getStoreId')->willReturn($this->returnValue(1)); + $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(12)); @@ -125,6 +129,9 @@ public function testSetWhenCouponCodeIsInvalid() $cartId = 33; $couponCode = '153a-ABC'; + $this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(1)); + $this->quoteMock->expects($this->once())->method('getStoreId')->willReturn($this->returnValue(1)); + $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(12)); @@ -144,6 +151,9 @@ public function testSet() $cartId = 33; $couponCode = '153a-ABC'; + $this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(1)); + $this->quoteMock->expects($this->once())->method('getStoreId')->willReturn($this->returnValue(1)); + $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(12)); diff --git a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php index ee0ffd3bcc666..73ed2e65b41a9 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php @@ -94,7 +94,7 @@ public function testCreateEmptyCart() $cartId = 1; $this->quoteIdMaskMock->expects($this->once())->method('setQuoteId')->with($cartId)->willReturnSelf(); $this->quoteIdMaskMock->expects($this->once())->method('save')->willReturnSelf(); - $this->quoteIdMaskMock->expects($this->once())->method('getMaskedId')->willreturn($maskedCartId); + $this->quoteIdMaskMock->expects($this->once())->method('getMaskedId')->willReturn($maskedCartId); $this->quoteIdMaskFactoryMock->expects($this->once())->method('create')->willReturn($this->quoteIdMaskMock); $this->quoteManagementMock->expects($this->once())->method('createEmptyCart')->willReturn($cartId); diff --git a/app/code/Magento/Quote/Test/Unit/Model/Product/Plugin/UpdateQuoteItemsTest.php b/app/code/Magento/Quote/Test/Unit/Model/Product/Plugin/UpdateQuoteItemsTest.php index 38f303dd23582..cd7a54455a994 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Product/Plugin/UpdateQuoteItemsTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Product/Plugin/UpdateQuoteItemsTest.php @@ -49,6 +49,9 @@ public function testAfterUpdate($originalPrice, $newPrice, $callMethod, $tierPri $this->assertEquals($result, $productResourceMock); } + /** + * @return array + */ public function aroundUpdateDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php index 78a87b59d9f62..c4a8081fbb8fa 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php @@ -49,6 +49,9 @@ protected function setUp() ); } + /** + * @return array + */ public function collectDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/TotalTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/TotalTest.php index f884981424d65..e1971fa9833a3 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/TotalTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/TotalTest.php @@ -49,6 +49,9 @@ public function testSetTotalAmount($code, $amount, $storedCode) $this->assertSame($this->model, $result); } + /** + * @return array + */ public function setTotalAmountDataProvider() { return [ @@ -80,6 +83,9 @@ public function testSetBaseTotalAmount($code, $amount, $storedCode) $this->assertSame($this->model, $result); } + /** + * @return array + */ public function setBaseTotalAmountDataProvider() { return [ @@ -111,6 +117,9 @@ public function testAddTotalAmount($initialAmount, $delta, $updatedAmount) $this->assertEquals($updatedAmount, $this->model->getTotalAmount($code)); } + /** + * @return array + */ public function addTotalAmountDataProvider() { return [ @@ -142,6 +151,9 @@ public function testAddBaseTotalAmount($initialAmount, $delta, $updatedAmount) $this->assertEquals($updatedAmount, $this->model->getBaseTotalAmount($code)); } + /** + * @return array + */ public function addBaseTotalAmountDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RelatedProductsTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RelatedProductsTest.php index a73a241922a9c..8be4479598907 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RelatedProductsTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RelatedProductsTest.php @@ -61,6 +61,9 @@ public function testGetRelatedProductIds($optionValue, $productId, $expectedResu * * @return array */ + /** + * @return array + */ public function getRelatedProductIdsDataProvider() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/UpdaterTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/UpdaterTest.php index 03c3e32c20cb9..af47f6276705b 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/UpdaterTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/UpdaterTest.php @@ -130,6 +130,9 @@ public function testUpdateNotQtyDecimal($qty, $expectedQty) $this->assertEquals($result, $this->object); } + /** + * @return array + */ public function qtyProvider() { return [ @@ -142,6 +145,9 @@ public function qtyProvider() ]; } + /** + * @return array + */ public function qtyProviderDecimal() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/ItemTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/ItemTest.php index 9bc593c2dfd7b..ef529f643d6d4 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/ItemTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/ItemTest.php @@ -847,6 +847,11 @@ public function testSetOptionsWithNull() $this->assertEquals($this->model, $this->model->setOptions(null)); } + /** + * @param $optionCode + * @param array $optionData + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function createOptionMock($optionCode, $optionData = []) { $optionMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Item\Option::class) diff --git a/app/code/Magento/Quote/Test/Unit/Model/QuoteTest.php b/app/code/Magento/Quote/Test/Unit/Model/QuoteTest.php index a92d360bad35b..22785f051dcfa 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/QuoteTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/QuoteTest.php @@ -639,6 +639,9 @@ public function testGetAddressById($addressId, $expected) $this->assertEquals((bool)$expected, (bool)$result); } + /** + * @return array + */ public static function dataProviderGetAddress() { return [ @@ -680,6 +683,9 @@ public function testGetAddressByCustomerAddressId($isDeleted, $customerAddressId $this->assertEquals((bool)$expected, (bool)$result); } + /** + * @return array + */ public static function dataProviderGetAddressByCustomer() { return [ @@ -726,6 +732,9 @@ public function testGetShippingAddressByCustomerAddressId($isDeleted, $addressTy $this->assertEquals($expected, (bool)$result); } + /** + * @return array + */ public static function dataProviderShippingAddress() { return [ diff --git a/app/code/Magento/Quote/Test/Unit/Observer/Backend/CustomerQuoteObserverTest.php b/app/code/Magento/Quote/Test/Unit/Observer/Backend/CustomerQuoteObserverTest.php index b82d1fa6c7839..f5ef9fed4ff84 100644 --- a/app/code/Magento/Quote/Test/Unit/Observer/Backend/CustomerQuoteObserverTest.php +++ b/app/code/Magento/Quote/Test/Unit/Observer/Backend/CustomerQuoteObserverTest.php @@ -157,6 +157,9 @@ public function testDispatch($isWebsiteScope, $websites) $this->customerQuote->execute($this->observerMock); } + /** + * @return array + */ public function dispatchDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/LICENSE.txt b/app/code/Magento/QuoteAnalytics/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/LICENSE.txt rename to app/code/Magento/QuoteAnalytics/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/LICENSE_AFL.txt b/app/code/Magento/QuoteAnalytics/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/LICENSE_AFL.txt rename to app/code/Magento/QuoteAnalytics/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/QuoteAnalytics/Test/Mftf/README.md b/app/code/Magento/QuoteAnalytics/Test/Mftf/README.md new file mode 100644 index 0000000000000..617b175d7ed07 --- /dev/null +++ b/app/code/Magento/QuoteAnalytics/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Quote Analytics Functional Tests + +The Functional Test Module for **Magento Quote Analytics** module. diff --git a/app/code/Magento/QuoteAnalytics/Test/Mftf/composer.json b/app/code/Magento/QuoteAnalytics/Test/Mftf/composer.json new file mode 100644 index 0000000000000..4f0f8f2c07344 --- /dev/null +++ b/app/code/Magento/QuoteAnalytics/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-quote-analytics", + "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-quote": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/LICENSE.txt b/app/code/Magento/ReleaseNotification/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/LICENSE.txt rename to app/code/Magento/ReleaseNotification/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/LICENSE_AFL.txt b/app/code/Magento/ReleaseNotification/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/LICENSE_AFL.txt rename to app/code/Magento/ReleaseNotification/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/ReleaseNotification/Test/Mftf/README.md b/app/code/Magento/ReleaseNotification/Test/Mftf/README.md new file mode 100644 index 0000000000000..a8c47e35e0c85 --- /dev/null +++ b/app/code/Magento/ReleaseNotification/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Release Notification Functional Tests + +The Functional Test Module for **Magento Release Notification** module. diff --git a/app/code/Magento/ReleaseNotification/Test/Mftf/composer.json b/app/code/Magento/ReleaseNotification/Test/Mftf/composer.json new file mode 100644 index 0000000000000..9499e710aaed2 --- /dev/null +++ b/app/code/Magento/ReleaseNotification/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-release-notification", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/functional-test-module-user": "100.0.0-dev", + "magento/functional-test-module-backend": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/ReleaseNotification/Test/Unit/Model/Condition/CanViewNotificationTest.php b/app/code/Magento/ReleaseNotification/Test/Unit/Model/Condition/CanViewNotificationTest.php index d1661eec551a3..55f448730a506 100644 --- a/app/code/Magento/ReleaseNotification/Test/Unit/Model/Condition/CanViewNotificationTest.php +++ b/app/code/Magento/ReleaseNotification/Test/Unit/Model/Condition/CanViewNotificationTest.php @@ -110,6 +110,9 @@ public function testIsVisible($expected, $version, $lastViewVersion) $this->assertEquals($expected, $this->canViewNotification->isVisible([])); } + /** + * @return array + */ public function isVisibleProvider() { return [ diff --git a/app/code/Magento/ReleaseNotification/Test/Unit/Model/ContentProvider/Http/HttpContentProviderTest.php b/app/code/Magento/ReleaseNotification/Test/Unit/Model/ContentProvider/Http/HttpContentProviderTest.php index b4cb86dc9c769..9f3affbba2ebc 100644 --- a/app/code/Magento/ReleaseNotification/Test/Unit/Model/ContentProvider/Http/HttpContentProviderTest.php +++ b/app/code/Magento/ReleaseNotification/Test/Unit/Model/ContentProvider/Http/HttpContentProviderTest.php @@ -173,6 +173,9 @@ public function testGetContentSuccessOnDefaultOrEmpty($version, $edition, $local $this->assertEquals($response, $this->httpContentProvider->getContent($version, $edition, $locale)); } + /** + * @return array + */ public function getGetContentOnDefaultOrEmptyProvider() { return [ diff --git a/app/code/Magento/ReleaseNotification/Test/Unit/Model/ContentProvider/Http/UrlBuilderTest.php b/app/code/Magento/ReleaseNotification/Test/Unit/Model/ContentProvider/Http/UrlBuilderTest.php index d8b2ecd11b2cb..46b3edf85826e 100644 --- a/app/code/Magento/ReleaseNotification/Test/Unit/Model/ContentProvider/Http/UrlBuilderTest.php +++ b/app/code/Magento/ReleaseNotification/Test/Unit/Model/ContentProvider/Http/UrlBuilderTest.php @@ -57,6 +57,9 @@ public function testGetUrl($baseUrl, $version, $edition, $locale, $expected) ); } + /** + * @return array + */ public function getUrlDataProvider() { return [ diff --git a/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed.php b/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed.php index fc4cffbdca408..f901b32d8b12f 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed.php @@ -17,7 +17,7 @@ class Viewed extends \Magento\Backend\Block\Widget\Grid\Container /** * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * @return void diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers.php index d70930d2395ae..b773184408a7f 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers.php @@ -19,7 +19,7 @@ class Bestsellers extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php index b8f71158877bb..fe85af58b34f6 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php @@ -19,7 +19,7 @@ class Coupons extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced.php index c96483e33ebe5..57594a11bd997 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced.php @@ -19,7 +19,7 @@ class Invoiced extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded.php index 7ff80f62f6bee..994b29e6eb0dd 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded.php @@ -19,7 +19,7 @@ class Refunded extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php index 5abea45e657d7..64375ace3e94d 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php @@ -19,7 +19,7 @@ class Sales extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping.php index 44dd4521c7bbe..e4dbdc2737745 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping.php @@ -19,7 +19,7 @@ class Shipping extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php index 38de08314d257..fa9e63745a87d 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php @@ -19,7 +19,7 @@ class Tax extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php index 28f2011de3365..1ca76cb1cf95f 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php @@ -18,7 +18,7 @@ class Wishlist extends \Magento\Backend\Block\Template * * @var string */ - protected $_template = 'report/wishlist.phtml'; + protected $_template = 'Magento_Reports::report/wishlist.phtml'; /** * Reports wishlist collection factory diff --git a/app/code/Magento/Reports/Model/ResourceModel/Report/Collection.php b/app/code/Magento/Reports/Model/ResourceModel/Report/Collection.php index d0fed6e1a0654..522bfa7bcf0bf 100644 --- a/app/code/Magento/Reports/Model/ResourceModel/Report/Collection.php +++ b/app/code/Magento/Reports/Model/ResourceModel/Report/Collection.php @@ -215,8 +215,11 @@ protected function _getMonthInterval(\DateTime $dateStart, \DateTime $dateEnd, $ ) ); } else { + // Transform the start date to UTC whilst preserving the date. This is required as getTimestamp() + // is in UTC which may result in a different month from the original start date due to time zones. + $dateStartUtc = (new \DateTime())->createFromFormat('d-m-Y g:i:s', $dateStart->format('d-m-Y 00:00:00')); $interval['end'] = $this->_localeDate->convertConfigTimeToUtc( - $dateStart->format('Y-m-' . date('t', $dateStart->getTimestamp()) . ' 23:59:59') + $dateStart->format('Y-m-' . date('t', $dateStartUtc->getTimestamp()) . ' 23:59:59') ); } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/LICENSE.txt b/app/code/Magento/Reports/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/LICENSE.txt rename to app/code/Magento/Reports/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/LICENSE_AFL.txt b/app/code/Magento/Reports/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/LICENSE_AFL.txt rename to app/code/Magento/Reports/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Reports/Test/Mftf/README.md b/app/code/Magento/Reports/Test/Mftf/README.md new file mode 100644 index 0000000000000..3617914a36783 --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Reports Functional Tests + +The Functional Test Module for **Magento Reports** module. diff --git a/app/code/Magento/Reports/Test/Mftf/composer.json b/app/code/Magento/Reports/Test/Mftf/composer.json new file mode 100644 index 0000000000000..6801ad5adaf2e --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/composer.json @@ -0,0 +1,32 @@ +{ + "name": "magento/functional-test-module-reports", + "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-cms": "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-downloadable": "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-review": "100.0.0-dev", + "magento/functional-test-module-sales": "100.0.0-dev", + "magento/functional-test-module-sales-rule": "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-widget": "100.0.0-dev", + "magento/functional-test-module-wishlist": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php index bf58e214ef4a6..3ad9827c7f462 100644 --- a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php +++ b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php @@ -202,7 +202,7 @@ public function testCheckIsLive() * @param int $useAggregatedData * @param string $mainTable * @param int $isFilter - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getIfNullSqlResult + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $getIfNullSqlResult * @dataProvider useAggregatedDataDataProvider * @return void */ @@ -309,7 +309,7 @@ public function testAddItemCountExpr() * @param int $isFilter * @param int $useAggregatedData * @param string $mainTable - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getIfNullSqlResult + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $getIfNullSqlResult * @dataProvider totalsDataProvider * @return void */ diff --git a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Report/Product/ViewedTest.php b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Report/Product/ViewedTest.php index 17e13f9d64bd7..df9f0d2139221 100644 --- a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Report/Product/ViewedTest.php +++ b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Report/Product/ViewedTest.php @@ -190,8 +190,8 @@ function ($arg) { /** * @param mixed $from * @param mixed $to - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $truncateCount - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $deleteCount + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $truncateCount + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $deleteCount * @dataProvider intervalsDataProvider * @return void */ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/LICENSE.txt b/app/code/Magento/RequireJs/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/LICENSE.txt rename to app/code/Magento/RequireJs/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/LICENSE_AFL.txt b/app/code/Magento/RequireJs/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/LICENSE_AFL.txt rename to app/code/Magento/RequireJs/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/RequireJs/Test/Mftf/README.md b/app/code/Magento/RequireJs/Test/Mftf/README.md new file mode 100644 index 0000000000000..152b706f7be1e --- /dev/null +++ b/app/code/Magento/RequireJs/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Require Js Functional Tests + +The Functional Test Module for **Magento Require Js** module. diff --git a/app/code/Magento/RequireJs/Test/Mftf/composer.json b/app/code/Magento/RequireJs/Test/Mftf/composer.json new file mode 100644 index 0000000000000..57bd4809b4140 --- /dev/null +++ b/app/code/Magento/RequireJs/Test/Mftf/composer.json @@ -0,0 +1,16 @@ +{ + "name": "magento/functional-test-module-require-js", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php index 0841388252905..dbf0a79bc42ff 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php @@ -17,7 +17,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @var string */ - protected $_template = 'rating/form.phtml'; + protected $_template = 'Magento_Review::rating/form.phtml'; /** * Session diff --git a/app/code/Magento/Review/Block/Adminhtml/Rss/Grid/Link.php b/app/code/Magento/Review/Block/Adminhtml/Rss/Grid/Link.php index 5d2ec9fc186ca..def0e896fc95f 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rss/Grid/Link.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rss/Grid/Link.php @@ -16,7 +16,7 @@ class Link extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'rss/grid/link.phtml'; + protected $_template = 'Magento_Review::rss/grid/link.phtml'; /** * @var \Magento\Framework\App\Rss\UrlBuilderInterface diff --git a/app/code/Magento/Review/Block/Customer/Recent.php b/app/code/Magento/Review/Block/Customer/Recent.php index 8f593f5695812..5c7f1ec2c0dad 100644 --- a/app/code/Magento/Review/Block/Customer/Recent.php +++ b/app/code/Magento/Review/Block/Customer/Recent.php @@ -20,7 +20,7 @@ class Recent extends \Magento\Framework\View\Element\Template * * @var string */ - protected $_template = 'customer/list.phtml'; + protected $_template = 'Magento_Review::customer/list.phtml'; /** * Product reviews collection diff --git a/app/code/Magento/Review/Block/Customer/View.php b/app/code/Magento/Review/Block/Customer/View.php index b7dfd4b969a9d..237b972f16573 100644 --- a/app/code/Magento/Review/Block/Customer/View.php +++ b/app/code/Magento/Review/Block/Customer/View.php @@ -23,7 +23,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct * * @var string */ - protected $_template = 'customer/view.phtml'; + protected $_template = 'Magento_Review::customer/view.phtml'; /** * Catalog product model diff --git a/app/code/Magento/Review/Block/Rating/Entity/Detailed.php b/app/code/Magento/Review/Block/Rating/Entity/Detailed.php index de871d9061428..0ce4f436ae704 100644 --- a/app/code/Magento/Review/Block/Rating/Entity/Detailed.php +++ b/app/code/Magento/Review/Block/Rating/Entity/Detailed.php @@ -15,7 +15,7 @@ class Detailed extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'detailed.phtml'; + protected $_template = 'Magento_Review::detailed.phtml'; /** * @var \Magento\Review\Model\RatingFactory diff --git a/app/code/Magento/Review/Block/View.php b/app/code/Magento/Review/Block/View.php index e2d0355671688..95b7176b48c44 100644 --- a/app/code/Magento/Review/Block/View.php +++ b/app/code/Magento/Review/Block/View.php @@ -19,7 +19,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct * * @var string */ - protected $_template = 'view.phtml'; + protected $_template = 'Magento_Review::view.phtml'; /** * Rating option model diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/LICENSE.txt b/app/code/Magento/Review/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/LICENSE.txt rename to app/code/Magento/Review/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/LICENSE_AFL.txt b/app/code/Magento/Review/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/LICENSE_AFL.txt rename to app/code/Magento/Review/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Review/Test/Mftf/README.md b/app/code/Magento/Review/Test/Mftf/README.md new file mode 100644 index 0000000000000..86af37286a7d6 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Review Functional Tests + +The Functional Test Module for **Magento Review** module. diff --git a/app/code/Magento/Review/Test/Mftf/composer.json b/app/code/Magento/Review/Test/Mftf/composer.json new file mode 100644 index 0000000000000..ae12d545ec244 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/composer.json @@ -0,0 +1,28 @@ +{ + "name": "magento/functional-test-module-review", + "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-customer": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-newsletter": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-theme": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-cookie": "100.0.0-dev", + "magento/functional-test-module-review-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Review/Test/Unit/Block/FormTest.php b/app/code/Magento/Review/Test/Unit/Block/FormTest.php index 2184385035c8d..1fd38551702ab 100644 --- a/app/code/Magento/Review/Test/Unit/Block/FormTest.php +++ b/app/code/Magento/Review/Test/Unit/Block/FormTest.php @@ -136,6 +136,9 @@ public function testGetAction($isSecure, $actionUrl, $productId) $this->assertEquals($actionUrl . '/id/' . $productId, $this->object->getAction()); } + /** + * @return array + */ public function getActionDataProvider() { return [ diff --git a/app/code/Magento/Review/Test/Unit/Block/Product/ReviewTest.php b/app/code/Magento/Review/Test/Unit/Block/Product/ReviewTest.php index 243b4e8389923..01868242d0e0c 100644 --- a/app/code/Magento/Review/Test/Unit/Block/Product/ReviewTest.php +++ b/app/code/Magento/Review/Test/Unit/Block/Product/ReviewTest.php @@ -204,6 +204,9 @@ public function testGetProductReviewUrl($isSecure, $actionUrl, $productId) $this->assertEquals($actionUrl . '/id/' . $productId, $this->block->getProductReviewUrl()); } + /** + * @return array + */ public function getProductReviewUrlDataProvider() { return [ diff --git a/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php b/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php index b3d2cec648dc6..36cbe455fa890 100644 --- a/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php +++ b/app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php @@ -147,6 +147,9 @@ public function testAddEntityFilter( $this->model->addEntityFilter($entity, $pkValue); } + /** + * @return array + */ public function addEntityFilterDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/LICENSE.txt b/app/code/Magento/ReviewAnalytics/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/LICENSE.txt rename to app/code/Magento/ReviewAnalytics/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/LICENSE_AFL.txt b/app/code/Magento/ReviewAnalytics/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/LICENSE_AFL.txt rename to app/code/Magento/ReviewAnalytics/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/ReviewAnalytics/Test/Mftf/README.md b/app/code/Magento/ReviewAnalytics/Test/Mftf/README.md new file mode 100644 index 0000000000000..9175fe01002bc --- /dev/null +++ b/app/code/Magento/ReviewAnalytics/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Review Analytics Functional Tests + +The Functional Test Module for **Magento Review Analytics** module. diff --git a/app/code/Magento/ReviewAnalytics/Test/Mftf/composer.json b/app/code/Magento/ReviewAnalytics/Test/Mftf/composer.json new file mode 100644 index 0000000000000..0164913753cb4 --- /dev/null +++ b/app/code/Magento/ReviewAnalytics/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-review-analytics", + "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-review": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/LICENSE.txt b/app/code/Magento/Robots/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/LICENSE.txt rename to app/code/Magento/Robots/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/LICENSE_AFL.txt b/app/code/Magento/Robots/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/LICENSE_AFL.txt rename to app/code/Magento/Robots/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Robots/Test/Mftf/README.md b/app/code/Magento/Robots/Test/Mftf/README.md new file mode 100644 index 0000000000000..e10f7c3e78419 --- /dev/null +++ b/app/code/Magento/Robots/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Robots Functional Tests + +The Functional Test Module for **Magento Robots** module. diff --git a/app/code/Magento/Robots/Test/Mftf/composer.json b/app/code/Magento/Robots/Test/Mftf/composer.json new file mode 100644 index 0000000000000..d3f2447e7970a --- /dev/null +++ b/app/code/Magento/Robots/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-robots", + "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-store": "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/Rss/Block/Feeds.php b/app/code/Magento/Rss/Block/Feeds.php index 2e88d25c02891..86998f87f5c17 100644 --- a/app/code/Magento/Rss/Block/Feeds.php +++ b/app/code/Magento/Rss/Block/Feeds.php @@ -16,7 +16,7 @@ class Feeds extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'feeds.phtml'; + protected $_template = 'Magento_Rss::feeds.phtml'; /** * @var \Magento\Framework\App\Rss\RssManagerInterface diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/LICENSE.txt b/app/code/Magento/Rss/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/LICENSE.txt rename to app/code/Magento/Rss/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/LICENSE_AFL.txt b/app/code/Magento/Rss/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/LICENSE_AFL.txt rename to app/code/Magento/Rss/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Rss/Test/Mftf/README.md b/app/code/Magento/Rss/Test/Mftf/README.md new file mode 100644 index 0000000000000..f0dfa5b1df52f --- /dev/null +++ b/app/code/Magento/Rss/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Rss Functional Tests + +The Functional Test Module for **Magento Rss** module. diff --git a/app/code/Magento/Rss/Test/Mftf/composer.json b/app/code/Magento/Rss/Test/Mftf/composer.json new file mode 100644 index 0000000000000..cf3a9dae8a054 --- /dev/null +++ b/app/code/Magento/Rss/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-rss", + "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-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/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/LICENSE.txt b/app/code/Magento/Rule/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/LICENSE.txt rename to app/code/Magento/Rule/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/LICENSE_AFL.txt b/app/code/Magento/Rule/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/LICENSE_AFL.txt rename to app/code/Magento/Rule/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Rule/Test/Mftf/README.md b/app/code/Magento/Rule/Test/Mftf/README.md new file mode 100644 index 0000000000000..46d592f4ab950 --- /dev/null +++ b/app/code/Magento/Rule/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Rule Functional Tests + +The Functional Test Module for **Magento Rule** module. diff --git a/app/code/Magento/Rule/Test/Mftf/composer.json b/app/code/Magento/Rule/Test/Mftf/composer.json new file mode 100644 index 0000000000000..827d8603fdb99 --- /dev/null +++ b/app/code/Magento/Rule/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-rule", + "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-eav": "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/Rule/Test/Unit/Model/Condition/AbstractConditionTest.php b/app/code/Magento/Rule/Test/Unit/Model/Condition/AbstractConditionTest.php index 1201ba92464d9..52653197e3981 100644 --- a/app/code/Magento/Rule/Test/Unit/Model/Condition/AbstractConditionTest.php +++ b/app/code/Magento/Rule/Test/Unit/Model/Condition/AbstractConditionTest.php @@ -40,6 +40,9 @@ public function testGetMappedSqlField() $this->assertEquals('category_ids', $this->_condition->getMappedSqlField()); } + /** + * @return array + */ public function validateAttributeDataProvider() { return [ @@ -146,6 +149,9 @@ public function testValidate($existingValue, $operator, $valueForValidate, $expe ); } + /** + * @return array + */ public function validateAttributeArrayInputTypeDataProvider() { return [ diff --git a/app/code/Magento/Rule/Test/Unit/Model/ResourceModel/Rule/Collection/AbstractCollectionTest.php b/app/code/Magento/Rule/Test/Unit/Model/ResourceModel/Rule/Collection/AbstractCollectionTest.php index 644d10ad75fe6..c4e7a591212c5 100644 --- a/app/code/Magento/Rule/Test/Unit/Model/ResourceModel/Rule/Collection/AbstractCollectionTest.php +++ b/app/code/Magento/Rule/Test/Unit/Model/ResourceModel/Rule/Collection/AbstractCollectionTest.php @@ -91,6 +91,9 @@ protected function setUp() ); } + /** + * @return array + */ public function addWebsitesToResultDataProvider() { return [ diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php index f2b454260dc22..6cab109b44dbb 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php @@ -19,7 +19,7 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address * * @var string */ - protected $_template = 'order/address/form.phtml'; + protected $_template = 'Magento_Sales::order/address/form.phtml'; /** * Core registry diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 47f74734b60fa..3623e72341a22 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -147,7 +147,7 @@ protected function _addAdditionalFormElementData(AbstractElement $element) { switch ($element->getId()) { case 'email': - $element->setRequired(0); + $element->setRequired(1); $element->setClass('validate-email admin__control-text'); break; } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php index eb437915ad668..cf9f8a44dee27 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php @@ -20,7 +20,7 @@ class Grandtotal extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Defa * * @var string */ - protected $_template = 'order/create/totals/grandtotal.phtml'; + protected $_template = 'Magento_Sales::order/create/totals/grandtotal.phtml'; /** * Tax config diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php index 9225d8c2e5f68..34a9ed8070e26 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php @@ -20,7 +20,7 @@ class Shipping extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Defaul * * @var string */ - protected $_template = 'order/create/totals/shipping.phtml'; + protected $_template = 'Magento_Sales::order/create/totals/shipping.phtml'; /** * Tax config diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php index cfdd73de9d8b8..166f3c9637ebb 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php @@ -20,7 +20,7 @@ class Subtotal extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Defaul * * @var string */ - protected $_template = 'order/create/totals/subtotal.phtml'; + protected $_template = 'Magento_Sales::order/create/totals/subtotal.phtml'; /** * Tax config diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php index d3da37c3f1bf8..207a4eca60213 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php @@ -18,5 +18,5 @@ class Tax extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\DefaultTota * * @var string */ - protected $_template = 'order/create/totals/tax.phtml'; + protected $_template = 'Magento_Sales::order/create/totals/tax.phtml'; } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php index 5c3a7fce805cc..261f4b0cfd12a 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php @@ -14,5 +14,5 @@ class Details extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/details.phtml'; + protected $_template = 'Magento_Sales::order/details.phtml'; } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Form.php index 82c3effcab62d..6c06e9d624c81 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Form.php @@ -17,5 +17,5 @@ class Form extends \Magento\Backend\Block\Template * * @var string */ - protected $_template = 'order/view/form.phtml'; + protected $_template = 'Magento_Sales::order/view/form.phtml'; } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php index 5489a0b2e513f..64b53d10d4af6 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php @@ -18,7 +18,7 @@ class History extends \Magento\Backend\Block\Template implements \Magento\Backen * * @var string */ - protected $_template = 'order/view/tab/history.phtml'; + protected $_template = 'Magento_Sales::order/view/tab/history.phtml'; /** * Core registry diff --git a/app/code/Magento/Sales/Block/Adminhtml/Rss/Order/Grid/Link.php b/app/code/Magento/Sales/Block/Adminhtml/Rss/Order/Grid/Link.php index fbb78970a4de0..512539824da20 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Rss/Order/Grid/Link.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Rss/Order/Grid/Link.php @@ -14,7 +14,7 @@ class Link extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'rss/order/grid/link.phtml'; + protected $_template = 'Magento_Sales::rss/order/grid/link.phtml'; /** * @var \Magento\Framework\App\Rss\UrlBuilderInterface diff --git a/app/code/Magento/Sales/Block/Order/Creditmemo.php b/app/code/Magento/Sales/Block/Order/Creditmemo.php index ae9a9a722291a..a32b2dbc74bde 100644 --- a/app/code/Magento/Sales/Block/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Block/Order/Creditmemo.php @@ -19,7 +19,7 @@ class Creditmemo extends \Magento\Sales\Block\Order\Creditmemo\Items /** * @var string */ - protected $_template = 'order/creditmemo.phtml'; + protected $_template = 'Magento_Sales::order/creditmemo.phtml'; /** * @var \Magento\Framework\App\Http\Context diff --git a/app/code/Magento/Sales/Block/Order/History.php b/app/code/Magento/Sales/Block/Order/History.php index 034df4edb5b49..80925f66fc83d 100644 --- a/app/code/Magento/Sales/Block/Order/History.php +++ b/app/code/Magento/Sales/Block/Order/History.php @@ -19,7 +19,7 @@ class History extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/history.phtml'; + protected $_template = 'Magento_Sales::order/history.phtml'; /** * @var \Magento\Sales\Model\ResourceModel\Order\CollectionFactory diff --git a/app/code/Magento/Sales/Block/Order/Info.php b/app/code/Magento/Sales/Block/Order/Info.php index db3dbdbfde40b..689a55f06896c 100644 --- a/app/code/Magento/Sales/Block/Order/Info.php +++ b/app/code/Magento/Sales/Block/Order/Info.php @@ -23,7 +23,7 @@ class Info extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/info.phtml'; + protected $_template = 'Magento_Sales::order/info.phtml'; /** * Core registry diff --git a/app/code/Magento/Sales/Block/Order/Info/Buttons.php b/app/code/Magento/Sales/Block/Order/Info/Buttons.php index a27b55cd8543f..18e79f6a76ecf 100644 --- a/app/code/Magento/Sales/Block/Order/Info/Buttons.php +++ b/app/code/Magento/Sales/Block/Order/Info/Buttons.php @@ -20,7 +20,7 @@ class Buttons extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/info/buttons.phtml'; + protected $_template = 'Magento_Sales::order/info/buttons.phtml'; /** * Core registry diff --git a/app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php b/app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php index 77e20eaa8d07b..2b84b8f1444b6 100644 --- a/app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php +++ b/app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php @@ -16,7 +16,7 @@ class Rss extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/info/buttons/rss.phtml'; + protected $_template = 'Magento_Sales::order/info/buttons/rss.phtml'; /** * @var \Magento\Sales\Model\OrderFactory diff --git a/app/code/Magento/Sales/Block/Order/Invoice.php b/app/code/Magento/Sales/Block/Order/Invoice.php index 2d8448ea5bc98..24ddf4bac7696 100644 --- a/app/code/Magento/Sales/Block/Order/Invoice.php +++ b/app/code/Magento/Sales/Block/Order/Invoice.php @@ -18,7 +18,7 @@ class Invoice extends \Magento\Sales\Block\Order\Invoice\Items /** * @var string */ - protected $_template = 'order/invoice.phtml'; + protected $_template = 'Magento_Sales::order/invoice.phtml'; /** * @var \Magento\Framework\App\Http\Context diff --git a/app/code/Magento/Sales/Block/Order/View.php b/app/code/Magento/Sales/Block/Order/View.php index 870e2e15ab7b3..03d1340e0f690 100644 --- a/app/code/Magento/Sales/Block/Order/View.php +++ b/app/code/Magento/Sales/Block/Order/View.php @@ -18,7 +18,7 @@ class View extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/view.phtml'; + protected $_template = 'Magento_Sales::order/view.phtml'; /** * Core registry diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php index 752ab088689c8..fa9676856a442 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php @@ -32,7 +32,7 @@ public function execute() if (!$order->canUnhold()) { throw new \Magento\Framework\Exception\LocalizedException(__('Can\'t unhold order.')); } - $this->orderManagement->unhold($order->getEntityId()); + $this->orderManagement->unHold($order->getEntityId()); $this->messageManager->addSuccess(__('You released the order from holding status.')); } catch (\Magento\Framework\Exception\LocalizedException $e) { $this->messageManager->addError($e->getMessage()); diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php index f34f8a681085d..07716ff8274c6 100644 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -2012,26 +2012,13 @@ protected function _validate() } /** - * Retrieve or generate new customer email. + * Retrieve new customer email. * * @return string */ protected function _getNewCustomerEmail() { - $email = $this->getData('account/email'); - if (empty($email)) { - $host = $this->_scopeConfig->getValue( - self::XML_PATH_DEFAULT_EMAIL_DOMAIN, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ); - $account = time(); - $email = $account . '@' . $host; - $account = $this->getData('account'); - $account['email'] = $email; - $this->setData('account', $account); - } - - return $email; + return $this->getData('account/email'); } /** diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo/Total/Discount.php b/app/code/Magento/Sales/Model/Order/Creditmemo/Total/Discount.php index bb173f4010311..0cc4143e569db 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo/Total/Discount.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo/Total/Discount.php @@ -25,7 +25,7 @@ public function collect(\Magento\Sales\Model\Order\Creditmemo $creditmemo) * Calculate how much shipping discount should be applied * basing on how much shipping should be refunded. */ - $baseShippingAmount = (float)$creditmemo->getBaseShippingAmount(); + $baseShippingAmount = $this->getBaseShippingAmount($creditmemo); if ($baseShippingAmount) { $baseShippingDiscount = $baseShippingAmount * $order->getBaseShippingDiscountAmount() / @@ -75,4 +75,21 @@ public function collect(\Magento\Sales\Model\Order\Creditmemo $creditmemo) $creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() - $baseTotalDiscountAmount); return $this; } + + /** + * Get base shipping amount + * + * @param \Magento\Sales\Model\Order\Creditmemo $creditmemo + * @return float + */ + private function getBaseShippingAmount(\Magento\Sales\Model\Order\Creditmemo $creditmemo): float + { + $baseShippingAmount = (float)$creditmemo->getBaseShippingAmount(); + if (!$baseShippingAmount) { + $baseShippingInclTax = (float)$creditmemo->getBaseShippingInclTax(); + $baseShippingTaxAmount = (float)$creditmemo->getBaseShippingTaxAmount(); + $baseShippingAmount = $baseShippingInclTax - $baseShippingTaxAmount; + } + return $baseShippingAmount; + } } diff --git a/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php b/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php index 92d00d0436634..f06da0de0fd00 100644 --- a/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php +++ b/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php @@ -138,7 +138,7 @@ protected function prepareTemplate(Order $order) */ $this->eventManager->dispatch( 'email_order_set_template_vars_before', - ['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject] + ['sender' => $this, 'transport' => $transportObject, 'transportObject' => $transportObject] ); $this->templateContainer->setTemplateVars($transportObject->getData()); diff --git a/app/code/Magento/Sales/Model/Order/OrderCustomerExtractor.php b/app/code/Magento/Sales/Model/Order/OrderCustomerExtractor.php index 2a93f389e569f..2f4d02109770b 100644 --- a/app/code/Magento/Sales/Model/Order/OrderCustomerExtractor.php +++ b/app/code/Magento/Sales/Model/Order/OrderCustomerExtractor.php @@ -11,13 +11,12 @@ use Magento\Customer\Api\Data\CustomerInterface; use Magento\Sales\Api\OrderRepositoryInterface; use Magento\Framework\DataObject\Copy as CopyService; -use Magento\Customer\Api\Data\AddressInterface; use Magento\Customer\Api\Data\RegionInterface; use Magento\Customer\Api\Data\AddressInterfaceFactory as AddressFactory; -use Magento\Quote\Model\Quote\Address as QuoteAddress; use Magento\Customer\Api\Data\RegionInterfaceFactory as RegionFactory; use Magento\Customer\Api\Data\CustomerInterfaceFactory as CustomerFactory; use Magento\Quote\Api\Data\AddressInterfaceFactory as QuoteAddressFactory; +use Magento\Sales\Model\Order\Address as OrderAddress; /** * Extract customer data from an order. @@ -87,8 +86,9 @@ public function __construct( } /** - * @param int $orderId + * Extract customer data from order. * + * @param int $orderId * @return CustomerInterface */ public function extract(int $orderId): CustomerInterface @@ -107,36 +107,45 @@ public function extract(int $orderId): CustomerInterface $order->getBillingAddress(), [] ); - $addresses = $order->getAddresses(); - foreach ($addresses as $address) { - $addressData = $this->objectCopyService->copyFieldsetToTarget( - 'order_address', - 'to_customer_address', - $address, - [] - ); - /** @var AddressInterface $customerAddress */ - $customerAddress = $this->addressFactory->create(['data' => $addressData]); - switch ($address->getAddressType()) { - case QuoteAddress::ADDRESS_TYPE_BILLING: - $customerAddress->setIsDefaultBilling(true); - break; - case QuoteAddress::ADDRESS_TYPE_SHIPPING: - $customerAddress->setIsDefaultShipping(true); - break; + + $processedAddressData = []; + $customerAddresses = []; + foreach ($order->getAddresses() as $orderAddress) { + $addressData = $this->objectCopyService + ->copyFieldsetToTarget('order_address', 'to_customer_address', $orderAddress, []); + + $index = array_search($addressData, $processedAddressData); + if ($index === false) { + // create new customer address only if it is unique + $customerAddress = $this->addressFactory->create(['data' => $addressData]); + $customerAddress->setIsDefaultBilling(false); + $customerAddress->setIsDefaultShipping(false); + if (is_string($orderAddress->getRegion())) { + /** @var RegionInterface $region */ + $region = $this->regionFactory->create(); + $region->setRegion($orderAddress->getRegion()); + $region->setRegionCode($orderAddress->getRegionCode()); + $region->setRegionId($orderAddress->getRegionId()); + $customerAddress->setRegion($region); + } + + $processedAddressData[] = $addressData; + $customerAddresses[] = $customerAddress; + $index = count($processedAddressData) - 1; } - if (is_string($address->getRegion())) { - /** @var RegionInterface $region */ - $region = $this->regionFactory->create(); - $region->setRegion($address->getRegion()); - $region->setRegionCode($address->getRegionCode()); - $region->setRegionId($address->getRegionId()); - $customerAddress->setRegion($region); + $customerAddress = $customerAddresses[$index]; + // make sure that address type flags from equal addresses are stored in one resulted address + if ($orderAddress->getAddressType() == OrderAddress::TYPE_BILLING) { + $customerAddress->setIsDefaultBilling(true); + } + if ($orderAddress->getAddressType() == OrderAddress::TYPE_SHIPPING) { + $customerAddress->setIsDefaultShipping(true); } - $customerData['addresses'][] = $customerAddress; } + $customerData['addresses'] = $customerAddresses; + return $this->customerFactory->create(['data' => $customerData]); } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminCreditMemoActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminCreditMemoActionGroup.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminCreditMemoActionGroup.xml rename to app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminCreditMemoActionGroup.xml index e83f061f56268..2a9ef0c948392 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminCreditMemoActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminCreditMemoActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Check customer information is correct in credit memo--> <actionGroup name="verifyBasicCreditMemoInformation"> <arguments> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminInvoiceActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminInvoiceActionGroup.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminInvoiceActionGroup.xml rename to app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminInvoiceActionGroup.xml index 29d7a2773aad6..f17d3462d06f3 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminInvoiceActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminInvoiceActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Check customer information is correct in invoice--> <actionGroup name="verifyBasicInvoiceInformation"> <arguments> diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml new file mode 100644 index 0000000000000..7ce10d5e5424e --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml @@ -0,0 +1,229 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!--Navigate to create order page (New Order -> Create New Customer)--> + <actionGroup name="navigateToNewOrderPageNewCustomer"> + <arguments> + <argument name="storeView" defaultValue="_defaultStore"/> + </arguments> + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/> + <waitForPageLoad stepKey="waitForIndexPageLoad"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/> + <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/> + <click selector="{{AdminOrderFormActionSection.CreateNewCustomer}}" stepKey="clickCreateCustomer"/> + <click selector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" stepKey="selectDefaultStoreView"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/> + </actionGroup> + + <!--Navigate to create order page (New Order -> Select Customer)--> + <actionGroup name="navigateToNewOrderPageExistingCustomer"> + <arguments> + <argument name="customer"/> + </arguments> + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/> + <waitForPageLoad stepKey="waitForIndexPageLoad"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/> + <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/> + <waitForPageLoad stepKey="waitForCustomerGridLoad"/> + <fillField userInput="{{customer.email}}" selector="{{AdminOrderCustomersGridSection.emailInput}}" stepKey="filterEmail"/> + <click selector="{{AdminOrderCustomersGridSection.apply}}" stepKey="applyFilter"/> + <waitForPageLoad stepKey="waitForFilteredCustomerGridLoad"/> + <click selector="{{AdminOrderCustomersGridSection.firstRow}}" stepKey="clickOnCustomer"/> + <waitForPageLoad stepKey="waitForCreateOrderPageLoad" /> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/> + </actionGroup> + + <!--Check the required fields are actually required--> + <actionGroup name="checkRequiredFieldsNewOrderForm"> + <seeElement selector="{{AdminOrderFormAccountSection.requiredGroup}}" stepKey="seeCustomerGroupRequired"/> + <seeElement selector="{{AdminOrderFormAccountSection.requiredEmail}}" stepKey="seeEmailRequired"/> + <clearField selector="{{AdminOrderFormAccountSection.email}}" stepKey="clearEmailField"/> + <clearField selector="{{AdminOrderFormBillingAddressSection.FirstName}}" stepKey="clearFirstNameField"/> + <clearField selector="{{AdminOrderFormBillingAddressSection.LastName}}" stepKey="clearLastNameField"/> + <clearField selector="{{AdminOrderFormBillingAddressSection.StreetLine1}}" stepKey="clearStreetField"/> + <clearField selector="{{AdminOrderFormBillingAddressSection.City}}" stepKey="clearCityField"/> + <selectOption selector="{{AdminOrderFormBillingAddressSection.Country}}" userInput="United States" stepKey="selectUSCountry"/> + <selectOption selector="{{AdminOrderFormBillingAddressSection.State}}" userInput="Please select" stepKey="selectNoState"/> + <clearField selector="{{AdminOrderFormBillingAddressSection.PostalCode}}" stepKey="clearPostalCodeField"/> + <clearField selector="{{AdminOrderFormBillingAddressSection.Phone}}" stepKey="clearPhoneField"/> + <seeElement selector="{{AdminOrderFormPaymentSection.getShippingMethods}}" stepKey="seeShippingMethodNotSelected"/> + <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="trySubmitOrder"/> + <see selector="{{AdminOrderFormBillingAddressSection.emailError}}" userInput="This is a required field." stepKey="seeThatEmailIsRequired"/> + <see selector="{{AdminOrderFormBillingAddressSection.firstNameError}}" userInput="This is a required field." stepKey="seeFirstNameRequired"/> + <see selector="{{AdminOrderFormBillingAddressSection.lastNameError}}" userInput="This is a required field." stepKey="seeLastNameRequired"/> + <see selector="{{AdminOrderFormBillingAddressSection.streetAddressError}}" userInput="This is a required field." stepKey="seeStreetRequired"/> + <see selector="{{AdminOrderFormBillingAddressSection.cityError}}" userInput="This is a required field." stepKey="seeCityRequired"/> + <see selector="{{AdminOrderFormBillingAddressSection.stateError}}" userInput="This is a required field." stepKey="seeStateRequired"/> + <see selector="{{AdminOrderFormBillingAddressSection.postalCodeError}}" userInput="This is a required field." stepKey="seePostalCodeRequired"/> + <see selector="{{AdminOrderFormBillingAddressSection.phoneError}}" userInput="This is a required field." stepKey="seePhoneRequired"/> + <see selector="{{AdminOrderFormPaymentSection.shippingError}}" userInput="This is a required field." stepKey="seeShippingMethodRequired"/> + </actionGroup> + + <!--Add a simple product to order--> + <actionGroup name="addSimpleProductToOrder"> + <arguments> + <argument name="product" defaultValue="_defaultProduct"/> + </arguments> + <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> + <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilter"/> + <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearch"/> + <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> + <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectProduct"/> + <fillField selector="{{AdminOrderFormItemsSection.rowQty('1')}}" userInput="1" stepKey="fillProductQty"/> + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> + </actionGroup> + + <!--Add configurable product to order --> + <actionGroup name="addConfigurableProductToOrder"> + <arguments> + <argument name="product"/> + <argument name="attribute"/> + <argument name="option"/> + </arguments> + <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> + <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterConfigurable"/> + <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchConfigurable"/> + <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> + <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectConfigurableProduct"/> + <waitForElementVisible selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_label)}}" stepKey="waitForConfigurablePopover"/> + <wait time="2" stepKey="waitForOptionsToLoad"/> + <selectOption selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_label)}}" + userInput="{{option.name}}" stepKey="selectionConfigurableOption"/> + <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover"/> + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> + </actionGroup> + + <!--Add bundle product to order --> + <actionGroup name="addBundleProductToOrder"> + <arguments> + <argument name="product"/> + <argument name="quantity" type="string" defaultValue="1"/> + </arguments> + <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> + <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterBundle"/> + <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchBundle"/> + <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> + <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectBundleProduct"/> + <waitForElementVisible selector="{{AdminOrderFormBundleProductSection.quantity}}" stepKey="waitForBundleOptionLoad"/> + <wait time="2" stepKey="waitForOptionsToLoad"/> + <fillField selector="{{AdminOrderFormBundleProductSection.quantity}}" userInput="{{quantity}}" stepKey="fillQuantity"/> + <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOk"/> + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> + </actionGroup> + + <!--Add downloadable product to order --> + <actionGroup name="addDownloadableProductToOrder"> + <arguments> + <argument name="product"/> + <argument name="link"/> + <argument name="quantity" defaultValue="1" type="string"/> + </arguments> + <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> + <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> + <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterDownloadable"/> + <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchDownloadable"/> + <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> + <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectDownloadableProduct"/> + <waitForElementVisible selector="{{AdminOrderFormDownloadableProductSection.optionSelect(link.title)}}" stepKey="waitForLinkLoad"/> + <click selector="{{AdminOrderFormDownloadableProductSection.optionSelect(link.title)}}" stepKey="selectLink"/> + <fillField selector="{{AdminOrderFormDownloadableProductSection.quantity}}" userInput="{{quantity}}" stepKey="setQuantity"/> + <click selector="{{AdminOrderFormDownloadableProductSection.ok}}" stepKey="confirmConfiguration"/> + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> + </actionGroup> + + <!--Add grouped product option to order --> + <actionGroup name="addGroupedProductOptionToOrder"> + <arguments> + <argument name="product"/> + <argument name="option"/> + <argument name="quantity" type="string" defaultValue="1"/> + </arguments> + + <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> + <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterGrouped"/> + <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchGrouped"/> + <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> + <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectGroupedProduct"/> + <waitForElementVisible selector="{{AdminOrderFormGroupedProductSection.optionQty(option.sku)}}" stepKey="waitForGroupedOptionLoad"/> + <wait time="2" stepKey="waitForOptionsToLoad"/> + <fillField selector="{{AdminOrderFormGroupedProductSection.optionQty(option.sku)}}" userInput="{{quantity}}" stepKey="fillOptionQuantity"/> + <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOk"/> + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> + </actionGroup> + + <!--Fill customer billing address--> + <actionGroup name="fillOrderCustomerInformation"> + <arguments> + <argument name="customer"/> + <argument name="address"/> + </arguments> + <fillField selector="{{AdminOrderFormBillingAddressSection.FirstName}}" userInput="{{customer.firstname}}" stepKey="fillFirstName"/> + <fillField selector="{{AdminOrderFormBillingAddressSection.LastName}}" userInput="{{customer.lastname}}" stepKey="fillLastName"/> + <fillField selector="{{AdminOrderFormBillingAddressSection.StreetLine1}}" userInput="{{address.street[0]}}" stepKey="fillStreetLine1"/> + <fillField selector="{{AdminOrderFormBillingAddressSection.City}}" userInput="{{address.city}}" stepKey="fillCity"/> + <selectOption selector="{{AdminOrderFormBillingAddressSection.Country}}" userInput="{{address.country_id}}" stepKey="fillCountry"/> + <selectOption selector="{{AdminOrderFormBillingAddressSection.State}}" userInput="{{address.state}}" stepKey="fillState"/> + <fillField selector="{{AdminOrderFormBillingAddressSection.PostalCode}}" userInput="{{address.postcode}}" stepKey="fillPostalCode"/> + <fillField selector="{{AdminOrderFormBillingAddressSection.Phone}}" userInput="{{address.telephone}}" stepKey="fillPhone"/> + </actionGroup> + + <!--Select flat rate shipping method--> + <actionGroup name="orderSelectFlatRateShipping"> + <click selector="{{AdminOrderFormPaymentSection.header}}" stepKey="unfocus"/> + <waitForPageLoad stepKey="waitForJavascriptToFinish"/> + <click selector="{{AdminOrderFormPaymentSection.getShippingMethods}}" stepKey="clickShippingMethods"/> + <waitForElementVisible selector="{{AdminOrderFormPaymentSection.flatRateOption}}" stepKey="waitForShippingOptions"/> + <selectOption selector="{{AdminOrderFormPaymentSection.flatRateOption}}" userInput="flatrate_flatrate" stepKey="checkFlatRate"/> + </actionGroup> + + <!--Check that customer information is correct in order--> + <actionGroup name="verifyBasicOrderInformation"> + <arguments> + <argument name="customer"/> + <argument name="shippingAddress"/> + <argument name="billingAddress"/> + <argument name="customerGroup" defaultValue="GeneralCustomerGroup"/> + </arguments> + <see selector="{{AdminOrderDetailsInformationSection.customerName}}" userInput="{{customer.firstname}}" stepKey="seeCustomerName"/> + <see selector="{{AdminOrderDetailsInformationSection.customerEmail}}" userInput="{{customer.email}}" stepKey="seeCustomerEmail"/> + <see selector="{{AdminOrderDetailsInformationSection.customerGroup}}" userInput="{{customerGroup.code}}" stepKey="seeCustomerGroup"/> + <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.street[0]}}" stepKey="seeBillingAddressStreet"/> + <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.city}}" stepKey="seeBillingAddressCity"/> + <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.country_id}}" stepKey="seeBillingAddressCountry"/> + <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.postcode}}" stepKey="seeBillingAddressPostcode"/> + <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.street[0]}}" stepKey="seeShippingAddressStreet"/> + <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.city}}" stepKey="seeShippingAddressCity"/> + <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.country_id}}" stepKey="seeShippingAddressCountry"/> + <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.postcode}}" stepKey="seeShippingAddressPostcode"/> + </actionGroup> + + <!--Check for product in order items list--> + <actionGroup name="seeProductInItemsOrdered"> + <arguments> + <argument name="product"/> + </arguments> + <see selector="{{AdminOrderItemsOrderedSection.productSkuColumn}}" userInput="{{product.sku}}" stepKey="seeSkuInItemsOrdered"/> + </actionGroup> + + <!--Cancel order that is in pending status--> + <actionGroup name="cancelPendingOrder"> + <click selector="{{AdminOrderDetailsMainActionsSection.cancel}}" stepKey="clickCancelOrder"/> + <waitForElement selector="{{AdminConfirmationModalSection.message}}" stepKey="waitForCancelConfirmation"/> + <see selector="{{AdminConfirmationModalSection.message}}" userInput="Are you sure you want to cancel this order?" stepKey="seeConfirmationMessage"/> + <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmOrderCancel"/> + <see selector="{{AdminMessagesSection.success}}" userInput="You canceled the order." stepKey="seeCancelSuccessMessage"/> + <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Canceled" stepKey="seeOrderStatusCanceled"/> + </actionGroup> +</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderGridActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderGridActionGroup.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderGridActionGroup.xml rename to app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderGridActionGroup.xml index 696cc898a2bc8..7dcb89fdc1628 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderGridActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderGridActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Filter order grid by order id field--> <actionGroup name="filterOrderGridById"> <arguments> diff --git a/app/code/Magento/Sales/Test/Mftf/Data/AddressData.xml b/app/code/Magento/Sales/Test/Mftf/Data/AddressData.xml new file mode 100644 index 0000000000000..800bbfca2f869 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Data/AddressData.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="ShippingAddressTX" type="shipping_address"> + <data key="firstname">Joe</data> + <data key="lastname">Buyer</data> + <data key="fullname">Joe Buyer</data> + <array key="street"> + <item>11501 Domain Dr</item> + <item>#150</item> + </array> + <data key="city">Austin</data> + <data key="region">Texas</data> + <data key="region_code">TX</data> + <data key="region_id">1</data> + <data key="country_id">US</data> + <data key="postcode">78758</data> + <data key="email" unique="prefix">joe.buyer@email.com</data> + <data key="telephone">512-345-6789</data> + </entity> + <entity name="BillingAddressTX" type="billing_address"> + <data key="firstname">Joe</data> + <data key="lastname">Buyer</data> + <data key="fullname">Joe Buyer</data> + <array key="street"> + <item>11501 Domain Dr</item> + <item>#150</item> + </array> + <data key="city">Austin</data> + <data key="region">Texas</data> + <data key="region_code">TX</data> + <data key="region_id">1</data> + <data key="country_id">US</data> + <data key="postcode">78758</data> + <data key="email" unique="prefix">joe.buyer@email.com</data> + <data key="telephone">512-345-6789</data> + </entity> +</entities> diff --git a/app/code/Magento/Sales/Test/Mftf/Data/ConstData.xml b/app/code/Magento/Sales/Test/Mftf/Data/ConstData.xml new file mode 100644 index 0000000000000..f6855ed09c263 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Data/ConstData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="Const" type="constant"> + <data key="one">1</data> + <data key="two">2</data> + <data key="fifty">50</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Data/OrderData.xml b/app/code/Magento/Sales/Test/Mftf/Data/OrderData.xml similarity index 86% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Data/OrderData.xml rename to app/code/Magento/Sales/Test/Mftf/Data/OrderData.xml index 39772e4c5da10..566fb7d44528e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Data/OrderData.xml +++ b/app/code/Magento/Sales/Test/Mftf/Data/OrderData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <!--Data for order created through UI with simple and configurable order--> <entity name="AdminOrderSimpleConfigurableProduct" type="order"> <data key="subtotal">246.00</data> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/LICENSE.txt b/app/code/Magento/Sales/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/LICENSE.txt rename to app/code/Magento/Sales/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/LICENSE_AFL.txt b/app/code/Magento/Sales/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/LICENSE_AFL.txt rename to app/code/Magento/Sales/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminCreditMemoNewPage.xml b/app/code/Magento/Sales/Test/Mftf/Page/AdminCreditMemoNewPage.xml similarity index 76% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminCreditMemoNewPage.xml rename to app/code/Magento/Sales/Test/Mftf/Page/AdminCreditMemoNewPage.xml index 79312e75a6416..5a50c807628c6 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminCreditMemoNewPage.xml +++ b/app/code/Magento/Sales/Test/Mftf/Page/AdminCreditMemoNewPage.xml @@ -7,7 +7,7 @@ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="AdminCreditMemoNewPage" url="sales/order_creditmemo/new/order_id/" area="admin" module="Magento_Sales"> <section name="AdminCreditMemoOrderInformationSection"/> <section name="AdminCreditMemoAddressInformationSection"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Page/AdminInvoiceDetailsPage.xml b/app/code/Magento/Sales/Test/Mftf/Page/AdminInvoiceDetailsPage.xml new file mode 100644 index 0000000000000..a60e44247fe9c --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Page/AdminInvoiceDetailsPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminInvoiceDetailsPage" url="sales/invoice/view/invoice_id/" area="admin" module="Magento_Sales"> + <section name="AdminInvoiceDetailsInformationSection"/> + </page> +</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminInvoiceNewPage.xml b/app/code/Magento/Sales/Test/Mftf/Page/AdminInvoiceNewPage.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminInvoiceNewPage.xml rename to app/code/Magento/Sales/Test/Mftf/Page/AdminInvoiceNewPage.xml index 6c603f582738e..e782fe5194720 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminInvoiceNewPage.xml +++ b/app/code/Magento/Sales/Test/Mftf/Page/AdminInvoiceNewPage.xml @@ -7,7 +7,7 @@ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="AdminInvoiceNewPage" url="sales/order_invoice/new/order_id/" area="admin" module="Magento_Sales"> <section name="AdminInvoiceMainActionsSection"/> <section name="AdminInvoiceOrderInformationSection"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Page/AdminInvoicesPage.xml b/app/code/Magento/Sales/Test/Mftf/Page/AdminInvoicesPage.xml new file mode 100644 index 0000000000000..7f7289b2e64fd --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Page/AdminInvoicesPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminInvoicesPage" url="sales/invoice/" area="admin" module="Magento_Sales"> + <section name="AdminInvoicesGridSection"/> + <section name="AdminInvoicesFiltersSection"/> + </page> +</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrderCreatePage.xml b/app/code/Magento/Sales/Test/Mftf/Page/AdminOrderCreatePage.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrderCreatePage.xml rename to app/code/Magento/Sales/Test/Mftf/Page/AdminOrderCreatePage.xml index 4eba7f02302fd..49520261d857f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrderCreatePage.xml +++ b/app/code/Magento/Sales/Test/Mftf/Page/AdminOrderCreatePage.xml @@ -7,7 +7,7 @@ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="AdminOrderCreatePage" url="sales/order_create/index" area="admin" module="Magento_Sales"> <section name="AdminOrderFormActionSection"/> <section name="AdminOrderFormItemsSection"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrderDetailsPage.xml b/app/code/Magento/Sales/Test/Mftf/Page/AdminOrderDetailsPage.xml similarity index 84% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrderDetailsPage.xml rename to app/code/Magento/Sales/Test/Mftf/Page/AdminOrderDetailsPage.xml index df8f4ed63787c..690eade8b0c8f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrderDetailsPage.xml +++ b/app/code/Magento/Sales/Test/Mftf/Page/AdminOrderDetailsPage.xml @@ -7,7 +7,7 @@ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="AdminOrderDetailsPage" url="sales/order/view/order_id/" area="admin" module="Magento_Sales"> <section name="AdminOrderDetailsMainActionsSection"/> <section name="AdminOrderDetailsOrderViewSection"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Page/AdminOrdersPage.xml b/app/code/Magento/Sales/Test/Mftf/Page/AdminOrdersPage.xml new file mode 100644 index 0000000000000..d4d5e78631885 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Page/AdminOrdersPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminOrdersPage" url="sales/order/" area="admin" module="Magento_Sales"> + <section name="AdminOrdersGridSection"/> + </page> +</pages> diff --git a/app/code/Magento/Sales/Test/Mftf/README.md b/app/code/Magento/Sales/Test/Mftf/README.md new file mode 100644 index 0000000000000..8a515e2b6233b --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Sales Functional Tests + +The Functional Test Module for **Magento Sales** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoAddressInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoAddressInformationSection.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoAddressInformationSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoAddressInformationSection.xml index 68baf82796fe3..85e5faca3a48c 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoAddressInformationSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoAddressInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCreditMemoAddressInformationSection"> <element name="billingAddress" type="text" selector=".order-billing-address address"/> <element name="billingAddressEdit" type="button" selector=".order-billing-address .actions a"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoItemsSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoItemsSection.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoItemsSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoItemsSection.xml index 024a2c55bef1c..5e3e8fc6e22ec 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoItemsSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoItemsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCreditMemoItemsSection"> <element name="header" type="text" selector="#creditmemo_item_container span.title"/> <element name="itemName" type="text" selector=".order-creditmemo-tables tbody:nth-of-type({{row}}) .col-product .product-title" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoOrderInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoOrderInformationSection.xml similarity index 85% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoOrderInformationSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoOrderInformationSection.xml index 6ffaa51c2d4d3..b0be8c6cd6575 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoOrderInformationSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoOrderInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCreditMemoOrderInformationSection"> <element name="orderId" type="text" selector="div.order-information span.title > a" timeout="60"/> <element name="orderDate" type="text" selector=".order-information table.order-information-table tr:first-of-type > td"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoPaymentShippingSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoPaymentShippingSection.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoPaymentShippingSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoPaymentShippingSection.xml index 1411ee23970a1..b307a5d1cf4bc 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoPaymentShippingSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoPaymentShippingSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCreditMemoPaymentShippingSection"> <element name="PaymentMethod" type="text" selector=".order-payment-method .order-payment-method-title"/> <element name="CurrencyInformation" type="text" selector=".order-payment-method .order-payment-currency"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoTotalSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoTotalSection.xml similarity index 84% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoTotalSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoTotalSection.xml index 529d86dc203a1..ca5e297b72ffb 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminCreditMemoTotalSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoTotalSection.xml @@ -7,10 +7,10 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCreditMemoTotalSection"> <element name="subtotalRow" type="text" selector=".order-subtotal-table tbody > tr:nth-of-type({{row}}) td span.price" parameterized="true"/> - <element name="total" type="text" selector="//table[contains(@class,'order-subtotal-table')]/tbody/tr/td[contains(text(), '{{total}}')]/following-sibling::td/span/span[contains(@class, 'price')]" parameterized="true"/> + <element name="total" type="text" selector="//table[contains(@class,'order-subtotal-table')]/tbody/tr/td[contains(text(), '{{total}}')]/following-sibling::td//span[contains(@class, 'price')]" parameterized="true"/> <element name="refundShipping" type="input" selector=".order-subtotal-table tbody input[name='creditmemo[shipping_amount]']"/> <element name="adjustmentRefund" type="input" selector=".order-subtotal-table tbody input[name='creditmemo[adjustment_positive]'"/> <element name="adjustmentFee" type="input" selector=".order-subtotal-table tbody input[name='creditmemo[adjustment_negative]']"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceAddressInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceAddressInformationSection.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceAddressInformationSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceAddressInformationSection.xml index f8b0e3dd284a4..63712f24a5de8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceAddressInformationSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceAddressInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminInvoiceAddressInformationSection"> <element name="billingAddress" type="text" selector=".order-billing-address address"/> <element name="billingAddressEdit" type="button" selector=".order-billing-address .actions a"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceDetailsInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceDetailsInformationSection.xml new file mode 100644 index 0000000000000..41b36310ebeb1 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceDetailsInformationSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminInvoiceDetailsInformationSection"> + <element name="orderStatus" type="text" selector="#order_status"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceItemsSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceItemsSection.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceItemsSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceItemsSection.xml index da2a7e10ae1f8..56c165bada500 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceItemsSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceItemsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminInvoiceItemsSection"> <element name="itemName" type="text" selector=".order-invoice-tables tbody:nth-of-type({{row}}) .product-title" parameterized="true"/> <element name="itemSku" type="text" selector=".order-invoice-tables tbody:nth-of-type({{row}}) .product-sku-block" parameterized="true"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceMainActionsSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceMainActionsSection.xml new file mode 100644 index 0000000000000..c1a9718b29b1c --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceMainActionsSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminInvoiceMainActionsSection"> + <element name="submitInvoice" type="button" selector=".action-default.scalable.save.submit-button.primary"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceOrderInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceOrderInformationSection.xml similarity index 85% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceOrderInformationSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceOrderInformationSection.xml index ad1d3052158a5..198a087bffc45 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceOrderInformationSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceOrderInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminInvoiceOrderInformationSection"> <element name="orderId" type="text" selector="div.order-information span.title > a" timeout="30"/> <element name="orderDate" type="text" selector=".order-information table.order-information-table tr:first-of-type > td"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoicePaymentShippingSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoicePaymentShippingSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml index d3ca09c1811cb..3bb381047bb97 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoicePaymentShippingSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminInvoicePaymentShippingSection"> <element name="PaymentMethod" type="text" selector=".order-payment-method .order-payment-method-title"/> <element name="CurrencyInformation" type="text" selector=".order-payment-method .order-payment-currency"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceTotalSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceTotalSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceTotalSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceTotalSection.xml index 49b734320a7ea..db5b12f622b64 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceTotalSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceTotalSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminInvoiceTotalSection"> <element name="subtotalRow" type="text" selector=".order-subtotal-table tbody > tr:nth-of-type({{row}}) td span.price" parameterized="true"/> <element name="total" type="text" selector="//table[contains(@class,'order-subtotal-table')]/tbody/tr/td[contains(text(), '{{total}}')]/following-sibling::td/span/span[contains(@class, 'price')]" parameterized="true"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicesFiltersSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicesFiltersSection.xml new file mode 100644 index 0000000000000..5b55dd3cc1aae --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicesFiltersSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminInvoicesFiltersSection"> + <element name="orderNum" type="input" selector="input[name='order_increment_id']"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoicesGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicesGridSection.xml similarity index 75% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoicesGridSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicesGridSection.xml index 3b7bbd6fd14e4..8d2d8750e5045 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoicesGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicesGridSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminInvoicesGridSection"> <element name="spinner" type="button" selector=".spinner"/> <element name="filter" type="button" selector="#container > div > div.admin__data-grid-header > div:nth-child(1) > div.data-grid-filters-actions-wrap > div > button"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderAddressInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderAddressInformationSection.xml new file mode 100644 index 0000000000000..2900cb60391be --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderAddressInformationSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderAddressInformationSection"> + <element name="billingAddress" type="text" selector=".order-billing-address address"/> + <element name="shippingAddress" type="text" selector=".order-shipping-address address"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCommentsTabSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCommentsTabSection.xml new file mode 100644 index 0000000000000..9a784049e081a --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCommentsTabSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderCommentsTabSection"> + <element name="orderNotesList" type="text" selector="#Order_History .edit-order-comments .note-list"/> + <element name="orderComments" type="text" selector="#Order_History .edit-order-comments-block"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCreditMemosTabSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCreditMemosTabSection.xml new file mode 100644 index 0000000000000..bb0e1618c66e3 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCreditMemosTabSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderCreditMemosTabSection"> + <element name="spinner" type="text" selector="[data-role='spinner'][data-component*='sales_order_view_creditmemo']"/> + <element name="gridRow" type="text" selector="#sales_order_view_tabs_order_creditmemos_content .data-grid tbody > tr:nth-of-type({{row}})" parameterized="true"/> + <element name="viewGridRow" type="button" selector="#sales_order_view_tabs_order_creditmemos_content .data-grid tbody > tr:nth-of-type({{row}}) a[href*='order_creditmemo/view']" parameterized="true"/> + <element name="gridRowCell" type="text" selector="//div[@id='sales_order_view_tabs_order_creditmemos_content']//tr[{{row}}]//td[count(//div[@id='sales_order_view_tabs_order_creditmemos_content']//tr//th[contains(., '{{column}}')][1]/preceding-sibling::th) +1 ]" parameterized="true"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCustomersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCustomersGridSection.xml new file mode 100644 index 0000000000000..c91a1e2aef693 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCustomersGridSection.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderCustomersGridSection"> + <element name="spinner" type="button" selector=".spinner"/> + <element name="apply" type="button" selector=".action-secondary[title='Search']"/> + <element name="resetFilter" type="button" selector=".action-tertiary[title='Reset Filter']"/> + <element name="emailInput" type="input" selector="#sales_order_create_customer_grid_filter_email"/> + <element name="firstRow" type="button" selector="tr:nth-of-type(1)[data-role='row']"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInformationSection.xml similarity index 87% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsInformationSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInformationSection.xml index 2ba11746694ad..39feba4694019 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsInformationSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderDetailsInformationSection"> <element name="orderDate" type="text" selector=".order-information table.order-information-table tr:first-of-type > td"/> <element name="orderStatus" type="text" selector=".order-information table.order-information-table #order_status"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInvoicesSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInvoicesSection.xml new file mode 100644 index 0000000000000..b6b32184841c4 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInvoicesSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderDetailsInvoicesSection"> + <element name="spinner" type="button" selector=".spinner"/> + <element name="content" type="text" selector="#sales_order_view_tabs_order_invoices_content"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsMainActionsSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMainActionsSection.xml similarity index 84% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsMainActionsSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMainActionsSection.xml index 4c08980bf7dde..eac238584b030 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsMainActionsSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMainActionsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderDetailsMainActionsSection"> <element name="back" type="button" selector="#back" timeout="30"/> <element name="cancel" type="button" selector="#order-view-cancel-button" timeout="30"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMessagesSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMessagesSection.xml new file mode 100644 index 0000000000000..31f78db11f90b --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMessagesSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderDetailsMessagesSection"> + <element name="successMessage" type="text" selector="div.message-success"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsOrderViewSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsOrderViewSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsOrderViewSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsOrderViewSection.xml index 1a83aa0eb6234..6623c68099fe7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsOrderViewSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsOrderViewSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderDetailsOrderViewSection"> <element name="information" type="button" selector="#sales_order_view_tabs_order_info"/> <element name="invoices" type="button" selector="#sales_order_view_tabs_order_invoices"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml new file mode 100644 index 0000000000000..3c920bc6ba0e7 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderFormAccountSection"> + <element name="group" type="select" selector="#group_id"/> + <element name="email" type="input" selector="#email"/> + <element name="requiredGroup" type="text" selector=".admin__field.required[data-ui-id='billing-address-fieldset-element-form-field-group-id']"/> + <element name="requiredEmail" type="text" selector=".admin__field.required[data-ui-id='billing-address-fieldset-element-form-field-email']"/> + </section> +</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormActionSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormActionSection.xml similarity index 75% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormActionSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormActionSection.xml index 302e0badb4543..09b2012841b8b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormActionSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormActionSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderFormActionSection"> <element name="SubmitOrder" type="button" selector="#submit_order_top_button" timeout="30"/> <element name="Cancel" type="button" selector="#reset_order_top_button" timeout="30"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormBillingAddressSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBillingAddressSection.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormBillingAddressSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBillingAddressSection.xml index f1000476d50fe..b0f7eb21d4dd7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormBillingAddressSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBillingAddressSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderFormBillingAddressSection"> <element name="NamePrefix" type="input" selector="#order-billing_address_prefix" timeout="30"/> <element name="FirstName" type="input" selector="#order-billing_address_firstname" timeout="30"/> @@ -28,6 +28,7 @@ <element name="ValidateVatNumber" type="button" selector="#order-billing_address_vat_id + .actions>button.action-default" timeout="30"/> <element name="SaveAddress" type="checkbox" selector="#order-billing_address_save_in_address_book"/> + <element name="emailError" type="text" selector="#email-error"/> <element name="firstNameError" type="text" selector="#order-billing_address_firstname-error"/> <element name="lastNameError" type="text" selector="#order-billing_address_lastname-error"/> <element name="streetAddressError" type="text" selector="#order-billing_address_street0-error"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBundleProductSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBundleProductSection.xml new file mode 100644 index 0000000000000..a035e47394d5b --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBundleProductSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderFormBundleProductSection"> + <element name="quantity" type="input" selector="#product_composite_configure_input_qty"/> + <element name="ok" type="button" selector=".modal-header .page-actions button[data-role='action']" timeout="30"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormConfigureProductSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormConfigureProductSection.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormConfigureProductSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormConfigureProductSection.xml index 1d1ff664eb7a3..87948c38e4328 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormConfigureProductSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormConfigureProductSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderFormConfigureProductSection"> <element name="optionSelect" type="select" selector="//div[@class='product-options']/div/div/select[../../label[text() = '{{option}}']]" parameterized="true"/> <element name="quantity" type="input" selector="#product_composite_configure_input_qty"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormDownloadableProductSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormDownloadableProductSection.xml new file mode 100644 index 0000000000000..b77b01d54f950 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormDownloadableProductSection.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderFormDownloadableProductSection"> + <element name="optionSelect" type="select" selector="//div[contains(@class,'link')]/div/div/input[./../label[contains(text(),{{linkTitle}})]]" parameterized="true"/> + <element name="quantity" type="input" selector="#product_composite_configure_input_qty"/> + <element name="ok" type="button" selector=".modal-header .page-actions button[data-role='action']" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormGroupedProductSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormGroupedProductSection.xml new file mode 100644 index 0000000000000..ceba11f74ae83 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormGroupedProductSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderFormGroupedProductSection"> + <element name="optionQty" type="input" selector="//td[@class='col-sku'][text()='{{productSku}}']/..//input[contains(@class, 'qty')]" parameterized="true"/> + <element name="ok" type="button" selector=".modal-header .page-actions button[data-role='action']" timeout="30"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormItemsSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsSection.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormItemsSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsSection.xml index c3486e1af5a1c..86288ec7d7ec9 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormItemsSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderFormItemsSection"> <element name="skuNumber" type="input" selector="#sku_{{row}}" parameterized="true"/> <element name="qty" type="input" selector="#sku_qty_{{row}}" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormPaymentSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormPaymentSection.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormPaymentSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormPaymentSection.xml index ff0d91a2b0d08..bb7c89dd39b6c 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormPaymentSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormPaymentSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderFormPaymentSection"> <element name="header" type="text" selector="#order-methods span.title"/> <element name="getShippingMethods" type="text" selector="#order-shipping_method a.action-default" timeout="30"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormShippingAddressSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormShippingAddressSection.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormShippingAddressSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormShippingAddressSection.xml index c7fc616eac6f1..82ecb023198c7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormShippingAddressSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormShippingAddressSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderFormShippingAddressSection"> <element name="SameAsBilling" type="checkbox" selector="#order-shipping_same_as_billing"/> <element name="NamePrefix" type="input" selector="#order-shipping_address_prefix"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormTotalSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormTotalSection.xml similarity index 78% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormTotalSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormTotalSection.xml index d558ecb3dfb92..e44a97b678f89 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormTotalSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormTotalSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderFormTotalSection"> <element name="subtotalRow" type="text" selector="#order-totals>table tr.row-totals:nth-of-type({{row}}) span.price" parameterized="true"/> <element name="total" type="text" selector="//tr[contains(@class,'row-totals')]/td[contains(text(), '{{total}}')]/following-sibling::td/span[contains(@class, 'price')]" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderInvoicesTabSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderInvoicesTabSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderInvoicesTabSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderInvoicesTabSection.xml index 985c070933b48..e00ab7e66b99a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderInvoicesTabSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderInvoicesTabSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderInvoicesTabSection"> <element name="spinner" type="text" selector="[data-role='spinner'][data-component*='sales_order_view_invoice']"/> <element name="gridRow" type="text" selector="#sales_order_view_tabs_order_invoices_content .data-grid tbody > tr:nth-of-type({{row}})" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderItemsOrderedSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderItemsOrderedSection.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderItemsOrderedSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderItemsOrderedSection.xml index 6a49d79db2010..9807d7364c7c6 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderItemsOrderedSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderItemsOrderedSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderItemsOrderedSection"> <element name="itemProductName" type="text" selector=".edit-order-table tr:nth-of-type({{row}}) .col-product .product-title" parameterized="true"/> <element name="itemProductSku" type="text" selector=".edit-order-table tr:nth-of-type({{row}}) .col-product .product-sku-block" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderPaymentInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderPaymentInformationSection.xml similarity index 75% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderPaymentInformationSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderPaymentInformationSection.xml index a750f2fa062d7..15b468d1dfa9b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderPaymentInformationSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderPaymentInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderPaymentInformationSection"> <element name="paymentMethod" type="text" selector=".order-payment-method .order-payment-method-title"/> <element name="paymentCurrency" type="text" selector=".order-payment-method .order-payment-currency"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderShipmentsTabSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderShipmentsTabSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderShipmentsTabSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderShipmentsTabSection.xml index 9ed9d852b4bea..65dbf01aad2e0 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderShipmentsTabSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderShipmentsTabSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderShipmentsTabSection"> <element name="spinner" type="text" selector="[data-role='spinner'][data-component*='sales_order_view_shipment']"/> <element name="gridRow" type="text" selector="#sales_order_view_tabs_order_shipments_content .data-grid tbody > tr:nth-of-type({{row}})" parameterized="true"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderShippingInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderShippingInformationSection.xml new file mode 100644 index 0000000000000..f29e8a2a7f970 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderShippingInformationSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderShippingInformationSection"> + <element name="shippingMethod" type="text" selector=".order-shipping-method .admin__page-section-item-content"/> + <element name="shippingPrice" type="text" selector=".order-shipping-method .admin__page-section-item-content .price"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderStoreScopeTreeSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderStoreScopeTreeSection.xml new file mode 100644 index 0000000000000..8f31dd1b8e96c --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderStoreScopeTreeSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderStoreScopeTreeSection"> + <element name="storeTree" type="text" selector="div.tree-store-scope"/> + <element name="storeOption" type="radio" selector="//div[contains(@class, 'tree-store-scope')]//label[contains(text(), '{{name}}')]/preceding-sibling::input" parameterized="true" timeout="30"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderTotalSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml similarity index 82% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderTotalSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml index 2434bfaea2638..5d60886a96a51 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderTotalSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrderTotalSection"> <element name="subTotal" type="text" selector=".order-subtotal-table tbody tr.col-0>td span.price"/> <element name="grandTotal" type="text" selector=".order-subtotal-table tfoot tr.col-0>td span.price"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrdersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrdersGridSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml index ccf477b1e523c..aa744787b0fef 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrdersGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminOrdersGridSection"> <element name="spinner" type="button" selector=".spinner"/> <element name="gridLoadingMask" type="button" selector=".admin__data-grid-loading-mask"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/OrdersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/OrdersGridSection.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/OrdersGridSection.xml rename to app/code/Magento/Sales/Test/Mftf/Section/OrdersGridSection.xml index 763f1e20a8d0e..f54fbf4cf4d53 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/OrdersGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/OrdersGridSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="OrdersGridSection"> <element name="spinner" type="button" selector=".spinner"/> <element name="gridLoadingMask" type="button" selector=".admin__data-grid-loading-mask"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Test/AdminCreateInvoiceTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Test/AdminCreateInvoiceTest.xml rename to app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml index 70bf457b11567..317a325693c65 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Test/AdminCreateInvoiceTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateInvoiceTest"> <annotations> <features value="Sales"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml new file mode 100644 index 0000000000000..23e4ae676b35b --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="AdminSubmitsOrderWithAndWithoutEmailTest"> + <annotations> + <title value="Email is required to create an order from Admin Panel"/> + <description value="Admin should not be able to submit orders without an email address"/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-92980"/> + <group value="sales"/> + + </annotations> + <before> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + </before> + <after> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + </after> + <!--Create order via Admin--> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <comment userInput="Admin creates order" stepKey="adminCreateOrderComment"/> + <!--<actionGroup ref="navigateToNewOrderPageNewCustomer" stepKey="navigateToNewOrderPage"/>--> + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/> + <waitForPageLoad stepKey="waitForIndexPageLoad"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/> + <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/> + <click selector="{{AdminOrderFormActionSection.CreateNewCustomer}}" stepKey="clickCreateCustomer"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/> + + <!--Check if order can be submitted without the required fields including email address--> + <actionGroup ref="checkRequiredFieldsNewOrderForm" stepKey="checkRequiredFieldsNewOrder" after="seeNewOrderPageTitle"/> + <scrollToTopOfPage stepKey="scrollToTopOfOrderFormPage" after="checkRequiredFieldsNewOrder"/> + <actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToOrder" after="scrollToTopOfOrderFormPage"> + <argument name="product" value="_defaultProduct"/> + </actionGroup> + + <!--Fill customer group and customer email--> + <selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectCustomerGroup" after="addSimpleProductToOrder"/> + <fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail" after="selectCustomerGroup"/> + + <!--Fill customer address information--> + <actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress" after="fillCustomerEmail"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="address" value="US_Address_TX"/> + </actionGroup> + <!-- Select shipping --> + <actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping" after="fillCustomerAddress"/> + + <!--Verify totals on Order page--> + <see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleProduct.subtotal}}" stepKey="seeOrderSubTotal" after="selectFlatRateShipping"/> + <see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="${{AdminOrderSimpleProduct.shipping}}" stepKey="seeOrderShipping" after="seeOrderSubTotal"/> + <scrollTo selector="{{AdminOrderFormTotalSection.grandTotal}}" stepKey="scrollToOrderGrandTotal"/> + <see selector="{{AdminOrderFormTotalSection.grandTotal}}" userInput="${{AdminOrderSimpleProduct.grandTotal}}" stepKey="seeCorrectGrandTotal" after="scrollToOrderGrandTotal"/> + + <!--Submit Order and verify information--> + <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="clickSubmitOrder" after="seeCorrectGrandTotal"/> + <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPage" after="clickSubmitOrder"/> + <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the order." stepKey="seeSuccessMessage" after="seeViewOrderPage"/> + </test> + </tests> \ No newline at end of file diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml new file mode 100644 index 0000000000000..2ff3d7756fe36 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="CreditMemoTotalAfterShippingDiscountTest"> + <annotations> + <features value="Credit memo"/> + <title value="Verify credit memo grand total after shipping discount is applied via Cart Price Rule"/> + <description value="Verify credit memo grand total after shipping discount is applied via Cart Price Rule"/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-92924"/> + <group value="sales"/> + </annotations> + <before> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="_defaultProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="SetTaxClassForShipping" stepKey="setShippingTaxClass"/> + </before> + <after> + <actionGroup ref="ResetTaxClassForShipping" stepKey="resetTaxClassForShipping"/> + <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteSalesRule"> + <argument name="ruleName" value="{{ApiSalesRule.name}}"/> + </actionGroup> + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="createCategory" stepKey="deleteProduct1"/> + <deleteData createDataKey="createProduct" stepKey="deleteCategory1"/> + </after> + + <!-- Create a cart price rule for $10 Fixed amount discount --> + <amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceList"/> + <waitForPageLoad stepKey="waitForRulesPage"/> + <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> + <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{ApiSalesRule.name}}" stepKey="fillRuleName"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsite"/> + <actionGroup ref="selectNotLoggedInCustomerGroup" stepKey="chooseNotLoggedInCustomerGroup"/> + <!--<selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="NOT LOGGED IN" stepKey="selectCustomerGroup"/>--> + + <!-- Open the Actions Tab in the Rules Edit page --> + <click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/> + <waitForElementVisible selector="{{AdminCartPriceRulesFormSection.applyDiscountToShippingLabel}}" stepKey="waitForElementToBeVisible"/> + <click selector="{{AdminCartPriceRulesFormSection.applyDiscountToShippingLabel}}" stepKey="enableApplyDiscountToShiping"/> + <seeCheckboxIsChecked selector="{{AdminCartPriceRulesFormSection.applyDiscountToShipping}}" stepKey="DiscountIsAppliedToShiping"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Fixed amount discount" stepKey="selectActionType"/> + <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="10" stepKey="fillDiscountAmount"/> + + <!--<scrollTo selector="{{AdminCartPriceRulesFormSection.applyDiscountToShippingLabel}}" stepKey="scrollToShippingLabel"/>--> + <!--<click selector="{{AdminCartPriceRulesFormSection.applyDiscountToShippingLabel}}" stepKey="enableApplyDiscountToShiping"/>--> + <!--<seeCheckboxIsChecked selector="{{AdminCartPriceRulesFormSection.applyDiscountToShipping}}" stepKey="DiscountIsAppliedToShiping"/>--> + <click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/> + <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + + <!-- Place an order from Storefront as a Guest --> + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/> + <waitForPageLoad stepKey="waitForPageLoad1"/> + <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverOverProduct"/> + <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/> + <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductToAdd"/> + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/> + <click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForPageLoad2"/> + <!-- fill out customer information --> + <fillField selector="{{CheckoutShippingGuestInfoSection.email}}" userInput="{{CustomerEntityOne.email}}" stepKey="enterEmail"/> + <fillField selector="{{CheckoutShippingGuestInfoSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="enterFirstName"/> + <fillField selector="{{CheckoutShippingGuestInfoSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="enterLastName"/> + <fillField selector="{{CheckoutShippingGuestInfoSection.street}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="enterStreet"/> + <fillField selector="{{CheckoutShippingGuestInfoSection.city}}" userInput="{{CustomerAddressSimple.city}}" stepKey="enterCity"/> + <selectOption selector="{{CheckoutShippingGuestInfoSection.region}}" userInput="{{CustomerAddressSimple.state}}" stepKey="selectRegion"/> + <fillField selector="{{CheckoutShippingGuestInfoSection.postcode}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="enterPostcode"/> + <fillField selector="{{CheckoutShippingGuestInfoSection.telephone}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="enterTelephone"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> + + <!-- Choose Shippping - Flat Rate Shipping --> + <click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/> + <waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/> + <click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/> + <waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/> + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/> + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> + + <!-- Search for Order in the order grid --> + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/> + <waitForPageLoad time="30" stepKey="waitForOrderListPageLoad"/> + <conditionalClick selector="{{AdminOrdersGridSection.clearFilters}}" dependentSelector="{{AdminOrdersGridSection.clearFilters}}" visible="true" stepKey="clearExistingOrderFilter"/> + <fillField selector="{{AdminOrdersGridSection.search}}" userInput="{$grabOrderNumber}" stepKey="searchOrderNum"/> + <click selector="{{AdminOrdersGridSection.submitSearch}}" stepKey="submitSearch"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask4"/> + + <!-- Create invoice --> + <click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/> + <click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/> + + <!-- Verify Invoice Totals including subTotal Shipping Discount and GrandTotal --> + <see selector="{{AdminInvoiceTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleProduct.subtotal}}" stepKey="seeInvoiceSubTotal"/> + <comment userInput="Shipping and Handling" stepKey="commentViewShippingAndHandling" after="seeInvoiceSubTotal"/> + <see selector="{{AdminInvoiceTotalSection.total('Shipping')}}" userInput="${{AdminOrderSimpleProduct.shipping}}" stepKey="seeShippingAndHandling"/> + <scrollTo selector="{{AdminInvoiceTotalSection.total('Shipping')}}" stepKey="scrollToInvoiceTotals"/> + <grabTextFrom selector="{{AdminInvoiceTotalSection.total('Shipping')}}" stepKey="grabShippingCost"/> + <assertEquals expected='$5.00' expectedType="string" actual="($grabShippingCost)" message="ExpectedShipping" stepKey="assertShippingAndHandling"/> + + <see selector="{{AdminInvoiceTotalSection.total('Discount')}}" userInput="-$15.00" stepKey="seeShippingAndHandling2"/> + <grabTextFrom selector="{{AdminInvoiceTotalSection.total('Discount')}}" stepKey="grabInvoiceDiscount"/> + <assertEquals expected='-$15.00' expectedType="string" actual="($grabInvoiceDiscount)" message="ExpectedDiscount" stepKey="assertDiscountValue"/> + + <see selector="{{AdminInvoiceTotalSection.grandTotal}}" userInput="$113.00" stepKey="seeCorrectGrandTotal"/> + <grabTextFrom selector="{{AdminInvoiceTotalSection.grandTotal}}" stepKey="grabInvoiceGrandTotal" after="seeCorrectGrandTotal"/> + + <click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/> + <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage1"/> + + <!--Create Credit Memo--> + <comment userInput="Admin creates credit memo" stepKey="createCreditMemoComment"/> + <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreateCreditMemo" after="createCreditMemoComment"/> + <seeInCurrentUrl url="{{AdminCreditMemoNewPage.url}}" stepKey="seeNewCreditMemoPage" after="clickCreateCreditMemo"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoInPageTitle" after="seeNewCreditMemoPage"/> + + <!-- Verify Refund Totals --> + <see selector="{{AdminCreditMemoTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleProduct.subtotal}}" stepKey="seeRefundSubTotal"/> + <grabTextFrom selector="{{AdminCreditMemoTotalSection.total('Discount')}}" stepKey="grabRefundDiscountValue"/> + <assertEquals expected='-$15.00' expectedType="string" actual="($grabRefundDiscountValue)" message="notExpectedDiscountOnRefundPage" stepKey="assertDiscountValue1"/> + <grabTextFrom selector="{{AdminInvoiceTotalSection.grandTotal}}" stepKey="grabRefundGrandTotal"/> + <assertEquals expected="($grabInvoiceGrandTotal)" actual="($grabRefundGrandTotal)" message="RefundGrandTotalMatchesWithInvoiceGrandTotal" stepKey="compareRefundGrandTotalAndInvoiceGrandTotal"/> + </test> +</tests> + diff --git a/app/code/Magento/Sales/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/EndToEndB2CAdminTest.xml new file mode 100644 index 0000000000000..4dc3c7a6ae788 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/EndToEndB2CAdminTest.xml @@ -0,0 +1,281 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CAdminTest"> + <before> + <!--Create order via API--> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="_defaultProduct" stepKey="createSimpleProductApi"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="GuestCart" stepKey="createGuestCart"/> + <createData entity="SimpleCartItem" stepKey="addCartItem"> + <requiredEntity createDataKey="createGuestCart"/> + <requiredEntity createDataKey="createSimpleProductApi"/> + </createData> + <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddress"> + <requiredEntity createDataKey="createGuestCart"/> + </createData> + <updateData createDataKey="createGuestCart" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformation"> + <requiredEntity createDataKey="createGuestCart"/> + </updateData> + <!--END Create order via API--> + </before> + + <!--Prerequisites--> + <!--Create store view to ensure multiple store views--> + <comment userInput="Create prerequisite store view" stepKey="createStoreViewComment" before="createStoreView"/> + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView" before="navigateToNewOrderPage"/> + + <!--Admin creates order--> + <comment userInput="Admin creates order" stepKey="adminCreateOrderComment" before="navigateToNewOrderPage"/> + <actionGroup ref="navigateToNewOrderPageNewCustomer" stepKey="navigateToNewOrderPage" after="deleteCategory"/> + + <actionGroup ref="checkRequiredFieldsNewOrderForm" stepKey="checkRequiredFieldsNewOrder" after="navigateToNewOrderPage"/> + <scrollToTopOfPage stepKey="scrollToTopOfOrderFormPage" after="checkRequiredFieldsNewOrder"/> + <actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToOrder" after="scrollToTopOfOrderFormPage"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="addConfigurableProductToOrder" stepKey="addConfigurableProductToOrder" after="addSimpleProductToOrder"> + <argument name="product" value="BaseConfigurableProduct"/> + <argument name="attribute" value="colorProductAttribute"/> + <argument name="option" value="colorProductAttribute1"/> + </actionGroup> + + <!--Fill customer group information--> + <selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectGroup" after="addConfigurableProductToOrder"/> + <fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillEmail" after="selectGroup"/> + + <!--Fill customer address information--> + <actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress" after="fillEmail"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="address" value="US_Address_TX"/> + </actionGroup> + + <actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping" after="fillCustomerAddress"/> + + <!--Verify totals on Order page--> + <see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleConfigurableProduct.subtotal}}" stepKey="seeOrderSubTotal" after="selectFlatRateShipping"/> + <see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="${{AdminOrderSimpleConfigurableProduct.shipping}}" stepKey="seeOrderShipping" after="seeOrderSubTotal"/> + <see selector="{{AdminOrderFormTotalSection.grandTotal}}" userInput="${{AdminOrderSimpleConfigurableProduct.grandTotal}}" stepKey="seeCorrectGrandTotal" after="seeOrderShipping"/> + + <!--Submit Order and verify information--> + <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="clickSubmitOrder" after="seeCorrectGrandTotal"/> + <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPage" after="clickSubmitOrder"/> + + <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the order." stepKey="seeSuccessMessage" after="seeViewOrderPage"/> + <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="seeOrderPendingStatus" after="seeSuccessMessage"/> + <grabTextFrom selector="|Order # (\d+)|" stepKey="getOrderId" after="seeOrderPendingStatus"/> + <assertNotEmpty actual="$getOrderId" stepKey="assertOrderIdIsNotEmpty" after="getOrderId"/> + <actionGroup ref="verifyBasicOrderInformation" stepKey="verifyOrderInformation" after="assertOrderIdIsNotEmpty"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="shippingAddress" value="US_Address_TX"/> + <argument name="billingAddress" value="US_Address_TX"/> + </actionGroup> + <actionGroup ref="seeProductInItemsOrdered" stepKey="seeSimpleProductInItemsOrdered" after="verifyOrderInformation"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="seeProductInItemsOrdered" stepKey="seeConfigurableProductInItemsOrdered" after="seeSimpleProductInItemsOrdered"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + + <!--Create order invoice--> + <comment userInput="Admin creates invoice for order" stepKey="adminCreateInvoiceComment" before="closeAdminNotificationInvoice"/> + <closeAdminNotification stepKey="closeAdminNotificationInvoice" after="seeConfigurableProductInItemsOrdered"/> + <click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceAction" after="closeAdminNotificationInvoice"/> + <seeInCurrentUrl url="{{AdminInvoiceNewPage.url}}" stepKey="seeOrderInvoiceUrl" after="clickInvoiceAction"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seePageNameNewInvoicePage" after="seeOrderInvoiceUrl"/> + + <!--Check Invoice Data--> + <see selector="{{AdminInvoiceOrderInformationSection.orderStatus}}" userInput="Pending" stepKey="seeOrderPendingInvoice" after="seePageNameNewInvoicePage"/> + <actionGroup ref="verifyBasicInvoiceInformation" stepKey="verifyOrderInvoiceInformation" after="seeOrderPendingInvoice"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="shippingAddress" value="US_Address_TX"/> + <argument name="billingAddress" value="US_Address_TX"/> + </actionGroup> + <see selector="{{AdminInvoicePaymentShippingSection.ShippingMethod}}" userInput="{{DefaultFlatRateMethod.title}}" stepKey="seeShippingMethod" after="verifyOrderInvoiceInformation"/> + <see selector="{{AdminInvoicePaymentShippingSection.ShippingPrice}}" userInput="${{AdminOrderSimpleConfigurableProduct.shipping}}" stepKey="seeShippingCost" after="seeShippingMethod"/> + <!--Submit Invoice--> + <click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice" after="seeShippingCost"/> + <!--Invoice created successfully--> + <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPageInvoice" after="clickSubmitInvoice"/> + <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeInvoiceCreateSuccess" after="seeViewOrderPageInvoice"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="$getOrderId" stepKey="seePageNameMatchesOrderIdAfterInvoice" after="seeInvoiceCreateSuccess"/> + + <click selector="{{AdminOrderDetailsOrderViewSection.invoices}}" stepKey="clickOrderInvoicesTab" after="seePageNameMatchesOrderIdAfterInvoice"/> + <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask" after="clickOrderInvoicesTab"/> + <see selector="{{AdminOrderInvoicesTabSection.gridRow('1')}}" userInput="{{Simple_US_Customer.firstname}}" stepKey="seeOrderInvoiceInTabGrid" after="waitForInvoiceGridLoadingMask"/> + <click selector="{{AdminOrderInvoicesTabSection.viewGridRow('1')}}" stepKey="clickToViewInvoiceRow" after="seeOrderInvoiceInTabGrid"/> + <see selector="{{AdminInvoiceOrderInformationSection.orderId}}" userInput="$getOrderId" stepKey="seeOrderIdOnInvoice" after="clickToViewInvoiceRow"/> + <actionGroup ref="verifyBasicInvoiceInformation" stepKey="verifyBasicInvoiceInformation" after="seeOrderIdOnInvoice"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="shippingAddress" value="US_Address_TX"/> + <argument name="billingAddress" value="US_Address_TX"/> + </actionGroup> + <actionGroup ref="seeProductInInvoiceItems" stepKey="seeSimpleProductInInvoice" after="verifyBasicInvoiceInformation"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="seeProductInInvoiceItems" stepKey="seeConfigurableProductInInvoice" after="seeSimpleProductInInvoice"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + <click selector="{{AdminInvoiceOrderInformationSection.orderId}}" stepKey="clickOrderIdLinkOnInvoice" after="seeConfigurableProductInInvoice"/> + + <!--Create Credit Memo--> + <comment userInput="Admin creates credit memo" stepKey="createCreditMemoComment" after="clickOrderIdOnShipment"/> + <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreateCreditMemo" after="createCreditMemoComment"/> + <seeInCurrentUrl url="{{AdminCreditMemoNewPage.url}}" stepKey="seeNewCreditMemoPage" after="clickCreateCreditMemo"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoInPageTitle" after="seeNewCreditMemoPage"/> + <!--Check Credit Memo Order Data--> + <actionGroup ref="verifyBasicCreditMemoInformation" stepKey="verifyOrderCreditMemoInformation" after="seeNewMemoInPageTitle"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="shippingAddress" value="US_Address_TX"/> + <argument name="billingAddress" value="US_Address_TX"/> + </actionGroup> + <!--Submit credit memo--> + <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline" after="verifyOrderCreditMemoInformation"/> + <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the credit memo." stepKey="seeCreditMemoSuccess" after="clickRefundOffline"/> + <click selector="{{AdminOrderDetailsOrderViewSection.creditMemos}}" stepKey="clickOrderCreditMemosTab" after="seeCreditMemoSuccess"/> + <waitForLoadingMaskToDisappear stepKey="waitForCreditMemoTabLoadingMask" after="clickOrderCreditMemosTab"/> + <see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" userInput="{{Simple_US_Customer.firstname}}" stepKey="seeOrderCreditMemoInTabGrid" after="waitForCreditMemoTabLoadingMask"/> + <click selector="{{AdminOrderCreditMemosTabSection.viewGridRow('1')}}" stepKey="clickToViewCreditMemoRow" after="seeOrderCreditMemoInTabGrid"/> + <waitForPageLoad stepKey="waitForCreditMemoPageLoad" after="clickToViewCreditMemoRow"/> + <see selector="{{AdminCreditMemoOrderInformationSection.orderId}}" userInput="$getOrderId" stepKey="seeOrderIdOnCreditMemo" after="waitForCreditMemoPageLoad"/> + <actionGroup ref="verifyBasicCreditMemoInformation" stepKey="verifyBasicCreditMemoInformation" after="seeOrderIdOnCreditMemo"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="shippingAddress" value="US_Address_TX"/> + <argument name="billingAddress" value="US_Address_TX"/> + </actionGroup> + <actionGroup ref="seeProductInItemsRefunded" stepKey="seeSimpleProductInItemsRefunded" after="verifyBasicCreditMemoInformation"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="seeProductInItemsRefunded" stepKey="seeConfigurableProductInItemsRefunded" after="seeSimpleProductInItemsRefunded"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + <scrollToTopOfPage stepKey="scrollToTopOfCreditMemo" after="seeConfigurableProductInItemsRefunded"/> + <click selector="{{AdminCreditMemoOrderInformationSection.orderId}}" stepKey="clickOrderIdLinkOnCreditMemo" after="scrollToTopOfCreditMemo"/> + + <!--Admin uses order grid--> + <comment userInput="Admin uses order grid" stepKey="adminUseOrderGridComment" before="navigateToOrderGridPage"/> + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderGridPage" after="clickOrderIdLinkOnCreditMemo"/> + <waitForPageLoad time="60" stepKey="waitForLoadUseOrderGrid" after="navigateToOrderGridPage"/> + <waitForLoadingMaskToDisappear stepKey="waitForOrderGridPageLoad" after="waitForLoadUseOrderGrid"/> + + <!--Search order grid by name--> + <comment userInput="Admin searches order grid by name" stepKey="searchOrderGridComment" after="waitForOrderGridPageLoad"/> + <actionGroup ref="resetAdminDataGridToDefaultView" stepKey="setOrderGridToDefaultViewForSearch" after="searchOrderGridComment"/> + <!--@TODO use "Ship-to Name" when MQE-794 is fixed--> + <see selector="{{AdminDataGridTableSection.column('Ship')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="seeNonFilterNameInShipNameColumn" after="setOrderGridToDefaultViewForSearch"/> + <actionGroup ref="searchAdminDataGridByKeyword" stepKey="searchOrderGridByNameKeyword" after="seeNonFilterNameInShipNameColumn"> + <argument name="keyword" value="BillingAddressTX.fullname"/> + </actionGroup> + <dontSee selector="{{AdminDataGridTableSection.column('Ship')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="dontSeeNonFilterNameInShipNameColumn" after="searchOrderGridByNameKeyword"/> + <see selector="{{AdminDataGridTableSection.column('Ship')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="seeFilterNameInShipNameColumn" after="dontSeeNonFilterNameInShipNameColumn"/> + + <!--Filter order grid--> + <comment userInput="Admin filters order grid by 'Bill-to Name'" stepKey="filterOrderGridByNameComment" after="seeFilterNameInShipNameColumn"/> + <!--Filter order grid by "Bill-to Name"--> + <actionGroup ref="resetAdminDataGridToDefaultView" stepKey="resetOrderGridForNameFilter" after="filterOrderGridByNameComment"/> + <!--@TODO use "Bill-to Name" when MQE-794 is fixed--> + <see selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="seeNonFilterNameInColumn" after="resetOrderGridForNameFilter"/> + <actionGroup ref="filterOrderGridByBillingName" stepKey="filterOrderGridByBillingName" after="seeNonFilterNameInColumn"> + <argument name="customer" value="Simple_US_Customer"/> + </actionGroup> + <dontSee selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="dontSeeNonFilterNameInColumn" after="filterOrderGridByBillingName"/> + <see selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="seeFilterNameInColumn" after="dontSeeNonFilterNameInColumn"/> + <!--Filter order grid by Grand Total (Base)--> + <comment userInput="Admin filters order grid by 'Grand Total'" stepKey="filterOrderGridByTotalComment" after="seeFilterNameInColumn"/> + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilterBeforeTotalFilter" after="filterOrderGridByTotalComment"/> + <see selector="{{AdminDataGridTableSection.column('Grand Total')}}" userInput="{{AdminOrderSimpleProduct.grandTotal}}" stepKey="seeLowerTotalInGrid" after="clearFilterBeforeTotalFilter"/> + <actionGroup ref="filterOrderGridByBaseTotalRange" stepKey="filterOrderGridByTotal" after="seeLowerTotalInGrid"> + <argument name="from" value="OrderGrandTotalFilterRange.from"/> + <argument name="to" value="OrderGrandTotalFilterRange.to"/> + </actionGroup> + <dontSee selector="{{AdminDataGridTableSection.column('Grand Total')}}" userInput="{{AdminOrderSimpleProduct.grandTotal}}" stepKey="dontSeeLowerTotalInGrid" after="filterOrderGridByTotal"/> + <see selector="{{AdminDataGridTableSection.column('Grand Total')}}" userInput="{{AdminOrderSimpleConfigurableProduct.grandTotal}}" stepKey="seeExpectedTotalInGrid" after="dontSeeLowerTotalInGrid"/> + <!--Filter order grid by purchase date--> + <comment userInput="Admin filters order grid by 'Purchase Date'" stepKey="filterOrderGridByDateComment" after="seeExpectedTotalInGrid"/> + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilterBeforeOrderDateFilter" after="filterOrderGridByDateComment"/> + <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openOrderFilterForOrderDateFrom" after="clearFilterBeforeOrderDateFilter"/> + <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[from]')}}" userInput="01/01/2018" stepKey="fillOrderDateFromFilter" after="openOrderFilterForOrderDateFrom"/> + <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="applyFilterOrderDateFrom" after="fillOrderDateFromFilter"/> + <!--Both of our orders should be in grid--> + <see selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="seeFirstOrderInGrid" after="applyFilterOrderDateFrom"/> + <see selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="seeSecondOrderInGrid" after="seeFirstOrderInGrid"/> + <!--Add end date to date range filter (past date)--> + <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openOrderFilterForOrderDateTo" after="seeSecondOrderInGrid"/> + <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[to]')}}" userInput="01/10/2018" stepKey="fillOrderDateToFilter" after="openOrderFilterForOrderDateTo"/> + <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="applyFilterOrderDateTo" after="fillOrderDateToFilter"/> + <!--Dont see our orders in the grid--> + <dontSee selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="dontSeeFirstOrderInGrid" after="applyFilterOrderDateTo"/> + <dontSee selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="dontSeeSecondOrderInGrid" after="dontSeeFirstOrderInGrid"/> + <!--Filter order grid by status--> + <comment userInput="Admin filters order grid by 'Status'" stepKey="filterOrderGridByStatusComment" after="dontSeeSecondOrderInGrid"/> + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilterBeforeStatusFilter" after="filterOrderGridByStatusComment"/> + <actionGroup ref="filterOrderGridByStatus" stepKey="filterOrderGridByPendingStatus" after="clearFilterBeforeStatusFilter"> + <argument name="status" value="OrderStatus.pending"/> + </actionGroup> + <dontSee selector="{{AdminDataGridTableSection.column('Status')}}" userInput="{{OrderStatus.closed}}" stepKey="dontSeeClosedStatusInOrderGrid" after="filterOrderGridByPendingStatus"/> + <see selector="{{AdminDataGridTableSection.column('Status')}}" userInput="{{OrderStatus.pending}}" stepKey="seePendingStatusInOrderGrid" after="dontSeeClosedStatusInOrderGrid"/> + <actionGroup ref="filterOrderGridByStatus" stepKey="filterOrderGridByClosedStatus" after="seePendingStatusInOrderGrid"> + <argument name="status" value="OrderStatus.closed"/> + </actionGroup> + <see selector="{{AdminDataGridTableSection.column('Status')}}" userInput="{{OrderStatus.closed}}" stepKey="seeClosedStatusInOrderGrid" after="filterOrderGridByClosedStatus"/> + <dontSee selector="{{AdminDataGridTableSection.column('Status')}}" userInput="{{OrderStatus.pending}}" stepKey="dontSeePendingStatusInOrderGrid" after="seeClosedStatusInOrderGrid"/> + + <!--Sort order grid--> + <actionGroup ref="resetAdminDataGridToDefaultView" stepKey="resetOrderGridForSorting" after="dontSeePendingStatusInOrderGrid"/> + <!--Sort order grid by status--> + <comment userInput="Admin sorts order grid by status" stepKey="sortOrderGridByStatusComment" after="resetOrderGridForSorting"/> + <click selector="{{AdminDataGridTableSection.columnHeader('Status')}}" stepKey="clickStatusToSortAsc" after="sortOrderGridByStatusComment"/> + <grabTextFrom selector="{{AdminDataGridTableSection.gridCell('1', 'Status')}}" stepKey="getOrderStatusFirstRow" after="clickStatusToSortAsc"/> + <grabTextFrom selector="{{AdminDataGridTableSection.gridCell('2', 'Status')}}" stepKey="getOrderStatusSecondRow" after="getOrderStatusFirstRow"/> + <assertGreaterThanOrEqual expected="$getOrderStatusFirstRow" actual="$getOrderStatusSecondRow" stepKey="checkStatusSortOrderAsc" after="getOrderStatusSecondRow"/> + <!--@TODO improve sort assertion and check price and date column when MQE-690 is resolved--> + + <!--Use paging on order grid--> + <actionGroup ref="resetAdminDataGridToDefaultView" stepKey="resetAdminGridBeforePaging" after="checkStatusSortOrderAsc"/> + <comment userInput="Admin uses paging on order grid" stepKey="usePagingOrderGridComment" after="resetAdminGridBeforePaging"/> + <actionGroup ref="adminDataGridSelectCustomPerPage" stepKey="select1OrderPerPage" after="usePagingOrderGridComment"> + <!--@TODO Change this to scalar when MQE-498 is implemented--> + <argument name="perPage" value="Const.one"/> + </actionGroup> + <seeNumberOfElements selector="{{AdminDataGridTableSection.rows}}" userInput="1" stepKey="see1RowOnFirstPage" after="select1OrderPerPage"/> + <seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="1" stepKey="seeOnFirstPageOrderGrid" after="see1RowOnFirstPage"/> + <click selector="{{AdminDataGridPaginationSection.nextPage}}" stepKey="clickNextPageOrderGrid" after="seeOnFirstPageOrderGrid"/> + <seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="2" stepKey="seeOnSecondPageOrderGrid" after="clickNextPageOrderGrid"/> + <seeNumberOfElements selector="{{AdminDataGridTableSection.rows}}" userInput="1" stepKey="see1RowOnSecondPage" after="seeOnSecondPageOrderGrid"/> + <actionGroup ref="adminDataGridSelectPerPage" stepKey="select50OrdersPerPage" after="see1RowOnSecondPage"> + <!--@TODO Change this to scalar when MQE-498 is implemented--> + <argument name="perPage" value="Const.fifty"/> + </actionGroup> + <seeNumberOfElements selector="{{AdminDataGridTableSection.rows}}" parameterArray="[2,50]" stepKey="seeCorrectNumberOfRowsPerPage" after="select50OrdersPerPage"/> + + <!--Add column to order grid--> + <!--@TODO Change to action group when MQE-498 is implemented--> + <comment userInput="Admin adds column to order grid" stepKey="adminAddsColumnOrderGrid" after="seeCorrectNumberOfRowsPerPage"/> + <dontSeeElement selector="{{AdminDataGridTableSection.columnHeader('Customer Email')}}" stepKey="dontSeeCustomerEmailColumnInGrid" after="adminAddsColumnOrderGrid"/> + <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="openOrderGridColumnOptions" after="dontSeeCustomerEmailColumnInGrid"/> + <checkOption selector="{{AdminDataGridHeaderSection.columnCheckbox('Customer Email')}}" stepKey="addCustomerEmailColumnToOrderGrid" after="openOrderGridColumnOptions"/> + <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="closeOrderGridColumnOptions" after="addCustomerEmailColumnToOrderGrid"/> + <seeElement selector="{{AdminDataGridTableSection.columnHeader('Customer Email')}}" stepKey="seeCustomerEmailColumnInGrid" after="closeOrderGridColumnOptions"/> + <!--Remove column from order grid--> + <!--@TODO Change to action group when MQE-498 is implemented--> + <comment userInput="Admin removes column from order grid" stepKey="adminRemovesColumnOrderGrid" after="seeCustomerEmailColumnInGrid"/> + <seeElement selector="{{AdminDataGridTableSection.columnHeader('Purchase Point')}}" stepKey="seePurchasePointColumnInGrid" after="adminRemovesColumnOrderGrid"/> + <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="openOrderGridColumnOptionsPurchasePoint" after="seePurchasePointColumnInGrid"/> + <uncheckOption selector="{{AdminDataGridHeaderSection.columnCheckbox('Purchase Point')}}" stepKey="removePurchasePointColumnFromGrid" after="openOrderGridColumnOptionsPurchasePoint"/> + <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="closeOrderGridColumnOptionsPurchasePoint" after="removePurchasePointColumnFromGrid"/> + <dontSeeElement selector="{{AdminDataGridTableSection.columnHeader('Purchase Point')}}" stepKey="dontSeePurchasePointColumnInGrid" after="closeOrderGridColumnOptionsPurchasePoint"/> + <!--END admin uses order grid--> + + <!--Delete store view created as prerequisites--> + <comment userInput="Clean up store view" stepKey="cleanUpStoreView" before="deleteStoreView"/> + <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"/> + </test> +</tests> diff --git a/app/code/Magento/Sales/Test/Mftf/composer.json b/app/code/Magento/Sales/Test/Mftf/composer.json new file mode 100644 index 0000000000000..ac26bb1bf49f5 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/composer.json @@ -0,0 +1,43 @@ +{ + "name": "magento/functional-test-module-sales", + "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-authorization": "100.0.0-dev", + "magento/functional-test-module-backend": "100.0.0-dev", + "magento/functional-test-module-catalog": "100.0.0-dev", + "magento/functional-test-module-bundle": "100.0.0-dev", + "magento/functional-test-module-catalog-inventory": "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-directory": "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-payment": "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-sales-rule": "100.0.0-dev", + "magento/functional-test-module-sales-sequence": "100.0.0-dev", + "magento/functional-test-module-shipping": "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-theme": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev", + "magento/functional-test-module-widget": "100.0.0-dev", + "magento/functional-test-module-wishlist": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-sales-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Items/GridTest.php b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Items/GridTest.php index 9070fa1a2e7bd..271f6cb659d7e 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Items/GridTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Items/GridTest.php @@ -268,6 +268,9 @@ public function testGetItems() $this->assertEquals(true, $this->block->getQuote()->getIsSuperMode()); } + /** + * @return \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid + */ protected function getGrid() { /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid $grid */ diff --git a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebarTest.php b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebarTest.php index a52d8e1b7f9f9..7b94e769eff9a 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebarTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebarTest.php @@ -39,6 +39,9 @@ public function testGetItemQty($itemQty, $qty, $expectedValue) $this->assertEquals($expectedValue, $this->abstractSidebar->getItemQty($this->itemMock)); } + /** + * @return array + */ public function getItemQtyDataProvider() { return ['whenQtyIsset' => [2, 10, 10], 'whenQtyNotIsset' => [1, false, 1]]; diff --git a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Invoice/ViewTest.php b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Invoice/ViewTest.php index 773694897291c..8f94ea8982ddf 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Invoice/ViewTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Invoice/ViewTest.php @@ -54,6 +54,9 @@ public function testIsPaymentReview($canReviewPayment, $canFetchUpdate, $expecte $this->assertEquals($expectedResult, $testMethod->invoke($block)); } + /** + * @return array + */ public function isPaymentReviewDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php b/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php index 2a839dd018dba..492cfee5f5d83 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php @@ -70,10 +70,10 @@ protected function setUp() $this->quoteMock->expects($this->any()) ->method('getBillingAddress') - ->willreturn($this->billingAddressMock); + ->willReturn($this->billingAddressMock); $this->quoteMock->expects($this->any()) ->method('getShippingAddress') - ->willreturn($this->shippingAddressMock); + ->willReturn($this->shippingAddressMock); $this->sessionQuoteMock->expects($this->any())->method('getQuote')->willReturn($this->quoteMock); $this->totals = $this->helperManager->getObject( \Magento\Sales\Block\Adminhtml\Order\Create\Totals::class, @@ -88,7 +88,7 @@ public function testGetTotals($isVirtual) { $expected = 'expected'; $this->quoteMock->expects($this->at(1))->method('collectTotals'); - $this->quoteMock->expects($this->once())->method('isVirtual')->willreturn($isVirtual); + $this->quoteMock->expects($this->once())->method('isVirtual')->willReturn($isVirtual); if ($isVirtual) { $this->billingAddressMock->expects($this->once())->method('getTotals')->willReturn($expected); } else { diff --git a/app/code/Magento/Sales/Test/Unit/Block/Order/TotalsTest.php b/app/code/Magento/Sales/Test/Unit/Block/Order/TotalsTest.php index a8ce2ad4ff034..91b139772fb32 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Order/TotalsTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Order/TotalsTest.php @@ -53,6 +53,10 @@ public function testApplySortOrder() ); } + /** + * @param array $expected + * @param array $actual + */ private function assertEqualsSorted(array $expected, array $actual) { $this->assertEquals($expected, $actual, 'Array contents should be equal.'); diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ProcessDataTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ProcessDataTest.php index 85ed8b9470282..e818b1edbc1d7 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ProcessDataTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ProcessDataTest.php @@ -235,6 +235,9 @@ public function testExecute($noDiscount, $couponCode, $errorMessage, $actualCoup $this->assertInstanceOf(\Magento\Backend\Model\View\Result\Forward::class, $this->processData->execute()); } + /** + * @return array + */ public function isApplyDiscountDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php index 19cbec9d1a06b..d0d7e7efa97f7 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Download/DownloadCustomOptionTest.php @@ -216,6 +216,9 @@ public function testExecute($itemOptionValues, $productOptionValues, $noRouteOcc $this->objectMock->execute(); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Cron/CleanExpiredQuotesTest.php b/app/code/Magento/Sales/Test/Unit/Cron/CleanExpiredQuotesTest.php index fd20e0cb7d94a..e424cae85f223 100644 --- a/app/code/Magento/Sales/Test/Unit/Cron/CleanExpiredQuotesTest.php +++ b/app/code/Magento/Sales/Test/Unit/Cron/CleanExpiredQuotesTest.php @@ -70,6 +70,9 @@ public function testExecute($lifetimes, $additionalFilterFields) $this->observer->execute(); } + /** + * @return array + */ public function cleanExpiredQuotesDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/CustomerData/LastOrderedItemsTest.php b/app/code/Magento/Sales/Test/Unit/CustomerData/LastOrderedItemsTest.php index 035d6ff2727d8..17b3fdde47456 100644 --- a/app/code/Magento/Sales/Test/Unit/CustomerData/LastOrderedItemsTest.php +++ b/app/code/Magento/Sales/Test/Unit/CustomerData/LastOrderedItemsTest.php @@ -177,6 +177,9 @@ public function testGetSectionData() $this->assertEquals(['items' => [$expectedItem1, $expectedItem2]], $this->section->getSectionData()); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getLastOrderMock() { $customerId = 1; diff --git a/app/code/Magento/Sales/Test/Unit/Helper/AdminTest.php b/app/code/Magento/Sales/Test/Unit/Helper/AdminTest.php index 180cfca0bc3cb..389064b7274a7 100644 --- a/app/code/Magento/Sales/Test/Unit/Helper/AdminTest.php +++ b/app/code/Magento/Sales/Test/Unit/Helper/AdminTest.php @@ -198,6 +198,9 @@ public function testDisplayPriceAttribute( ); } + /** + * @return array + */ public function displayPricesDataProvider() { return [ @@ -310,6 +313,9 @@ public function testApplySalableProductTypesFilter($itemKey, $type, $calledTimes $this->adminHelper->applySalableProductTypesFilter($collectionMock); } + /** + * @return array + */ public function applySalableProductTypesFilterDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php b/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php index 014e0e28b49ee..02f855929d9d6 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php @@ -428,6 +428,9 @@ public function testCouldNotInvoiceException() ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/AddressTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/AddressTest.php index 73838379490fd..93eb56a07955c 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/AddressTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/AddressTest.php @@ -78,6 +78,9 @@ public function testGetRegionCodeRegionIsSet() $this->assertEquals('region', $this->address->getRegionCode()); } + /** + * @return array + */ public function regionProvider() { return [ [1, null], [null, 1]]; diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Item/Validation/CreateQuantityValidatorTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Item/Validation/CreateQuantityValidatorTest.php index c911af3044e5d..24a64c37a5e13 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Item/Validation/CreateQuantityValidatorTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Item/Validation/CreateQuantityValidatorTest.php @@ -97,6 +97,9 @@ public function testValidateCreditMemoProductItems($orderItemId, $expectedResult $this->assertEquals($expectedResult, $this->createQuantityValidator->validate($this->entity)); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/RefundOperationTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/RefundOperationTest.php index f917d69e69f79..9172a6f45bbcd 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/RefundOperationTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/RefundOperationTest.php @@ -364,6 +364,9 @@ public function baseAmountsDataProvider() ]; } + /** + * @param $amounts + */ private function setBaseAmounts($amounts) { foreach ($amounts as $amountName => $summands) { @@ -403,6 +406,9 @@ private function registerItems() ->willReturn([$item1, $item2, $item3]); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getCreditmemoItemMock() { return $this->getMockBuilder(\Magento\Sales\Api\Data\CreditmemoItemInterface::class) diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Total/DiscountTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Total/DiscountTest.php index 2531a26321d67..18efef38b204c 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Total/DiscountTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Total/DiscountTest.php @@ -48,7 +48,7 @@ protected function setUp() ]); $this->creditmemoMock = $this->createPartialMock(\Magento\Sales\Model\Order\Creditmemo::class, [ 'setBaseCost', 'getAllItems', 'getOrder', 'getBaseShippingAmount', 'roundPrice', - 'setDiscountAmount', 'setBaseDiscountAmount' + 'setDiscountAmount', 'setBaseDiscountAmount', 'getBaseShippingInclTax', 'getBaseShippingTaxAmount' ]); $this->creditmemoItemMock = $this->createPartialMock(\Magento\Sales\Model\Order\Creditmemo\Item::class, [ 'getHasChildren', 'getBaseCost', 'getQty', 'getOrderItem', 'setDiscountAmount', @@ -127,6 +127,82 @@ public function testCollect() $this->assertEquals($this->total, $this->total->collect($this->creditmemoMock)); } + public function testCollectNoBaseShippingAmount() + { + $this->creditmemoMock->expects($this->exactly(2)) + ->method('setDiscountAmount') + ->willReturnSelf(); + $this->creditmemoMock->expects($this->exactly(2)) + ->method('setBaseDiscountAmount') + ->willReturnSelf(); + $this->creditmemoMock->expects($this->once()) + ->method('getOrder') + ->willReturn($this->orderMock); + $this->creditmemoMock->expects($this->once()) + ->method('getBaseShippingAmount') + ->willReturn(0); + $this->creditmemoMock->expects($this->once()) + ->method('getBaseShippingInclTax') + ->willReturn(1); + $this->creditmemoMock->expects($this->once()) + ->method('getBaseShippingTaxAmount') + ->willReturn(0); + $this->orderMock->expects($this->once()) + ->method('getBaseShippingDiscountAmount') + ->willReturn(1); + $this->orderMock->expects($this->exactly(2)) + ->method('getBaseShippingAmount') + ->willReturn(1); + $this->orderMock->expects($this->once()) + ->method('getShippingAmount') + ->willReturn(1); + $this->creditmemoMock->expects($this->once()) + ->method('getAllItems') + ->willReturn([$this->creditmemoItemMock]); + $this->creditmemoItemMock->expects($this->atLeastOnce()) + ->method('getOrderItem') + ->willReturn($this->orderItemMock); + $this->orderItemMock->expects($this->once()) + ->method('isDummy') + ->willReturn(false); + $this->orderItemMock->expects($this->once()) + ->method('getDiscountInvoiced') + ->willReturn(1); + $this->orderItemMock->expects($this->once()) + ->method('getBaseDiscountInvoiced') + ->willReturn(1); + $this->orderItemMock->expects($this->once()) + ->method('getQtyInvoiced') + ->willReturn(1); + $this->orderItemMock->expects($this->once()) + ->method('getDiscountRefunded') + ->willReturn(1); + $this->orderItemMock->expects($this->once()) + ->method('getQtyRefunded') + ->willReturn(0); + $this->creditmemoItemMock->expects($this->once()) + ->method('isLast') + ->willReturn(false); + $this->creditmemoItemMock->expects($this->atLeastOnce()) + ->method('getQty') + ->willReturn(1); + $this->creditmemoItemMock->expects($this->exactly(1)) + ->method('setDiscountAmount') + ->willReturnSelf(); + $this->creditmemoItemMock->expects($this->exactly(1)) + ->method('setBaseDiscountAmount') + ->willReturnSelf(); + $this->creditmemoMock->expects($this->exactly(2)) + ->method('roundPrice') + ->willReturnMap( + [ + [1, 'regular', true, 1], + [1, 'base', true, 1] + ] + ); + $this->assertEquals($this->total, $this->total->collect($this->creditmemoMock)); + } + public function testCollectZeroShipping() { $this->creditmemoMock->expects($this->exactly(2)) diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php index 97dc973e63437..2297d6aa711cf 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/AbstractSenderTest.php @@ -120,6 +120,10 @@ public function stepMockSetup() $this->loggerMock = $this->createMock(\Psr\Log\LoggerInterface::class); } + /** + * @param $billingAddress + * @param bool $isVirtual + */ public function stepAddressFormat($billingAddress, $isVirtual = false) { $this->orderMock->expects($this->any()) @@ -145,6 +149,9 @@ public function stepSendWithCallSendCopyTo() $this->stepSend($this->never(), $this->once()); } + /** + * @param $identityMockClassName + */ public function stepIdentityContainerInit($identityMockClassName) { $this->identityContainerMock = $this->createPartialMock( @@ -156,9 +163,13 @@ public function stepIdentityContainerInit($identityMockClassName) ->will($this->returnValue($this->storeMock)); } + /** + * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendExpects + * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendCopyToExpects + */ protected function stepSend( - \PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendExpects, - \PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendCopyToExpects + \PHPUnit\Framework\MockObject\Matcher\InvokedCount $sendExpects, + \PHPUnit\Framework\MockObject\Matcher\InvokedCount $sendCopyToExpects ) { $senderMock = $this->createPartialMock(\Magento\Sales\Model\Order\Email\Sender::class, ['send', 'sendCopyTo']); $senderMock->expects($sendExpects) diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php index 14d6df5c1c8f1..f6051d0a7f172 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php @@ -156,6 +156,11 @@ public function testValidateNoInvoiceItems() ); } + /** + * @param $orderItemId + * @param $qty + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getInvoiceItemMock($orderItemId, $qty) { $invoiceItemMock = $this->getMockBuilder(\Magento\Sales\Api\Data\InvoiceItemInterface::class) @@ -167,6 +172,12 @@ private function getInvoiceItemMock($orderItemId, $qty) return $invoiceItemMock; } + /** + * @param $id + * @param $qtyToInvoice + * @param $isDummy + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getOrderItemMock($id, $qtyToInvoice, $isDummy) { $orderItemMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderItemInterface::class) diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceTest.php index 672b6aacc4084..01589fcd7fdb3 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceTest.php @@ -137,6 +137,9 @@ public function testDefaultCanVoid($canVoid) $this->assertEquals($canVoid, $this->model->canVoid()); } + /** + * @return array + */ public function canVoidDataProvider() { return [[true], [false]]; @@ -379,6 +382,9 @@ public function testPay( self::assertEquals($expectedTotal, $this->order->getTotalPaid()); } + /** + * @return array + */ public function payDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php index 39fffa23dc1ec..76bfd62a7b889 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/ItemTest.php @@ -140,6 +140,9 @@ public function testGetStatusId( $this->assertEquals($expectedStatus, $this->model->getStatusId()); } + /** + * @return array + */ public function getStatusIdDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php index 66ac821006266..d8c17cc2ace87 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php @@ -149,6 +149,10 @@ public function testGetList() $this->assertSame($this->collection, $this->repository->getList($this->searchCriteria)); } + /** + * @param bool $id + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function mockPayment($id = false) { $payment = $this->createMock(\Magento\Sales\Model\Order\Payment::class); diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/BuilderTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/BuilderTest.php index 1ea3aeedea51c..ea11604c53c45 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/BuilderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/BuilderTest.php @@ -257,6 +257,9 @@ protected function expectsIsPaymentTransactionClosed($isPaymentTransactionClosed ->willReturn($isPaymentTransactionClosed); } + /** + * @return array + */ public function createDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/ManagerTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/ManagerTest.php index 34b874c073a5a..13f6b9c607586 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/ManagerTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/ManagerTest.php @@ -155,6 +155,9 @@ public function generateTransactionIdDataProvider() ]; } + /** + * @return array + */ public function isTransactionExistsDataProvider() { return [ @@ -165,6 +168,9 @@ public function isTransactionExistsDataProvider() ]; } + /** + * @return array + */ public function getAuthorizationDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php index ee7e07873da51..30b584b8c4ebf 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php @@ -600,6 +600,9 @@ public function testAcceptApprovePaymentTrue() self::assertEquals($baseGrandTotal, $this->payment->getBaseAmountPaidOnline()); } + /** + * @return array + */ public function acceptPaymentFalseProvider() { return [ @@ -1532,6 +1535,9 @@ public function testRefund() static::assertEquals($amount, $this->payment->getData('base_amount_refunded')); } + /** + * @return array + */ public function boolProvider() { return [ @@ -1570,6 +1576,9 @@ public function testGetShouldCloseParentTransaction() static::assertFalse($this->payment->getShouldCloseParentTransaction()); } + /** + * @return object + */ protected function initPayment() { return (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))->getObject( @@ -1589,6 +1598,12 @@ protected function initPayment() ); } + /** + * @param $state + * @param null $status + * @param null $message + * @param null $isCustomerNotified + */ protected function assertOrderUpdated( $state, $status = null, @@ -1617,6 +1632,11 @@ protected function assertOrderUpdated( ->willReturn($statusHistory); } + /** + * @param $state + * @param $status + * @param array $allStatuses + */ protected function mockGetDefaultStatus($state, $status, $allStatuses = []) { /** @var \Magento\Sales\Model\Order\Config | \PHPUnit_Framework_MockObject_MockObject $orderConfigMock */ @@ -1642,6 +1662,10 @@ protected function mockGetDefaultStatus($state, $status, $allStatuses = []) ->will($this->returnValue($orderConfigMock)); } + /** + * @param $transactionId + * @return MockObject + */ protected function getTransactionMock($transactionId) { $transaction = $this->createPartialMock(\Magento\Sales\Model\Order\Payment\Transaction::class, [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/StatusResolverTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/StatusResolverTest.php index 28c29cd7a3bdf..57a4d5f40aa36 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/StatusResolverTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/StatusResolverTest.php @@ -27,6 +27,9 @@ public function testGetOrderStatusByState($order, $expectedReturn) self::assertEquals($expectedReturn, $actualReturn); } + /** + * @return array + */ public function statesDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php b/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php index fb1970638753f..7f6363346872c 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php @@ -845,6 +845,9 @@ protected function prepareItemMock($qtyInvoiced) ->will($this->returnValue($itemCollectionMock)); } + /** + * @return array + */ public function canVoidPaymentDataProvider() { $data = []; @@ -856,6 +859,9 @@ public function canVoidPaymentDataProvider() return $data; } + /** + * @return array + */ public function dataProviderActionFlag() { return [ @@ -1076,6 +1082,9 @@ public function testGetCreatedAtFormattedUsesCorrectLocale() $this->order->getCreatedAtFormatted(\IntlDateFormatter::SHORT); } + /** + * @return array + */ public function notInvoicingStatesProvider() { return [ @@ -1085,6 +1094,9 @@ public function notInvoicingStatesProvider() ]; } + /** + * @return array + */ public function canNotCreditMemoStatesProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Model/RefundInvoiceTest.php b/app/code/Magento/Sales/Test/Unit/Model/RefundInvoiceTest.php index 5a8c1032cd4fc..5148752e9831a 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/RefundInvoiceTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/RefundInvoiceTest.php @@ -463,6 +463,9 @@ public function testCouldNotCreditmemoException() ); } + /** + * @return array + */ public function dataProvider() { $creditmemoItemCreationMock = $this->getMockBuilder(CreditmemoItemCreationInterface::class) diff --git a/app/code/Magento/Sales/Test/Unit/Model/RefundOrderTest.php b/app/code/Magento/Sales/Test/Unit/Model/RefundOrderTest.php index 8bc3288af04cf..c95b56d81d6f4 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/RefundOrderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/RefundOrderTest.php @@ -407,6 +407,9 @@ public function testCouldNotCreditmemoException() ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Observer/Frontend/AddVatRequestParamsOrderCommentTest.php b/app/code/Magento/Sales/Test/Unit/Observer/Frontend/AddVatRequestParamsOrderCommentTest.php index 395b653b0be8d..45cbea7307f4d 100644 --- a/app/code/Magento/Sales/Test/Unit/Observer/Frontend/AddVatRequestParamsOrderCommentTest.php +++ b/app/code/Magento/Sales/Test/Unit/Observer/Frontend/AddVatRequestParamsOrderCommentTest.php @@ -84,6 +84,9 @@ public function testAddVatRequestParamsOrderComment( $this->assertNull($this->observer->execute($observer)); } + /** + * @return array + */ public function addVatRequestParamsOrderCommentDataProvider() { return [ diff --git a/app/code/Magento/Sales/Test/Unit/Observer/Frontend/RestoreCustomerGroupIdTest.php b/app/code/Magento/Sales/Test/Unit/Observer/Frontend/RestoreCustomerGroupIdTest.php index f0738fbcf3129..f0845c67f1a4a 100644 --- a/app/code/Magento/Sales/Test/Unit/Observer/Frontend/RestoreCustomerGroupIdTest.php +++ b/app/code/Magento/Sales/Test/Unit/Observer/Frontend/RestoreCustomerGroupIdTest.php @@ -72,6 +72,9 @@ public function testExecute($configAddressType) $this->quote->execute($observer); } + /** + * @return array + */ public function restoreCustomerGroupIdDataProvider() { return [ diff --git a/app/code/Magento/Sales/etc/di.xml b/app/code/Magento/Sales/etc/di.xml index 89799347fdda0..0f69389c2969e 100644 --- a/app/code/Magento/Sales/etc/di.xml +++ b/app/code/Magento/Sales/etc/di.xml @@ -120,6 +120,7 @@ <arguments> <argument name="providers" xsi:type="array"> <item name="default" xsi:type="string">Magento\Sales\Model\ResourceModel\Provider\UpdatedIdListProvider</item> + <item name="updated_at" xsi:type="string">Magento\Sales\Model\ResourceModel\Provider\UpdatedAtListProvider</item> </argument> </arguments> </type> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml index da37433758aeb..c69d453fb81d5 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml @@ -17,7 +17,7 @@ <?php foreach ($_methods as $_method) : $_code = $_method->getCode(); $_counter++; - ?> + ?> <dt class="admin__field-option"> <?php if ($_methodsCount > 1) : ?> <input id="p_method_<?= $block->escapeHtml($_code); ?>" diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml index b038c72199c7f..af7dfbc4e2ab3 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml @@ -6,14 +6,15 @@ // @codingStandardsIgnoreFile +$totals = $block->getTotals(); ?> -<?php if (sizeof($block->getTotals()) > 0): ?> +<?php if ($totals && count($totals) > 0): ?> <table class="items-to-invoice"> <tr> - <?php foreach ($block->getTotals() as $_total): ?> - <td <?php if ($_total['grand']): ?>class="grand-total"<?php endif; ?>> - <?= /* @escapeNotVerified */ $_total['label'] ?><br /> - <?= /* @escapeNotVerified */ $_total['value'] ?> + <?php foreach ($totals as $total): ?> + <td <?php if ($total['grand']): ?>class="grand-total"<?php endif; ?>> + <?= $block->escapeHtml($total['label']) ?><br /> + <?= $block->escapeHtml($total['value']) ?> </td> <?php endforeach; ?> </tr> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/LICENSE.txt b/app/code/Magento/SalesAnalytics/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/LICENSE.txt rename to app/code/Magento/SalesAnalytics/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/LICENSE_AFL.txt b/app/code/Magento/SalesAnalytics/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/LICENSE_AFL.txt rename to app/code/Magento/SalesAnalytics/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/SalesAnalytics/Test/Mftf/README.md b/app/code/Magento/SalesAnalytics/Test/Mftf/README.md new file mode 100644 index 0000000000000..00e1b136c5c26 --- /dev/null +++ b/app/code/Magento/SalesAnalytics/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Sales Analytics Functional Tests + +The Functional Test Module for **Magento Sales Analytics** module. diff --git a/app/code/Magento/SalesAnalytics/Test/Mftf/composer.json b/app/code/Magento/SalesAnalytics/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7382a7dcc8e5a --- /dev/null +++ b/app/code/Magento/SalesAnalytics/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-sales-analytics", + "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-sales": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/LICENSE.txt b/app/code/Magento/SalesInventory/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/LICENSE.txt rename to app/code/Magento/SalesInventory/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/LICENSE_AFL.txt b/app/code/Magento/SalesInventory/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/LICENSE_AFL.txt rename to app/code/Magento/SalesInventory/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/SalesInventory/Test/Mftf/README.md b/app/code/Magento/SalesInventory/Test/Mftf/README.md new file mode 100644 index 0000000000000..5d52679cbb173 --- /dev/null +++ b/app/code/Magento/SalesInventory/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Sales Inventory Functional Tests + +The Functional Test Module for **Magento Sales Inventory** module. diff --git a/app/code/Magento/SalesInventory/Test/Mftf/composer.json b/app/code/Magento/SalesInventory/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7a72dfc649780 --- /dev/null +++ b/app/code/Magento/SalesInventory/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-sales-inventory", + "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-inventory": "100.0.0-dev", + "magento/functional-test-module-sales": "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/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php b/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php index 3d811363156d7..32eb810c7a16a 100644 --- a/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php +++ b/app/code/Magento/SalesInventory/Test/Unit/Model/Order/ReturnValidatorTest.php @@ -121,6 +121,9 @@ public function testValidationWithWrongOrderItems() ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/SalesInventory/Test/Unit/Model/Plugin/Order/Validation/InvoiceRefundCreationArgumentsTest.php b/app/code/Magento/SalesInventory/Test/Unit/Model/Plugin/Order/Validation/InvoiceRefundCreationArgumentsTest.php index b0a1f70cb01f9..c80cae2150704 100644 --- a/app/code/Magento/SalesInventory/Test/Unit/Model/Plugin/Order/Validation/InvoiceRefundCreationArgumentsTest.php +++ b/app/code/Magento/SalesInventory/Test/Unit/Model/Plugin/Order/Validation/InvoiceRefundCreationArgumentsTest.php @@ -140,6 +140,9 @@ public function testAfterValidation($erroMessage) ); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/app/code/Magento/SalesInventory/Test/Unit/Observer/RefundOrderInventoryObserverTest.php b/app/code/Magento/SalesInventory/Test/Unit/Observer/RefundOrderInventoryObserverTest.php index c2e2d4710f96c..9cbc1ec1677d0 100644 --- a/app/code/Magento/SalesInventory/Test/Unit/Observer/RefundOrderInventoryObserverTest.php +++ b/app/code/Magento/SalesInventory/Test/Unit/Observer/RefundOrderInventoryObserverTest.php @@ -173,6 +173,10 @@ public function testRefundOrderInventory() $this->observer->execute($this->eventObserver); } + /** + * @param $productId + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getCreditMemoItem($productId) { $backToStock = true; diff --git a/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php b/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php index 794fc94d6a2a8..3a5ed16fdd2fd 100644 --- a/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php +++ b/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php @@ -239,7 +239,7 @@ public function saveStoreLabels($ruleId, $labels) $connection->delete($table, ['rule_id=?' => $ruleId, 'store_id IN (?)' => $deleteByStoreIds]); } } catch (\Exception $e) { - $connection->rollback(); + $connection->rollBack(); throw $e; } $connection->commit(); diff --git a/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleActionGroup.xml new file mode 100644 index 0000000000000..997b3b4b9ff06 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleActionGroup.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="selectNotLoggedInCustomerGroup"> + <!-- This actionGroup was created to be merged from B2B because B2B has a very different form control here --> + <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="NOT LOGGED IN" stepKey="selectCustomerGroup"/> + </actionGroup> +</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/AdminSalesRuleActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminSalesRuleActionGroup.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/AdminSalesRuleActionGroup.xml rename to app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminSalesRuleActionGroup.xml index 93bdf29a8ba14..4026c3d65cfaf 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/AdminSalesRuleActionGroup.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminSalesRuleActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="DeleteCartPriceRuleByName"> <arguments> <argument name="ruleName" type="string"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/ApplyCartRuleOnStorefrontActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/ApplyCartRuleOnStorefrontActionGroup.xml similarity index 87% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/ApplyCartRuleOnStorefrontActionGroup.xml rename to app/code/Magento/SalesRule/Test/Mftf/ActionGroup/ApplyCartRuleOnStorefrontActionGroup.xml index 06318f5080943..e8c520f1f985e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/ApplyCartRuleOnStorefrontActionGroup.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/ApplyCartRuleOnStorefrontActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="ApplyCartRuleOnStorefrontActionGroup"> <arguments> <argument name="Product" defaultValue="_defaultProduct"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/StorefrontSalesRuleActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/StorefrontSalesRuleActionGroup.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/StorefrontSalesRuleActionGroup.xml rename to app/code/Magento/SalesRule/Test/Mftf/ActionGroup/StorefrontSalesRuleActionGroup.xml index 0027d9a71fff3..5d1cc877aa775 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/StorefrontSalesRuleActionGroup.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/StorefrontSalesRuleActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!-- Apply Sales Rule Coupon to the cart --> <actionGroup name="StorefrontApplyCouponActionGroup"> <arguments> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Data/QuoteData.xml b/app/code/Magento/SalesRule/Test/Mftf/Data/QuoteData.xml new file mode 100644 index 0000000000000..7e929266b89ef --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Data/QuoteData.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> + <entity name="E2EB2CQuoteWith10PercentDiscount" type="Quote"> + <data key="subtotal">480.00</data> + <data key="shipping">15.00</data> + <data key="discount">48.00</data> + <data key="total">447.00</data> + <data key="shippingMethod">Flat Rate - Fixed</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesCouponData.xml b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesCouponData.xml similarity index 75% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesCouponData.xml rename to app/code/Magento/SalesRule/Test/Mftf/Data/SalesCouponData.xml index 4d93ea208fc3a..917b4ca179b8a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesCouponData.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesCouponData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="ApiSalesRuleCoupon" type="SalesRuleCoupon"> <data key="code" unique="suffix">salesCoupon</data> <data key="times_used">0</data> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleCouponData.xml b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleCouponData.xml new file mode 100644 index 0000000000000..6cca73dff5724 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleCouponData.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="SimpleSalesRuleCoupon" type="SalesRuleCoupon"> + <var key="rule_id" entityKey="rule_id" entityType="SalesRule"/> + <data key="code" unique="suffix">Code</data> + <data key="is_primary">1</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml similarity index 90% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml rename to app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml index d89d3f44776e4..efd21405a7cc1 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleData.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="ApiSalesRule" type="SalesRule"> <data key="name" unique="suffix">salesRule</data> <data key="description">Sales Rule Descritpion</data> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleLabelData.xml b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleLabelData.xml new file mode 100644 index 0000000000000..f1916e81e0e52 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleLabelData.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="SalesRuleLabelDefault" type="SalesRuleLabel"> + <data key="store_id">0</data> + <data key="store_label" unique="suffix">Sales Rule (Default) </data> + </entity> + <entity name="SalesRuleLabelStore1" type="SalesRuleLabel"> + <data key="store_id">1</data> + <data key="store_label" unique="suffix">Sales Rule (Store 1) </data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/LICENSE.txt b/app/code/Magento/SalesRule/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/LICENSE.txt rename to app/code/Magento/SalesRule/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/LICENSE_AFL.txt b/app/code/Magento/SalesRule/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/LICENSE_AFL.txt rename to app/code/Magento/SalesRule/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-condition-meta.xml b/app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-condition-meta.xml similarity index 86% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-condition-meta.xml rename to app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-condition-meta.xml index 82b3e3de28fea..bf4809a7d3f8d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-condition-meta.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-condition-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateSalesRuleCondition" dataType="SalesRuleCondition" type="create"> <field key="condition_type" required="true">string</field> <array key="conditions" required="true"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-coupon-meta.xml b/app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-coupon-meta.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-coupon-meta.xml rename to app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-coupon-meta.xml index 6b5e4a1a6cab6..03b87a96e6ce6 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-coupon-meta.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-coupon-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateSalesRuleCoupon" dataType="SalesRuleCoupon" type="create" auth="adminOauth" url="/V1/coupons" method="POST"> <contentType>application/json</contentType> <object key="coupon" dataType="SalesRuleCoupon"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-label-meta.xml b/app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-label-meta.xml similarity index 78% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-label-meta.xml rename to app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-label-meta.xml index 17429d38a3254..676cb7026c2fa 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-label-meta.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-label-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateSalesRuleLabel" dataType="SalesRuleLabel" type="create"> <field key="store_id" required="true">integer</field> <field key="store_label" required="true">string</field> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-meta.xml b/app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-meta.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-meta.xml rename to app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-meta.xml index f71431ff97dda..6e6a203a4e6c5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Metadata/sales_rule-meta.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Metadata/sales_rule-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateSalesRule" dataType="SalesRule" type="create" auth="adminOauth" url="/V1/salesRules" method="POST"> <contentType>application/json</contentType> <object key="rule" dataType="SalesRule"> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Page/AdminCartPriceRulesPage.xml b/app/code/Magento/SalesRule/Test/Mftf/Page/AdminCartPriceRulesPage.xml new file mode 100644 index 0000000000000..2c260540ae79f --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Page/AdminCartPriceRulesPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminCartPriceRulesPage" url="sales_rule/promo_quote/" area="admin" module="SalesRule"> + <section name="AdminCartPriceRulesSection"/> + <section name="AdminCartPriceRulesFormSection"/> + </page> +</pages> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Page/PriceRuleNewPage.xml b/app/code/Magento/SalesRule/Test/Mftf/Page/PriceRuleNewPage.xml new file mode 100644 index 0000000000000..4bedeb88effc8 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Page/PriceRuleNewPage.xml @@ -0,0 +1,11 @@ +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <page name="PriceRuleNewPage" url="sales_rule/promo_quote/new/" area="admin" module="Magento_SalesRule"> + <section name="PriceRuleConditionsSection"/> + </page> +</pages> diff --git a/app/code/Magento/SalesRule/Test/Mftf/README.md b/app/code/Magento/SalesRule/Test/Mftf/README.md new file mode 100644 index 0000000000000..7b65abe671e29 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Sales Rule Functional Tests + +The Functional Test Module for **Magento Sales Rule** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/AdminCartPriceRulesFormSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml similarity index 84% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/AdminCartPriceRulesFormSection.xml rename to app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml index 3912a6ab31e8d..f31ff1a456898 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/AdminCartPriceRulesFormSection.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml @@ -6,7 +6,7 @@ */ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCartPriceRulesFormSection"> <element name="save" type="button" selector="#save" timeout="30"/> <element name="saveAndContinue" type="button" selector="#save_and_continue" timeout="30"/> @@ -25,6 +25,8 @@ <!-- Actions sub-form --> <element name="actionsHeader" type="button" selector="div[data-index='actions']" timeout="30"/> <element name="apply" type="select" selector="select[name='simple_action']"/> + <element name="applyDiscountToShipping" type="checkbox" selector="input[name='apply_to_shipping']"/> + <element name="applyDiscountToShippingLabel" type="checkbox" selector="input[name='apply_to_shipping']+label"/> <element name="discountAmount" type="input" selector="input[name='discount_amount']"/> <element name="discountStep" type="input" selector="input[name='discount_step']"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/AdminCartPriceRulesSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesSection.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/AdminCartPriceRulesSection.xml rename to app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesSection.xml index 882f6cd2dcf9b..5fe5fc1e34687 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/AdminCartPriceRulesSection.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesSection.xml @@ -6,7 +6,7 @@ */ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCartPriceRulesSection"> <element name="addNewRuleButton" type="button" selector="#add" timeout="30"/> <element name="messages" type="text" selector=".messages"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Section/CheckoutCartSummarySection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/CheckoutCartSummarySection.xml new file mode 100644 index 0000000000000..5327d53032d48 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/CheckoutCartSummarySection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="CheckoutCartSummarySection"> + <element name="discountLabel" type="text" selector="//*[@id='cart-totals']//tr[.//th//span[contains(@class, 'discount coupon')]]"/> + <element name="discountTotal" type="text" selector="//*[@id='cart-totals']//tr[.//th//span[contains(@class, 'discount coupon')]]//td//span//span[@class='price']"/> + </section> +</sections> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Section/DiscountSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/DiscountSection.xml new file mode 100644 index 0000000000000..cc9ab6724528c --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/DiscountSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="DiscountSection"> + <element name="DiscountTab" type="button" selector="//strong[text()='Apply Discount Code']"/> + <element name="CouponInput" type="input" selector="#coupon_code"/> + <element name="ApplyCodeBtn" type="button" selector="//span[text()='Apply Discount']"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/PriceRuleConditionsSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/PriceRuleConditionsSection.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/PriceRuleConditionsSection.xml rename to app/code/Magento/SalesRule/Test/Mftf/Section/PriceRuleConditionsSection.xml index 93ed408ce7a0e..1b05ec838dc98 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/PriceRuleConditionsSection.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/PriceRuleConditionsSection.xml @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ --> -<sections xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<sections xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <section name="PriceRuleConditionsSection"> <element name="conditionsTab" type="text" selector="//div[@data-index='conditions']//span[contains(.,'Conditions')][1]"/> <element name="createNewRule" type="text" selector="span.rule-param.rule-param-new-child"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/StorefrontSalesRuleCartCouponSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/StorefrontSalesRuleCartCouponSection.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/StorefrontSalesRuleCartCouponSection.xml rename to app/code/Magento/SalesRule/Test/Mftf/Section/StorefrontSalesRuleCartCouponSection.xml index 7c0b918864db3..39d85ae5fa69b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/StorefrontSalesRuleCartCouponSection.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/StorefrontSalesRuleCartCouponSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontSalesRuleCartCouponSection"> <element name="couponHeader" type="button" selector="//*[@id='block-discount-heading']"/> <element name="couponField" type="text" selector="//*[@id='coupon_code']"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateBuyXGetYFreeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateBuyXGetYFreeTest.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml index e8b1ebfa99be0..d21034bc9248f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateBuyXGetYFreeTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateBuyXGetYFreeTest"> <annotations> <features value="SalesRule"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml index 29f7fedc33af5..a33a4b819b530 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateCartPriceRuleForCouponCodeTest"> <annotations> <features value="SalesRule"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml index 15a2d8cedc99c..cf8879514f5a5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateCartPriceRuleForGeneratedCouponTest"> <annotations> <features value="SalesRule"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateFixedAmountDiscountTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateFixedAmountDiscountTest.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml index b9fbf38236c11..adf8b391a68bf 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateFixedAmountDiscountTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateFixedAmountDiscountTest"> <annotations> <features value="SalesRule"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml index 6c6a1ece40444..c482d25828397 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateFixedAmountWholeCartDiscountTest"> <annotations> <features value="SalesRule"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreatePercentOfProductPriceTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreatePercentOfProductPriceTest.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml index 3086a7855d647..2de7952cd1208 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/AdminCreatePercentOfProductPriceTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreatePercentOfProductPriceTest"> <annotations> <features value="SalesRule"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml new file mode 100644 index 0000000000000..05ea5a32574c8 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CGuestUserTest"> + <before> + <createData entity="ApiSalesRule" stepKey="createSalesRule"/> + <createData entity="ApiSalesRuleCoupon" stepKey="createSalesRuleCoupon"> + <requiredEntity createDataKey="createSalesRule"/> + </createData> + </before> + <after> + <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> + </after> + + <!-- Step 5: User uses coupon codes --> + <comment userInput="Start of using coupon code" stepKey="startOfUsingCouponCode" after="endOfComparingProducts" /> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="couponOpenCart" after="startOfUsingCouponCode"/> + + <actionGroup ref="StorefrontApplyCouponActionGroup" stepKey="couponApplyCoupon" after="couponOpenCart"> + <argument name="coupon" value="$$createSalesRuleCoupon$$"/> + </actionGroup> + + <actionGroup ref="StorefrontCheckCouponAppliedActionGroup" stepKey="couponCheckAppliedDiscount" after="couponApplyCoupon"> + <argument name="rule" value="$$createSalesRule$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="discount" value="E2EB2CQuoteWith10PercentDiscount.discount"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="couponCheckCartWithDiscount" after="couponCheckAppliedDiscount"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="subtotal" value="E2EB2CQuoteWith10PercentDiscount.subtotal"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shipping" value="E2EB2CQuoteWith10PercentDiscount.shipping"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingMethod" value="E2EB2CQuoteWith10PercentDiscount.shippingMethod"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="total" value="E2EB2CQuoteWith10PercentDiscount.total"/> + </actionGroup> + + <actionGroup ref="StorefrontCancelCouponActionGroup" stepKey="couponCancelCoupon" after="couponCheckCartWithDiscount"/> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCartAfterCancelCoupon" after="couponCancelCoupon"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="subtotal" value="E2EB2CQuote.subtotal"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shipping" value="E2EB2CQuote.shipping"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="total" value="E2EB2CQuote.total"/> + </actionGroup> + <comment userInput="End of using coupon code" stepKey="endOfUsingCouponCode" after="cartAssertCartAfterCancelCoupon" /> + </test> +</tests> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml new file mode 100644 index 0000000000000..c0ef70dbd048a --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CLoggedInUserTest"> + <before> + <createData entity="ApiSalesRule" stepKey="createSalesRule"/> + <createData entity="ApiSalesRuleCoupon" stepKey="createSalesRuleCoupon"> + <requiredEntity createDataKey="createSalesRule"/> + </createData> + </before> + <after> + <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> + </after> + + <!-- Step 6: User uses coupon codes --> + <comment userInput="Start of using coupon code" stepKey="startOfUsingCouponCode" after="endOfComparingProducts" /> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="couponOpenCart" after="startOfUsingCouponCode"/> + + <actionGroup ref="StorefrontApplyCouponActionGroup" stepKey="couponApplyCoupon" after="couponOpenCart"> + <argument name="coupon" value="$$createSalesRuleCoupon$$"/> + </actionGroup> + + <actionGroup ref="StorefrontCheckCouponAppliedActionGroup" stepKey="couponCheckAppliedDiscount" after="couponApplyCoupon"> + <argument name="rule" value="$$createSalesRule$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="discount" value="E2EB2CQuoteWith10PercentDiscount.discount"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="couponCheckCartWithDiscount" after="couponCheckAppliedDiscount"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="subtotal" value="E2EB2CQuoteWith10PercentDiscount.subtotal"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shipping" value="E2EB2CQuoteWith10PercentDiscount.shipping"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingMethod" value="E2EB2CQuoteWith10PercentDiscount.shippingMethod"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="total" value="E2EB2CQuoteWith10PercentDiscount.total"/> + </actionGroup> + + <actionGroup ref="StorefrontCancelCouponActionGroup" stepKey="couponCancelCoupon" after="couponCheckCartWithDiscount"/> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCartAfterCancelCoupon" after="couponCancelCoupon"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="subtotal" value="E2EB2CQuote.subtotal"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shipping" value="E2EB2CQuote.shipping"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="total" value="E2EB2CQuote.total"/> + </actionGroup> + <comment userInput="End of using coupon code" stepKey="endOfUsingCouponCode" after="cartAssertCartAfterCancelCoupon"/> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/PriceRuleCategoryNestingTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/PriceRuleCategoryNestingTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/PriceRuleCategoryNestingTest.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/PriceRuleCategoryNestingTest.xml index 9d47a5e823e83..a46fc19a51cc8 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/PriceRuleCategoryNestingTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/PriceRuleCategoryNestingTest.xml @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ --> -<tests xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<tests xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <test name="PriceRuleCategoryNestingTest"> <annotations> <description value="Category nesting level must be the same as were created in categories."/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleCountry.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountry.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleCountry.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountry.xml index a6a0d669f3435..508b16721b2df 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleCountry.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountry.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontCartPriceRuleCountry"> <annotations> <features value="SalesRule"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRulePostcode.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcode.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRulePostcode.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcode.xml index 97936382e60e0..e025d8b2a3b68 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRulePostcode.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcode.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontCartPriceRulePostcode"> <annotations> <features value="SalesRule"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleQuantity.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantity.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleQuantity.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantity.xml index f4342b5d480b4..3e54620d24937 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleQuantity.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantity.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontCartPriceRuleQuantity"> <annotations> <features value="SalesRule"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleState.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleState.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleState.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleState.xml index e2de2117d78e7..98c4b1144b475 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleState.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleState.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontCartPriceRuleState"> <annotations> <features value="SalesRule"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleSubtotal.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotal.xml similarity index 96% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleSubtotal.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotal.xml index 6c49534ee43c1..93c64903a337e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/StorefrontCartPriceRuleSubtotal.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotal.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontCartPriceRuleSubtotal"> <annotations> <features value="SalesRule"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/composer.json b/app/code/Magento/SalesRule/Test/Mftf/composer.json new file mode 100644 index 0000000000000..8839051a0848e --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/composer.json @@ -0,0 +1,35 @@ +{ + "name": "magento/functional-test-module-sales-rule", + "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-rule": "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-directory": "100.0.0-dev", + "magento/functional-test-module-eav": "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-reports": "100.0.0-dev", + "magento/functional-test-module-rule": "100.0.0-dev", + "magento/functional-test-module-sales": "100.0.0-dev", + "magento/functional-test-module-shipping": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev", + "magento/functional-test-module-widget": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-sales-rule-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/SalesRule/Test/Unit/Block/Rss/DiscountsTest.php b/app/code/Magento/SalesRule/Test/Unit/Block/Rss/DiscountsTest.php index cd00562bc4f7a..bd14773ea4923 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Block/Rss/DiscountsTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Block/Rss/DiscountsTest.php @@ -195,6 +195,9 @@ public function testIsAllowed($isAllowed) $this->assertEquals($isAllowed, $this->block->isAllowed()); } + /** + * @return array + */ public function isAllowedDataProvider() { return [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToDataModelTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToDataModelTest.php index 82868b3723c75..1016d14066afc 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToDataModelTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToDataModelTest.php @@ -115,6 +115,9 @@ protected function setUp() ); } + /** + * @return array + */ private function getArrayData() { return [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToModelTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToModelTest.php index 98e1d7cddee57..5dd67424418b7 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToModelTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Converter/ToModelTest.php @@ -273,6 +273,9 @@ public function testFormattingDate($data) $this->model->toModel($dataModel); } + /** + * @return array + */ public function expectedDatesProvider() { return [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php index 31536e1be3d2e..e516f817a59d1 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php @@ -155,6 +155,9 @@ public function testSaveWithExceptions($exceptionObject, $exceptionName, $except $this->model->save($coupon); } + /** + * @return array + */ public function saveExceptionsDataProvider() { $msg = 'kiwis'; diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php index 671f20a27a460..090dbd7fe5d6d 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php @@ -225,6 +225,9 @@ public function testCollectItemHasChildren($childItemData, $parentData, $expecte } } + /** + * @return array + */ public function collectItemHasChildrenDataProvider() { $data = [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/RuleTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/RuleTest.php index 89f4e93901c1b..be9e25eb20302 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/RuleTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/RuleTest.php @@ -113,6 +113,9 @@ public function testBeforeSaveResetConditionToNull() $this->model->getActions(); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupProdConditionMock() { $prodConditionMock = $this->getMockBuilder(\Magento\SalesRule\Model\Rule\Condition\Product\Combine::class) @@ -133,6 +136,9 @@ protected function setupProdConditionMock() return $prodConditionMock; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupConditionMock() { $conditionMock = $this->getMockBuilder(\Magento\SalesRule\Model\Rule\Condition\Combine::class) diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php index 37c839d413d4b..217a8dba273c4 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php @@ -140,6 +140,9 @@ public function testApplyRulesWhenRuleWithStopRulesProcessingIsUsed($isChildren, $this->assertEquals($appliedRuleIds, $result); } + /** + * @return array + */ public function dataProviderChildren() { return [ @@ -179,6 +182,10 @@ protected function getPreparedItem() return $item; } + /** + * @param $item + * @param $rule + */ protected function applyRule($item, $rule) { $qty = 2; diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/UtilityTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/UtilityTest.php index 5e48f3110a395..4ce0f2a0564f3 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/UtilityTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/UtilityTest.php @@ -362,6 +362,9 @@ public function testMergeIds($a1, $a2, $isSting, $expected) $this->assertEquals($expected, $this->utility->mergeIds($a1, $a2, $isSting)); } + /** + * @return array + */ public function mergeIdsDataProvider() { return [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/ValidatorTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/ValidatorTest.php index 2e6a3c3c38af0..42448565791c5 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/ValidatorTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/ValidatorTest.php @@ -495,6 +495,9 @@ public function testProcessShippingAmountActions($action) ); } + /** + * @return array + */ public static function dataProviderActions() { return [ diff --git a/app/code/Magento/SalesRule/Test/Unit/Observer/SalesOrderAfterPlaceObserverTest.php b/app/code/Magento/SalesRule/Test/Unit/Observer/SalesOrderAfterPlaceObserverTest.php index b14c783019590..32bf2201665ef 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Observer/SalesOrderAfterPlaceObserverTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Observer/SalesOrderAfterPlaceObserverTest.php @@ -170,6 +170,9 @@ public function testSalesOrderAfterPlace($ruleCustomerId) $this->assertEquals($this->model, $this->model->execute($observer)); } + /** + * @return array + */ public function salesOrderAfterPlaceDataProvider() { return [ diff --git a/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js b/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js index 6df769a90894e..f2924fe48e01b 100644 --- a/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js +++ b/app/code/Magento/SalesRule/view/frontend/web/js/view/summary/discount.js @@ -57,7 +57,7 @@ define([ } discountSegments = this.totals()['total_segments'].filter(function (segment) { - return segment.code === 'discount'; + return segment.code.indexOf('discount') !== -1; }); return discountSegments.length ? discountSegments[0].title : null; diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/LICENSE.txt b/app/code/Magento/SalesSequence/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/LICENSE.txt rename to app/code/Magento/SalesSequence/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/LICENSE_AFL.txt b/app/code/Magento/SalesSequence/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/LICENSE_AFL.txt rename to app/code/Magento/SalesSequence/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/SalesSequence/Test/Mftf/README.md b/app/code/Magento/SalesSequence/Test/Mftf/README.md new file mode 100644 index 0000000000000..969f7d0daf509 --- /dev/null +++ b/app/code/Magento/SalesSequence/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Sales Sequence Functional Tests + +The Functional Test Module for **Magento Sales Sequence** module. diff --git a/app/code/Magento/SalesSequence/Test/Mftf/composer.json b/app/code/Magento/SalesSequence/Test/Mftf/composer.json new file mode 100644 index 0000000000000..5649df3b7e0ea --- /dev/null +++ b/app/code/Magento/SalesSequence/Test/Mftf/composer.json @@ -0,0 +1,16 @@ +{ + "name": "magento/functional-test-module-sales-sequence", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/SampleData/Test/Mftf/README.md b/app/code/Magento/SampleData/Test/Mftf/README.md new file mode 100644 index 0000000000000..dcadf692f4959 --- /dev/null +++ b/app/code/Magento/SampleData/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Sample Data Functional Tests + +The Functional Test Module for **Magento Sample Data** module. diff --git a/app/code/Magento/SampleData/Test/Mftf/composer.json b/app/code/Magento/SampleData/Test/Mftf/composer.json new file mode 100644 index 0000000000000..039b87fa858b5 --- /dev/null +++ b/app/code/Magento/SampleData/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-sample-data", + "description": "Sample Data fixtures", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/sample-data-media": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/SampleData/Test/Unit/Model/DependencyTest.php b/app/code/Magento/SampleData/Test/Unit/Model/DependencyTest.php index 5343b4f867adb..f0b69a627091f 100644 --- a/app/code/Magento/SampleData/Test/Unit/Model/DependencyTest.php +++ b/app/code/Magento/SampleData/Test/Unit/Model/DependencyTest.php @@ -16,6 +16,11 @@ use Magento\SampleData\Model\Dependency; use Magento\Framework\Filesystem\DriverPool; +/** + * Class DependencyTest + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class DependencyTest extends \PHPUnit\Framework\TestCase { /** @@ -76,6 +81,10 @@ public function testPackagesFromComposerSuggest( ); $this->assertEquals($expectedPackages, $dependency->getSampleDataPackages()); } + + /** + * @return array + */ public static function dataPackagesFromComposerSuggest() { return [ @@ -167,6 +176,10 @@ public static function dataPackagesFromComposerSuggest() ]; } + /** + * @param array $composerJsonContent + * @return \PHPUnit_Framework_MockObject_MockObject + */ public function stubComposerJsonReader(array $composerJsonContent) { $stub = $this->getMockBuilder(Filesystem\Directory\ReadInterface::class) @@ -183,6 +196,9 @@ public function stubComposerJsonReader(array $composerJsonContent) return $stub; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ public function stubFileNotFoundReader() { $stub = $this->getMockBuilder(Filesystem\Directory\ReadInterface::class) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/LICENSE.txt b/app/code/Magento/Search/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/LICENSE.txt rename to app/code/Magento/Search/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/LICENSE_AFL.txt b/app/code/Magento/Search/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/LICENSE_AFL.txt rename to app/code/Magento/Search/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Search/Test/Mftf/README.md b/app/code/Magento/Search/Test/Mftf/README.md new file mode 100644 index 0000000000000..bd4bc14db41f7 --- /dev/null +++ b/app/code/Magento/Search/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Search Functional Tests + +The Functional Test Module for **Magento Search** module. diff --git a/app/code/Magento/Search/Test/Mftf/Section/StorefrontQuickSearchSection.xml b/app/code/Magento/Search/Test/Mftf/Section/StorefrontQuickSearchSection.xml new file mode 100644 index 0000000000000..543725fc5fa1c --- /dev/null +++ b/app/code/Magento/Search/Test/Mftf/Section/StorefrontQuickSearchSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontQuickSearchSection"> + <element name="searchPhrase" type="input" selector="#search"/> + <element name="searchButton" type="button" selector="button.action.search" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Search/Test/Mftf/composer.json b/app/code/Magento/Search/Test/Mftf/composer.json new file mode 100644 index 0000000000000..97cef910ffa02 --- /dev/null +++ b/app/code/Magento/Search/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-search", + "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-search": "100.0.0-dev", + "magento/functional-test-module-reports": "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/Search/Test/Unit/Helper/DataTest.php b/app/code/Magento/Search/Test/Unit/Helper/DataTest.php index 291362734feff..1f9aad8d4316d 100644 --- a/app/code/Magento/Search/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Search/Test/Unit/Helper/DataTest.php @@ -127,6 +127,9 @@ public function testGetEscapedQueryText($queryText, $maxQueryLength, $expected) $this->assertEquals($expected, $this->model->getEscapedQueryText()); } + /** + * @return array + */ public function queryTextDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/LICENSE.txt b/app/code/Magento/Security/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/LICENSE.txt rename to app/code/Magento/Security/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/LICENSE_AFL.txt b/app/code/Magento/Security/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/LICENSE_AFL.txt rename to app/code/Magento/Security/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Security/Test/Mftf/README.md b/app/code/Magento/Security/Test/Mftf/README.md new file mode 100644 index 0000000000000..65a0ff6c26e21 --- /dev/null +++ b/app/code/Magento/Security/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Security Functional Tests + +The Functional Test Module for **Magento Security** module. diff --git a/app/code/Magento/Security/Test/Mftf/composer.json b/app/code/Magento/Security/Test/Mftf/composer.json new file mode 100644 index 0000000000000..3429571c9b6d8 --- /dev/null +++ b/app/code/Magento/Security/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-security", + "description": "Security management module", + "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-store": "100.0.0-dev", + "magento/functional-test-module-user": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-customer": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Security/Test/Unit/Model/ResourceModel/PasswordResetRequestEvent/CollectionFactoryTest.php b/app/code/Magento/Security/Test/Unit/Model/ResourceModel/PasswordResetRequestEvent/CollectionFactoryTest.php index 525693631e86f..89bc5c2b85d50 100644 --- a/app/code/Magento/Security/Test/Unit/Model/ResourceModel/PasswordResetRequestEvent/CollectionFactoryTest.php +++ b/app/code/Magento/Security/Test/Unit/Model/ResourceModel/PasswordResetRequestEvent/CollectionFactoryTest.php @@ -86,6 +86,9 @@ public function testCreate( $this->model->create($securityEventType, $accountReference, $longIp); } + /** + * @return array + */ public function createDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/LICENSE.txt b/app/code/Magento/SendFriend/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/LICENSE.txt rename to app/code/Magento/SendFriend/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/LICENSE_AFL.txt b/app/code/Magento/SendFriend/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/LICENSE_AFL.txt rename to app/code/Magento/SendFriend/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/SendFriend/Test/Mftf/README.md b/app/code/Magento/SendFriend/Test/Mftf/README.md new file mode 100644 index 0000000000000..a6e18162013a3 --- /dev/null +++ b/app/code/Magento/SendFriend/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Send Friend Functional Tests + +The Functional Test Module for **Magento Send Friend** module. diff --git a/app/code/Magento/SendFriend/Test/Mftf/composer.json b/app/code/Magento/SendFriend/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7e061e0159f02 --- /dev/null +++ b/app/code/Magento/SendFriend/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-send-friend", + "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-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/SendFriend/Test/Unit/Block/Plugin/Catalog/Product/ViewTest.php b/app/code/Magento/SendFriend/Test/Unit/Block/Plugin/Catalog/Product/ViewTest.php index 6dbab3a5573a8..2718e1fa44f6e 100644 --- a/app/code/Magento/SendFriend/Test/Unit/Block/Plugin/Catalog/Product/ViewTest.php +++ b/app/code/Magento/SendFriend/Test/Unit/Block/Plugin/Catalog/Product/ViewTest.php @@ -52,6 +52,9 @@ public function testAfterCanEmailToFriend($result, $callSendfriend) $this->assertTrue($this->view->afterCanEmailToFriend($this->productView, $result)); } + /** + * @return array + */ public function afterCanEmailToFriendDataSet() { return [ diff --git a/app/code/Magento/SendFriend/view/frontend/templates/send.phtml b/app/code/Magento/SendFriend/view/frontend/templates/send.phtml index 7a972cd5f01c5..3342530f01eb5 100644 --- a/app/code/Magento/SendFriend/view/frontend/templates/send.phtml +++ b/app/code/Magento/SendFriend/view/frontend/templates/send.phtml @@ -35,6 +35,7 @@ <div class="control"> <input name="recipients[email][<%- data._index_ %>]" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" id="recipients-email<%- data._index_ %>" type="email" class="input-text" + data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}"/> </div> </div> @@ -72,7 +73,8 @@ <label for="sender-email" class="label"><span><?= $block->escapeHtml(__('Email')) ?></span></label> <div class="control"> <input name="sender[email]" value="<?= $block->escapeHtmlAttr($block->getEmail()) ?>" - title="<?= $block->escapeHtmlAttr(__('Email')) ?>" id="sender-email" type="text" class="input-text" + title="<?= $block->escapeHtmlAttr(__('Email')) ?>" id="sender-email" type="email" class="input-text" + data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}"/> </div> </div> diff --git a/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php index 9e340cc31ff17..1d3f6ad1ee5a3 100644 --- a/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php +++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php @@ -10,7 +10,7 @@ class Grid extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'order/packaging/grid.phtml'; + protected $_template = 'Magento_Shipping::order/packaging/grid.phtml'; /** * Core registry diff --git a/app/code/Magento/Shipping/Block/Order/Shipment.php b/app/code/Magento/Shipping/Block/Order/Shipment.php index 653fb357f0b1d..21e960985d6b6 100644 --- a/app/code/Magento/Shipping/Block/Order/Shipment.php +++ b/app/code/Magento/Shipping/Block/Order/Shipment.php @@ -18,7 +18,7 @@ class Shipment extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/shipment.phtml'; + protected $_template = 'Magento_Shipping::order/shipment.phtml'; /** * Core registry diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php index 5575792c346d3..6763046373ce7 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php @@ -329,11 +329,24 @@ public function checkAvailableShipCountries(\Magento\Framework\DataObject $reque * @return $this|bool|\Magento\Framework\DataObject * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function proccessAdditionalValidation(\Magento\Framework\DataObject $request) + public function processAdditionalValidation(\Magento\Framework\DataObject $request) { return $this; } + /** + * Processing additional validation to check is carrier applicable. + * + * @param \Magento\Framework\DataObject $request + * @return $this|bool|\Magento\Framework\DataObject + * @deprecated + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function proccessAdditionalValidation(\Magento\Framework\DataObject $request) + { + return $this->processAdditionalValidation($request); + } + /** * Determine whether current carrier enabled for activity * diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php index 8244fcc4bad9d..be2588dc48711 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php @@ -302,10 +302,24 @@ public function getAllItems(RateRequest $request) * * @param \Magento\Framework\DataObject $request * @return $this|bool|\Magento\Framework\DataObject + * @deprecated * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) */ public function proccessAdditionalValidation(\Magento\Framework\DataObject $request) + { + return $this->processAdditionalValidation($request); + } + + /** + * Processing additional validation to check if carrier applicable. + * + * @param \Magento\Framework\DataObject $request + * @return $this|bool|\Magento\Framework\DataObject + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ + public function processAdditionalValidation(\Magento\Framework\DataObject $request) { //Skip by item validation if there is no items in request if (!count($this->getAllItems($request))) { diff --git a/app/code/Magento/Shipping/Model/Shipping.php b/app/code/Magento/Shipping/Model/Shipping.php index 2223cb8ae3bf2..57e055e83a58a 100644 --- a/app/code/Magento/Shipping/Model/Shipping.php +++ b/app/code/Magento/Shipping/Model/Shipping.php @@ -259,7 +259,7 @@ public function collectCarrierRates($carrierCode, $request) $carrier->setActiveFlag($this->_availabilityConfigField); $result = $carrier->checkAvailableShipCountries($request); if (false !== $result && !$result instanceof \Magento\Quote\Model\Quote\Address\RateResult\Error) { - $result = $carrier->proccessAdditionalValidation($request); + $result = $carrier->processAdditionalValidation($request); } /* * Result will be false if the admin set not to show the shipping module diff --git a/app/code/Magento/Shipping/Model/Shipping/Labels.php b/app/code/Magento/Shipping/Model/Shipping/Labels.php index 5c796d9fa6897..08ce168567182 100644 --- a/app/code/Magento/Shipping/Model/Shipping/Labels.php +++ b/app/code/Magento/Shipping/Model/Shipping/Labels.php @@ -117,8 +117,8 @@ public function requestToShipment(Shipment $orderShipment) ) ); - if (!$admin->getFirstname() - || !$admin->getLastname() + if (!$admin->getFirstName() + || !$admin->getLastName() || !$storeInfo->getName() || !$storeInfo->getPhone() || !$originStreet1 @@ -188,8 +188,8 @@ protected function setShipperDetails( ); $request->setShipperContactPersonName($storeAdmin->getName()); - $request->setShipperContactPersonFirstName($storeAdmin->getFirstname()); - $request->setShipperContactPersonLastName($storeAdmin->getLastname()); + $request->setShipperContactPersonFirstName($storeAdmin->getFirstName()); + $request->setShipperContactPersonLastName($storeAdmin->getLastName()); $request->setShipperContactCompanyName($store->getName()); $request->setShipperContactPhoneNumber($store->getPhone()); $request->setShipperEmail($storeAdmin->getEmail()); diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/ActionGroup/AdminShipmentActionGroup.xml b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminShipmentActionGroup.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/ActionGroup/AdminShipmentActionGroup.xml rename to app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminShipmentActionGroup.xml index 3f420c2051067..80db1fe9469a3 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/ActionGroup/AdminShipmentActionGroup.xml +++ b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminShipmentActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="verifyBasicShipmentInformation"> <arguments> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Data/FlatRateShippingMethodData.xml b/app/code/Magento/Shipping/Test/Mftf/Data/FlatRateShippingMethodData.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Data/FlatRateShippingMethodData.xml rename to app/code/Magento/Shipping/Test/Mftf/Data/FlatRateShippingMethodData.xml index 4827fe869d882..120517bffde8f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Data/FlatRateShippingMethodData.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Data/FlatRateShippingMethodData.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <!-- Enable Flat Rate Shipping method config --> <entity name="FlatRateShippingMethodConfig" type="flat_rate_shipping_method"> <requiredEntity type="active">flatRateActiveEnable</requiredEntity> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Data/FreeShippingMethodData.xml b/app/code/Magento/Shipping/Test/Mftf/Data/FreeShippingMethodData.xml similarity index 92% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Data/FreeShippingMethodData.xml rename to app/code/Magento/Shipping/Test/Mftf/Data/FreeShippingMethodData.xml index 9b27264bc2df1..fba1970dba294 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Data/FreeShippingMethodData.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Data/FreeShippingMethodData.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <!-- Enable Free Shipping method --> <entity name="FreeShippinMethodConfig" type="free_shipping_method"> <requiredEntity type="active">freeActiveEnable</requiredEntity> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Data/ShippingMethodData.xml b/app/code/Magento/Shipping/Test/Mftf/Data/ShippingMethodData.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Data/ShippingMethodData.xml rename to app/code/Magento/Shipping/Test/Mftf/Data/ShippingMethodData.xml index 1c5139a5d7350..3e8613ec2e43f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Data/ShippingMethodData.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Data/ShippingMethodData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="DefaultFlatRateMethod" type="shipping"> <data key="enabled">Yes</data> <data key="title">Flat Rate</data> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/LICENSE.txt b/app/code/Magento/Shipping/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/LICENSE.txt rename to app/code/Magento/Shipping/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/LICENSE_AFL.txt b/app/code/Magento/Shipping/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/LICENSE_AFL.txt rename to app/code/Magento/Shipping/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Metadata/shipping_methods-meta.xml b/app/code/Magento/Shipping/Test/Mftf/Metadata/shipping_methods-meta.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Metadata/shipping_methods-meta.xml rename to app/code/Magento/Shipping/Test/Mftf/Metadata/shipping_methods-meta.xml index 65127cedabd60..8b6a2aab74580 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Metadata/shipping_methods-meta.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Metadata/shipping_methods-meta.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="FlatRateShippingMethodSetup" dataType="flat_rate_shipping_method" type="create" auth="adminFormKey" url="/admin/system_config/save/section/carriers/" method="POST"> <object key="groups" dataType="flat_rate_shipping_method"> <object key="flatrate" dataType="flat_rate_shipping_method"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Page/AdminShipmentNewPage.xml b/app/code/Magento/Shipping/Test/Mftf/Page/AdminShipmentNewPage.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Page/AdminShipmentNewPage.xml rename to app/code/Magento/Shipping/Test/Mftf/Page/AdminShipmentNewPage.xml index e1d7f8f451397..e6b3f1100dd88 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Page/AdminShipmentNewPage.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Page/AdminShipmentNewPage.xml @@ -7,7 +7,7 @@ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="AdminShipmentNewPage" url="order_shipment/new/order_id/" area="admin" module="Shipping"> <section name="AdminShipmentMainActionsSection"/> <section name="AdminShipmentOrderInformationSection"/> diff --git a/app/code/Magento/Shipping/Test/Mftf/README.md b/app/code/Magento/Shipping/Test/Mftf/README.md new file mode 100644 index 0000000000000..6acc747f50d71 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Shipping Functional Tests + +The Functional Test Module for **Magento Shipping** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentAddressInformationSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentAddressInformationSection.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentAddressInformationSection.xml rename to app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentAddressInformationSection.xml index ddfd21836b8d6..ea4dde8190bc7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentAddressInformationSection.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentAddressInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminShipmentAddressInformationSection"> <element name="billingAddress" type="text" selector=".order-billing-address address"/> <element name="billingAddressEdit" type="button" selector=".order-billing-address .actions a"/> diff --git a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentItemsSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentItemsSection.xml new file mode 100644 index 0000000000000..30f508beb57ab --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentItemsSection.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminShipmentItemsSection"> + <element name="itemName" type="text" selector=".order-shipment-table tbody:nth-of-type({{var1}}) .col-product .product-title" parameterized="true"/> + <element name="itemSku" type="text" selector=".order-shipment-table tbody:nth-of-type({{var1}}) .col-product .product-sku-block" parameterized="true"/> + <element name="itemQty" type="text" selector=".order-shipment-table tbody:nth-of-type({{var1}}) .col-ordered-qty .qty-table" parameterized="true"/> + <element name="itemQtyToShip" type="input" selector=".order-shipment-table tbody:nth-of-type({{var1}}) .col-qty input.qty-item" parameterized="true"/> + <element name="nameColumn" type="text" selector=".order-shipment-table .col-product .product-title"/> + <element name="skuColumn" type="text" selector=".order-shipment-table .col-product .product-sku-block"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentMainActionsSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentMainActionsSection.xml new file mode 100644 index 0000000000000..506a7a496d8d8 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentMainActionsSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminShipmentMainActionsSection"> + <element name="submitShipment" type="button" selector="button.action-default.save.submit-button"/> + </section> +</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentOrderInformationSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentOrderInformationSection.xml similarity index 85% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentOrderInformationSection.xml rename to app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentOrderInformationSection.xml index 9076ad5c249f9..56f5a3221535b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentOrderInformationSection.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentOrderInformationSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminShipmentOrderInformationSection"> <element name="orderId" type="text" selector="div.order-information span.title > a" timeout="30"/> <element name="orderDate" type="text" selector=".order-information table.order-information-table tr:first-of-type > td"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentPaymentShippingSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentPaymentShippingSection.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentPaymentShippingSection.xml rename to app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentPaymentShippingSection.xml index a97bb4813917c..e6004e8c59454 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentPaymentShippingSection.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentPaymentShippingSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminShipmentPaymentShippingSection"> <element name="PaymentMethod" type="text" selector=".order-payment-method .order-payment-method-title"/> <element name="CurrencyInformation" type="text" selector=".order-payment-method .order-payment-currency"/> diff --git a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTotalSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTotalSection.xml new file mode 100644 index 0000000000000..2a4150b19a454 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTotalSection.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminShipmentTotalSection"> + <element name="CommentText" type="textarea" selector="#shipment_comment_text"/> + <element name="AppendComments" type="checkbox" selector=".order-totals input#notify_customer"/> + <element name="EmailCopy" type="checkbox" selector=".order-totals input#send_email"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/EndToEndB2CAdminTest.xml new file mode 100644 index 0000000000000..e14fed443ac0c --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Test/EndToEndB2CAdminTest.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CAdminTest"> + <!--Ship Order--> + <comment userInput="Admin creates shipment" stepKey="adminCreatesShipmentComment" before="clickShipAction"/> + <click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction" after="clickOrderIdLinkOnInvoice"/> + <seeInCurrentUrl url="{{AdminShipmentNewPage.url}}" stepKey="seeOrderShipmentUrl" after="clickShipAction"/> + + <see selector="{{AdminShipmentOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="seeShipmentOrderStatus" after="seeOrderShipmentUrl"/> + <actionGroup ref="verifyBasicShipmentInformation" stepKey="checkBasicShipmentOrderInfo" after="seeShipmentOrderStatus"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="shippingAddress" value="US_Address_TX"/> + <argument name="billingAddress" value="US_Address_TX"/> + </actionGroup> + + <!--Submit Shipment--> + <click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment" after="checkBasicShipmentOrderInfo"/> + <!--Shipment created successfully--> + <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPageShipping" after="clickSubmitShipment"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="$getOrderId" stepKey="seeOrderIdInPageNameAfterShip" after="seeViewOrderPageShipping"/> + <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The shipment has been created." stepKey="seeShipmentCreateSuccess" after="seeOrderIdInPageNameAfterShip"/> + <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Complete" stepKey="seeOrderComplete" after="seeShipmentCreateSuccess"/> + <see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Shipped 1" stepKey="seeShippedQuantity" after="seeOrderComplete"/> + + <click selector="{{AdminOrderDetailsOrderViewSection.shipments}}" stepKey="clickOrderShipmentsTab" after="seeShippedQuantity"/> + <waitForLoadingMaskToDisappear stepKey="waitForShipmentTabLoad" after="clickOrderShipmentsTab"/> + <see selector="{{AdminOrderShipmentsTabSection.gridRow('1')}}" userInput="{{Simple_US_Customer.firstname}}" stepKey="seeOrderShipmentInTabGrid" after="waitForShipmentTabLoad"/> + <click selector="{{AdminOrderShipmentsTabSection.viewGridRow('1')}}" stepKey="clickRowToViewShipment" after="seeOrderShipmentInTabGrid"/> + <see selector="{{AdminShipmentOrderInformationSection.orderId}}" userInput="$getOrderId" stepKey="seeOrderIdOnShipment" after="clickRowToViewShipment"/> + <actionGroup ref="verifyBasicShipmentInformation" stepKey="checkShipmentOrderInformation" after="seeOrderIdOnShipment"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="shippingAddress" value="US_Address_TX"/> + <argument name="billingAddress" value="US_Address_TX"/> + </actionGroup> + <actionGroup ref="seeProductInShipmentItems" stepKey="seeSimpleProductInShipmentItems" after="checkShipmentOrderInformation"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="seeProductInShipmentItems" stepKey="seeConfigurableProductInShipmentItems" after="seeSimpleProductInShipmentItems"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + <click selector="{{AdminShipmentOrderInformationSection.orderId}}" stepKey="clickOrderIdOnShipment" after="seeConfigurableProductInShipmentItems"/> + </test> +</tests> \ No newline at end of file diff --git a/app/code/Magento/Shipping/Test/Mftf/composer.json b/app/code/Magento/Shipping/Test/Mftf/composer.json new file mode 100644 index 0000000000000..1b640d86f907d --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/composer.json @@ -0,0 +1,34 @@ +{ + "name": "magento/functional-test-module-shipping", + "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-contact": "100.0.0-dev", + "magento/functional-test-module-customer": "100.0.0-dev", + "magento/functional-test-module-directory": "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", + "magento/functional-test-module-tax": "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-fedex": "100.0.0-dev", + "magento/functional-test-module-ups": "100.0.0-dev", + "magento/functional-test-module-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/ViewTest.php b/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/ViewTest.php index 65460d1a13eea..2db8eabffae61 100644 --- a/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/ViewTest.php +++ b/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/ViewTest.php @@ -204,6 +204,14 @@ public function testExecuteNoShipment() $this->assertEquals($this->resultForwardMock, $this->controller->execute()); } + /** + * @param $orderId + * @param $shipmentId + * @param $shipment + * @param $tracking + * @param $comeFrom + * @param $returnShipment + */ protected function loadShipment($orderId, $shipmentId, $shipment, $tracking, $comeFrom, $returnShipment) { $valueMap = [ diff --git a/app/code/Magento/Shipping/Test/Unit/Model/Carrier/AbstractCarrierOnlineTest.php b/app/code/Magento/Shipping/Test/Unit/Model/Carrier/AbstractCarrierOnlineTest.php index 6f87eb171a398..b40f5b26b89f1 100644 --- a/app/code/Magento/Shipping/Test/Unit/Model/Carrier/AbstractCarrierOnlineTest.php +++ b/app/code/Magento/Shipping/Test/Unit/Model/Carrier/AbstractCarrierOnlineTest.php @@ -100,7 +100,7 @@ public function testComposePackages() $this->stockItemData->expects($this->atLeastOnce())->method('getIsDecimalDivided') ->will($this->returnValue(true)); - $this->carrier->proccessAdditionalValidation($request); + $this->carrier->processAdditionalValidation($request); } public function testParseXml() diff --git a/app/code/Magento/Signifyd/Block/Fingerprint.php b/app/code/Magento/Signifyd/Block/Fingerprint.php index db76fc6c94468..f43bffce1fc1a 100644 --- a/app/code/Magento/Signifyd/Block/Fingerprint.php +++ b/app/code/Magento/Signifyd/Block/Fingerprint.php @@ -42,7 +42,7 @@ class Fingerprint extends Template * @var string * @since 100.2.0 */ - protected $_template = 'fingerprint.phtml'; + protected $_template = 'Magento_Signifyd::fingerprint.phtml'; /** * @param Context $context diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/LICENSE.txt b/app/code/Magento/Signifyd/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/LICENSE.txt rename to app/code/Magento/Signifyd/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/LICENSE_AFL.txt b/app/code/Magento/Signifyd/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/LICENSE_AFL.txt rename to app/code/Magento/Signifyd/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Signifyd/Test/Mftf/README.md b/app/code/Magento/Signifyd/Test/Mftf/README.md new file mode 100644 index 0000000000000..9391d7b314ea5 --- /dev/null +++ b/app/code/Magento/Signifyd/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Signifyd Functional Tests + +The Functional Test Module for **Magento Signifyd** module. diff --git a/app/code/Magento/Signifyd/Test/Mftf/composer.json b/app/code/Magento/Signifyd/Test/Mftf/composer.json new file mode 100644 index 0000000000000..dc969cc4780ef --- /dev/null +++ b/app/code/Magento/Signifyd/Test/Mftf/composer.json @@ -0,0 +1,26 @@ +{ + "name": "magento/functional-test-module-signifyd", + "description": "Submitting Case Entry to Signifyd on Order Creation", + "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-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-directory": "100.0.0-dev", + "magento/functional-test-module-payment": "100.0.0-dev", + "magento/functional-test-module-sales": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "php": "~7.1.3||~7.2.0" + }, + "suggest": { + "magento/functional-test-module-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "proprietary" + ] +} diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php index 7ba3ab3eef4f6..6b7a6112a932e 100644 --- a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php +++ b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreateGuaranteeAbilityTest.php @@ -198,6 +198,9 @@ public function testIsAvailableWithCanceledOrder($state) $this->assertFalse($this->createGuaranteeAbility->isAvailable($orderId)); } + /** + * @return array + */ public function isAvailableWithCanceledOrderDataProvider() { return [ diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php index a22bfe12222a6..db64b38375fe1 100644 --- a/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php +++ b/app/code/Magento/Signifyd/Test/Unit/Model/Guarantee/CreationServiceTest.php @@ -203,6 +203,11 @@ public function testCreateForOrderWithCaseUpdate() ); } + /** + * @param $orderId + * @param array $caseData + * @return MockObject + */ private function withCaseEntityExistsForOrderId($orderId, array $caseData = []) { $this->createGuaranteeAbility->expects(self::once()) @@ -226,6 +231,9 @@ private function withCaseEntityExistsForOrderId($orderId, array $caseData = []) return $dummyCaseEntity; } + /** + * @param $failureMessage + */ private function withGatewayFailure($failureMessage) { $this->gateway @@ -233,6 +241,9 @@ private function withGatewayFailure($failureMessage) ->willThrowException(new GatewayException($failureMessage)); } + /** + * @param $gatewayResult + */ private function withGatewaySuccess($gatewayResult) { $this->gateway diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php index bf0c6ee238d5f..1ee55d7ad150c 100644 --- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php +++ b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/Client/ResponseHandlerTest.php @@ -92,6 +92,9 @@ public function testHandleFailureMessage($code, $message) } } + /** + * @return array + */ public function errorsProvider() { return [ diff --git a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php index 2a05189e0e393..ba82ff4619ad3 100644 --- a/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php +++ b/app/code/Magento/Signifyd/Test/Unit/Model/SignifydGateway/GatewayTest.php @@ -389,6 +389,9 @@ public function testCancelGuaranteeWithUnexpectedDisposition() $this->assertEquals(Gateway::GUARANTEE_CANCELED, $result); } + /** + * @return array + */ public function supportedGuaranteeDispositionsProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/LICENSE.txt b/app/code/Magento/Sitemap/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/LICENSE.txt rename to app/code/Magento/Sitemap/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/LICENSE_AFL.txt b/app/code/Magento/Sitemap/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/LICENSE_AFL.txt rename to app/code/Magento/Sitemap/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Sitemap/Test/Mftf/README.md b/app/code/Magento/Sitemap/Test/Mftf/README.md new file mode 100644 index 0000000000000..8d506744827f6 --- /dev/null +++ b/app/code/Magento/Sitemap/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Sitemap Functional Tests + +The Functional Test Module for **Magento Sitemap** module. diff --git a/app/code/Magento/Sitemap/Test/Mftf/composer.json b/app/code/Magento/Sitemap/Test/Mftf/composer.json new file mode 100644 index 0000000000000..46ad680c9fb1e --- /dev/null +++ b/app/code/Magento/Sitemap/Test/Mftf/composer.json @@ -0,0 +1,28 @@ +{ + "name": "magento/functional-test-module-sitemap", + "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-url-rewrite": "100.0.0-dev", + "magento/functional-test-module-cms": "100.0.0-dev", + "magento/functional-test-module-config": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-media-storage": "100.0.0-dev", + "magento/functional-test-module-robots": "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": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateNewStoreGroupActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateNewStoreGroupActionGroup.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateNewStoreGroupActionGroup.xml rename to app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateNewStoreGroupActionGroup.xml index 980e540b6b9b4..e67e21e4c1e67 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateNewStoreGroupActionGroup.xml +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateNewStoreGroupActionGroup.xml @@ -7,7 +7,7 @@ --> <!-- Admin creates new Store group --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminCreateNewStoreGroupActionGroup"> <arguments> <argument name="website" type="string"/> diff --git a/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreGroupActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreGroupActionGroup.xml new file mode 100644 index 0000000000000..0819a74ea8996 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreGroupActionGroup.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminCreateStoreGroupActionGroup"> + <arguments> + <argument name="Website" defaultValue="_defaultWebsite"/> + </arguments> + <amOnPage url="{{AdminSystemStoreGroupPage.url}}" stepKey="navigateToNewStoreGroup"/> + <waitForPageLoad stepKey="waitForStoreGroupPageLoad" /> + + <comment userInput="Creating Store Group" stepKey="storeGroupCreationComment" /> + <selectOption selector="{{AdminNewStoreGroupSection.storeGrpWebsiteDropdown}}" userInput="{{Website.name}}" stepKey="selectWebsite" /> + <fillField selector="{{AdminNewStoreGroupSection.storeGrpNameTextField}}" userInput="{{CustomStoreGroupCustomWebsite.name}}" stepKey="enterStoreGroupName" /> + <fillField selector="{{AdminNewStoreGroupSection.storeGrpCodeTextField}}" userInput="{{CustomStoreGroupCustomWebsite.code}}" stepKey="enterStoreGroupCode" /> + <selectOption selector="{{AdminNewStoreGroupSection.storeRootCategoryDropdown}}" userInput="Default Category" stepKey="setRootCategory" /> + <click selector="{{AdminNewStoreGroupActionsSection.saveButton}}" stepKey="clickSaveStoreGroup" /> + <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageReload"/> + <see userInput="You saved the store." stepKey="seeSavedMessage" /> + </actionGroup> +</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreViewActionGroup.xml similarity index 89% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml rename to app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreViewActionGroup.xml index 6e86f1b68dce3..b35b36bc667a7 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateStoreViewActionGroup.xml +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreViewActionGroup.xml @@ -7,7 +7,7 @@ --> <!-- Test XML Example --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminCreateStoreViewActionGroup"> <arguments> <argument name="StoreGroup" defaultValue="_defaultStoreGroup"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateWebsiteActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateWebsiteActionGroup.xml similarity index 85% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateWebsiteActionGroup.xml rename to app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateWebsiteActionGroup.xml index 01d14f60bd011..709cfe8ec9c40 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminCreateWebsiteActionGroup.xml +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateWebsiteActionGroup.xml @@ -7,7 +7,7 @@ --> <!-- Admin creates new custom website --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminCreateWebsiteActionGroup"> <arguments> <argument name="newWebsiteName" type="string"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminDeleteStoreViewActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminDeleteStoreViewActionGroup.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminDeleteStoreViewActionGroup.xml rename to app/code/Magento/Store/Test/Mftf/ActionGroup/AdminDeleteStoreViewActionGroup.xml index 794f626f45e65..1267ebf8f440c 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminDeleteStoreViewActionGroup.xml +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminDeleteStoreViewActionGroup.xml @@ -7,7 +7,7 @@ --> <!-- Test XML Example --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminDeleteStoreViewActionGroup"> <arguments> <argument name="customStore" defaultValue="customStore"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminDeleteWebsiteActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminDeleteWebsiteActionGroup.xml similarity index 89% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminDeleteWebsiteActionGroup.xml rename to app/code/Magento/Store/Test/Mftf/ActionGroup/AdminDeleteWebsiteActionGroup.xml index 8182a5d6dd1e3..0512a1f6fbc3f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminDeleteWebsiteActionGroup.xml +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminDeleteWebsiteActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminDeleteWebsiteActionGroup"> <arguments> <argument name="websiteName" type="string"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminSwitchStoreViewActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminSwitchStoreViewActionGroup.xml similarity index 85% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminSwitchStoreViewActionGroup.xml rename to app/code/Magento/Store/Test/Mftf/ActionGroup/AdminSwitchStoreViewActionGroup.xml index 8c4ecbed047b8..bd004f1fc7de3 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/AdminSwitchStoreViewActionGroup.xml +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminSwitchStoreViewActionGroup.xml @@ -7,7 +7,7 @@ --> <!-- Test XML Example --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminSwitchStoreViewActionGroup"> <arguments> <argument name="storeView" defaultValue="customStore.name"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/CreateCustomStoreViewActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/CreateCustomStoreViewActionGroup.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/CreateCustomStoreViewActionGroup.xml rename to app/code/Magento/Store/Test/Mftf/ActionGroup/CreateCustomStoreViewActionGroup.xml index 7315a4fcde06f..1e23a85a78935 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/CreateCustomStoreViewActionGroup.xml +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/CreateCustomStoreViewActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="CreateCustomStoreViewActionGroup"> <arguments> <argument name="storeGroupName" defaultValue="customStoreGroup.name"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/DeleteCustomStoreActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomStoreActionGroup.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/DeleteCustomStoreActionGroup.xml rename to app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomStoreActionGroup.xml index ec735091041eb..0cac9bbd9954b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/DeleteCustomStoreActionGroup.xml +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomStoreActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="DeleteCustomStoreActionGroup"> <arguments> <argument name="storeGroupName" defaultValue="customStoreGroup.name"/> diff --git a/app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomWebsiteActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomWebsiteActionGroup.xml new file mode 100644 index 0000000000000..0f8673eb2f4aa --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomWebsiteActionGroup.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="DeleteCustomWebsiteActionGroup"> + <arguments> + <argument name="websiteName" defaultValue="customWebsite.name"/> + </arguments> + <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnTheStorePage"/> + <click selector="{{AdminStoresGridSection.resetButton}}" stepKey="clickOnResetButton"/> + <waitForPageLoad stepKey="waitForPageLoadAfterResetButtonClicked" time="10"/> + <fillField userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="fillSearchWebsiteField"/> + <click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton" /> + <waitForPageLoad stepKey="waitForPageLoadAfterSearch" time="10"/> + <see userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="verifyThatCorrectWebsiteFound"/> + <click selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="clickEditExistingWebsite"/> + + <click selector="{{AdminStoresMainActionsSection.deleteButton}}" stepKey="clickDeleteWebsiteButtonOnEditStorePage"/> + <selectOption userInput="No" selector="{{AdminStoresDeleteWebsiteSection.createDbBackup}}" stepKey="setCreateDbBackupToNo"/> + <click selector="{{AdminStoresDeleteWebsiteSection.deleteButton}}" stepKey="clickDeleteButtonOnDeleteWebsitePage"/> + </actionGroup> +</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/StorefrontSwitchStoreViewActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/StorefrontSwitchStoreViewActionGroup.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/StorefrontSwitchStoreViewActionGroup.xml rename to app/code/Magento/Store/Test/Mftf/ActionGroup/StorefrontSwitchStoreViewActionGroup.xml index 9f06c2773dc3a..d14de9af9c14a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/ActionGroup/StorefrontSwitchStoreViewActionGroup.xml +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/StorefrontSwitchStoreViewActionGroup.xml @@ -7,7 +7,7 @@ --> <!-- Test XML Example --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="StorefrontSwitchStoreViewActionGroup"> <arguments> <argument name="storeView" defaultValue="customStore"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreData.xml b/app/code/Magento/Store/Test/Mftf/Data/StoreData.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreData.xml rename to app/code/Magento/Store/Test/Mftf/Data/StoreData.xml index 1d0fcfd57b01e..036069977bf52 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreData.xml +++ b/app/code/Magento/Store/Test/Mftf/Data/StoreData.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="_defaultStore" type="store"> <data key="name">Default Store View</data> <data key="code">default</data> diff --git a/app/code/Magento/Store/Test/Mftf/Data/StoreGroupData.xml b/app/code/Magento/Store/Test/Mftf/Data/StoreGroupData.xml new file mode 100644 index 0000000000000..1ab86afbf5d55 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Data/StoreGroupData.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="_defaultStoreGroup" type="group"> + <data key="name">Main Website Store</data> + <data key="code">main_website_store</data> + <data key="root_category_id">2</data> + <data key="website_id">1</data> + </entity> + <entity name="customStoreGroup" type="group"> + <data key="group_id">null</data> + <data key="name" unique="suffix">store</data> + <data key="code" unique="suffix">store</data> + <data key="root_category_id">2</data> + <data key="website_id">1</data> + <data key="store_action">add</data> + <data key="store_type">group</data> + </entity> + <entity name="CustomStoreGroupCustomWebsite" type="group"> + <data key="group_id">null</data> + <data key="name" unique="suffix">Store Group Custom Website</data> + <data key="code" unique="suffix">store_group_custom_website</data> + <data key="root_category_id">2</data> + <data key="store_action">add</data> + <data key="store_type">group</data> + <requiredEntity type="website">customWebsite</requiredEntity> + </entity> +</entities> diff --git a/app/code/Magento/Store/Test/Mftf/Data/WebsiteData.xml b/app/code/Magento/Store/Test/Mftf/Data/WebsiteData.xml new file mode 100644 index 0000000000000..e8528fba1ae29 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Data/WebsiteData.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="_defaultWebsite" type="website"> + <data key="name">Main Website</data> + <data key="code">base</data> + <data key="sort_order">0</data> + </entity> + <entity name="customWebsite" type="website"> + <data key="name" unique="suffix">Second Website</data> + <data key="code" unique="suffix">second_website</data> + <data key="sort_order">10</data> + <data key="store_action">add</data> + <data key="store_type">website</data> + <data key="website_id">null</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/LICENSE.txt b/app/code/Magento/Store/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/LICENSE.txt rename to app/code/Magento/Store/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/LICENSE_AFL.txt b/app/code/Magento/Store/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/LICENSE_AFL.txt rename to app/code/Magento/Store/Test/Mftf/LICENSE_AFL.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Metadata/store-meta.xml b/app/code/Magento/Store/Test/Mftf/Metadata/store-meta.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Metadata/store-meta.xml rename to app/code/Magento/Store/Test/Mftf/Metadata/store-meta.xml index 8b1ada521da66..e0263b2c88869 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Metadata/store-meta.xml +++ b/app/code/Magento/Store/Test/Mftf/Metadata/store-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateStore" dataType="store" type="create" auth="adminFormKey" url="/admin/system_store/save" method="POST" successRegex="/messages-message-success/" returnRegex="" > <object dataType="store" key="store"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Metadata/store_group-meta.xml b/app/code/Magento/Store/Test/Mftf/Metadata/store_group-meta.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Metadata/store_group-meta.xml rename to app/code/Magento/Store/Test/Mftf/Metadata/store_group-meta.xml index d2d085e60328e..bc117756a542b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Metadata/store_group-meta.xml +++ b/app/code/Magento/Store/Test/Mftf/Metadata/store_group-meta.xml @@ -6,7 +6,7 @@ */ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateStoreGroup" dataType="group" type="create" auth="adminFormKey" url="/admin/system_store/save" method="POST" successRegex="/messages-message-success/" returnRegex="" > <contentType>application/x-www-form-urlencoded</contentType> diff --git a/app/code/Magento/Store/Test/Mftf/Metadata/website-meta.xml b/app/code/Magento/Store/Test/Mftf/Metadata/website-meta.xml new file mode 100644 index 0000000000000..4e314396ab046 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Metadata/website-meta.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="CreateWebsite" dataType="website" type="create" + auth="adminFormKey" url="/admin/system_store/save" method="POST" successRegex="/messages-message-success/" returnRegex=""> + <object dataType="website" key="website"> + <field key="website_id">string</field> + <field key="name">string</field> + <field key="code">string</field> + <field key="sort_order">integer</field> + </object> + <field key="store_action">string</field> + <field key="store_type">string</field> + </operation> +</operations> diff --git a/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreDeletePage.xml b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreDeletePage.xml new file mode 100644 index 0000000000000..3ec22d3135137 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreDeletePage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminSystemStoreDeletePage" url="system_store/deleteStore" module="Magento_Store" area="admin"> + <section name="AdminStoreBackupOptionsSection"/> + </page> +</pages> diff --git a/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreEditPage.xml b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreEditPage.xml new file mode 100644 index 0000000000000..fe2bfcab39ae4 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreEditPage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminSystemStoreEditPage" url="system_store/editStore" module="Magento_Store" area="admin"> + <section name="AdminNewStoreViewMainActionsSection"/> + <section name="AdminNewStoreSection"/> + </page> +</pages> diff --git a/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreGroupEditPage.xml b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreGroupEditPage.xml new file mode 100644 index 0000000000000..634ee6d651af1 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreGroupEditPage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminSystemStoreGroupEditPage" url="admin/system_store/editGroup" area="admin" module="Magento_Store"> + <section name="AdminStoreGroupActionsSection"/> + </page> +</pages> diff --git a/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreGroupPage.xml b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreGroupPage.xml new file mode 100644 index 0000000000000..3c73d019aa540 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreGroupPage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminSystemStoreGroupPage" url="admin/system_store/newGroup" module="Magento_Store" area="admin"> + <section name="AdminNewStoreGroupSection"/> + </page> +</pages> \ No newline at end of file diff --git a/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStorePage.xml b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStorePage.xml new file mode 100644 index 0000000000000..9eed4f6557a59 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStorePage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminSystemStorePage" url="/admin/system_store/" area="admin" module="Magento_Store"> + <section name="AdminStoresMainActionsSection"/> + <section name="AdminStoresGridSection"/> + </page> +</pages> diff --git a/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreViewPage.xml b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreViewPage.xml new file mode 100644 index 0000000000000..15ed31c19f996 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreViewPage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminSystemStoreViewPage" url="admin/system_store/newStore" module="Magento_Store" area="admin"> + <section name="AdminNewStoreViewMainActionsSection"/> + <section name="AdminNewStoreSection"/> + </page> +</pages> diff --git a/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreWebsitePage.xml b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreWebsitePage.xml new file mode 100644 index 0000000000000..6f99e4340a070 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Page/AdminSystemStoreWebsitePage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminSystemStoreWebsitePage" url="admin/system_store/newWebsite" module="Magento_Store" area="admin"> + <section name="AdminNewWebsiteSection"/> + </page> +</pages> \ No newline at end of file diff --git a/app/code/Magento/Store/Test/Mftf/README.md b/app/code/Magento/Store/Test/Mftf/README.md new file mode 100644 index 0000000000000..18b37aad6d8ef --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Store Functional Tests + +The Functional Test Module for **Magento Store** module. diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminMainActionsSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminMainActionsSection.xml new file mode 100644 index 0000000000000..0927a1ffc950b --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminMainActionsSection.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminMainActionsSection"> + <element name="storeSwitcher" type="text" selector=".store-switcher"/> + <element name="storeViewDropdown" type="button" selector="#store-change-button"/> + <element name="storeViewByName" type="button" selector="//*[@class='store-switcher-store-view ']/a[contains(text(), '{{storeViewName}}')]" timeout="30" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupActionsSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupActionsSection.xml new file mode 100644 index 0000000000000..f026c7765b6d6 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupActionsSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminNewStoreGroupActionsSection"> + <element name="backButton" type="button" selector="#back" timeout="30"/> + <element name="delete" type="button" selector="#delete" timeout="30"/> + <element name="resetButton" type="button" selector="#reset" timeout="30"/> + <element name="saveButton" type="button" selector="#save" timeout="30"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreGroupSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupSection.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreGroupSection.xml rename to app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupSection.xml index be22aa7f8c120..106a0f4de5e8b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreGroupSection.xml +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminNewStoreGroupSection"> <element name="storeGrpWebsiteDropdown" type="select" selector="#group_website_id"/> <element name="storeGrpNameTextField" type="input" selector="#group_name"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreSection.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreSection.xml rename to app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreSection.xml index 6ff8f6765de8f..cec7a1f4f81e1 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreSection.xml +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminNewStoreSection"> <element name="storeNameTextField" type="input" selector="#store_name"/> <element name="storeCodeTextField" type="input" selector="#store_code"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreViewActionsSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreViewActionsSection.xml similarity index 76% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreViewActionsSection.xml rename to app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreViewActionsSection.xml index f41ae17364a42..5f8e27f3ec101 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreViewActionsSection.xml +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreViewActionsSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminNewStoreViewActionsSection"> <element name="backButton" type="button" selector="#back" timeout="30"/> <element name="delete" type="button" selector="#delete" timeout="30"/> diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteActionsSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteActionsSection.xml new file mode 100644 index 0000000000000..8048ded87e260 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteActionsSection.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminNewWebsiteActionsSection"> + <element name="saveWebsite" type="button" selector="#save" timeout="30"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteSection.xml new file mode 100644 index 0000000000000..21dee5f6b6e0d --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminNewWebsiteSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminNewWebsiteSection"> + <element name="name" type="input" selector="#website_name"/> + <element name="code" type="input" selector="#website_code"/> + </section> +</sections> diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminStoreBackupOptionsSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminStoreBackupOptionsSection.xml new file mode 100644 index 0000000000000..58248b1943714 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminStoreBackupOptionsSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminStoreBackupOptionsSection"> + <element name="createBackupSelect" type="select" selector="select#store_create_backup"/> + </section> +</sections> diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminStoreGroupActionsSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminStoreGroupActionsSection.xml new file mode 100644 index 0000000000000..ae0283865b774 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminStoreGroupActionsSection.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminStoreGroupActionsSection"> + <element name="saveButton" type="button" selector="#save" timeout="30" /> + </section> +</sections> diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteStoreGroupSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteStoreGroupSection.xml new file mode 100644 index 0000000000000..ba3d9660b44b3 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteStoreGroupSection.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminStoresDeleteStoreGroupSection"> + <element name="createDbBackup" type="select" selector="#store_create_backup"/> + <element name="deleteStoreGroupButton" type="button" selector="#delete" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteWebsiteSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteWebsiteSection.xml new file mode 100644 index 0000000000000..50c536dcfe809 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteWebsiteSection.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminStoresDeleteWebsiteSection"> + <element name="createDbBackup" type="select" selector="#store_create_backup"/> + <element name="deleteButton" type="button" selector="#delete" timeout="30"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresGridSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresGridSection.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresGridSection.xml rename to app/code/Magento/Store/Test/Mftf/Section/AdminStoresGridSection.xml index c4f7f90f905a3..7630f316d8095 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresGridSection.xml +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresGridSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminStoresGridControlsSection"> <element name="createStoreView" type="button" selector="#add_store"/> <element name="createStore" type="button" selector="#add_group"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresMainActionsSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresMainActionsSection.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresMainActionsSection.xml rename to app/code/Magento/Store/Test/Mftf/Section/AdminStoresMainActionsSection.xml index e2d0f67faee08..d86a68d0f7b99 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresMainActionsSection.xml +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresMainActionsSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminStoresMainActionsSection"> <element name="createStoreViewButton" type="button" selector="#add_store" timeout="30"/> <element name="createStoreButton" type="button" selector="#add_group" timeout="30"/> diff --git a/app/code/Magento/Store/Test/Mftf/Section/StorefrontHeaderSection.xml b/app/code/Magento/Store/Test/Mftf/Section/StorefrontHeaderSection.xml new file mode 100644 index 0000000000000..4bb62a5a7f6b9 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/StorefrontHeaderSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontHeaderSection"> + <element name="storeViewSwitcher" type="button" selector="#switcher-language-trigger"/> + <element name="storeViewDropdown" type="button" selector="ul.switcher-dropdown"/> + <element name="storeViewOption" type="button" selector="li.view-{{var1}}>a" parameterized="true"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Test/AdminCreateStoreGroupTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupTest.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Test/AdminCreateStoreGroupTest.xml rename to app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupTest.xml index 1d3cad0cd4f27..e3345c1f2f094 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Test/AdminCreateStoreGroupTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupTest.xml @@ -6,7 +6,7 @@ */ --> <!-- Test XML Example --> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateStoreGroupTest"> <annotations> <features value="Store"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Test/AdminCreateStoreViewTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewTest.xml similarity index 87% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Test/AdminCreateStoreViewTest.xml rename to app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewTest.xml index 9d6a71f009beb..d38d4dc992a2b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Test/AdminCreateStoreViewTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewTest.xml @@ -6,7 +6,7 @@ */ --> <!-- Test XML Example --> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminCreateStoreViewTest"> <annotations> <features value="Store"/> diff --git a/app/code/Magento/Store/Test/Mftf/composer.json b/app/code/Magento/Store/Test/Mftf/composer.json new file mode 100644 index 0000000000000..81305cf049e6c --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/composer.json @@ -0,0 +1,24 @@ +{ + "name": "magento/functional-test-module-store", + "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-config": "100.0.0-dev", + "magento/functional-test-module-directory": "100.0.0-dev", + "magento/functional-test-module-media-storage": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-deploy": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Store/Test/Unit/Model/Config/Importer/Processor/UpdateTest.php b/app/code/Magento/Store/Test/Unit/Model/Config/Importer/Processor/UpdateTest.php index 99722ab7f855c..e98ad08d46a68 100644 --- a/app/code/Magento/Store/Test/Unit/Model/Config/Importer/Processor/UpdateTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/Config/Importer/Processor/UpdateTest.php @@ -251,6 +251,9 @@ public function testRun() $this->model->run($data); } + /** + * @return array + */ private function getData() { return [ diff --git a/app/code/Magento/Store/Test/Unit/Model/Service/StoreConfigManagerTest.php b/app/code/Magento/Store/Test/Unit/Model/Service/StoreConfigManagerTest.php index 702f4eee8db99..14d7e07c3c801 100644 --- a/app/code/Magento/Store/Test/Unit/Model/Service/StoreConfigManagerTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/Service/StoreConfigManagerTest.php @@ -55,6 +55,10 @@ protected function setUp() ); } + /** + * @param array $storeConfig + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getStoreMock(array $storeConfig) { $storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class) @@ -88,6 +92,9 @@ protected function getStoreMock(array $storeConfig) return $storeMock; } + /** + * @return \Magento\Store\Model\Data\StoreConfig + */ protected function createStoreConfigDataObject() { /** @var \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactoryMock */ diff --git a/app/code/Magento/Store/Test/Unit/Model/StoreManagerTest.php b/app/code/Magento/Store/Test/Unit/Model/StoreManagerTest.php index ad3b927258717..a48804f02adc0 100644 --- a/app/code/Magento/Store/Test/Unit/Model/StoreManagerTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/StoreManagerTest.php @@ -97,6 +97,9 @@ public function testGetStores($storesList, $withDefault, $codeKey, $expectedStor $this->assertEquals($expectedStores, $this->model->getStores($withDefault, $codeKey)); } + /** + * @return array + */ public function getStoresDataProvider() { $defaultStoreMock = $this->getMockBuilder(\Magento\Store\Api\Data\StoreInterface::class) diff --git a/app/code/Magento/Store/Test/Unit/Model/StoreTest.php b/app/code/Magento/Store/Test/Unit/Model/StoreTest.php index eacccbf1bb475..4cbf78d0d6471 100644 --- a/app/code/Magento/Store/Test/Unit/Model/StoreTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/StoreTest.php @@ -94,6 +94,9 @@ public function testLoad($key, $field) $model->load($key); } + /** + * @return array + */ public function loadDataProvider() { return [ @@ -265,6 +268,9 @@ function ($path, $scope, $scopeCode) use ($secure, $expectedPath) { $this->assertEquals($expectedBaseUrl, $model->getBaseUrl($type, $secure)); } + /** + * @return array + */ public function getBaseUrlDataProvider() { return [ @@ -563,6 +569,9 @@ public function testIsCurrentlySecure( } } + /** + * @return array + */ public function isCurrentlySecureDataProvider() { return [ diff --git a/app/code/Magento/Store/Test/Unit/Model/System/StoreTest.php b/app/code/Magento/Store/Test/Unit/Model/System/StoreTest.php index d70da2ee1ddc6..9cc4bb6ac8e5b 100644 --- a/app/code/Magento/Store/Test/Unit/Model/System/StoreTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/System/StoreTest.php @@ -104,6 +104,9 @@ public function testGetStoresStructure( ); } + /** + * @return array + */ public function getStoresStructureDataProvider() { $websiteName = 'website'; @@ -207,6 +210,9 @@ public function testGetStoreValuesForForm( ); } + /** + * @return array + */ public function getStoreValuesForFormDataProvider() { $websiteName = 'website'; diff --git a/app/code/Magento/StoreGraphQl/Test/Mftf/README.md b/app/code/Magento/StoreGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..3e3588d2f7301 --- /dev/null +++ b/app/code/Magento/StoreGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Store Graph Ql Functional Tests + +The Functional Test Module for **Magento Store Graph Ql** module. diff --git a/app/code/Magento/StoreGraphQl/Test/Mftf/composer.json b/app/code/Magento/StoreGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..10407d0dc179c --- /dev/null +++ b/app/code/Magento/StoreGraphQl/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-store-graph-ql", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-graph-ql": "100.0.0-dev", + "magento/functional-test-module-catalog-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/LICENSE.txt b/app/code/Magento/Swagger/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/LICENSE.txt rename to app/code/Magento/Swagger/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/LICENSE_AFL.txt b/app/code/Magento/Swagger/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/LICENSE_AFL.txt rename to app/code/Magento/Swagger/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Swagger/Test/Mftf/README.md b/app/code/Magento/Swagger/Test/Mftf/README.md new file mode 100644 index 0000000000000..0ec1c02814c6e --- /dev/null +++ b/app/code/Magento/Swagger/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Swagger Functional Tests + +The Functional Test Module for **Magento Swagger** module. diff --git a/app/code/Magento/Swagger/Test/Mftf/composer.json b/app/code/Magento/Swagger/Test/Mftf/composer.json new file mode 100644 index 0000000000000..a997257192fce --- /dev/null +++ b/app/code/Magento/Swagger/Test/Mftf/composer.json @@ -0,0 +1,16 @@ +{ + "name": "magento/functional-test-module-swagger", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "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/Swagger/LICENSE.txt b/app/code/Magento/SwaggerWebapi/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swagger/LICENSE.txt rename to app/code/Magento/SwaggerWebapi/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swagger/LICENSE_AFL.txt b/app/code/Magento/SwaggerWebapi/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swagger/LICENSE_AFL.txt rename to app/code/Magento/SwaggerWebapi/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/SwaggerWebapi/Test/Mftf/README.md b/app/code/Magento/SwaggerWebapi/Test/Mftf/README.md new file mode 100644 index 0000000000000..91d7c1522aa74 --- /dev/null +++ b/app/code/Magento/SwaggerWebapi/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Swagger Webapi Functional Tests + +The Functional Test Module for **Magento Swagger Webapi** module. diff --git a/app/code/Magento/SwaggerWebapi/Test/Mftf/composer.json b/app/code/Magento/SwaggerWebapi/Test/Mftf/composer.json new file mode 100644 index 0000000000000..22ed346ef2081 --- /dev/null +++ b/app/code/Magento/SwaggerWebapi/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-swagger-webapi", + "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-swagger": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/LICENSE.txt b/app/code/Magento/SwaggerWebapiAsync/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/LICENSE.txt rename to app/code/Magento/SwaggerWebapiAsync/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/LICENSE_AFL.txt b/app/code/Magento/SwaggerWebapiAsync/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/LICENSE_AFL.txt rename to app/code/Magento/SwaggerWebapiAsync/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/SwaggerWebapiAsync/Test/Mftf/README.md b/app/code/Magento/SwaggerWebapiAsync/Test/Mftf/README.md new file mode 100644 index 0000000000000..46c9dc293dd7d --- /dev/null +++ b/app/code/Magento/SwaggerWebapiAsync/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Swagger Webapi Async Functional Tests + +The Functional Test Module for **Magento Swagger Webapi Async** module. diff --git a/app/code/Magento/SwaggerWebapiAsync/Test/Mftf/composer.json b/app/code/Magento/SwaggerWebapiAsync/Test/Mftf/composer.json new file mode 100644 index 0000000000000..fe20e7a539d03 --- /dev/null +++ b/app/code/Magento/SwaggerWebapiAsync/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-swagger-webapi-async", + "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-swagger": "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/Swatches/Test/Mftf/ActionGroup/AddSwatchToProductActionGroup.xml b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddSwatchToProductActionGroup.xml new file mode 100644 index 0000000000000..09137a7003b94 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddSwatchToProductActionGroup.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + + <actionGroup name="AddVisualSwatchToProductActionGroup"> + <arguments> + <argument name="attribute" defaultValue="visualSwatchAttribute"/> + <argument name="option1" defaultValue="visualSwatchOption1"/> + <argument name="option2" defaultValue="visualSwatchOption2"/> + </arguments> + + <seeInCurrentUrl url="{{ProductCatalogPage.url}}" stepKey="seeOnProductEditPage"/> + <conditionalClick selector="{{AdminProductFormConfigurationsSection.sectionHeader}}" dependentSelector="{{AdminProductFormConfigurationsSection.createConfigurations}}" visible="false" stepKey="openConfigurationSection"/> + <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="openConfigurationPanel"/> + <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" stepKey="waitForSlideOut"/> + <click selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" stepKey="clickCreateNewAttribute"/> + <waitForPageLoad stepKey="waitForIFrame"/> + + <switchToIFrame selector="{{AdminNewAttributePanel.newAttributeIFrame}}" stepKey="switchToNewAttributeIFrame"/> + <fillField selector="{{AdminNewAttributePanel.defaultLabel}}" userInput="{{attribute.default_label}}" stepKey="fillDefaultLabel"/> + <selectOption selector="{{AdminNewAttributePanel.inputType}}" userInput="{{attribute.input_type}}" stepKey="selectInputType"/> + <!--Add swatch options--> + <click selector="{{AdminNewAttributePanel.addVisualSwatchOption}}" stepKey="clickAddSwatch1"/> + <waitForElementVisible selector="{{AdminNewAttributePanel.visualSwatchOptionAdminValue('0')}}" stepKey="waitForOption1Row"/> + <fillField selector="{{AdminNewAttributePanel.visualSwatchOptionAdminValue('0')}}" userInput="{{option1.admin_label}}" stepKey="fillAdminLabel1"/> + <fillField selector="{{AdminNewAttributePanel.visualSwatchOptionDefaultStoreValue('0')}}" userInput="{{option1.default_label}}" stepKey="fillDefaultStoreLabel1"/> + <click selector="{{AdminNewAttributePanel.addVisualSwatchOption}}" stepKey="clickAddSwatch2"/> + <waitForElementVisible selector="{{AdminNewAttributePanel.visualSwatchOptionAdminValue('1')}}" stepKey="waitForOption2Row"/> + <fillField selector="{{AdminNewAttributePanel.visualSwatchOptionAdminValue('1')}}" userInput="{{option2.admin_label}}" stepKey="fillAdminLabel2"/> + <fillField selector="{{AdminNewAttributePanel.visualSwatchOptionDefaultStoreValue('1')}}" userInput="{{option2.default_label}}" stepKey="fillDefaultStoreLabel2"/> + + <!--Save attribute--> + <click selector="{{AdminNewAttributePanel.saveAttribute}}" stepKey="clickOnNewAttributePanel"/> + <waitForPageLoad stepKey="waitForSaveAttribute"/> + <switchToIFrame stepKey="switchOutOfIFrame"/> + + <!--Find attribute in grid and select--> + <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/> + <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="clickOnFilters"/> + <fillField selector="{{AdminDataGridHeaderSection.attributeCodeFilterInput}}" userInput="{{attribute.default_label}}" stepKey="fillFilterAttributeCodeField"/> + <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickApplyFiltersButton"/> + <click selector="{{AdminDataGridTableSection.rowCheckbox('1')}}" stepKey="clickOnFirstCheckbox"/> + + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextStep1"/> + + <click selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute(attribute.default_label)}}" stepKey="clickSelectAll"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextStep2"/> + + <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="100" stepKey="enterAttributeQuantity"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextStep3"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="generateProducts"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/> + <click selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="clickOnConfirmInPopup"/> + <seeElement selector="{{AdminMessagesSection.success}}" stepKey="seeSaveProductMessage"/> + </actionGroup> + +</actionGroups> diff --git a/app/code/Magento/Swatches/Test/Mftf/Data/SwatchAttributeData.xml b/app/code/Magento/Swatches/Test/Mftf/Data/SwatchAttributeData.xml new file mode 100644 index 0000000000000..0e70bdcc70249 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Data/SwatchAttributeData.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="visualSwatchAttribute" type="SwatchAttribute"> + <data key="default_label" unique="suffix">VisualSwatchAttr</data> + <data key="input_type">Visual Swatch</data> + </entity> +</entities> diff --git a/app/code/Magento/Swatches/Test/Mftf/Data/SwatchOptionData.xml b/app/code/Magento/Swatches/Test/Mftf/Data/SwatchOptionData.xml new file mode 100644 index 0000000000000..76bfbe8e1b870 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Data/SwatchOptionData.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="visualSwatchOption1" type="SwatchOption"> + <data key="admin_label" unique="suffix">VisualOpt1</data> + <data key="default_label" unique="suffix">VisualOpt1</data> + </entity> + + <entity name="visualSwatchOption2" type="SwatchOption"> + <data key="admin_label" unique="suffix">VisualOpt2</data> + <data key="default_label" unique="suffix">VisualOpt2</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/LICENSE.txt b/app/code/Magento/Swatches/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/LICENSE.txt rename to app/code/Magento/Swatches/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/LICENSE_AFL.txt b/app/code/Magento/Swatches/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/LICENSE_AFL.txt rename to app/code/Magento/Swatches/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Swatches/Test/Mftf/README.md b/app/code/Magento/Swatches/Test/Mftf/README.md new file mode 100644 index 0000000000000..1bb664cc52d7a --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Swatches Functional Tests + +The Functional Test Module for **Magento Swatches** module. diff --git a/app/code/Magento/Swatches/Test/Mftf/Section/AdminNewAttributePanelSection.xml b/app/code/Magento/Swatches/Test/Mftf/Section/AdminNewAttributePanelSection.xml new file mode 100644 index 0000000000000..36c2056a45771 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Section/AdminNewAttributePanelSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminNewAttributePanel"> + <element name="addVisualSwatchOption" type="button" selector="button#add_new_swatch_visual_option_button"/> + <element name="addTextSwatchOption" type="button" selector="button#add_new_swatch_text_option_button"/> + <element name="visualSwatchOptionAdminValue" type="input" selector="[data-role='swatch-visual-options-container'] input[name='optionvisual[value][option_{{row}}][0]']" parameterized="true"/> + <element name="visualSwatchOptionDefaultStoreValue" type="input" selector="[data-role='swatch-visual-options-container'] input[name='optionvisual[value][option_{{row}}][1]']" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Swatches/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/Swatches/Test/Mftf/Section/StorefrontProductInfoMainSection.xml new file mode 100644 index 0000000000000..4da84f92e20ed --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Section/StorefrontProductInfoMainSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductInfoMainSection"> + <element name="swatchOptionByLabel" type="button" selector="div.swatch-option[option-label={{opt}}]" parameterized="true"/> + <element name="selectedSwatchValue" type="text" selector="//div[contains(@class, 'swatch-attribute') and contains(., '{{attr}}')]//span[contains(@class, 'swatch-attribute-selected-option')]" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml new file mode 100644 index 0000000000000..cfd220d12b1d7 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="StorefrontSwatchProductWithFileCustomOptionTest"> + <annotations> + <features value="ConfigurableProduct"/> + <stories value="Add configurable product to cart"/> + <title value="Correct error message and redirect with invalid file option"/> + <description value="Configurable product with swatch option and file custom option. When adding to cart with an invalid filetype, the correct error message is shown, and options remain selected."/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-93101"/> + <group value="ConfigurableProduct"/> + <group value="Swatches"/> + </annotations> + + <before> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + </before> + + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + </after> + + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + + <!-- Create a configurable swatch product via the UI --> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductIndex"/> + <waitForPageLoad stepKey="waitForProductPage"/> + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + <actionGroup ref="fillMainProductForm" stepKey="fillProductForm"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="searchAndSelectCategory"/> + <!--Add swatch attribute to configurable product--> + <actionGroup ref="AddVisualSwatchToProductActionGroup" stepKey="addSwatchToProduct"/> + <!--Add custom option to configurable product--> + <actionGroup ref="AddProductCustomOptionFile" stepKey="addCustomOptionToProduct"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/> + + <!--Go to storefront--> + <amOnPage url="" stepKey="goToHomePage"/> + <waitForPageLoad stepKey="waitForHomePageLoad"/> + <click selector="{{StorefrontNavigationSection.topCategory($$createCategory.name$$)}}" stepKey="goToCategoryStorefront"/> + <waitForPageLoad stepKey="waitForCategoryPageLoad"/> + <see selector="{{StorefrontCategoryMainSection.CategoryTitle}}" userInput="$$createCategory.name$$" stepKey="seeOnCategoryPage"/> + <!--Add configurable product to cart--> + <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductTitleByName(BaseConfigurableProduct.name)}}" stepKey="hoverProductInGrid"/> + <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(BaseConfigurableProduct.name)}}" stepKey="tryAddToCartFromCategoryPage"/> + <waitForPageLoad stepKey="waitForRedirectToProductPage"/> + <seeInCurrentUrl url="{{StorefrontProductPage.url(BaseConfigurableProduct.name)}}" stepKey="seeOnProductPage"/> + <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(visualSwatchOption2.default_label)}}" stepKey="clickSwatchOption"/> + <see selector="{{StorefrontProductInfoMainSection.selectedSwatchValue(visualSwatchAttribute.default_label)}}" userInput="{{visualSwatchOption2.default_label}}" stepKey="seeSwatchIsSelected"/> + + <!--Try invalid file--> + <attachFile selector="{{StorefrontProductInfoMainSection.addLinkFileUploadFile(ProductOptionFile.title)}}" userInput="lorem_ipsum.docx" stepKey="attachInvalidFile"/> + <click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addToCartInvalidFile"/> + <waitForElementVisible selector="{{StorefrontProductPageSection.alertMessage}}" stepKey="waitForErrorMessageInvalidFile"/> + <see selector="{{StorefrontProductPageSection.messagesBlock}}" userInput="The file 'lorem_ipsum.docx' for '{{ProductOptionFile.title}}' has an invalid extension." stepKey="seeMessageInvalidFile"/> + <!--Swatch remains selected--> + <see selector="{{StorefrontProductInfoMainSection.selectedSwatchValue(visualSwatchAttribute.default_label)}}" userInput="{{visualSwatchOption2.default_label}}" stepKey="seeSwatchRemainsSelected"/> + <!--Try valid file--> + <attachFile selector="{{StorefrontProductInfoMainSection.addLinkFileUploadFile(ProductOptionFile.title)}}" userInput="{{MagentoLogo.file}}" stepKey="attachValidFile"/> + <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$132.99" stepKey="seePriceUpdated"/> + <click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addToCartValidFile"/> + <waitForElementVisible selector="{{StorefrontProductPageSection.successMsg}}" stepKey="waitForSuccessMessage"/> + <see selector="{{StorefrontProductPageSection.messagesBlock}}" userInput="You added {{BaseConfigurableProduct.name}} to your shopping cart." stepKey="seeSuccessMessage"/> + + <!--Check item in cart--> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/> + <waitForPageLoad stepKey="waitForCartPageLoad"/> + <seeElement selector="{{CheckoutCartProductSection.ProductLinkByName(BaseConfigurableProduct.name)}}" stepKey="seeProductInCart"/> + <see selector="{{CheckoutCartProductSection.ProductOptionByNameAndAttribute(BaseConfigurableProduct.name, visualSwatchAttribute.default_label)}}" userInput="{{visualSwatchOption2.default_label}}" stepKey="seeSelectedSwatch"/> + <see selector="{{CheckoutCartProductSection.ProductOptionByNameAndAttribute(BaseConfigurableProduct.name, ProductOptionFile.title)}}" userInput="{{MagentoLogo.file}}" stepKey="seeCorrectOptionFile"/> + <!--Delete cart item--> + <click selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="deleteCartItem"/> + + <!--Delete product--> + <actionGroup ref="deleteProductBySku" stepKey="deleteProduct"> + <argument name="sku" value="{{BaseConfigurableProduct.sku}}"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Swatches/Test/Mftf/composer.json b/app/code/Magento/Swatches/Test/Mftf/composer.json new file mode 100644 index 0000000000000..76c8037995754 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/composer.json @@ -0,0 +1,28 @@ +{ + "name": "magento/functional-test-module-swatches", + "description": "Add Swatches to Products", + "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-config": "100.0.0-dev", + "magento/functional-test-module-configurable-product": "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-media-storage": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-theme": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-layered-navigation": "100.0.0-dev", + "magento/functional-test-module-swatches-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "proprietary" + ] +} diff --git a/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Attribute/Edit/Options/AbstractSwatchTest.php b/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Attribute/Edit/Options/AbstractSwatchTest.php index a86c745c7c810..0d0444ddda38b 100644 --- a/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Attribute/Edit/Options/AbstractSwatchTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Attribute/Edit/Options/AbstractSwatchTest.php @@ -160,6 +160,9 @@ public function testGetStoreOptionValues($values) $this->assertEquals($result, $values); } + /** + * @return array + */ public function dataForGetStoreOptionValues() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Product/Attribute/Edit/FormTest.php b/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Product/Attribute/Edit/FormTest.php index aad8741735813..168a682961bc6 100644 --- a/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Product/Attribute/Edit/FormTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Block/Adminhtml/Product/Attribute/Edit/FormTest.php @@ -21,6 +21,9 @@ public function testAddValues($values) $this->assertEquals($block, $result); } + /** + * @return array + */ public function dataForAddValues() { $additionalData = [ diff --git a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php index 19a05dad151c4..a28f3db8fb392 100644 --- a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Iframe/ShowTest.php @@ -130,6 +130,9 @@ public function testExecute($fileResult, $expectedResult) $this->controller->execute(); } + /** + * @return array + */ public function dataForExecute() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Product/Attribute/Plugin/SaveTest.php b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Product/Attribute/Plugin/SaveTest.php index 66f0d484c9e83..c9c826b3a7831 100644 --- a/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Product/Attribute/Plugin/SaveTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Controller/Adminhtml/Product/Attribute/Plugin/SaveTest.php @@ -39,6 +39,9 @@ public function testBeforeDispatch($dataRequest, $runTimes) $controller->beforeDispatch($subject, $request); } + /** + * @return array + */ public function dataRequest() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php index 96e84dc6eecd0..aa44f1f114037 100644 --- a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php @@ -148,6 +148,9 @@ protected function setUp() ); } + /** + * @return array + */ public function dataForAdditionalData() { $additionalData = [ @@ -199,6 +202,9 @@ public function testAssembleAdditionalDataEavAttribute($dataFromDb, $attributeDa $this->swatchHelperObject->assembleAdditionalDataEavAttribute($this->attributeMock); } + /** + * @return array + */ public function dataForAssembleEavAttribute() { $additionalData = [ @@ -243,6 +249,9 @@ public function testLoadFirstVariationWithSwatchImage($imageTypes, $expected, $r } } + /** + * @return array + */ public function dataForVariationWithSwatchImage() { return [ @@ -306,6 +315,9 @@ public function testLoadFirstVariationWithImage($imageTypes, $expected, $require } } + /** + * @return array + */ public function dataForVariationWithImage() { return [ @@ -394,6 +406,9 @@ public function testGetProductMediaGallery($mediaGallery, $image) } } + /** + * @return array + */ public function dataForMediaGallery() { return [ @@ -431,6 +446,10 @@ protected function getSwatchAttributes() ->willReturn($returnFromProvideMethod); } + /** + * @param array $attributes + * @param array $imageTypes + */ protected function getUsedProducts(array $attributes, array $imageTypes) { $this->productMock @@ -516,6 +535,9 @@ protected function addfilterByParent() $zendDbSelectMock->method('where')->willReturn($zendDbSelectMock); } + /** + * @return array + */ public function dataForCreateSwatchProduct() { $productMock = $this->createMock(\Magento\Catalog\Model\Product::class); @@ -552,6 +574,9 @@ public function dataForCreateSwatchProduct() ]; } + /** + * @return array + */ public function dataForCreateSwatchProductByFallback() { $productMock = $this->createMock(\Magento\Catalog\Model\Product::class); @@ -593,6 +618,9 @@ public function testGetSwatchAttributesAsArray($optionsArray, $attributeData, $e $this->assertEquals($result, $expected); } + /** + * @return array + */ public function dataForGettingSwatchAsArray() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php b/app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php index 9602291df4838..cb14e29ba3d64 100644 --- a/app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php @@ -106,6 +106,9 @@ public function testGetSwatchAttributeImage($swatchType, $expectedResult) $this->assertEquals($result, $expectedResult); } + /** + * @return array + */ public function dataForFullPath() { return [ @@ -194,6 +197,9 @@ public function testGetFolderNameSize($swatchType, $imageConfig, $expectedResult $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function dataForFolderName() { return [ @@ -281,6 +287,9 @@ public function testGetSwatchCachePath($swatchType, $expectedResult) $this->assertEquals($expectedResult, $this->mediaHelperObject->getSwatchCachePath($swatchType)); } + /** + * @return array + */ public function getSwatchTypes() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/EavAttributeTest.php b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/EavAttributeTest.php index 258347887ff08..21df8c795506b 100644 --- a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/EavAttributeTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/EavAttributeTest.php @@ -310,6 +310,9 @@ public function testBeforeSaveNotSwatch() $this->eavAttribute->beforeBeforeSave($this->attribute); } + /** + * @return array + */ public function visualSwatchProvider() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductImageTest.php b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductImageTest.php index b699d08076ef9..895a08062d999 100644 --- a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductImageTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductImageTest.php @@ -94,6 +94,9 @@ public function testBeforeGetImage($expected) $this->assertEquals([$this->productMock, $expected['page_handle'], []], $result); } + /** + * @param $expected + */ protected function getFilterArray($expected) { $this->eavConfigMock @@ -112,6 +115,9 @@ protected function getFilterArray($expected) ->willReturn($expected['getId']); } + /** + * @param $expected + */ protected function canReplaceImageWithSwatch($expected) { $this->swatchesHelperMock diff --git a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductTest.php b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductTest.php index 791ba83b374c6..d7422786aec67 100644 --- a/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Model/Plugin/ProductTest.php @@ -39,6 +39,9 @@ public function testAfterGetMediaAttributes($productType, $hasKey) } } + /** + * @return array + */ public function dataRoles() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php b/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php index 8292e0c2ed1bb..45c680366264b 100644 --- a/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Observer/AddFieldsToAttributeObserverTest.php @@ -73,6 +73,9 @@ public function testAddFields($expected) $this->observerMock->execute($this->eventObserverMock); } + /** + * @return array + */ public function dataAddFields() { return [ diff --git a/app/code/Magento/Swatches/Test/Unit/Observer/AddSwatchAttributeTypeObserverTest.php b/app/code/Magento/Swatches/Test/Unit/Observer/AddSwatchAttributeTypeObserverTest.php index c24dd820e0144..f78797d93cb0d 100644 --- a/app/code/Magento/Swatches/Test/Unit/Observer/AddSwatchAttributeTypeObserverTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Observer/AddSwatchAttributeTypeObserverTest.php @@ -66,6 +66,9 @@ public function testAddSwatchAttributeType($exp) $this->observerMock->execute($this->eventObserverMock); } + /** + * @return array + */ public function dataAddSwatch() { return [ diff --git a/app/code/Magento/Swatches/i18n/en_US.csv b/app/code/Magento/Swatches/i18n/en_US.csv index 8954bdb9228e5..9fe2ec7067570 100644 --- a/app/code/Magento/Swatches/i18n/en_US.csv +++ b/app/code/Magento/Swatches/i18n/en_US.csv @@ -41,3 +41,4 @@ Admin,Admin "The value of Admin must be unique.","The value of Admin must be unique." "The value of Admin must be unique. (%1)","The value of Admin must be unique. (%1)" Description,Description +More,More diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/view/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/view/renderer.phtml index fc1de530a66bd..b044e692313dc 100644 --- a/app/code/Magento/Swatches/view/frontend/templates/product/view/renderer.phtml +++ b/app/code/Magento/Swatches/view/frontend/templates/product/view/renderer.phtml @@ -20,6 +20,9 @@ "gallerySwitchStrategy": "<?php /* @escapeNotVerified */ echo $block->getVar('gallery_switch_strategy', 'Magento_ConfigurableProduct') ?: 'replace'; ?>" } + }, + "*" : { + "Magento_Swatches/js/catalog-add-to-cart": {} } } </script> diff --git a/app/code/Magento/Swatches/view/frontend/web/js/catalog-add-to-cart.js b/app/code/Magento/Swatches/view/frontend/web/js/catalog-add-to-cart.js index d699faae3a85f..80003ef68f1c4 100644 --- a/app/code/Magento/Swatches/view/frontend/web/js/catalog-add-to-cart.js +++ b/app/code/Magento/Swatches/view/frontend/web/js/catalog-add-to-cart.js @@ -7,11 +7,23 @@ require([ ], function ($) { 'use strict'; + /** + * Add selected swatch attributes to redirect url + * + * @see Magento_Catalog/js/catalog-add-to-cart + */ $('body').on('catalogCategoryAddToCartRedirect', function (event, data) { $(data.form).find('[name*="super"]').each(function (index, item) { - var $item = $(item); + var $item = $(item), + attr; + + if ($item.attr('data-attr-name')) { + attr = $item.attr('data-attr-name'); + } else { + attr = $item.parent().attr('attribute-code'); + } + data.redirectParameters.push(attr + '=' + $item.val()); - data.redirectParameters.push($item.attr('data-attr-name') + '=' + $item.val()); }); }); }); diff --git a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js index 3fea6b7dddf14..4a57bf796aabd 100644 --- a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js +++ b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js @@ -235,7 +235,7 @@ define([ controlLabelId: '', // text for more button - moreButtonText: 'More', + moreButtonText: $t('More'), // Callback url for media mediaCallback: '', @@ -1214,8 +1214,20 @@ define([ */ _EmulateSelected: function (selectedAttributes) { $.each(selectedAttributes, $.proxy(function (attributeCode, optionId) { - this.element.find('.' + this.options.classes.attributeClass + - '[attribute-code="' + attributeCode + '"] [option-id="' + optionId + '"]').trigger('click'); + var elem = this.element.find('.' + this.options.classes.attributeClass + + '[attribute-code="' + attributeCode + '"] [option-id="' + optionId + '"]'), + parentInput = elem.parent(); + + if (elem.hasClass('selected')) { + return; + } + + if (parentInput.hasClass(this.options.classes.selectClass)) { + parentInput.val(optionId); + parentInput.trigger('change'); + } else { + elem.trigger('click'); + } }, this)); }, diff --git a/app/code/Magento/SwatchesGraphQl/Test/Mftf/README.md b/app/code/Magento/SwatchesGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..3d31f777fa5b9 --- /dev/null +++ b/app/code/Magento/SwatchesGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Swatches Graph Ql Functional Tests + +The Functional Test Module for **Magento Swatches Graph Ql** module. diff --git a/app/code/Magento/SwatchesGraphQl/Test/Mftf/composer.json b/app/code/Magento/SwatchesGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..7a62d9bd33ab9 --- /dev/null +++ b/app/code/Magento/SwatchesGraphQl/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-swatches-graph-ql", + "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-swatches": "100.0.0-dev", + "magento/functional-test-module-catalog": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-catalog-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/LICENSE.txt b/app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/LICENSE.txt rename to app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/LICENSE_AFL.txt b/app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/LICENSE_AFL.txt rename to app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/README.md b/app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/README.md new file mode 100644 index 0000000000000..52402884b9f28 --- /dev/null +++ b/app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Swatches Layered Navigation Functional Tests + +The Functional Test Module for **Magento Swatches Layered Navigation** module. diff --git a/app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/composer.json b/app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/composer.json new file mode 100644 index 0000000000000..e37d2bfda247d --- /dev/null +++ b/app/code/Magento/SwatchesLayeredNavigation/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-swatches-layered-navigation", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0", + "magento/magento-composer-installer": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php index 96fc9a40d53d1..450203486f364 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php @@ -31,7 +31,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @var string */ - protected $_template = 'rate/form.phtml'; + protected $_template = 'Magento_Tax::rate/form.phtml'; /** * Tax data diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php index e1e866c06571b..9612b57f8d5d8 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php @@ -23,7 +23,7 @@ class Title extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'rate/title.phtml'; + protected $_template = 'Magento_Tax::rate/title.phtml'; /** * @var \Magento\Store\Model\StoreFactory diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php index 9cf96bc21e962..16d828542c5b9 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php @@ -20,7 +20,7 @@ class Add extends \Magento\Backend\Block\Template implements \Magento\Backend\Bl /** * @var string */ - protected $_template = 'toolbar/rate/add.phtml'; + protected $_template = 'Magento_Tax::toolbar/rate/add.phtml'; /** * @var \Magento\Backend\Block\Widget\Button\ButtonList diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php index 19c5fab72ac4b..4eaaa3be8a8f2 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php @@ -16,7 +16,7 @@ class Save extends \Magento\Backend\Block\Template implements \Magento\Backend\B /** * @var string */ - protected $_template = 'toolbar/rate/save.phtml'; + protected $_template = 'Magento_Tax::toolbar/rate/save.phtml'; /** * @var \Magento\Backend\Block\Widget\Button\ButtonList diff --git a/app/code/Magento/Tax/Block/Checkout/Grandtotal.php b/app/code/Magento/Tax/Block/Checkout/Grandtotal.php index 68de4cb24a487..77af1ad99ea2c 100644 --- a/app/code/Magento/Tax/Block/Checkout/Grandtotal.php +++ b/app/code/Magento/Tax/Block/Checkout/Grandtotal.php @@ -15,7 +15,7 @@ class Grandtotal extends \Magento\Checkout\Block\Total\DefaultTotal * * @var string */ - protected $_template = 'checkout/grandtotal.phtml'; + protected $_template = 'Magento_Tax::checkout/grandtotal.phtml'; /** * @var \Magento\Tax\Model\Config diff --git a/app/code/Magento/Tax/Block/Checkout/Shipping.php b/app/code/Magento/Tax/Block/Checkout/Shipping.php index e9098035053be..299c586fd224c 100644 --- a/app/code/Magento/Tax/Block/Checkout/Shipping.php +++ b/app/code/Magento/Tax/Block/Checkout/Shipping.php @@ -15,7 +15,7 @@ class Shipping extends \Magento\Checkout\Block\Total\DefaultTotal * * @var string */ - protected $_template = 'checkout/shipping.phtml'; + protected $_template = 'Magento_Tax::checkout/shipping.phtml'; /** * @var \Magento\Tax\Model\Config diff --git a/app/code/Magento/Tax/Block/Checkout/Subtotal.php b/app/code/Magento/Tax/Block/Checkout/Subtotal.php index 7a9059df08bab..22da07954159d 100644 --- a/app/code/Magento/Tax/Block/Checkout/Subtotal.php +++ b/app/code/Magento/Tax/Block/Checkout/Subtotal.php @@ -15,7 +15,7 @@ class Subtotal extends \Magento\Checkout\Block\Total\DefaultTotal * * @var string */ - protected $_template = 'checkout/subtotal.phtml'; + protected $_template = 'Magento_Tax::checkout/subtotal.phtml'; /** * @var \Magento\Tax\Model\Config diff --git a/app/code/Magento/Tax/Block/Checkout/Tax.php b/app/code/Magento/Tax/Block/Checkout/Tax.php index f741e64019de1..0a86c0312ab1c 100644 --- a/app/code/Magento/Tax/Block/Checkout/Tax.php +++ b/app/code/Magento/Tax/Block/Checkout/Tax.php @@ -14,5 +14,5 @@ class Tax extends \Magento\Checkout\Block\Total\DefaultTotal /** * @var string */ - protected $_template = 'checkout/tax.phtml'; + protected $_template = 'Magento_Tax::checkout/tax.phtml'; } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/ActionGroup/AdminTaxActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminTaxActionGroup.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/ActionGroup/AdminTaxActionGroup.xml rename to app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminTaxActionGroup.xml index 946402d080e99..6d6e5cea0fd34 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/ActionGroup/AdminTaxActionGroup.xml +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminTaxActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!-- Change the tax configuration to display in cart and checkout flow --> <actionGroup name="editTaxConfigurationByUI"> <!-- navigate to the tax configuration page --> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Data/TaxCodeData.xml b/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml similarity index 80% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Data/TaxCodeData.xml rename to app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml index ac603751ddc78..e786616119c92 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Data/TaxCodeData.xml +++ b/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml @@ -7,7 +7,7 @@ --> <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> <entity name="SimpleTaxNY" type="tax"> <data key="state">New York</data> <data key="country">United States</data> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/LICENSE.txt b/app/code/Magento/Tax/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/LICENSE.txt rename to app/code/Magento/Tax/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/LICENSE_AFL.txt b/app/code/Magento/Tax/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/LICENSE_AFL.txt rename to app/code/Magento/Tax/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Tax/Test/Mftf/Page/AdminNewTaxRulePage.xml b/app/code/Magento/Tax/Test/Mftf/Page/AdminNewTaxRulePage.xml new file mode 100644 index 0000000000000..cf7fcf041c1b1 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/Page/AdminNewTaxRulePage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminNewTaxRulePage" url="tax/rule/new/" module="Magento_Tax" area="admin"> + <section name="AdminTaxRulesSection"/> + </page> +</pages> diff --git a/app/code/Magento/Tax/Test/Mftf/Page/AdminTaxConfigurationPage.xml b/app/code/Magento/Tax/Test/Mftf/Page/AdminTaxConfigurationPage.xml new file mode 100644 index 0000000000000..d18e300983b5f --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/Page/AdminTaxConfigurationPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminTaxConfigurationPage" url="admin/system_config/edit/section/tax/" area="admin" module="Magento_Tax"> + <section name="AdminConfigureTaxSection"/> + </page> +</pages> diff --git a/app/code/Magento/Tax/Test/Mftf/Page/AdminTaxRateGridPage.xml b/app/code/Magento/Tax/Test/Mftf/Page/AdminTaxRateGridPage.xml new file mode 100644 index 0000000000000..6073766a81692 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/Page/AdminTaxRateGridPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminTaxRateGridPage" url="tax/rate/" area="admin" module="Magento_Tax"> + <section name="AdminSecondaryGridSection"/> + </page> +</pages> diff --git a/app/code/Magento/Tax/Test/Mftf/Page/AdminTaxRuleGridPage.xml b/app/code/Magento/Tax/Test/Mftf/Page/AdminTaxRuleGridPage.xml new file mode 100644 index 0000000000000..8c75237a203a6 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/Page/AdminTaxRuleGridPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminTaxRuleGridPage" url="tax/rule" area="admin" module="Magento_Tax"> + <section name="AdminSecondaryGridSection"/> + <section name="AdminGridMainControls"/> + </page> +</pages> diff --git a/app/code/Magento/Tax/Test/Mftf/README.md b/app/code/Magento/Tax/Test/Mftf/README.md new file mode 100644 index 0000000000000..43f3bace41c18 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Tax Functional Tests + +The Functional Test Module for **Magento Tax** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Section/AdminConfigureTaxSection.xml b/app/code/Magento/Tax/Test/Mftf/Section/AdminConfigureTaxSection.xml similarity index 93% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Section/AdminConfigureTaxSection.xml rename to app/code/Magento/Tax/Test/Mftf/Section/AdminConfigureTaxSection.xml index 8ae17928d3bbd..ad68179119834 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Section/AdminConfigureTaxSection.xml +++ b/app/code/Magento/Tax/Test/Mftf/Section/AdminConfigureTaxSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminConfigureTaxSection"> <!-- on page /admin/admin/system_config/edit/section/tax/ --> <element name="taxClasses" type="block" selector="#tax_classes-head" timeout="30"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Section/AdminTaxRulesSection.xml b/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRulesSection.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Section/AdminTaxRulesSection.xml rename to app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRulesSection.xml index df3a56a36bc4a..f7b72263c1255 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Section/AdminTaxRulesSection.xml +++ b/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRulesSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminTaxRulesSection"> <!-- on page /admin/tax/rule/new/ --> <element name="ruleName" type="input" selector="#anchor-content #code"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Test/StorefrontTaxQuoteCartTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Test/StorefrontTaxQuoteCartTest.xml rename to app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml index 2607775ce7f36..752585830638f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Test/StorefrontTaxQuoteCartTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml @@ -1,458 +1,458 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="StorefrontTaxQuoteCartLoggedInSimple"> - <annotations> - <features value="Tax"/> - <stories value="Tax Calculation in Shopping Cart"/> - <title value="Tax for Simple Product Quote should be recalculated in Shopping Cart for Logged in Customer with Default Address"/> - <description value="Tax for Simple Product Quote should be recalculated in Shopping Cart for Logged in Customer with Default Address"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-295"/> - <group value="Tax"/> - </annotations> - <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> - - <!-- Fill in rules to display tax in the cart --> - <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> - - <!-- Go to tax rule page --> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> - <waitForPageLoad stepKey="waitForTaxRatePage"/> - <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> - <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> - - <!-- Add NY and CA tax rules --> - <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - - <!-- Fill out form for a new user with address --> - <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> - <argument name="Customer" value="Simple_US_Customer_NY"/> - </actionGroup> - - <actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo"> - <argument name="Address" value="US_Address_NY"/> - </actionGroup> - </before> - <after> - <!-- Go to the tax rule page and delete the row we created--> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> - <waitForPageLoad stepKey="waitForRulesPage"/> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> - <argument name="name" value="SampleRule"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Go to the tax rate page --> - <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> - <waitForPageLoad stepKey="waitForRatesPage"/> - - <!-- Delete the two tax rates that were created --> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Ensure tax wont be shown in the cart --> - <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> - - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> - </after> - - <!-- Go to the created product page and add it to the cart --> - <amOnPage url="$$simpleProduct1.sku$$.html" stepKey="goToSimpleProductPage"/> - <waitForPageLoad stepKey="waitForSimpleProductPage"/> - <click stepKey="addSimpleProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> - <waitForPageLoad stepKey="waitForProductAdded"/> - <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> - - <!-- Assert that taxes are applied correctly for NY --> - <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> - <waitForPageLoad stepKey="waitForCart"/> - - <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.30"/> - <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> - <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.30"/> - <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - - <!-- Change the address --> - <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress"> - <argument name="taxCode" value="SimpleTaxSwiss"/> - </actionGroup> - - <!-- Assert that taxes are applied correctly for Switzerland --> - <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$0.00"/> - <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$128.00"/> - <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - - <!-- Change the address --> - <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress2"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <!-- Assert that taxes are applied correctly for CA --> - <see stepKey="seeTax3" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.15"/> - <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> - <see stepKey="seeTotalIncl3" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.15"/> - <see stepKey="seeTotalExcl3" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - </test> - - - <test name="StorefrontTaxQuoteCartLoggedInVirtual"> - <annotations> - <features value="Tax"/> - <stories value="Tax Calculation in Shopping Cart"/> - <title value="Tax for Virtual Product Quote should be recalculated in Shopping Cart for Logged in Customer with Default Address"/> - <description value="Tax for Virtual Product Quote should be recalculated in Shopping Cart for Logged in Customer with Default Address"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-296"/> - <group value="Tax"/> - </annotations> - <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - <createData entity="VirtualProduct" stepKey="virtualProduct1"/> - - <!-- Fill in rules to display tax in the cart --> - <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> - - <!-- Go to tax rule page --> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> - <waitForPageLoad stepKey="waitForTaxRatePage"/> - <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> - <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> - - <!-- Add NY and CA tax rules --> - <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - - <!-- Fill out form for a new user with address --> - <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> - <argument name="Customer" value="Simple_US_Customer_NY"/> - </actionGroup> - - <actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo"> - <argument name="Address" value="US_Address_NY"/> - </actionGroup> - </before> - <after> - <!-- Go to the tax rule page and delete the row we created--> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> - <waitForPageLoad stepKey="waitForRulesPage"/> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> - <argument name="name" value="SampleRule"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Go to the tax rate page --> - <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> - <waitForPageLoad stepKey="waitForRatesPage"/> - - <!-- Delete the two tax rates that were created --> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Ensure tax wont be shown in the cart --> - <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> - - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - <deleteData createDataKey="virtualProduct1" stepKey="deleteVirtualProduct1"/> - </after> - - <!-- Go to the created product page and add it to the cart --> - <amOnPage url="$$virtualProduct1.sku$$.html" stepKey="goToVirtualProductPage"/> - <waitForPageLoad stepKey="waitForVirtualProductPage"/> - <click stepKey="addVirtualProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> - <waitForPageLoad stepKey="waitForProductAdded"/> - <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> - - <!-- Assert that taxes are applied correctly for NY --> - <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> - <waitForPageLoad stepKey="waitForCart"/> - - <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.37"/> - <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> - <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.36"/> - <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> - - <!-- Change the address --> - <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress"> - <argument name="taxCode" value="SimpleTaxSwiss"/> - </actionGroup> - - <!-- Assert that taxes are applied correctly for Switzerland --> - <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$0.00"/> - <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$$$virtualProduct1.price$$"/> - <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$$virtualProduct1.price$$"/> - - <!-- Change the address --> - <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress2"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <!-- Assert that taxes are applied correctly for CA --> - <see stepKey="seeTax3" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.25"/> - <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> - <see stepKey="seeTotalIncl3" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.24"/> - <see stepKey="seeTotalExcl3" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> - </test> - - <test name="StorefrontTaxQuoteCartGuestSimple"> - <annotations> - <features value="Tax"/> - <stories value="Tax Calculation in Shopping Cart"/> - <title value="Tax for Simple Product Quote should be recalculated in Shopping Cart for Guest Customer"/> - <description value="Tax for Simple Product Quote should be recalculated in Shopping Cart for Guest Customer#anch"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-297"/> - <group value="Tax"/> - <group value="skip"/> - <!-- skipped due to MAGETWO-90539 --> - </annotations> - <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> - - <!-- Fill in rules to display tax in the cart --> - <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> - - <!-- Go to tax rule page --> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> - <waitForPageLoad stepKey="waitForTaxRatePage"/> - <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> - <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> - - <!-- Add NY and CA tax rules --> - <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - </before> - <after> - <!-- Go to the tax rule page and delete the row we created--> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> - <waitForPageLoad stepKey="waitForRulesPage"/> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> - <argument name="name" value="SampleRule"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Go to the tax rate page --> - <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> - <waitForPageLoad stepKey="waitForRatesPage"/> - - <!-- Delete the two tax rates that were created --> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Ensure tax wont be shown in the cart --> - <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> - - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> - </after> - - <!-- Go to the created product page and add it to the cart --> - <amOnPage url="$$simpleProduct1.sku$$.html" stepKey="goToSimpleProductPage"/> - <waitForPageLoad stepKey="waitForSimpleProductPage"/> - <click stepKey="addSimpleProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> - <waitForPageLoad stepKey="waitForProductAdded"/> - <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> - - <!-- Assert that taxes are applied correctly for CA --> - <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> - <waitForPageLoad stepKey="waitForCart"/> - - <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax3" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.15"/> - <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> - <see stepKey="seeTotalIncl3" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.15"/> - <see stepKey="seeTotalExcl3" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - - <!-- Change the address --> - <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress"> - <argument name="taxCode" value="SimpleTaxSwiss"/> - </actionGroup> - - <!-- Assert that taxes are applied correctly for Switzerland --> - <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$0.00"/> - <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$128.00"/> - <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - - <!-- Change the address --> - <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress2"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <!-- Assert that taxes are applied correctly for NY --> - <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.30"/> - <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> - <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.30"/> - <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - </test> - - <test name="StorefrontTaxQuoteCartGuestVirtual"> - <annotations> - <features value="Tax"/> - <stories value="Tax Calculation in Shopping Cart"/> - <title value="Tax for Virtual Product Quote should be recalculated in Shopping Cart for Guest Customer"/> - <description value="Tax for Virtual Product Quote should be recalculated in Shopping Cart for Guest Customer"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-298"/> - <group value="Tax"/> - <group value="skip"/> - <!-- Skipped due to MAGETWO-90539 --> - </annotations> - <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - <createData entity="VirtualProduct" stepKey="virtualProduct1"/> - - <!-- Fill in rules to display tax in the cart --> - <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> - - <!-- Go to tax rule page --> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> - <waitForPageLoad stepKey="waitForTaxRatePage"/> - <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> - <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> - - <!-- Add NY and CA tax rules --> - <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - </before> - <after> - <!-- Go to the tax rule page and delete the row we created--> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> - <waitForPageLoad stepKey="waitForRulesPage"/> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> - <argument name="name" value="SampleRule"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Go to the tax rate page --> - <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> - <waitForPageLoad stepKey="waitForRatesPage"/> - - <!-- Delete the two tax rates that were created --> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Ensure tax wont be shown in the cart --> - <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> - - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - <deleteData createDataKey="virtualProduct1" stepKey="deleteVirtualProduct1"/> - </after> - - <!-- Go to the created product page and add it to the cart --> - <amOnPage url="$$virtualProduct1.sku$$.html" stepKey="goToVirtualProductPage"/> - <waitForPageLoad stepKey="waitForVirtualProductPage"/> - <click stepKey="addVirtualProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> - <waitForPageLoad stepKey="waitForProductAdded"/> - <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> - - <!-- Assert that taxes are applied correctly for NY --> - <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> - <waitForPageLoad stepKey="waitForCart"/> - - <!-- Assert that taxes are applied correctly for CA --> - <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax3" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.25"/> - <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> - <see stepKey="seeTotalIncl3" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.24"/> - <see stepKey="seeTotalExcl3" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> - - <!-- Change the address --> - <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress"> - <argument name="taxCode" value="SimpleTaxSwiss"/> - </actionGroup> - - <!-- Assert that taxes are applied correctly for Switzerland --> - <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$0.00"/> - <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$$$virtualProduct1.price$$"/> - <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$$virtualProduct1.price$$"/> - - <!-- Change the address --> - <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress2"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <!-- Assert that taxes are applied correctly for NY --> - <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.37"/> - <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> - <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.36"/> - <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> - </test> -</tests> +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="StorefrontTaxQuoteCartLoggedInSimple"> + <annotations> + <features value="Tax"/> + <stories value="Tax Calculation in Shopping Cart"/> + <title value="Tax for Simple Product Quote should be recalculated in Shopping Cart for Logged in Customer with Default Address"/> + <description value="Tax for Simple Product Quote should be recalculated in Shopping Cart for Logged in Customer with Default Address"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-295"/> + <group value="Tax"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> + + <!-- Fill in rules to display tax in the cart --> + <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> + + <!-- Go to tax rule page --> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> + <waitForPageLoad stepKey="waitForTaxRatePage"/> + <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> + <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> + + <!-- Add NY and CA tax rules --> + <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + + <!-- Fill out form for a new user with address --> + <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> + <argument name="Customer" value="Simple_US_Customer_NY"/> + </actionGroup> + + <actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo"> + <argument name="Address" value="US_Address_NY"/> + </actionGroup> + </before> + <after> + <!-- Go to the tax rule page and delete the row we created--> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> + <waitForPageLoad stepKey="waitForRulesPage"/> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> + <argument name="name" value="SampleRule"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Go to the tax rate page --> + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> + <waitForPageLoad stepKey="waitForRatesPage"/> + + <!-- Delete the two tax rates that were created --> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> + <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> + <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Ensure tax wont be shown in the cart --> + <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> + + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> + </after> + + <!-- Go to the created product page and add it to the cart --> + <amOnPage url="$$simpleProduct1.sku$$.html" stepKey="goToSimpleProductPage"/> + <waitForPageLoad stepKey="waitForSimpleProductPage"/> + <click stepKey="addSimpleProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForProductAdded"/> + <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> + + <!-- Assert that taxes are applied correctly for NY --> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForCart"/> + + <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.30"/> + <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> + <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.30"/> + <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + + <!-- Change the address --> + <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress"> + <argument name="taxCode" value="SimpleTaxSwiss"/> + </actionGroup> + + <!-- Assert that taxes are applied correctly for Switzerland --> + <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$0.00"/> + <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$128.00"/> + <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + + <!-- Change the address --> + <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress2"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <!-- Assert that taxes are applied correctly for CA --> + <see stepKey="seeTax3" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.15"/> + <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> + <see stepKey="seeTotalIncl3" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.15"/> + <see stepKey="seeTotalExcl3" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + </test> + + + <test name="StorefrontTaxQuoteCartLoggedInVirtual"> + <annotations> + <features value="Tax"/> + <stories value="Tax Calculation in Shopping Cart"/> + <title value="Tax for Virtual Product Quote should be recalculated in Shopping Cart for Logged in Customer with Default Address"/> + <description value="Tax for Virtual Product Quote should be recalculated in Shopping Cart for Logged in Customer with Default Address"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-296"/> + <group value="Tax"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="VirtualProduct" stepKey="virtualProduct1"/> + + <!-- Fill in rules to display tax in the cart --> + <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> + + <!-- Go to tax rule page --> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> + <waitForPageLoad stepKey="waitForTaxRatePage"/> + <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> + <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> + + <!-- Add NY and CA tax rules --> + <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + + <!-- Fill out form for a new user with address --> + <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> + <argument name="Customer" value="Simple_US_Customer_NY"/> + </actionGroup> + + <actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo"> + <argument name="Address" value="US_Address_NY"/> + </actionGroup> + </before> + <after> + <!-- Go to the tax rule page and delete the row we created--> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> + <waitForPageLoad stepKey="waitForRulesPage"/> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> + <argument name="name" value="SampleRule"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Go to the tax rate page --> + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> + <waitForPageLoad stepKey="waitForRatesPage"/> + + <!-- Delete the two tax rates that were created --> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> + <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> + <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Ensure tax wont be shown in the cart --> + <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> + + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="virtualProduct1" stepKey="deleteVirtualProduct1"/> + </after> + + <!-- Go to the created product page and add it to the cart --> + <amOnPage url="$$virtualProduct1.sku$$.html" stepKey="goToVirtualProductPage"/> + <waitForPageLoad stepKey="waitForVirtualProductPage"/> + <click stepKey="addVirtualProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForProductAdded"/> + <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> + + <!-- Assert that taxes are applied correctly for NY --> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForCart"/> + + <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.37"/> + <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> + <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.36"/> + <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> + + <!-- Change the address --> + <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress"> + <argument name="taxCode" value="SimpleTaxSwiss"/> + </actionGroup> + + <!-- Assert that taxes are applied correctly for Switzerland --> + <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$0.00"/> + <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$$$virtualProduct1.price$$"/> + <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$$virtualProduct1.price$$"/> + + <!-- Change the address --> + <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress2"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <!-- Assert that taxes are applied correctly for CA --> + <see stepKey="seeTax3" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.25"/> + <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> + <see stepKey="seeTotalIncl3" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.24"/> + <see stepKey="seeTotalExcl3" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> + </test> + + <test name="StorefrontTaxQuoteCartGuestSimple"> + <annotations> + <features value="Tax"/> + <stories value="Tax Calculation in Shopping Cart"/> + <title value="Tax for Simple Product Quote should be recalculated in Shopping Cart for Guest Customer"/> + <description value="Tax for Simple Product Quote should be recalculated in Shopping Cart for Guest Customer#anch"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-297"/> + <group value="Tax"/> + <group value="skip"/> + <!-- skipped due to MAGETWO-90539 --> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> + + <!-- Fill in rules to display tax in the cart --> + <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> + + <!-- Go to tax rule page --> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> + <waitForPageLoad stepKey="waitForTaxRatePage"/> + <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> + <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> + + <!-- Add NY and CA tax rules --> + <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + </before> + <after> + <!-- Go to the tax rule page and delete the row we created--> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> + <waitForPageLoad stepKey="waitForRulesPage"/> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> + <argument name="name" value="SampleRule"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Go to the tax rate page --> + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> + <waitForPageLoad stepKey="waitForRatesPage"/> + + <!-- Delete the two tax rates that were created --> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> + <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> + <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Ensure tax wont be shown in the cart --> + <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> + + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> + </after> + + <!-- Go to the created product page and add it to the cart --> + <amOnPage url="$$simpleProduct1.sku$$.html" stepKey="goToSimpleProductPage"/> + <waitForPageLoad stepKey="waitForSimpleProductPage"/> + <click stepKey="addSimpleProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForProductAdded"/> + <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> + + <!-- Assert that taxes are applied correctly for CA --> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForCart"/> + + <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax3" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.15"/> + <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> + <see stepKey="seeTotalIncl3" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.15"/> + <see stepKey="seeTotalExcl3" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + + <!-- Change the address --> + <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress"> + <argument name="taxCode" value="SimpleTaxSwiss"/> + </actionGroup> + + <!-- Assert that taxes are applied correctly for Switzerland --> + <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$0.00"/> + <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$128.00"/> + <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + + <!-- Change the address --> + <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress2"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <!-- Assert that taxes are applied correctly for NY --> + <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.30"/> + <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> + <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.30"/> + <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + </test> + + <test name="StorefrontTaxQuoteCartGuestVirtual"> + <annotations> + <features value="Tax"/> + <stories value="Tax Calculation in Shopping Cart"/> + <title value="Tax for Virtual Product Quote should be recalculated in Shopping Cart for Guest Customer"/> + <description value="Tax for Virtual Product Quote should be recalculated in Shopping Cart for Guest Customer"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-298"/> + <group value="Tax"/> + <group value="skip"/> + <!-- Skipped due to MAGETWO-90539 --> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="VirtualProduct" stepKey="virtualProduct1"/> + + <!-- Fill in rules to display tax in the cart --> + <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> + + <!-- Go to tax rule page --> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> + <waitForPageLoad stepKey="waitForTaxRatePage"/> + <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> + <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> + + <!-- Add NY and CA tax rules --> + <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + </before> + <after> + <!-- Go to the tax rule page and delete the row we created--> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> + <waitForPageLoad stepKey="waitForRulesPage"/> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> + <argument name="name" value="SampleRule"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Go to the tax rate page --> + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> + <waitForPageLoad stepKey="waitForRatesPage"/> + + <!-- Delete the two tax rates that were created --> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> + <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> + <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Ensure tax wont be shown in the cart --> + <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> + + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="virtualProduct1" stepKey="deleteVirtualProduct1"/> + </after> + + <!-- Go to the created product page and add it to the cart --> + <amOnPage url="$$virtualProduct1.sku$$.html" stepKey="goToVirtualProductPage"/> + <waitForPageLoad stepKey="waitForVirtualProductPage"/> + <click stepKey="addVirtualProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForProductAdded"/> + <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> + + <!-- Assert that taxes are applied correctly for NY --> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForCart"/> + + <!-- Assert that taxes are applied correctly for CA --> + <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax3" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.25"/> + <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> + <see stepKey="seeTotalIncl3" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.24"/> + <see stepKey="seeTotalExcl3" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> + + <!-- Change the address --> + <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress"> + <argument name="taxCode" value="SimpleTaxSwiss"/> + </actionGroup> + + <!-- Assert that taxes are applied correctly for Switzerland --> + <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$0.00"/> + <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$$$virtualProduct1.price$$"/> + <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$$virtualProduct1.price$$"/> + + <!-- Change the address --> + <actionGroup ref="changeSummaryQuoteAddress" stepKey="changeAddress2"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <!-- Assert that taxes are applied correctly for NY --> + <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.37"/> + <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> + <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.36"/> + <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Test/StorefrontTaxQuoteCheckoutTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Test/StorefrontTaxQuoteCheckoutTest.xml rename to app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml index 6b60201a00709..f051d4f8c3b82 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Test/StorefrontTaxQuoteCheckoutTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml @@ -1,458 +1,458 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="StorefrontTaxQuoteCheckoutGuestVirtual"> - <annotations> - <features value="Tax"/> - <stories value="Tax Calculation in One Page Checkout"/> - <title value="Tax for Virtual Product Quote should be recalculated according to inputted data on Checkout flow for Guest Customer"/> - <description value="Tax for Virtual Product Quote should be recalculated according to inputted data on Checkout flow for Guest Customer"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-255"/> - <group value="Tax"/> - </annotations> - <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - <createData entity="VirtualProduct" stepKey="virtualProduct1"/> - - <!-- Fill in rules to display tax in the cart --> - <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> - - <!-- Go to tax rule page --> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> - <waitForPageLoad stepKey="waitForTaxRatePage"/> - <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> - <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> - - <!-- Add NY and CA tax rules --> - <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - </before> - <after> - <!-- Go to the tax rule page and delete the row we created--> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> - <waitForPageLoad stepKey="waitForRulesPage"/> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> - <argument name="name" value="SampleRule"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Go to the tax rate page --> - <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> - <waitForPageLoad stepKey="waitForRatesPage"/> - - <!-- Delete the two tax rates that were created --> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Ensure tax wont be shown in the cart --> - <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> - - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - <deleteData createDataKey="virtualProduct1" stepKey="deleteVirtualProduct1"/> - </after> - - <!-- Go to the created product page and add it to the cart --> - <amOnPage url="$$virtualProduct1.sku$$.html" stepKey="goToVirtualProductPage"/> - <waitForPageLoad stepKey="waitForVirtualProductPage"/> - <click stepKey="addVirtualProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> - <waitForPageLoad stepKey="waitForProductAdded"/> - <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> - - <!-- Assert that taxes are applied correctly for CA --> - <amOnPage url="{{CheckoutPage.url}}" stepKey="goToCheckout"/> - <waitForPageLoad stepKey="waitForShippingSection"/> - - <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.25"/> - <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> - <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.24"/> - <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> - - <!-- Change the address --> - <actionGroup ref="GuestCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress"> - <argument name="customerVar" value="Simple_US_Customer_NY"/> - <argument name="customerAddressVar" value="US_Address_NY"/> - </actionGroup> - <click stepKey="saveAddress" selector="{{CheckoutShippingSection.updateAddress}}"/> - - <waitForPageLoad stepKey="waitForAddressSaved"/> - <see stepKey="seeEditButton" selector="{{CheckoutShippingSection.editAddressButton}}" userInput="Edit"/> - <see stepKey="seeAddress2" selector="{{CheckoutShippingSection.defaultShipping}}" userInput="{{SimpleTaxNY.state}}"/> - - <!-- Assert that taxes are applied correctly for NY --> - <waitForElementVisible stepKey="waitForOverviewVisible2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.37"/> - <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> - <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.36"/> - <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> - </test> - - <test name="StorefrontTaxQuoteCheckoutLoggedInSimple"> - <annotations> - <features value="Tax"/> - <stories value="Tax Calculation in One Page Checkout"/> - <title value="Tax for Simple Product Quote should be recalculated according to inputted data on Checkout flow for Logged in Customer"/> - <description value="Tax for Simple Product Quote should be recalculated according to inputted data on Checkout flow for Logged in Customer"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-256"/> - <group value="Tax"/> - </annotations> - <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> - - <!-- Fill in rules to display tax in the cart --> - <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> - - <!-- Go to tax rule page --> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> - <waitForPageLoad stepKey="waitForTaxRatePage"/> - <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> - <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> - - <!-- Add NY and CA tax rules --> - <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - - <!-- Fill out form for a new user with address --> - <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> - <argument name="Customer" value="Simple_US_Customer_NY"/> - </actionGroup> - - <actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo"> - <argument name="Address" value="US_Address_NY"/> - </actionGroup> - </before> - <after> - <!-- Go to the tax rule page and delete the row we created--> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> - <waitForPageLoad stepKey="waitForRulesPage"/> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> - <argument name="name" value="SampleRule"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Go to the tax rate page --> - <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> - <waitForPageLoad stepKey="waitForRatesPage"/> - - <!-- Delete the two tax rates that were created --> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Ensure tax wont be shown in the cart --> - <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> - - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> - </after> - - <!-- Go to the created product page and add it to the cart --> - <amOnPage url="$$simpleProduct1.sku$$.html" stepKey="goToSimpleProductPage"/> - <waitForPageLoad stepKey="waitForSimpleProductPage"/> - <click stepKey="addSimpleProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> - <waitForPageLoad stepKey="waitForProductAdded"/> - <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> - - <!-- Assert that taxes are applied correctly for NY --> - <amOnPage url="{{CheckoutPage.url}}" stepKey="goToCheckout"/> - <waitForPageLoad stepKey="waitForShippingSection"/> - <see stepKey="seeAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{SimpleTaxNY.state}}"/> - <click stepKey="clickNext" selector="{{CheckoutShippingSection.next}}"/> - <waitForPageLoad stepKey="waitForReviewAndPayments"/> - - <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.30"/> - <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> - <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.30"/> - <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - - <!-- Go back to the shipping page and change the address --> - <click stepKey="goBackToShipping" selector="{{CheckoutShippingSection.shippingTab}}"/> - <click stepKey="addNewAddress" selector="{{CheckoutShippingSection.newAddressButton}}"/> - <waitForPageLoad stepKey="waitForAddressPopUp"/> - - <actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress"> - <argument name="Address" value="US_Address_CA"/> - <argument name="classPrefix" value="._show"/> - </actionGroup> - <click stepKey="saveAddress" selector="{{CheckoutShippingSection.saveAddress}}"/> - - <waitForPageLoad stepKey="waitForAddressSaved"/> - <see stepKey="seeAddress2" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{SimpleTaxCA.state}}"/> - <click stepKey="clickNext2" selector="{{CheckoutShippingSection.next}}"/> - <waitForPageLoad stepKey="waitForReviewAndPayments2"/> - - <!-- Assert that taxes are applied correctly for CA --> - <waitForElementVisible stepKey="waitForOverviewVisible2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.15"/> - <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> - <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.15"/> - <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - </test> - - <test name="StorefrontTaxQuoteCheckoutGuestSimple"> - <annotations> - <features value="Tax"/> - <stories value="Tax Calculation in One Page Checkout"/> - <title value="Tax for Simple Product Quote should be recalculated according to inputted data on Checkout flow for Guest Customer"/> - <description value="Tax for Simple Product Quote should be recalculated according to inputted data on Checkout flow for Guest Customer"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-258"/> - <group value="Tax"/> - </annotations> - <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> - - <!-- Fill in rules to display tax in the cart --> - <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> - - <!-- Go to tax rule page --> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> - <waitForPageLoad stepKey="waitForTaxRatePage"/> - <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> - <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> - - <!-- Add NY and CA tax rules --> - <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - </before> - <after> - <!-- Go to the tax rule page and delete the row we created--> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> - <waitForPageLoad stepKey="waitForRulesPage"/> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> - <argument name="name" value="SampleRule"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Go to the tax rate page --> - <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> - <waitForPageLoad stepKey="waitForRatesPage"/> - - <!-- Delete the two tax rates that were created --> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Ensure tax wont be shown in the cart --> - <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> - - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> - </after> - - <!-- Go to the created product page and add it to the cart --> - <amOnPage url="$$simpleProduct1.sku$$.html" stepKey="goToSimpleProductPage"/> - <waitForPageLoad stepKey="waitForSimpleProductPage"/> - <click stepKey="addSimpleProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> - <waitForPageLoad stepKey="waitForProductAdded"/> - <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> - - <!-- Fill in address for CA --> - <amOnPage url="{{CheckoutPage.url}}" stepKey="goToCheckout"/> - <waitForPageLoad stepKey="waitForShippingSection"/> - <fillField selector="{{CheckoutShippingSection.email}}" userInput="{{Simple_US_Customer_CA.email}}" stepKey="enterEmail"/> - <waitForLoadingMaskToDisappear stepKey="waitEmailLoad" /> - <actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress"> - <argument name="Address" value="US_Address_CA"/> - </actionGroup> - <click stepKey="clickNext" selector="{{CheckoutShippingSection.next}}"/> - <see stepKey="seeAddress" selector="{{CheckoutShippingSection.defaultShipping}}" userInput="{{SimpleTaxCA.state}}"/> - <see stepKey="seeShipTo" selector="{{CheckoutPaymentSection.shipToInfomation}}" userInput="{{SimpleTaxCA.state}}"/> - - <!-- Assert that taxes are applied correctly for CA --> - <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.15"/> - <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> - <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.15"/> - <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - - <!-- Go back to the shipping page and change the address --> - <click stepKey="goBackToShipping" selector="{{CheckoutShippingSection.shippingTab}}"/> - <actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress2"> - <argument name="Address" value="US_Address_NY"/> - </actionGroup> - <click stepKey="clickNext2" selector="{{CheckoutShippingSection.next}}"/> - <see stepKey="seeShipTo2" selector="{{CheckoutPaymentSection.shipToInfomation}}" userInput="{{SimpleTaxNY.state}}"/> - - <!-- Assert that taxes are applied correctly for NY --> - <waitForElementVisible stepKey="waitForOverviewVisible2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.30"/> - <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> - <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.30"/> - <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> - </test> - - <test name="StorefrontTaxQuoteCheckoutLoggedInVirtual"> - <annotations> - <features value="Tax"/> - <stories value="Tax Calculation in One Page Checkout"/> - <title value="Tax for Virtual Product Quote should be recalculated according to inputted data on Checkout flow for Logged in Customer"/> - <description value="Tax for Virtual Product Quote should be recalculated according to inputted data on Checkout flow for Logged in Customer"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-259"/> - <group value="Tax"/> - </annotations> - <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> - <createData entity="VirtualProduct" stepKey="virtualProduct1"/> - - <!-- Fill in rules to display tax in the cart --> - <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> - - <!-- Go to tax rule page --> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> - <waitForPageLoad stepKey="waitForTaxRatePage"/> - <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> - <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> - - <!-- Add NY and CA tax rules --> - <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> - <argument name="taxCode" value="SimpleTaxNY"/> - </actionGroup> - - <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> - <argument name="taxCode" value="SimpleTaxCA"/> - </actionGroup> - - <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - - <!-- Fill out form for a new user with address --> - <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> - <argument name="Customer" value="Simple_US_Customer_NY"/> - </actionGroup> - - <actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo"> - <argument name="Address" value="US_Address_NY"/> - </actionGroup> - </before> - <after> - <!-- Go to the tax rule page and delete the row we created--> - <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> - <waitForPageLoad stepKey="waitForRulesPage"/> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> - <argument name="name" value="SampleRule"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Go to the tax rate page --> - <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> - <waitForPageLoad stepKey="waitForRatesPage"/> - - <!-- Delete the two tax rates that were created --> - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> - <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> - </actionGroup> - - <!-- Ensure tax wont be shown in the cart --> - <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> - - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - <deleteData createDataKey="virtualProduct1" stepKey="deleteVirtualProduct1"/> - </after> - - <!-- Go to the created product page and add it to the cart --> - <amOnPage url="$$virtualProduct1.sku$$.html" stepKey="goToVirtualProductPage"/> - <waitForPageLoad stepKey="waitForVirtualProductPage"/> - <click stepKey="addVirtualProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> - <waitForPageLoad stepKey="waitForProductAdded"/> - <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> - - <!-- Assert that taxes are applied correctly for NY --> - <amOnPage url="{{CheckoutPage.url}}" stepKey="goToCheckout"/> - <waitForPageLoad stepKey="waitForShippingSection"/> - <see stepKey="seeAddress" selector="{{CheckoutShippingSection.defaultShipping}}" userInput="{{SimpleTaxNY.state}}"/> - - <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.37"/> - <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> - <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.36"/> - <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> - - <!-- Change the address --> - <click stepKey="editAddress" selector="{{CheckoutShippingSection.editAddressButton}}"/> - <selectOption stepKey="addNewAddress" selector="{{CheckoutShippingSection.addressDropdown}}" userInput="New Address"/> - <waitForPageLoad stepKey="waitForNewAddressForm"/> - - <actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress"> - <argument name="Address" value="US_Address_CA"/> - <argument name="classPrefix" value="[aria-hidden=false]"/> - </actionGroup> - <click stepKey="saveAddress" selector="{{CheckoutShippingSection.updateAddress}}"/> - - <waitForPageLoad stepKey="waitForAddressSaved"/> - <see stepKey="seeAddress2" selector="{{CheckoutShippingSection.defaultShipping}}" userInput="{{SimpleTaxCA.state}}"/> - - <!-- Assert that taxes are applied correctly for CA --> - <waitForElementVisible stepKey="waitForOverviewVisible2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.25"/> - <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> - <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> - <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.24"/> - <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> - </test> -</tests> +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="StorefrontTaxQuoteCheckoutGuestVirtual"> + <annotations> + <features value="Tax"/> + <stories value="Tax Calculation in One Page Checkout"/> + <title value="Tax for Virtual Product Quote should be recalculated according to inputted data on Checkout flow for Guest Customer"/> + <description value="Tax for Virtual Product Quote should be recalculated according to inputted data on Checkout flow for Guest Customer"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-255"/> + <group value="Tax"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="VirtualProduct" stepKey="virtualProduct1"/> + + <!-- Fill in rules to display tax in the cart --> + <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> + + <!-- Go to tax rule page --> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> + <waitForPageLoad stepKey="waitForTaxRatePage"/> + <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> + <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> + + <!-- Add NY and CA tax rules --> + <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + </before> + <after> + <!-- Go to the tax rule page and delete the row we created--> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> + <waitForPageLoad stepKey="waitForRulesPage"/> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> + <argument name="name" value="SampleRule"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Go to the tax rate page --> + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> + <waitForPageLoad stepKey="waitForRatesPage"/> + + <!-- Delete the two tax rates that were created --> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> + <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> + <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Ensure tax wont be shown in the cart --> + <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> + + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="virtualProduct1" stepKey="deleteVirtualProduct1"/> + </after> + + <!-- Go to the created product page and add it to the cart --> + <amOnPage url="$$virtualProduct1.sku$$.html" stepKey="goToVirtualProductPage"/> + <waitForPageLoad stepKey="waitForVirtualProductPage"/> + <click stepKey="addVirtualProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForProductAdded"/> + <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> + + <!-- Assert that taxes are applied correctly for CA --> + <amOnPage url="{{CheckoutPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForShippingSection"/> + + <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.25"/> + <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> + <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.24"/> + <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> + + <!-- Change the address --> + <actionGroup ref="GuestCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress"> + <argument name="customerVar" value="Simple_US_Customer_NY"/> + <argument name="customerAddressVar" value="US_Address_NY"/> + </actionGroup> + <click stepKey="saveAddress" selector="{{CheckoutShippingSection.updateAddress}}"/> + + <waitForPageLoad stepKey="waitForAddressSaved"/> + <see stepKey="seeEditButton" selector="{{CheckoutShippingSection.editAddressButton}}" userInput="Edit"/> + <see stepKey="seeAddress2" selector="{{CheckoutShippingSection.defaultShipping}}" userInput="{{SimpleTaxNY.state}}"/> + + <!-- Assert that taxes are applied correctly for NY --> + <waitForElementVisible stepKey="waitForOverviewVisible2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.37"/> + <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> + <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.36"/> + <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> + </test> + + <test name="StorefrontTaxQuoteCheckoutLoggedInSimple"> + <annotations> + <features value="Tax"/> + <stories value="Tax Calculation in One Page Checkout"/> + <title value="Tax for Simple Product Quote should be recalculated according to inputted data on Checkout flow for Logged in Customer"/> + <description value="Tax for Simple Product Quote should be recalculated according to inputted data on Checkout flow for Logged in Customer"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-256"/> + <group value="Tax"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> + + <!-- Fill in rules to display tax in the cart --> + <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> + + <!-- Go to tax rule page --> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> + <waitForPageLoad stepKey="waitForTaxRatePage"/> + <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> + <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> + + <!-- Add NY and CA tax rules --> + <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + + <!-- Fill out form for a new user with address --> + <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> + <argument name="Customer" value="Simple_US_Customer_NY"/> + </actionGroup> + + <actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo"> + <argument name="Address" value="US_Address_NY"/> + </actionGroup> + </before> + <after> + <!-- Go to the tax rule page and delete the row we created--> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> + <waitForPageLoad stepKey="waitForRulesPage"/> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> + <argument name="name" value="SampleRule"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Go to the tax rate page --> + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> + <waitForPageLoad stepKey="waitForRatesPage"/> + + <!-- Delete the two tax rates that were created --> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> + <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> + <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Ensure tax wont be shown in the cart --> + <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> + + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> + </after> + + <!-- Go to the created product page and add it to the cart --> + <amOnPage url="$$simpleProduct1.sku$$.html" stepKey="goToSimpleProductPage"/> + <waitForPageLoad stepKey="waitForSimpleProductPage"/> + <click stepKey="addSimpleProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForProductAdded"/> + <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> + + <!-- Assert that taxes are applied correctly for NY --> + <amOnPage url="{{CheckoutPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForShippingSection"/> + <see stepKey="seeAddress" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{SimpleTaxNY.state}}"/> + <click stepKey="clickNext" selector="{{CheckoutShippingSection.next}}"/> + <waitForPageLoad stepKey="waitForReviewAndPayments"/> + + <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.30"/> + <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> + <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.30"/> + <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + + <!-- Go back to the shipping page and change the address --> + <click stepKey="goBackToShipping" selector="{{CheckoutShippingSection.shippingTab}}"/> + <click stepKey="addNewAddress" selector="{{CheckoutShippingSection.newAddressButton}}"/> + <waitForPageLoad stepKey="waitForAddressPopUp"/> + + <actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress"> + <argument name="Address" value="US_Address_CA"/> + <argument name="classPrefix" value="._show"/> + </actionGroup> + <click stepKey="saveAddress" selector="{{CheckoutShippingSection.saveAddress}}"/> + + <waitForPageLoad stepKey="waitForAddressSaved"/> + <see stepKey="seeAddress2" selector="{{CheckoutShippingSection.selectedShippingAddress}}" userInput="{{SimpleTaxCA.state}}"/> + <click stepKey="clickNext2" selector="{{CheckoutShippingSection.next}}"/> + <waitForPageLoad stepKey="waitForReviewAndPayments2"/> + + <!-- Assert that taxes are applied correctly for CA --> + <waitForElementVisible stepKey="waitForOverviewVisible2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.15"/> + <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> + <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.15"/> + <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + </test> + + <test name="StorefrontTaxQuoteCheckoutGuestSimple"> + <annotations> + <features value="Tax"/> + <stories value="Tax Calculation in One Page Checkout"/> + <title value="Tax for Simple Product Quote should be recalculated according to inputted data on Checkout flow for Guest Customer"/> + <description value="Tax for Simple Product Quote should be recalculated according to inputted data on Checkout flow for Guest Customer"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-258"/> + <group value="Tax"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> + + <!-- Fill in rules to display tax in the cart --> + <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> + + <!-- Go to tax rule page --> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> + <waitForPageLoad stepKey="waitForTaxRatePage"/> + <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> + <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> + + <!-- Add NY and CA tax rules --> + <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + </before> + <after> + <!-- Go to the tax rule page and delete the row we created--> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> + <waitForPageLoad stepKey="waitForRulesPage"/> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> + <argument name="name" value="SampleRule"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Go to the tax rate page --> + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> + <waitForPageLoad stepKey="waitForRatesPage"/> + + <!-- Delete the two tax rates that were created --> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> + <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> + <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Ensure tax wont be shown in the cart --> + <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> + + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> + </after> + + <!-- Go to the created product page and add it to the cart --> + <amOnPage url="$$simpleProduct1.sku$$.html" stepKey="goToSimpleProductPage"/> + <waitForPageLoad stepKey="waitForSimpleProductPage"/> + <click stepKey="addSimpleProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForProductAdded"/> + <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> + + <!-- Fill in address for CA --> + <amOnPage url="{{CheckoutPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForShippingSection"/> + <fillField selector="{{CheckoutShippingSection.email}}" userInput="{{Simple_US_Customer_CA.email}}" stepKey="enterEmail"/> + <waitForLoadingMaskToDisappear stepKey="waitEmailLoad" /> + <actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress"> + <argument name="Address" value="US_Address_CA"/> + </actionGroup> + <click stepKey="clickNext" selector="{{CheckoutShippingSection.next}}"/> + <see stepKey="seeAddress" selector="{{CheckoutShippingSection.defaultShipping}}" userInput="{{SimpleTaxCA.state}}"/> + <see stepKey="seeShipTo" selector="{{CheckoutPaymentSection.shipToInfomation}}" userInput="{{SimpleTaxCA.state}}"/> + + <!-- Assert that taxes are applied correctly for CA --> + <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.15"/> + <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> + <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.15"/> + <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + + <!-- Go back to the shipping page and change the address --> + <click stepKey="goBackToShipping" selector="{{CheckoutShippingSection.shippingTab}}"/> + <actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress2"> + <argument name="Address" value="US_Address_NY"/> + </actionGroup> + <click stepKey="clickNext2" selector="{{CheckoutShippingSection.next}}"/> + <see stepKey="seeShipTo2" selector="{{CheckoutPaymentSection.shipToInfomation}}" userInput="{{SimpleTaxNY.state}}"/> + + <!-- Assert that taxes are applied correctly for NY --> + <waitForElementVisible stepKey="waitForOverviewVisible2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$10.30"/> + <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> + <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$138.30"/> + <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> + </test> + + <test name="StorefrontTaxQuoteCheckoutLoggedInVirtual"> + <annotations> + <features value="Tax"/> + <stories value="Tax Calculation in One Page Checkout"/> + <title value="Tax for Virtual Product Quote should be recalculated according to inputted data on Checkout flow for Logged in Customer"/> + <description value="Tax for Virtual Product Quote should be recalculated according to inputted data on Checkout flow for Logged in Customer"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-259"/> + <group value="Tax"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <createData entity="VirtualProduct" stepKey="virtualProduct1"/> + + <!-- Fill in rules to display tax in the cart --> + <actionGroup ref="editTaxConfigurationByUI" stepKey="fillDefaultTaxForms"/> + + <!-- Go to tax rule page --> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> + <waitForPageLoad stepKey="waitForTaxRatePage"/> + <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> + <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> + + <!-- Add NY and CA tax rules --> + <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> + <argument name="taxCode" value="SimpleTaxNY"/> + </actionGroup> + + <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> + <argument name="taxCode" value="SimpleTaxCA"/> + </actionGroup> + + <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + + <!-- Fill out form for a new user with address --> + <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> + <argument name="Customer" value="Simple_US_Customer_NY"/> + </actionGroup> + + <actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo"> + <argument name="Address" value="US_Address_NY"/> + </actionGroup> + </before> + <after> + <!-- Go to the tax rule page and delete the row we created--> + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> + <waitForPageLoad stepKey="waitForRulesPage"/> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> + <argument name="name" value="SampleRule"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Go to the tax rate page --> + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> + <waitForPageLoad stepKey="waitForRatesPage"/> + + <!-- Delete the two tax rates that were created --> + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> + <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> + <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> + </actionGroup> + + <!-- Ensure tax wont be shown in the cart --> + <actionGroup ref="changeToDefaultTaxConfigurationUI" stepKey="changeToDefaultTaxConfiguration"/> + + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="virtualProduct1" stepKey="deleteVirtualProduct1"/> + </after> + + <!-- Go to the created product page and add it to the cart --> + <amOnPage url="$$virtualProduct1.sku$$.html" stepKey="goToVirtualProductPage"/> + <waitForPageLoad stepKey="waitForVirtualProductPage"/> + <click stepKey="addVirtualProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/> + <waitForPageLoad stepKey="waitForProductAdded"/> + <see stepKey="seeSuccess" selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You added"/> + + <!-- Assert that taxes are applied correctly for NY --> + <amOnPage url="{{CheckoutPage.url}}" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForShippingSection"/> + <see stepKey="seeAddress" selector="{{CheckoutShippingSection.defaultShipping}}" userInput="{{SimpleTaxNY.state}}"/> + + <waitForElementVisible stepKey="waitForOverviewVisible" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.37"/> + <click stepKey="expandTax" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxNY.rate}}%)"/> + <see stepKey="seeTotalIncl" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.36"/> + <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> + + <!-- Change the address --> + <click stepKey="editAddress" selector="{{CheckoutShippingSection.editAddressButton}}"/> + <selectOption stepKey="addNewAddress" selector="{{CheckoutShippingSection.addressDropdown}}" userInput="New Address"/> + <waitForPageLoad stepKey="waitForNewAddressForm"/> + + <actionGroup ref="LoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeAddress"> + <argument name="Address" value="US_Address_CA"/> + <argument name="classPrefix" value="[aria-hidden=false]"/> + </actionGroup> + <click stepKey="saveAddress" selector="{{CheckoutShippingSection.updateAddress}}"/> + + <waitForPageLoad stepKey="waitForAddressSaved"/> + <see stepKey="seeAddress2" selector="{{CheckoutShippingSection.defaultShipping}}" userInput="{{SimpleTaxCA.state}}"/> + + <!-- Assert that taxes are applied correctly for CA --> + <waitForElementVisible stepKey="waitForOverviewVisible2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTax2" selector="{{CheckoutPaymentSection.tax}}" userInput="$8.25"/> + <click stepKey="expandTax2" selector="{{CheckoutPaymentSection.tax}}"/> + <see stepKey="seeTaxPercent2" selector="{{CheckoutPaymentSection.taxPercentage}}" userInput="({{SimpleTaxCA.rate}}%)"/> + <see stepKey="seeTotalIncl2" selector="{{CheckoutPaymentSection.orderSummaryTotalIncluding}}" userInput="$108.24"/> + <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> + </test> +</tests> diff --git a/app/code/Magento/Tax/Test/Mftf/composer.json b/app/code/Magento/Tax/Test/Mftf/composer.json new file mode 100644 index 0000000000000..e2d9db9f8f76e --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/composer.json @@ -0,0 +1,32 @@ +{ + "name": "magento/functional-test-module-tax", + "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-config": "100.0.0-dev", + "magento/functional-test-module-customer": "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-page-cache": "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-sales": "100.0.0-dev", + "magento/functional-test-module-shipping": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-tax-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Tax/Test/Unit/Block/Checkout/ShippingTest.php b/app/code/Magento/Tax/Test/Unit/Block/Checkout/ShippingTest.php index c1aa2b0c9900d..e7a11ec45ad3f 100644 --- a/app/code/Magento/Tax/Test/Unit/Block/Checkout/ShippingTest.php +++ b/app/code/Magento/Tax/Test/Unit/Block/Checkout/ShippingTest.php @@ -44,6 +44,9 @@ public function testDisplayShipping($shippingMethod, $expectedResult) $this->assertEquals($expectedResult, $this->model->displayShipping()); } + /** + * @return array + */ public function displayShippingDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Block/Item/Price/RendererTest.php b/app/code/Magento/Tax/Test/Unit/Block/Item/Price/RendererTest.php index 1a16e69724479..90f0f09215889 100644 --- a/app/code/Magento/Tax/Test/Unit/Block/Item/Price/RendererTest.php +++ b/app/code/Magento/Tax/Test/Unit/Block/Item/Price/RendererTest.php @@ -96,6 +96,9 @@ public function testDisplayPriceInclTax($zone, $methodName) $this->assertEquals($flag, $this->renderer->displayPriceInclTax()); } + /** + * @return array + */ public function displayPriceInclTaxDataProvider() { $data = [ @@ -143,6 +146,9 @@ public function testDisplayPriceExclTax($zone, $methodName) $this->assertEquals($flag, $this->renderer->displayPriceExclTax()); } + /** + * @return array + */ public function displayPriceExclTaxDataProvider() { $data = [ @@ -190,6 +196,9 @@ public function testDisplayBothPrices($zone, $methodName) $this->assertEquals($flag, $this->renderer->displayBothPrices()); } + /** + * @return array + */ public function displayBothPricesDataProvider() { $data = [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php index e12edf0c683e9..bf49f3d479132 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php @@ -312,6 +312,9 @@ public function testSaveThrowsExceptionIfCannotSaveTitles($expectedException, $e $this->model->save($rateMock); } + /** + * @return array + */ public function saveThrowsExceptionIfCannotSaveTitlesDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/Plugin/OrderSaveTest.php b/app/code/Magento/Tax/Test/Unit/Model/Plugin/OrderSaveTest.php index 912f42af0d3cd..82a473b42a82e 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Plugin/OrderSaveTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Plugin/OrderSaveTest.php @@ -63,6 +63,9 @@ protected function setUp() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupOrderMock() { $orderMock = $this->getMockBuilder(\Magento\Sales\Model\Order::class) @@ -80,6 +83,9 @@ protected function setupOrderMock() return $orderMock; } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupExtensionAttributeMock() { $orderExtensionAttributeMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderExtensionInterface::class) @@ -95,6 +101,9 @@ protected function setupExtensionAttributeMock() return $orderExtensionAttributeMock; } + /** + * @param $expectedTaxes + */ protected function verifyOrderTaxes($expectedTaxes) { $index = 0; @@ -125,6 +134,9 @@ protected function verifyOrderTaxes($expectedTaxes) } } + /** + * @param $expectedItemTaxes + */ public function verifyItemTaxes($expectedItemTaxes) { $index = 0; diff --git a/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php index e5bd728e180f6..4d1db6435b863 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php @@ -108,6 +108,10 @@ function ($value) { ); } + /** + * @param array $data + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupTaxTotal(array $data) { $taxTotalMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address\Total::class) @@ -121,6 +125,10 @@ protected function setupTaxTotal(array $data) return $taxTotalMock; } + /** + * @param array $taxRate + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupTaxRateFactoryMock(array $taxRate) { $taxRateMock = $this->getMockBuilder(\Magento\Tax\Api\Data\GrandTotalRatesInterface::class) @@ -142,6 +150,10 @@ protected function setupTaxRateFactoryMock(array $taxRate) return $taxRateMock; } + /** + * @param array $taxDetails + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupTaxDetails(array $taxDetails) { $taxDetailsMock = $this->getMockBuilder(\Magento\Tax\Api\Data\GrandTotalDetailsInterface::class) diff --git a/app/code/Magento/Tax/Test/Unit/Model/Quote/ToOrderConverterTest.php b/app/code/Magento/Tax/Test/Unit/Model/Quote/ToOrderConverterTest.php index 23ce032764a8f..09f82b32137b3 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Quote/ToOrderConverterTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Quote/ToOrderConverterTest.php @@ -64,6 +64,9 @@ protected function setUp() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function setupOrderExtensionAttributeMock() { $orderExtensionAttributeMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderExtensionInterface::class) diff --git a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/CommonTaxCollectorTest.php b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/CommonTaxCollectorTest.php index 44c827c41af56..9325ec10dc627 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/CommonTaxCollectorTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/CommonTaxCollectorTest.php @@ -183,6 +183,9 @@ public function testGetShippingDataObject( } } + /** + * @return array + */ public function getShippingDataObjectDataProvider() { $data = [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php index 0c1876d6fc7d7..9cfea225f2d9c 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php @@ -565,6 +565,9 @@ public function testMapQuoteExtraTaxables($itemData, $addressData) /* * @return array */ + /** + * @return array + */ public function dataProviderMapQuoteExtraTaxablesArray() { $data = [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/System/Message/Notification/ApplyDiscountOnPricesTest.php b/app/code/Magento/Tax/Test/Unit/Model/System/Message/Notification/ApplyDiscountOnPricesTest.php index a5bf80345f0b2..95dc5509ed0a3 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/System/Message/Notification/ApplyDiscountOnPricesTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/System/Message/Notification/ApplyDiscountOnPricesTest.php @@ -93,6 +93,9 @@ public function testIsDisplayed( $this->assertEquals($expectedResult, $this->applyDiscountOnPricesNotification->isDisplayed()); } + /** + * @return array + */ public function dataProviderIsDisplayed() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/System/Message/NotificationsTest.php b/app/code/Magento/Tax/Test/Unit/Model/System/Message/NotificationsTest.php index 3cf1421ebcf37..3fda67669fe86 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/System/Message/NotificationsTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/System/Message/NotificationsTest.php @@ -73,6 +73,9 @@ public function testIsDisplayed( $this->assertEquals($expectedResult, $this->notifications->isDisplayed()); } + /** + * @return array + */ public function dataProviderIsDisplayed() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxAddressManagerTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxAddressManagerTest.php index ec640b74f8985..493eebf9e1123 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/TaxAddressManagerTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/TaxAddressManagerTest.php @@ -109,6 +109,9 @@ public function testSetDefaultAddressAfterSave( $this->manager->setDefaultAddressAfterSave($address); } + /** + * @return array + */ public function setAddressCustomerSessionAddressSaveDataProvider() { return [ @@ -151,6 +154,9 @@ public function testSetDefaultAddressAfterLogIn( $this->manager->setDefaultAddressAfterLogIn([$address]); } + /** + * @return array + */ public function setAddressCustomerSessionLogInDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/FactoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/FactoryTest.php index ee611b5320a8a..d124fc2f81902 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/FactoryTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/FactoryTest.php @@ -39,6 +39,9 @@ public function testCreate($classType, $className, $classTypeMock) $this->assertEquals($classTypeMock, $taxClassFactory->create($classMock)); } + /** + * @return array + */ public function createDataProvider() { $customerClassMock = $this->createMock(\Magento\Tax\Model\TaxClass\Type\Customer::class); diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php index fc27e68c8e55b..707b999c5e467 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php @@ -26,9 +26,9 @@ public function testIsAssignedToObjects() $filterBuilder->expects($this->once())->method('setField')->with( \Magento\Customer\Api\Data\GroupInterface::TAX_CLASS_ID - )->willReturnself(); - $filterBuilder->expects($this->once())->method('setValue')->willReturnself(); - $filterBuilder->expects($this->once())->method('create')->willReturnself(); + )->willReturnSelf(); + $filterBuilder->expects($this->once())->method('setValue')->willReturnSelf(); + $filterBuilder->expects($this->once())->method('create')->willReturnSelf(); $filterGroupBuilder = $this->createMock(\Magento\Framework\Api\Search\FilterGroupBuilder::class); $searchCriteriaBuilder = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaBuilder::class) diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php index f4151cd18ba66..3fddd5da47611 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php @@ -168,6 +168,9 @@ public function testSaveWithExceptions($exceptionObject, $exceptionName, $except $this->model->save($rule); } + /** + * @return array + */ public function saveExceptionsDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Observer/AfterAddressSaveObserverTest.php b/app/code/Magento/Tax/Test/Unit/Observer/AfterAddressSaveObserverTest.php index 14d678d02366b..96b4b81ae2817 100644 --- a/app/code/Magento/Tax/Test/Unit/Observer/AfterAddressSaveObserverTest.php +++ b/app/code/Magento/Tax/Test/Unit/Observer/AfterAddressSaveObserverTest.php @@ -138,6 +138,9 @@ public function testExecute( $this->session->execute($this->observerMock); } + /** + * @return array + */ public function getExecuteDataProvider() { return [ diff --git a/app/code/Magento/Tax/Test/Unit/Pricing/AdjustmentTest.php b/app/code/Magento/Tax/Test/Unit/Pricing/AdjustmentTest.php index a92aa6a0d05eb..e7557e2164ca0 100644 --- a/app/code/Magento/Tax/Test/Unit/Pricing/AdjustmentTest.php +++ b/app/code/Magento/Tax/Test/Unit/Pricing/AdjustmentTest.php @@ -56,6 +56,9 @@ public function testIsIncludedInBasePrice($expectedResult) $this->assertEquals($expectedResult, $this->adjustment->isIncludedInBasePrice()); } + /** + * @return array + */ public function isIncludedInBasePriceDataProvider() { return [[true], [false]]; @@ -113,6 +116,9 @@ public function testExtractAdjustment($isPriceIncludesTax, $amount, $price, $exp $this->assertEquals($expectedResult, $this->adjustment->extractAdjustment($amount, $object)); } + /** + * @return array + */ public function extractAdjustmentDataProvider() { return [ @@ -164,6 +170,9 @@ public function testIsExcludedWith($adjustmentCode, $expectedResult) $this->assertEquals($expectedResult, $this->adjustment->isExcludedWith($adjustmentCode)); } + /** + * @return array + */ public function isExcludedWithDataProvider() { return [ diff --git a/app/code/Magento/TaxGraphQl/Test/Mftf/README.md b/app/code/Magento/TaxGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..8914dc0865ada --- /dev/null +++ b/app/code/Magento/TaxGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Tax Graph Ql Functional Tests + +The Functional Test Module for **Magento Tax Graph Ql** module. diff --git a/app/code/Magento/TaxGraphQl/Test/Mftf/composer.json b/app/code/Magento/TaxGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..144f778833cd4 --- /dev/null +++ b/app/code/Magento/TaxGraphQl/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-tax-graph-ql", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-tax": "100.0.0-dev", + "magento/functional-test-module-catalog-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExport.php b/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExport.php index a42877b3ecf8a..ab64567f4fe28 100644 --- a/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExport.php +++ b/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExport.php @@ -14,7 +14,7 @@ class ImportExport extends \Magento\Backend\Block\Widget /** * @var string */ - protected $_template = 'importExport.phtml'; + protected $_template = 'Magento_TaxImportExport::importExport.phtml'; /** * @param \Magento\Backend\Block\Template\Context $context diff --git a/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExportHeader.php b/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExportHeader.php index 8897e9b2083e9..e223adc3adb1a 100644 --- a/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExportHeader.php +++ b/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExportHeader.php @@ -16,5 +16,5 @@ class ImportExportHeader extends \Magento\Backend\Block\Widget * * @var string */ - protected $_template = 'importExportHeader.phtml'; + protected $_template = 'Magento_TaxImportExport::importExportHeader.phtml'; } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/LICENSE.txt b/app/code/Magento/TaxImportExport/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/LICENSE.txt rename to app/code/Magento/TaxImportExport/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/LICENSE_AFL.txt b/app/code/Magento/TaxImportExport/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/LICENSE_AFL.txt rename to app/code/Magento/TaxImportExport/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/TaxImportExport/Test/Mftf/README.md b/app/code/Magento/TaxImportExport/Test/Mftf/README.md new file mode 100644 index 0000000000000..e53dd041cb34a --- /dev/null +++ b/app/code/Magento/TaxImportExport/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Tax Import Export Functional Tests + +The Functional Test Module for **Magento Tax Import Export** module. diff --git a/app/code/Magento/TaxImportExport/Test/Mftf/composer.json b/app/code/Magento/TaxImportExport/Test/Mftf/composer.json new file mode 100644 index 0000000000000..39bc90df32651 --- /dev/null +++ b/app/code/Magento/TaxImportExport/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-tax-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-backend": "100.0.0-dev", + "magento/functional-test-module-directory": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-tax": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Theme/Block/Adminhtml/Wysiwyg/Files/Content/Uploader.php b/app/code/Magento/Theme/Block/Adminhtml/Wysiwyg/Files/Content/Uploader.php index 8e7f4c9cc680c..e99500dbd0694 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/Wysiwyg/Files/Content/Uploader.php +++ b/app/code/Magento/Theme/Block/Adminhtml/Wysiwyg/Files/Content/Uploader.php @@ -19,7 +19,7 @@ class Uploader extends \Magento\Backend\Block\Media\Uploader * * @var string */ - protected $_template = 'browser/content/uploader.phtml'; + protected $_template = 'Magento_Theme::browser/content/uploader.phtml'; /** * @var \Magento\Theme\Helper\Storage diff --git a/app/code/Magento/Theme/Block/Html/Breadcrumbs.php b/app/code/Magento/Theme/Block/Html/Breadcrumbs.php index c1f8ea620ef41..cff87fc8726bd 100644 --- a/app/code/Magento/Theme/Block/Html/Breadcrumbs.php +++ b/app/code/Magento/Theme/Block/Html/Breadcrumbs.php @@ -21,7 +21,7 @@ class Breadcrumbs extends \Magento\Framework\View\Element\Template * * @var string */ - protected $_template = 'html/breadcrumbs.phtml'; + protected $_template = 'Magento_Theme::html/breadcrumbs.phtml'; /** * List of available breadcrumb properties diff --git a/app/code/Magento/Theme/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php index f597b4034da92..2663a4da15011 100644 --- a/app/code/Magento/Theme/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -19,7 +19,7 @@ class Header extends \Magento\Framework\View\Element\Template * * @var string */ - protected $_template = 'html/header.phtml'; + protected $_template = 'Magento_Theme::html/header.phtml'; /** * Retrieve welcome text diff --git a/app/code/Magento/Theme/Block/Html/Header/Logo.php b/app/code/Magento/Theme/Block/Html/Header/Logo.php index 5b0c2eaf04c45..0a0e71f44ba32 100644 --- a/app/code/Magento/Theme/Block/Html/Header/Logo.php +++ b/app/code/Magento/Theme/Block/Html/Header/Logo.php @@ -19,7 +19,7 @@ class Logo extends \Magento\Framework\View\Element\Template * * @var string */ - protected $_template = 'html/header/logo.phtml'; + protected $_template = 'Magento_Theme::html/header/logo.phtml'; /** * @var \Magento\MediaStorage\Helper\File\Storage\Database diff --git a/app/code/Magento/Theme/Controller/Adminhtml/Design/Config/Save.php b/app/code/Magento/Theme/Controller/Adminhtml/Design/Config/Save.php index 657fbb25795d9..4f7a1cd47af58 100644 --- a/app/code/Magento/Theme/Controller/Adminhtml/Design/Config/Save.php +++ b/app/code/Magento/Theme/Controller/Adminhtml/Design/Config/Save.php @@ -7,6 +7,7 @@ use Magento\Backend\App\Action; use Magento\Framework\App\Request\DataPersistorInterface; +use Magento\Framework\Exception\NotFoundException; use Magento\Theme\Model\DesignConfigRepository; use Magento\Backend\App\Action\Context; use Magento\Framework\Exception\LocalizedException; @@ -62,9 +63,15 @@ protected function _isAllowed() /** * @return \Magento\Framework\Controller\Result\Redirect + * + * @throws NotFoundException */ public function execute() { + if (!$this->getRequest()->isPost()) { + throw new NotFoundException(__('Page not found.')); + } + $resultRedirect = $this->resultRedirectFactory->create(); $scope = $this->getRequest()->getParam('scope'); $scopeId = (int)$this->getRequest()->getParam('scope_id'); @@ -73,7 +80,7 @@ public function execute() try { $designConfigData = $this->configFactory->create($scope, $scopeId, $data); $this->designConfigRepository->save($designConfigData); - $this->messageManager->addSuccess(__('You saved the configuration.')); + $this->messageManager->addSuccessMessage(__('You saved the configuration.')); $this->dataPersistor->clear('theme_design_config'); @@ -86,10 +93,10 @@ public function execute() } catch (LocalizedException $e) { $messages = explode("\n", $e->getMessage()); foreach ($messages as $message) { - $this->messageManager->addError(__('%1', $message)); + $this->messageManager->addErrorMessage(__('%1', $message)); } } catch (\Exception $e) { - $this->messageManager->addException( + $this->messageManager->addExceptionMessage( $e, __('Something went wrong while saving this configuration:') . ' ' . $e->getMessage() ); diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/Index.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/Index.php index 4bae57f80209e..d51fd658075f1 100644 --- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/Index.php +++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/Index.php @@ -21,6 +21,7 @@ public function execute() { $this->_view->loadLayout(); $this->_setActiveMenu('Magento_Theme::system_design_theme'); + $this->_view->getLayout()->getBlock('page.title')->setPageTitle('Themes'); $this->_view->renderLayout(); } } diff --git a/app/code/Magento/Theme/Model/ResourceModel/Theme/Collection.php b/app/code/Magento/Theme/Model/ResourceModel/Theme/Collection.php index f2f95d24a368b..f9dd501520109 100644 --- a/app/code/Magento/Theme/Model/ResourceModel/Theme/Collection.php +++ b/app/code/Magento/Theme/Model/ResourceModel/Theme/Collection.php @@ -17,6 +17,11 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab */ const DEFAULT_PAGE_SIZE = 6; + /** + * @var string + */ + protected $_idFieldName = 'theme_id'; + /** * Collection initialization * diff --git a/app/code/Magento/Theme/Model/ResourceModel/Theme/Grid/Collection.php b/app/code/Magento/Theme/Model/ResourceModel/Theme/Grid/Collection.php index f708b3c7889f3..c4a7bb11a78f7 100644 --- a/app/code/Magento/Theme/Model/ResourceModel/Theme/Grid/Collection.php +++ b/app/code/Magento/Theme/Model/ResourceModel/Theme/Grid/Collection.php @@ -7,13 +7,15 @@ /** * Theme grid collection + * @deprecated + * @see \Magento\Theme\Ui\Component\Theme\DataProvider\SearchResult */ class Collection extends \Magento\Theme\Model\ResourceModel\Theme\Collection { /** * Add area filter * - * @return \Magento\Theme\Model\ResourceModel\Theme\Collection + * @return $this */ protected function _initSelect() { diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/LICENSE.txt b/app/code/Magento/Theme/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/LICENSE.txt rename to app/code/Magento/Theme/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/LICENSE_AFL.txt b/app/code/Magento/Theme/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/LICENSE_AFL.txt rename to app/code/Magento/Theme/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Theme/Test/Mftf/Page/ThemesPage.xml b/app/code/Magento/Theme/Test/Mftf/Page/ThemesPage.xml new file mode 100644 index 0000000000000..e0f0d2db70602 --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/Page/ThemesPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="ThemesPageIndex" url="admin/system_design_theme/" area="admin" module="Magento_Theme"> + <section name="AdminThemeSection"/> + </page> +</pages> diff --git a/app/code/Magento/Theme/Test/Mftf/README.md b/app/code/Magento/Theme/Test/Mftf/README.md new file mode 100644 index 0000000000000..25b16385c3eca --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Theme Functional Tests + +The Functional Test Module for **Magento Theme** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Section/AdminThemeSection.xml b/app/code/Magento/Theme/Test/Mftf/Section/AdminThemeSection.xml similarity index 85% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Section/AdminThemeSection.xml rename to app/code/Magento/Theme/Test/Mftf/Section/AdminThemeSection.xml index 281cc290b4f39..2e5a786d45725 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Section/AdminThemeSection.xml +++ b/app/code/Magento/Theme/Test/Mftf/Section/AdminThemeSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminThemeSection"> <!--All rows in a specific Column e.g. {{Section.rowsInColumn('columnName')}}--> <element name="rowsInColumn" type="text" selector="//tr/td[contains(@class, '{{column}}')]" parameterized="true"/> diff --git a/app/code/Magento/Theme/Test/Mftf/Section/StorefrontFooterSection.xml b/app/code/Magento/Theme/Test/Mftf/Section/StorefrontFooterSection.xml new file mode 100644 index 0000000000000..a9db1cbb9c776 --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/Section/StorefrontFooterSection.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontFooterSection"> + </section> +</sections> diff --git a/app/code/Magento/Theme/Test/Mftf/Section/StorefrontMessagesSection.xml b/app/code/Magento/Theme/Test/Mftf/Section/StorefrontMessagesSection.xml new file mode 100644 index 0000000000000..9b0b9c7a053bc --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/Section/StorefrontMessagesSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontMessagesSection"> + <element name="message" type="text" + selector="//main//div[contains(@class, 'messages')]//div[contains(@class, 'message')]/div[contains(text(), '{{var1}}')]" + parameterized="true" + /> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Test/ThemeTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Test/ThemeTest.xml rename to app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml index 8764750d473c3..2ae24934a48df 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Test/ThemeTest.xml +++ b/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="ThemeTest"> <annotations> <features value="Theme Test"/> @@ -26,6 +26,7 @@ <amOnPage url="{{ThemesPageIndex.url}}" stepKey="navigateToThemesIndexPage" /> <waitForPageLoad stepKey="wait1"/> <dontSee selector="{{AdminThemeSection.gridCell('Magento Rush')}}" stepKey="dontSeeRushThemeInTitleColumn"/> + <waitForPageLoad stepKey="waitForThemeGridLoad"/> <seeNumberOfElements selector="{{AdminThemeSection.rowsInColumn('theme_path')}}" userInput="2" stepKey="see2RowsOnTheGrid"/> </test> </tests> diff --git a/app/code/Magento/Theme/Test/Mftf/composer.json b/app/code/Magento/Theme/Test/Mftf/composer.json new file mode 100644 index 0000000000000..f93dac15279a4 --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/composer.json @@ -0,0 +1,32 @@ +{ + "name": "magento/functional-test-module-theme", + "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-cms": "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-media-storage": "100.0.0-dev", + "magento/functional-test-module-require-js": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-ui": "100.0.0-dev", + "magento/functional-test-module-widget": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-translation": "100.0.0-dev", + "magento/functional-test-module-theme-sample-data": "100.0.0-dev", + "magento/functional-test-module-deploy": "100.0.0-dev", + "magento/functional-test-module-directory": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php b/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php index 49066e79cb798..91c3ce47fc8b8 100644 --- a/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php +++ b/app/code/Magento/Theme/Test/Unit/Block/Html/TopmenuTest.php @@ -109,6 +109,9 @@ protected function setUp() ); } + /** + * @return Topmenu + */ protected function getTopmenu() { return new Topmenu($this->context, $this->nodeFactory, $this->treeFactory); diff --git a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/Design/Config/SaveTest.php b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/Design/Config/SaveTest.php index f90e24678d9e0..a193604a0d6da 100644 --- a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/Design/Config/SaveTest.php +++ b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/Design/Config/SaveTest.php @@ -62,15 +62,13 @@ public function setUp() '', false ); - $this->request = $this->getMockForAbstractClass( - \Magento\Framework\App\RequestInterface::class, - [], - '', - false, - false, - true, - ['getFiles', 'getParam', 'getParams'] - ); + $this->request = $this->getMockBuilder(\Magento\Framework\App\Request\Http::class) + ->disableOriginalConstructor()->getMock(); + + $this->request->expects($this->atLeastOnce()) + ->method('isPost') + ->willReturn(true); + $this->context = $objectManager->getObject( \Magento\Backend\App\Action\Context::class, [ @@ -138,7 +136,7 @@ public function testSave() ->method('save') ->with($this->designConfig); $this->messageManager->expects($this->once()) - ->method('addSuccess') + ->method('addSuccessMessage') ->with(__('You saved the configuration.')); $this->dataPersistor->expects($this->once()) ->method('clear') @@ -194,7 +192,7 @@ public function testSaveWithLocalizedException() ->with($this->designConfig) ->willThrowException(new \Magento\Framework\Exception\LocalizedException(__('Exception message'))); $this->messageManager->expects($this->once()) - ->method('addError') + ->method('addErrorMessage') ->with(__('Exception message')->render()); $this->dataPersistor->expects($this->once()) @@ -249,7 +247,7 @@ public function testSaveWithException() ->with($this->designConfig) ->willThrowException($exception); $this->messageManager->expects($this->once()) - ->method('addException') + ->method('addExceptionMessage') ->with($exception, 'Something went wrong while saving this configuration: Exception message'); $this->dataPersistor->expects($this->once()) diff --git a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/IndexTest.php b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/IndexTest.php index a5acb67f93974..213d8dde8689f 100644 --- a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/IndexTest.php +++ b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/IndexTest.php @@ -28,13 +28,18 @@ public function testIndexAction() ->method('getMenuModel') ->will($this->returnValue($menuModel)); + $titleBlock = $this->createMock(\Magento\Theme\Block\Html\Title::class); + $titleBlock->expects($this->once())->method('setPageTitle'); + $layout = $this->createMock(\Magento\Framework\View\LayoutInterface::class); $layout->expects($this->any()) ->method('getBlock') - ->with($this->equalTo('menu')) - ->will($this->returnValue($menuBlock)); + ->willReturnMap([ + ['menu', $menuBlock], + ['page.title', $titleBlock] + ]); - $this->view->expects($this->once()) + $this->view->expects($this->any()) ->method('getLayout') ->will($this->returnValue($layout)); diff --git a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php index d5919db5edcba..bbcaa87acb9c3 100644 --- a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php +++ b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php @@ -63,22 +63,22 @@ public function testExecuteWithoutTheme() ->expects($this->at(0)) ->method('get') ->with(\Magento\Theme\Model\Uploader\Service::class) - ->WillReturn($this->serviceModel); + ->willReturn($this->serviceModel); $this->_objectManagerMock ->expects($this->at(1)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\FlyweightFactory::class) - ->WillReturn($this->themeFactory); + ->willReturn($this->themeFactory); $this->_objectManagerMock ->expects($this->at(2)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\Customization\File\Js::class) - ->WillReturn($this->customizationJs); + ->willReturn($this->customizationJs); $this->_objectManagerMock ->expects($this->at(3)) ->method('get') ->with(\Magento\Framework\Json\Helper\Data::class) - ->WillReturn($this->jsonHelper); + ->willReturn($this->jsonHelper); $this->themeFactory->expects($this->once()) ->method('create') @@ -107,21 +107,21 @@ public function testExecuteWithException() $this->_objectManagerMock->expects($this->at(0)) ->method('get') ->with(\Magento\Theme\Model\Uploader\Service::class) - ->WillReturn($this->serviceModel); + ->willReturn($this->serviceModel); $this->_objectManagerMock->expects($this->at(1)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\FlyweightFactory::class) - ->WillReturn($this->themeFactory); + ->willReturn($this->themeFactory); $this->_objectManagerMock ->expects($this->at(2)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\Customization\File\Js::class) - ->WillReturn($this->customizationJs); + ->willReturn($this->customizationJs); $this->_objectManagerMock ->expects($this->at(4)) ->method('get') ->with(\Magento\Framework\Json\Helper\Data::class) - ->WillReturn($this->jsonHelper); + ->willReturn($this->jsonHelper); $this->themeFactory->expects($this->once()) ->method('create') @@ -172,19 +172,19 @@ public function testExecute() $this->_objectManagerMock->expects($this->at(0)) ->method('get') ->with(\Magento\Theme\Model\Uploader\Service::class) - ->WillReturn($this->serviceModel); + ->willReturn($this->serviceModel); $this->_objectManagerMock->expects($this->at(1)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\FlyweightFactory::class) - ->WillReturn($this->themeFactory); + ->willReturn($this->themeFactory); $this->_objectManagerMock->expects($this->at(2)) ->method('get') ->with(\Magento\Framework\View\Design\Theme\Customization\File\Js::class) - ->WillReturn($this->customizationJs); + ->willReturn($this->customizationJs); $this->_objectManagerMock->expects($this->at(4)) ->method('get') ->with(\Magento\Framework\Json\Helper\Data::class) - ->WillReturn($this->jsonHelper); + ->willReturn($this->jsonHelper); $this->themeFactory->expects($this->once()) ->method('create') diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ThemeTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ThemeTest.php index d959b95dcb0ca..1725fe158c16c 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ThemeTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ThemeTest.php @@ -123,6 +123,9 @@ public function testGetValue($value, $expectedResult) $this->assertEquals($expectedResult, $this->model->getValue()); } + /** + * @return array + */ public function getValueDataProvider() { return [ @@ -131,6 +134,9 @@ public function getValueDataProvider() ]; } + /** + * @return array + */ public function afterSaveDataProvider() { return [ diff --git a/app/code/Magento/Theme/Test/Unit/Model/Theme/ValidationTest.php b/app/code/Magento/Theme/Test/Unit/Model/Theme/ValidationTest.php index 5d1c9f8cf7c3c..e302762c1c783 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/Theme/ValidationTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/Theme/ValidationTest.php @@ -31,6 +31,9 @@ public function testValidate(array $data, $result, array $messages) $this->assertEquals($messages, $validator->getErrorMessages()); } + /** + * @return array + */ public function dataProviderValidate() { return [ diff --git a/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php b/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php index 4ff64e6f694e8..b191a64ac2c21 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php @@ -481,6 +481,9 @@ public function testToArray(array $themeData, array $expected) $this->assertEquals($expected, $this->_model->toArray()); } + /** + * @return array + */ public function toArrayDataProvider() { $parentTheme = $this->getMockBuilder(\Magento\Theme\Model\Theme::class) @@ -555,6 +558,9 @@ public function testPopulateFromArray(array $value, array $expected, $expectedCa $this->assertEquals($expected, $this->_model->getData()); } + /** + * @return array + */ public function populateFromArrayDataProvider() { return [ diff --git a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php index 86ee29b0759e8..0951f7b50f289 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php @@ -172,6 +172,9 @@ public function testUploadInvalidFile() $this->_storageModel->uploadFile($this->_storageRoot); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function _prepareUploader() { $uploader = $this->createMock(\Magento\MediaStorage\Model\File\Uploader::class); @@ -538,6 +541,9 @@ public function testDeleteRootDirectory() $this->_storageModel->deleteDirectory($directoryPath); } + /** + * @return array + */ public function booleanCasesDataProvider() { return [[true], [false]]; diff --git a/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/EditActionTest.php b/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/EditActionTest.php index 068738f17c967..2ac959d0a9881 100644 --- a/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/EditActionTest.php +++ b/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/EditActionTest.php @@ -82,6 +82,9 @@ public function testPrepareDataSource($dataSourceItem, $scope, $scopeId) $this->assertEquals($expectedDataSource, $dataSource); } + /** + * @return array + */ public function getPrepareDataSourceDataProvider() { return [ diff --git a/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/ViewActionTest.php b/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/ViewActionTest.php new file mode 100644 index 0000000000000..03d1fe70f2f07 --- /dev/null +++ b/app/code/Magento/Theme/Test/Unit/Ui/Component/Listing/Column/ViewActionTest.php @@ -0,0 +1,121 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Theme\Test\Unit\Ui\Component\Listing\Column; + +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Framework\UrlInterface; +use Magento\Theme\Ui\Component\Listing\Column\ViewAction; + +/** + * Class ViewActionTest contains unit tests for \Magento\Theme\Ui\Component\Listing\Column\ViewAction class + * + * @SuppressWarnings(PHPMD.LongVariable) + */ +class ViewActionTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var ViewAction + */ + protected $model; + + /** + * @var UrlInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $urlBuilder; + + /** + * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + */ + protected $objectManager; + + /** + * SetUp method + * + * @return void + */ + protected function setUp() + { + $this->objectManager = new ObjectManager($this); + $this->urlBuilder = $this->getMockForAbstractClass(\Magento\Framework\UrlInterface::class); + } + + /** + * @param array $data + * @param array $dataSourceItems + * @param array $expectedDataSourceItems + * @param string $expectedUrlPath + * @param array $expectedUrlParam + * + * @dataProvider getPrepareDataSourceDataProvider + * @return void + */ + public function testPrepareDataSource( + $data, + $dataSourceItems, + $expectedDataSourceItems, + $expectedUrlPath, + $expectedUrlParam + ) { + $contextMock = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class) + ->getMockForAbstractClass(); + $processor = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\Processor::class) + ->disableOriginalConstructor() + ->getMock(); + $contextMock->expects($this->never())->method('getProcessor')->willReturn($processor); + $this->model = $this->objectManager->getObject( + ViewAction::class, + [ + 'urlBuilder' => $this->urlBuilder, + 'data' => $data, + 'context' => $contextMock, + ] + ); + + $this->urlBuilder->expects($this->once()) + ->method('getUrl') + ->with($expectedUrlPath, $expectedUrlParam) + ->willReturn('url'); + + $dataSource = [ + 'data' => [ + 'items' => $dataSourceItems + ] + ]; + $dataSource = $this->model->prepareDataSource($dataSource); + $this->assertEquals($expectedDataSourceItems, $dataSource['data']['items']); + } + + /** + * Data provider for testPrepareDataSource + * @return array + */ + public function getPrepareDataSourceDataProvider() + { + return [ + [ + ['name' => 'itemName', 'config' => []], + [['itemName' => '', 'entity_id' => 1]], + [['itemName' => ['view' => ['href' => 'url', 'label' => __('View')]], 'entity_id' => 1]], + '#', + ['id' => 1] + ], + [ + ['name' => 'itemName', 'config' => [ + 'viewUrlPath' => 'url_path', + 'urlEntityParamName' => 'theme_id', + 'indexField' => 'theme_id'] + ], + [['itemName' => '', 'theme_id' => 2]], + [['itemName' => ['view' => ['href' => 'url', 'label' => __('View')]], 'theme_id' => 2]], + 'url_path', + ['theme_id' => 2] + ] + ]; + } +} diff --git a/app/code/Magento/Theme/Ui/Component/Listing/Column/ViewAction.php b/app/code/Magento/Theme/Ui/Component/Listing/Column/ViewAction.php new file mode 100644 index 0000000000000..774d5bab660af --- /dev/null +++ b/app/code/Magento/Theme/Ui/Component/Listing/Column/ViewAction.php @@ -0,0 +1,77 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Theme\Ui\Component\Listing\Column; + +use Magento\Framework\UrlInterface; +use Magento\Framework\View\Element\UiComponent\ContextInterface; +use Magento\Framework\View\Element\UiComponentFactory; +use Magento\Ui\Component\Listing\Columns\Column; + +/** + * Class ViewAction + */ +class ViewAction extends Column +{ + /** + * @var UrlInterface + */ + private $urlBuilder; + + /** + * Constructor + * + * @param ContextInterface $context + * @param UiComponentFactory $uiComponentFactory + * @param UrlInterface $urlBuilder + * @param array $components + * @param array $data + */ + public function __construct( + ContextInterface $context, + UiComponentFactory $uiComponentFactory, + UrlInterface $urlBuilder, + array $components = [], + array $data = [] + ) { + $this->urlBuilder = $urlBuilder; + parent::__construct($context, $uiComponentFactory, $components, $data); + } + + /** + * Prepare Theme Data Source + * + * @param array $dataSource + * @return array + */ + public function prepareDataSource(array $dataSource) : array + { + if (isset($dataSource['data']['items'])) { + foreach ($dataSource['data']['items'] as & $item) { + $indexField = $this->getData('config/indexField') ?: 'entity_id'; + if (isset($item[$indexField])) { + $viewUrlPath = $this->getData('config/viewUrlPath') ?: '#'; + $urlEntityParamName = $this->getData('config/urlEntityParamName') ?: 'id'; + $item[$this->getData('name')] = [ + 'view' => [ + 'href' => $this->urlBuilder->getUrl( + $viewUrlPath, + [ + $urlEntityParamName => $item[$indexField] + ] + ), + 'label' => __('View') + ] + ]; + } + } + } + + return $dataSource; + } +} diff --git a/app/code/Magento/Theme/Ui/Component/Theme/DataProvider/SearchResult.php b/app/code/Magento/Theme/Ui/Component/Theme/DataProvider/SearchResult.php new file mode 100644 index 0000000000000..696b38a71761a --- /dev/null +++ b/app/code/Magento/Theme/Ui/Component/Theme/DataProvider/SearchResult.php @@ -0,0 +1,53 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Theme\Ui\Component\Theme\DataProvider; + +/** + * Theme search result + */ +class SearchResult extends \Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult +{ + /** + * {@inheritdoc} + */ + protected $_map = [ + 'fields' => [ + 'theme_id' => 'main_table.theme_id', + 'theme_title' => 'main_table.theme_title', + 'theme_path' => 'main_table.theme_path', + 'parent_theme_title' => 'parent.theme_title', + ], + ]; + + /** + * Add area and type filters + * Join parent theme title + * + * @return $this + */ + protected function _initSelect() + { + parent::_initSelect(); + $this + ->addFieldToFilter('main_table.area', \Magento\Framework\App\Area::AREA_FRONTEND) + ->addFieldToFilter('main_table.type', ['in' => [ + \Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL, + \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL, + ]]) + ; + + $this->getSelect()->joinLeft( + ['parent' => $this->getMainTable()], + 'main_table.parent_id = parent.theme_id', + ['parent_theme_title' => 'parent.theme_title'] + ); + + return $this; + } +} diff --git a/app/code/Magento/Theme/etc/di.xml b/app/code/Magento/Theme/etc/di.xml index c20184fec6bc4..55119f3449389 100644 --- a/app/code/Magento/Theme/etc/di.xml +++ b/app/code/Magento/Theme/etc/di.xml @@ -108,6 +108,7 @@ <arguments> <argument name="collections" xsi:type="array"> <item name="design_config_listing_data_source" xsi:type="string">Magento\Theme\Model\ResourceModel\Design\Config\Grid\Collection</item> + <item name="design_theme_listing_data_source" xsi:type="string">Magento\Theme\Ui\Component\Theme\DataProvider\SearchResult</item> </argument> </arguments> </type> @@ -273,4 +274,11 @@ <argument name="themeList" xsi:type="object">Magento\Theme\Model\ResourceModel\Theme\Collection</argument> </arguments> </type> + <type name="Magento\Theme\Ui\Component\Theme\DataProvider\SearchResult"> + <arguments> + <argument name="mainTable" xsi:type="string">theme</argument> + <argument name="resourceModel" xsi:type="string">Magento\Theme\Model\ResourceModel\Theme</argument> + <argument name="identifierName" xsi:type="string">theme_id</argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/Theme/i18n/en_US.csv b/app/code/Magento/Theme/i18n/en_US.csv index 53b890635fdc1..db641b5da1f74 100644 --- a/app/code/Magento/Theme/i18n/en_US.csv +++ b/app/code/Magento/Theme/i18n/en_US.csv @@ -185,3 +185,6 @@ Settings,Settings "2 columns with left bar","2 columns with left bar" "2 columns with right bar","2 columns with right bar" "3 columns","3 columns" +ID,ID +View,View +Action,Action diff --git a/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_index.xml b/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_index.xml index 7bbdc526a6143..3b377899b9199 100644 --- a/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_index.xml +++ b/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_index.xml @@ -6,11 +6,9 @@ */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> - <update handle="formkey"/> - <update handle="adminhtml_system_design_theme_block"/> <body> <referenceContainer name="content"> - <block class="Magento\Theme\Block\Adminhtml\System\Design\Theme" name="design_theme"/> + <uiComponent name="design_theme_listing"/> </referenceContainer> </body> </page> diff --git a/app/code/Magento/Theme/view/adminhtml/ui_component/design_theme_listing.xml b/app/code/Magento/Theme/view/adminhtml/ui_component/design_theme_listing.xml new file mode 100644 index 0000000000000..14aea72d87357 --- /dev/null +++ b/app/code/Magento/Theme/view/adminhtml/ui_component/design_theme_listing.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> + <argument name="data" xsi:type="array"> + <item name="js_config" xsi:type="array"> + <item name="provider" xsi:type="string">design_theme_listing.design_theme_listing_data_source</item> + </item> + </argument> + <settings> + <spinner>design_theme_columns</spinner> + <deps> + <dep>design_theme_listing.design_theme_listing_data_source</dep> + </deps> + </settings> + <dataSource name="design_theme_listing_data_source" component="Magento_Ui/js/grid/provider"> + <settings> + <updateUrl path="mui/index/render"/> + </settings> + <aclResource>Magento_Theme::theme</aclResource> + <dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="design_theme_listing_data_source"> + <settings> + <requestFieldName>id</requestFieldName> + <primaryFieldName>theme_id</primaryFieldName> + </settings> + </dataProvider> + </dataSource> + <listingToolbar name="listing_top"> + <bookmark name="bookmarks"/> + <columnsControls name="columns_controls"/> + <filters name="listing_filters"/> + <paging name="listing_paging"/> + </listingToolbar> + <columns name="design_theme_columns"> + <settings> + <childDefaults> + <param name="fieldAction" xsi:type="array"> + <item name="provider" xsi:type="string">design_theme_listing.design_theme_listing.design_theme_columns.actions</item> + <item name="target" xsi:type="string">applyAction</item> + <item name="params" xsi:type="array"> + <item name="0" xsi:type="string">view</item> + <item name="1" xsi:type="string">${ $.$data.rowIndex }</item> + </item> + </param> + </childDefaults> + </settings> + <column name="theme_id" sortOrder="10"> + <settings> + <filter>textRange</filter> + <label translate="true">ID</label> + <sorting>asc</sorting> + <visible>false</visible> + </settings> + </column> + <column name="theme_title" sortOrder="20"> + <settings> + <filter>text</filter> + <label translate="true">Theme Title</label> + </settings> + </column> + <column name="parent_theme_title" sortOrder="30"> + <settings> + <filter>text</filter> + <label translate="true">Parent Theme</label> + </settings> + </column> + <column name="theme_path" sortOrder="40"> + <settings> + <filter>text</filter> + <label translate="true">Theme Path</label> + <fieldClass> + <class name="theme_path">true</class> + </fieldClass> + </settings> + </column> + <actionsColumn name="actions" class="Magento\Theme\Ui\Component\Listing\Column\ViewAction" sortOrder="50"> + <argument name="data" xsi:type="array"> + <item name="config" xsi:type="array"> + <item name="viewUrlPath" xsi:type="string">adminhtml/system_design_theme/edit</item> + <item name="urlEntityParamName" xsi:type="string">id</item> + </item> + </argument> + <settings> + <indexField>theme_id</indexField> + </settings> + </actionsColumn> + </columns> +</listing> diff --git a/app/code/Magento/Theme/view/frontend/web/js/row-builder.js b/app/code/Magento/Theme/view/frontend/web/js/row-builder.js index 62537c8b1b899..7785ced2e4bd5 100644 --- a/app/code/Magento/Theme/view/frontend/web/js/row-builder.js +++ b/app/code/Magento/Theme/view/frontend/web/js/row-builder.js @@ -144,7 +144,7 @@ define([ $(tmpl).appendTo(row); - $(this.options.rowContainer).append(row); + $(this.options.rowContainer).append(row).trigger('contentUpdated'); row.addClass(this.options.additionalRowClass); diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/LICENSE.txt b/app/code/Magento/Tinymce3/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/LICENSE.txt rename to app/code/Magento/Tinymce3/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/LICENSE_AFL.txt b/app/code/Magento/Tinymce3/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/LICENSE_AFL.txt rename to app/code/Magento/Tinymce3/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Tinymce3/Test/Mftf/README.md b/app/code/Magento/Tinymce3/Test/Mftf/README.md new file mode 100644 index 0000000000000..e65a4afe26d88 --- /dev/null +++ b/app/code/Magento/Tinymce3/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Tinymce3 Functional Tests + +The Functional Test Module for **Magento Tinymce3** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/Section/AdminTinymce3FileldsSection.xml b/app/code/Magento/Tinymce3/Test/Mftf/Section/AdminTinymce3FileldsSection.xml similarity index 76% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/Section/AdminTinymce3FileldsSection.xml rename to app/code/Magento/Tinymce3/Test/Mftf/Section/AdminTinymce3FileldsSection.xml index 1c666a9755420..83296abf61dc2 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/Section/AdminTinymce3FileldsSection.xml +++ b/app/code/Magento/Tinymce3/Test/Mftf/Section/AdminTinymce3FileldsSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="ProductWYSIWYGSection"> <element name="Tinymce3MSG" type="button" selector=".admin__field-error"/> </section> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/Test/AdminSwitchWYSIWYGOptionsTest.xml b/app/code/Magento/Tinymce3/Test/Mftf/Test/AdminSwitchWYSIWYGOptionsTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/Test/AdminSwitchWYSIWYGOptionsTest.xml rename to app/code/Magento/Tinymce3/Test/Mftf/Test/AdminSwitchWYSIWYGOptionsTest.xml index 350f3a77cbe5c..4a1c7e07c38c6 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/Test/AdminSwitchWYSIWYGOptionsTest.xml +++ b/app/code/Magento/Tinymce3/Test/Mftf/Test/AdminSwitchWYSIWYGOptionsTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="AdminSwitchWYSIWYGOptionsTest"> <annotations> <features value="Cms"/> diff --git a/app/code/Magento/Tinymce3/Test/Mftf/composer.json b/app/code/Magento/Tinymce3/Test/Mftf/composer.json new file mode 100644 index 0000000000000..84c1f9376bf45 --- /dev/null +++ b/app/code/Magento/Tinymce3/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-tinymce-3", + "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-ui": "100.0.0-dev", + "magento/functional-test-module-variable": "100.0.0-dev", + "magento/functional-test-module-widget": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-cms": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/LICENSE.txt b/app/code/Magento/Translation/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/LICENSE.txt rename to app/code/Magento/Translation/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/LICENSE_AFL.txt b/app/code/Magento/Translation/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/LICENSE_AFL.txt rename to app/code/Magento/Translation/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Translation/Test/Mftf/README.md b/app/code/Magento/Translation/Test/Mftf/README.md new file mode 100644 index 0000000000000..99e8bd0e13ab3 --- /dev/null +++ b/app/code/Magento/Translation/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Translation Functional Tests + +The Functional Test Module for **Magento Translation** module. diff --git a/app/code/Magento/Translation/Test/Mftf/composer.json b/app/code/Magento/Translation/Test/Mftf/composer.json new file mode 100644 index 0000000000000..36bfa66adda0f --- /dev/null +++ b/app/code/Magento/Translation/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-translation", + "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-developer": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-deploy": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Ui/Model/Export/ConvertToCsv.php b/app/code/Magento/Ui/Model/Export/ConvertToCsv.php index 40b10749db21e..eb811bfae788f 100644 --- a/app/code/Magento/Ui/Model/Export/ConvertToCsv.php +++ b/app/code/Magento/Ui/Model/Export/ConvertToCsv.php @@ -9,7 +9,6 @@ use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Filesystem; -use Magento\Framework\Filesystem\Directory\WriteInterface; use Magento\Ui\Component\MassAction\Filter; /** @@ -18,7 +17,7 @@ class ConvertToCsv { /** - * @var WriteInterface + * @var DirectoryList */ protected $directory; diff --git a/app/code/Magento/Ui/Model/Export/ConvertToXml.php b/app/code/Magento/Ui/Model/Export/ConvertToXml.php index 5f6e45a948f24..19eb651113fcf 100644 --- a/app/code/Magento/Ui/Model/Export/ConvertToXml.php +++ b/app/code/Magento/Ui/Model/Export/ConvertToXml.php @@ -13,7 +13,6 @@ use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Filesystem; -use Magento\Framework\Filesystem\Directory\WriteInterface; use Magento\Ui\Component\MassAction\Filter; /** @@ -22,7 +21,7 @@ class ConvertToXml { /** - * @var WriteInterface + * @var DirectoryList */ protected $directory; diff --git a/app/code/Magento/Ui/Model/Export/MetadataProvider.php b/app/code/Magento/Ui/Model/Export/MetadataProvider.php index 499cd06e505f6..54d856e8a6104 100644 --- a/app/code/Magento/Ui/Model/Export/MetadataProvider.php +++ b/app/code/Magento/Ui/Model/Export/MetadataProvider.php @@ -118,6 +118,13 @@ public function getHeaders(UiComponentInterface $component) foreach ($this->getColumns($component) as $column) { $row[] = $column->getData('config/label'); } + + array_walk($row, function (&$header) { + if (mb_strpos($header, 'ID') === 0) { + $header = '"' . $header . '"'; + } + }); + return $row; } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminDataGridFilterActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridFilterActionGroup.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminDataGridFilterActionGroup.xml rename to app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridFilterActionGroup.xml index db89951690fc2..127647e6e9b48 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminDataGridFilterActionGroup.xml +++ b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridFilterActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!--Search grid with keyword search--> <actionGroup name="searchAdminDataGridByKeyword"> <arguments> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminDataGridPaginationActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridPaginationActionGroup.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminDataGridPaginationActionGroup.xml rename to app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridPaginationActionGroup.xml index ee981e06f4983..9239f296aafad 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminDataGridPaginationActionGroup.xml +++ b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridPaginationActionGroup.xml @@ -7,10 +7,10 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="adminDataGridSelectPerPage"> <arguments> - <argument name="perPage"/> + <argument name="perPage" type="string"/> </arguments> <click selector="{{AdminDataGridPaginationSection.perPageDropdown}}" stepKey="clickPerPageDropdown"/> <click selector="{{AdminDataGridPaginationSection.perPageOption(perPage)}}" stepKey="selectCustomPerPage"/> diff --git a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml new file mode 100644 index 0000000000000..023e20b7025c1 --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminGridFilterSearchResultsByInput"> + <arguments> + <argument name="selector"/> + <argument name="value" type="string"/> + </arguments> + + <conditionalClick selector="{{AdminGridFilterControls.clearAll}}" dependentSelector="(//*[contains(@class, 'admin__data-grid-header')][contains(@data-bind, 'afterRender: \$data.setToolbarNode')]//*[contains(@class, 'admin__data-grid-filters-current')][contains(@class, '_show')])[1]" visible="true" stepKey="clearTheFiltersIfPresent"/> + <waitForPageLoad stepKey="waitForPageLoad" time="5"/> + + <click selector="{{AdminGridFilterControls.filters}}" stepKey="clickOnFilters1"/> + <fillField userInput="{{value}}" selector="{{selector}}" stepKey="fillCodeField2"/> + <click selector="{{AdminGridFilterControls.applyFilters}}" stepKey="clickOnApplyFilters1"/> + </actionGroup> +</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminSaveAndCloseActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminSaveAndCloseActionGroup.xml similarity index 75% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminSaveAndCloseActionGroup.xml rename to app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminSaveAndCloseActionGroup.xml index b8c36ba0b485f..133b81a5d6044 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminSaveAndCloseActionGroup.xml +++ b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminSaveAndCloseActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminFormSaveAndClose"> <click selector="{{AdminProductFormActionSection.saveArrow}}" stepKey="openSaveDropDown"/> <click selector="{{AdminProductFormActionSection.saveAndClose}}" stepKey="clickOnSaveAndClose"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/LICENSE.txt b/app/code/Magento/Ui/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/LICENSE.txt rename to app/code/Magento/Ui/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/LICENSE_AFL.txt b/app/code/Magento/Ui/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/LICENSE_AFL.txt rename to app/code/Magento/Ui/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Ui/Test/Mftf/README.md b/app/code/Magento/Ui/Test/Mftf/README.md new file mode 100644 index 0000000000000..9f61e8fc9a009 --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Ui Functional Tests + +The Functional Test Module for **Magento Ui** module. diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridHeaderSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridHeaderSection.xml new file mode 100644 index 0000000000000..e5766300b0e87 --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridHeaderSection.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminDataGridHeaderSection"> + <!--Search by keyword element--> + <element name="search" type="input" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] input[placeholder='Search by keyword']"/> + <element name="submitSearch" type="button" selector=".data-grid-search-control-wrap > button.action-submit" timeout="30"/> + <!--Filters--> + <element name="filters" type="button" selector="button[data-action='grid-filter-expand']" timeout="30"/> + <element name="filterFieldInput" type="input" selector=".admin__data-grid-filters input[name='{{name}}']" parameterized="true"/> + <element name="filterFieldSelect" type="select" selector=".admin__data-grid-filters select[name='{{name}}']" parameterized="true"/> + <element name="cancelFilters" type="button" selector="button[data-action='grid-filter-cancel']" timeout="30"/> + <element name="applyFilters" type="button" selector="button[data-action='grid-filter-apply']" timeout="30"/> + <element name="clearFilters" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" timeout="30"/> + <!--Grid view bookmarks--> + <element name="bookmarkToggle" type="button" selector="div.admin__data-grid-action-bookmarks button[data-bind='toggleCollapsible']" timeout="30"/> + <element name="bookmarkOption" type="button" selector="//div[contains(@class, 'admin__data-grid-action-bookmarks')]/ul/li/div/a[text() = '{{label}}']" parameterized="true" timeout="30"/> + <!--Visible columns management--> + <element name="columnsToggle" type="button" selector="div.admin__data-grid-action-columns button[data-bind='toggleCollapsible']" timeout="30"/> + <element name="columnCheckbox" type="checkbox" selector="//div[contains(@class,'admin__data-grid-action-columns')]//div[contains(@class, 'admin__field-option')]//label[text() = '{{column}}']/preceding-sibling::input" parameterized="true"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminDataGridPaginationSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml similarity index 83% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminDataGridPaginationSection.xml rename to app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml index d52d5ee4bb8a3..ff4097aa76265 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminDataGridPaginationSection.xml +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml @@ -7,10 +7,10 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminDataGridPaginationSection"> <element name="perPageDropdown" type="select" selector=".admin__data-grid-pager-wrap .selectmenu"/> - <element name="perPageOption" type="button" selector="//div[@class='admin__data-grid-pager-wrap']//div[@class='selectmenu-items _active']//li//button[text()='{{label}}']" parameterized="true"/> + <element name="perPageOption" type="button" selector="//div[@class='admin__data-grid-pager-wrap']//div[@class='selectmenu-items _active']//li//button[text()='{{var1}}']" parameterized="true"/> <element name="perPageInput" type="input" selector="//div[@class='admin__data-grid-pager-wrap']//div[@class='selectmenu-items _active']//li//div[@class='selectmenu-item-edit']//input"/> <element name="perPageApplyInput" type="button" selector="//div[@class='admin__data-grid-pager-wrap']//div[@class='selectmenu-items _active']//li//div[@class='selectmenu-item-edit']//button"/> <element name="nextPage" type="button" selector="div.admin__data-grid-pager > button.action-next" timeout="30"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminDataGridTableSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminDataGridTableSection.xml rename to app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml index 53228559f6d7c..ea0f7e64a8448 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminDataGridTableSection.xml +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml @@ -7,11 +7,12 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminDataGridTableSection"> <element name="firstRow" type="button" selector="tr.data-row:nth-of-type(1)"/> <element name="columnHeader" type="button" selector="//div[@data-role='grid-wrapper']//table[contains(@class, 'data-grid')]/thead/tr/th[contains(@class, 'data-grid-th')]/span[text() = '{{label}}']" parameterized="true" timeout="30"/> <element name="column" type="text" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., '{{col}}')]/preceding-sibling::th) +1 ]" parameterized="true"/> + <element name="rowCheckbox" type="checkbox" selector="table.data-grid tbody > tr:nth-of-type({{row}}) td.data-grid-checkbox-cell input" parameterized="true"/> <element name="row" type="text" selector="table.data-grid tbody > tr:nth-of-type({{row}})" parameterized="true"/> <element name="rows" type="text" selector="table.data-grid tbody > tr.data-row"/> <!--Specific cell e.g. {{Section.gridCell('1', 'Name')}}--> diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminGridControlsSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminGridControlsSection.xml new file mode 100644 index 0000000000000..2bf65a682d21c --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminGridControlsSection.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <!-- TODO: Search, Notifications, Admin Menu --> + <section name="AdminGridMainControls"> + <element name="add" type="button" selector="#add" timeout="30"/> + <element name="back" type="button" selector="#back" timeout="30"/> + <element name="reset" type="button" selector="#reset" timeout="30"/> + <element name="save" type="button" selector="#save-button" timeout="30"/> + <element name="saveAndContinue" type="button" selector="#save-button" timeout="30"/> + <element name="saveArrow" type="button" selector="button[data-ui-id='save-button-dropdown']" timeout="5"/> + <element name="saveAndClose" type="button" selector="span[title='Save & Close']" timeout="30"/> + <element name="saveAndNew" type="button" selector="span[title='Save & New']" timeout="30"/> + </section> + <section name="AdminGridSearchBox"> + <element name="searchByKeyword" type="input" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] input[placeholder='Search by keyword']"/> + <element name="search" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] input[placeholder='Search by keyword'] + .action-submit" timeout="30"/> + </section> + <section name="AdminGridFilterControls"> + <element name="filters" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] button[data-action='grid-filter-expand']" timeout="5"/> + <element name="applyFilters" type="button" selector="button[data-action='grid-filter-apply']" timeout="30"/> + <element name="cancel" type="button" selector="button[data-action='grid-filter-cancel']" timeout="30"/> + <element name="clearAll" type="button" selector="(//*[contains(@class, 'admin__data-grid-header')][contains(@data-bind, 'afterRender: \$data.setToolbarNode')]//button[contains(@data-action, 'reset')])[1]" timeout="5"/> + </section> + <section name="AdminGridDefaultViewControls"> + <element name="defaultView" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .admin__data-grid-action-bookmarks" timeout="5"/> + <element name="viewByName" type="button" selector="//a[@class='action-dropdown-menu-link'][contains(text(), '{{var1}}')]" parameterized="true" timeout="5"/> + <element name="saveViewAs" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .action-dropdown-menu-item-last a" timeout="5"/> + <element name="viewName" type="input" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] ._edit input"/> + <element name="save" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] ._edit button" timeout="30"/> + </section> + <section name="AdminGridColumnsControls"> + <element name="columns" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .admin__data-grid-action-columns" timeout="5"/> + + <element name="columnName" type="button" selector="//label[contains(text(), '{{var1}}')]" parameterized="true" timeout="5"/> + + <element name="reset" type="button" selector="//div[@class='admin__action-dropdown-menu-footer']/div/button[contains(text(), 'Reset')]" timeout="5"/> + <element name="cancel" type="button" selector="//div[@class='admin__action-dropdown-menu-footer']/div/button[contains(text(), 'Cancel')]" timeout="5"/> + </section> + <section name="AdminGridActionsMenu"> + <element name="dropDown" type="select" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .action-select" timeout="30"/> + <element name="delete" type="select" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .action-menu-items li" timeout="5"/> + </section> + <section name="AdminGridRowsPerPage"> + <element name="count" type="select" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .selectmenu-value input" timeout="30"/> + </section> + <!-- TODO: Pagination controls --> + <section name="AdminGridHeaders"> + <element name="title" type="text" selector=".page-title-wrapper h1"/> + <element name="headerByName" type="text" selector="//div[@data-role='grid-wrapper']//span[@class='data-grid-cell-content' and contains(text(), '{{var1}}')]/parent::*" parameterized="true"/> + <element name="columnsNames" type="text" selector="[data-role='grid-wrapper'] .data-grid-th > span"/> + </section> + <section name="AdminGridRow"> + <element name="rowOne" type="text" selector="tr[data-repeat-index='0']"/> + <element name="rowByIndex" type="text" selector="tr[data-repeat-index='{{var1}}']" parameterized="true"/> + + <element name="editByValue" type="button" selector="//a[ancestor::tr[contains(., '{{var1}}')]]" parameterized="true"/> + + <element name="checkboxByValue" type="checkbox" selector="//input[ancestor::tr[contains(., '{{var1}}')]]" parameterized="true"/> + <element name="checkboxByIndex" type="checkbox" selector=".data-row[data-repeat-index='{{var1}}'] .admin__control-checkbox" parameterized="true"/> + </section> + <section name="AdminGridSelectRows"> + <element name="multicheckDropdown" type="button" selector="div[data-role='grid-wrapper'] th.data-grid-multicheck-cell button.action-multicheck-toggle"/> + <element name="multicheckOption" type="button" selector="//div[@data-role='grid-wrapper']//th[contains(@class, data-grid-multicheck-cell)]//li//span[text() = '{{label}}']" parameterized="true"/> + <element name="bulkActionDropdown" type="button" selector="div.admin__data-grid-header-row.row div.action-select-wrap button.action-select"/> + <element name="bulkActionOption" type="button" selector="//div[contains(@class,'admin__data-grid-header-row') and contains(@class, 'row')]//div[contains(@class, 'action-select-wrap')]//ul/li/span[text() = '{{label}}']" parameterized="true"/> + </section> + <section name="AdminGridConfirmActionSection"> + <element name="title" type="text" selector=".modal-popup.confirm h1.modal-title"/> + <element name="message" type="text" selector=".modal-popup.confirm div.modal-content"/> + <element name="cancel" type="button" selector=".modal-popup.confirm button.action-dismiss"/> + <element name="ok" type="button" selector=".modal-popup.confirm button.action-accept" timeout="60"/> + </section> +</sections> diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminMessagesSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminMessagesSection.xml new file mode 100644 index 0000000000000..d3e94eb24dfd2 --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminMessagesSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminMessagesSection"> + <element name="successMessage" type="text" selector=".message-success"/> + <element name="errorMessage" type="text" selector=".message.message-error.error"/> + </section> +</sections> diff --git a/app/code/Magento/Ui/Test/Mftf/Section/ModalConfirmationSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/ModalConfirmationSection.xml new file mode 100644 index 0000000000000..8c3dd505f66be --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/Section/ModalConfirmationSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="ModalConfirmationSection"> + <element name="CancelButton" type="button" selector="//footer[@class='modal-footer']/button[contains(@class, 'action-dismiss')]"/> + <element name="OkButton" type="button" selector="//footer[@class='modal-footer']/button[contains(@class, 'action-accept')]"/> + </section> +</sections> diff --git a/app/code/Magento/Ui/Test/Mftf/composer.json b/app/code/Magento/Ui/Test/Mftf/composer.json new file mode 100644 index 0000000000000..86a99d02bd959 --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/composer.json @@ -0,0 +1,24 @@ +{ + "name": "magento/functional-test-module-ui", + "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-authorization": "100.0.0-dev", + "magento/functional-test-module-backend": "100.0.0-dev", + "magento/functional-test-module-eav": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-user": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/AbstractElementTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/AbstractElementTest.php index 54bf0c9e8b37e..d9afe8f16a1a7 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/AbstractElementTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/AbstractElementTest.php @@ -46,6 +46,9 @@ protected function setUp() */ abstract protected function getModelName(); + /** + * @return mixed + */ abstract public function testGetComponentName(); /** diff --git a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/WysiwygTest.php b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/WysiwygTest.php index 1d6c41b2c3ac1..b345989ba05ef 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/Form/Element/WysiwygTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/Form/Element/WysiwygTest.php @@ -69,6 +69,9 @@ protected function setUp() ->method('getElementHtml'); } + /** + * @return \Magento\Ui\Component\Form\Element\AbstractElement|object + */ protected function getModel() { return $this->objectManager->getObject(Wysiwyg::class, [ diff --git a/app/code/Magento/Ui/Test/Unit/Component/MassActionTest.php b/app/code/Magento/Ui/Test/Unit/Component/MassActionTest.php index 123b4cacf71a7..b2f494351597f 100644 --- a/app/code/Magento/Ui/Test/Unit/Component/MassActionTest.php +++ b/app/code/Magento/Ui/Test/Unit/Component/MassActionTest.php @@ -93,6 +93,9 @@ public function testPrepare($componentName, $componentData) $this->assertEquals(['actions' => [$action->getConfiguration()]], $massAction->getConfiguration()); } + /** + * @return array + */ public function getPrepareDataProvider() { return [ diff --git a/app/code/Magento/Ui/Test/Unit/Config/Converter/ActionsTest.php b/app/code/Magento/Ui/Test/Unit/Config/Converter/ActionsTest.php index 8228026dff3d1..d146a18a710c6 100644 --- a/app/code/Magento/Ui/Test/Unit/Config/Converter/ActionsTest.php +++ b/app/code/Magento/Ui/Test/Unit/Config/Converter/ActionsTest.php @@ -61,6 +61,9 @@ public function testConvert(array $expectedResult, $xpath) $this->assertEquals($expectedResult, $this->converter->convert($actions)); } + /** + * @return array + */ public function convertDataProvider() { return [ diff --git a/app/code/Magento/Ui/Test/Unit/Config/Converter/OptionsTest.php b/app/code/Magento/Ui/Test/Unit/Config/Converter/OptionsTest.php index 058e3651bde5c..8f5ab55f7a914 100644 --- a/app/code/Magento/Ui/Test/Unit/Config/Converter/OptionsTest.php +++ b/app/code/Magento/Ui/Test/Unit/Config/Converter/OptionsTest.php @@ -41,6 +41,9 @@ public function testConvert(array $expectedResult, $xpath) $this->assertEquals($expectedResult, $res); } + /** + * @return array + */ public function convertDataProvider() { return [ diff --git a/app/code/Magento/Ui/Test/Unit/Model/Export/MetadataProviderTest.php b/app/code/Magento/Ui/Test/Unit/Model/Export/MetadataProviderTest.php index dd6fd58d355e6..aae4fafbdac3f 100644 --- a/app/code/Magento/Ui/Test/Unit/Model/Export/MetadataProviderTest.php +++ b/app/code/Magento/Ui/Test/Unit/Model/Export/MetadataProviderTest.php @@ -40,18 +40,37 @@ protected function setUp() ); } - public function testGetHeaders() + /** + * @param array $columnLabels + * @param array $expected + * @return void + * @dataProvider getColumnsDataProvider + */ + public function testGetHeaders(array $columnLabels, array $expected): void { $componentName = 'component_name'; $columnName = 'column_name'; - $columnLabel = 'column_label'; - - $component = $this->prepareColumns($componentName, $columnName, $columnLabel); + $component = $this->prepareColumns($componentName, $columnName, $columnLabels[0]); $result = $this->model->getHeaders($component); $this->assertTrue(is_array($result)); $this->assertCount(1, $result); - $this->assertEquals($columnLabel, $result[0]); + $this->assertEquals($expected, $result); + } + + /** + * @return array + */ + public function getColumnsDataProvider(): array + { + return [ + [['ID'],['"ID"']], + [['Name'],['Name']], + [['Id'],['Id']], + [['id'],['id']], + [['IDTEST'],['"IDTEST"']], + [['ID TEST'],['"ID TEST"']], + ]; } public function testGetFields() diff --git a/app/code/Magento/Ui/Test/Unit/Model/ManagerTest.php b/app/code/Magento/Ui/Test/Unit/Model/ManagerTest.php index e569688eaa8c6..e301741e9f048 100644 --- a/app/code/Magento/Ui/Test/Unit/Model/ManagerTest.php +++ b/app/code/Magento/Ui/Test/Unit/Model/ManagerTest.php @@ -193,6 +193,9 @@ public function testPrepareGetData($componentName, $componentData, $isCached, $r ); } + /** + * @return array + */ public function getComponentData() { $cachedData = new \ArrayObject( @@ -293,6 +296,9 @@ public function testCreateRawComponentData($componentName, $configData, $compone $this->assertEquals($componentData, $this->manager->createRawComponentData($componentName, $needEvaluate)); } + /** + * @return array + */ public function getComponentDataProvider() { return [ diff --git a/app/code/Magento/Ui/view/base/web/js/form/element/region.js b/app/code/Magento/Ui/view/base/web/js/form/element/region.js index 0edb4c1966b54..fec69bf8558b5 100644 --- a/app/code/Magento/Ui/view/base/web/js/form/element/region.js +++ b/app/code/Magento/Ui/view/base/web/js/form/element/region.js @@ -57,6 +57,7 @@ define([ registry.get(this.customName, function (input) { isRegionRequired = !!option['is_region_required']; input.validation['required-entry'] = isRegionRequired; + input.validation['validate-not-number-first'] = true; input.required(isRegionRequired); }); } diff --git a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js index 41e2703f4ed1e..c63b4588d2d16 100644 --- a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js +++ b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js @@ -755,6 +755,12 @@ define([ }, $.mage.__('Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.')//eslint-disable-line max-len ], + 'validate-not-number-first': [ + function (value) { + return utils.isEmptyNoTrim(value) || /^[^0-9-\.].*$/.test(value.trim()); + }, + $.mage.__('First character must be letter.') + ], 'validate-date': [ function (value, params, additionalParams) { var test = moment(value, additionalParams.dateFormat); diff --git a/app/code/Magento/Ui/view/base/web/js/modal/modal.js b/app/code/Magento/Ui/view/base/web/js/modal/modal.js index 6c9b4b89bec7a..147a18c08c54c 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/modal.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/modal.js @@ -104,11 +104,12 @@ define([ /** * Escape key press handler, * close modal window + * @param {Object} event - event */ - escapeKey: function () { + escapeKey: function (event) { if (this.options.isOpen && this.modal.find(document.activeElement).length || this.options.isOpen && this.modal[0] === document.activeElement) { - this.closeModal(); + this.closeModal(event); } } } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/LICENSE.txt b/app/code/Magento/Ups/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/LICENSE.txt rename to app/code/Magento/Ups/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/LICENSE_AFL.txt b/app/code/Magento/Ups/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/LICENSE_AFL.txt rename to app/code/Magento/Ups/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Ups/Test/Mftf/README.md b/app/code/Magento/Ups/Test/Mftf/README.md new file mode 100644 index 0000000000000..9f3fe133f3228 --- /dev/null +++ b/app/code/Magento/Ups/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Ups Functional Tests + +The Functional Test Module for **Magento Ups** module. diff --git a/app/code/Magento/Ups/Test/Mftf/composer.json b/app/code/Magento/Ups/Test/Mftf/composer.json new file mode 100644 index 0000000000000..560eaab1a19b1 --- /dev/null +++ b/app/code/Magento/Ups/Test/Mftf/composer.json @@ -0,0 +1,26 @@ +{ + "name": "magento/functional-test-module-ups", + "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-inventory": "100.0.0-dev", + "magento/functional-test-module-directory": "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-shipping": "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": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php b/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php index 64a775b01593b..e34d4773c271b 100644 --- a/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php +++ b/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php @@ -27,7 +27,7 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory /** * @var string */ - protected $_template = 'categories.phtml'; + protected $_template = 'Magento_UrlRewrite::categories.phtml'; /** * Adminhtml data diff --git a/app/code/Magento/UrlRewrite/Block/Selector.php b/app/code/Magento/UrlRewrite/Block/Selector.php index 0a28ba215de5a..75266fd2f977c 100644 --- a/app/code/Magento/UrlRewrite/Block/Selector.php +++ b/app/code/Magento/UrlRewrite/Block/Selector.php @@ -18,7 +18,7 @@ class Selector extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'selector.phtml'; + protected $_template = 'Magento_UrlRewrite::selector.phtml'; /** * Set block template and get available modes diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/LICENSE.txt b/app/code/Magento/UrlRewrite/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/LICENSE.txt rename to app/code/Magento/UrlRewrite/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/LICENSE_AFL.txt b/app/code/Magento/UrlRewrite/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/LICENSE_AFL.txt rename to app/code/Magento/UrlRewrite/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/README.md b/app/code/Magento/UrlRewrite/Test/Mftf/README.md new file mode 100644 index 0000000000000..1d7cfbb915afa --- /dev/null +++ b/app/code/Magento/UrlRewrite/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Url Rewrite Functional Tests + +The Functional Test Module for **Magento Url Rewrite** module. diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/composer.json b/app/code/Magento/UrlRewrite/Test/Mftf/composer.json new file mode 100644 index 0000000000000..2d906c3499ac6 --- /dev/null +++ b/app/code/Magento/UrlRewrite/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-url-rewrite", + "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-url-rewrite": "100.0.0-dev", + "magento/functional-test-module-cms": "100.0.0-dev", + "magento/functional-test-module-cms-url-rewrite": "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/UrlRewrite/Test/Unit/Helper/UrlRewriteTest.php b/app/code/Magento/UrlRewrite/Test/Unit/Helper/UrlRewriteTest.php index e41a06cb0c9f0..b99c5c48c3de0 100644 --- a/app/code/Magento/UrlRewrite/Test/Unit/Helper/UrlRewriteTest.php +++ b/app/code/Magento/UrlRewrite/Test/Unit/Helper/UrlRewriteTest.php @@ -55,6 +55,9 @@ public function testValidateSuffixException($suffix) $this->_helper->validateSuffix($suffix); } + /** + * @return array + */ public function requestPathDataProvider() { return [ @@ -63,6 +66,9 @@ public function requestPathDataProvider() ]; } + /** + * @return array + */ public function requestPathExceptionDataProvider() { return [ diff --git a/app/code/Magento/UrlRewriteGraphQl/Test/Mftf/README.md b/app/code/Magento/UrlRewriteGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..8825364e35cc6 --- /dev/null +++ b/app/code/Magento/UrlRewriteGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Url Rewrite Graph Ql Functional Tests + +The Functional Test Module for **Magento Url Rewrite Graph Ql** module. diff --git a/app/code/Magento/UrlRewriteGraphQl/Test/Mftf/composer.json b/app/code/Magento/UrlRewriteGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..06c58dbb59468 --- /dev/null +++ b/app/code/Magento/UrlRewriteGraphQl/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-url-rewrite-graph-ql", + "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-url-rewrite": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/User/Block/Role/Tab/Edit.php b/app/code/Magento/User/Block/Role/Tab/Edit.php index 45d725c61bd52..5fe6a1b2a2e88 100644 --- a/app/code/Magento/User/Block/Role/Tab/Edit.php +++ b/app/code/Magento/User/Block/Role/Tab/Edit.php @@ -19,7 +19,7 @@ class Edit extends \Magento\Backend\Block\Widget\Form implements \Magento\Backen /** * @var string */ - protected $_template = 'role/edit.phtml'; + protected $_template = 'Magento_User::role/edit.phtml'; /** * Root ACL Resource diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminCreateUserActionGroup.xml similarity index 91% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserActionGroup.xml rename to app/code/Magento/User/Test/Mftf/ActionGroup/AdminCreateUserActionGroup.xml index f3edad3a082bb..e8aff30ff8d67 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/ActionGroup/AdminCreateUserActionGroup.xml +++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminCreateUserActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminCreateUserActionGroup"> <arguments> <argument name="role"/> diff --git a/app/code/Magento/User/Test/Mftf/Data/UserData.xml b/app/code/Magento/User/Test/Mftf/Data/UserData.xml new file mode 100644 index 0000000000000..93bf0ccfa43d6 --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/Data/UserData.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="admin" type="user"> + <data key="email">admin@magento.com</data> + <data key="password">admin123</data> + </entity> + <entity name="admin2" type="user"> + <data key="username" unique="suffix">admin</data> + <data key="firstName">John</data> + <data key="lastName">Smith</data> + <data key="password">admin123</data> + </entity> +</entities> diff --git a/app/code/Magento/User/Test/Mftf/Data/UserRoleData.xml b/app/code/Magento/User/Test/Mftf/Data/UserRoleData.xml new file mode 100644 index 0000000000000..39eea63356b7e --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/Data/UserRoleData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="adminRole" type="role"> + <data key="name" unique="suffix">adminRole</data> + <data key="scope">1</data> + <data key="access">1</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/LICENSE.txt b/app/code/Magento/User/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/LICENSE.txt rename to app/code/Magento/User/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/LICENSE_AFL.txt b/app/code/Magento/User/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/LICENSE_AFL.txt rename to app/code/Magento/User/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/User/Test/Mftf/Page/AdminEditRolePage.xml b/app/code/Magento/User/Test/Mftf/Page/AdminEditRolePage.xml new file mode 100644 index 0000000000000..8c71a815a3346 --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/Page/AdminEditRolePage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminEditRolePage" url="admin/user_role/editrole" module="Magento_User" area="admin"> + <section name="AdminEditRoleInfoSection"/> + </page> +</pages> diff --git a/app/code/Magento/User/Test/Mftf/Page/AdminEditUserPage.xml b/app/code/Magento/User/Test/Mftf/Page/AdminEditUserPage.xml new file mode 100644 index 0000000000000..7f6751c6f9e9b --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/Page/AdminEditUserPage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminEditUserPage" url="admin/user/new" area="admin" module="Magento_User"> + <section name="AdminEditUserSection"/> + <section name="AdminEditUserRoleSection"/> + </page> +</pages> diff --git a/app/code/Magento/User/Test/Mftf/Page/AdminRolesPage.xml b/app/code/Magento/User/Test/Mftf/Page/AdminRolesPage.xml new file mode 100644 index 0000000000000..87cf0625670e0 --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/Page/AdminRolesPage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminRolesPage" url="admin/user_role/" module="Magento_User" area="admin"> + <section name="AdminRoleGridSection"/> + </page> +</pages> diff --git a/app/code/Magento/User/Test/Mftf/Page/AdminUsersPage.xml b/app/code/Magento/User/Test/Mftf/Page/AdminUsersPage.xml new file mode 100644 index 0000000000000..2075cba2bdccb --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/Page/AdminUsersPage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminUsersPage" url="admin/user/" area="admin" module="Magento_User"> + <section name="AdminUserGridSection"/> + </page> +</pages> diff --git a/app/code/Magento/User/Test/Mftf/README.md b/app/code/Magento/User/Test/Mftf/README.md new file mode 100644 index 0000000000000..fbf07c88d5a9c --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# User Functional Tests + +The Functional Test Module for **Magento User** module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleInfoSection.xml b/app/code/Magento/User/Test/Mftf/Section/AdminEditRoleInfoSection.xml similarity index 85% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleInfoSection.xml rename to app/code/Magento/User/Test/Mftf/Section/AdminEditRoleInfoSection.xml index 69d1fdea9cb51..feb7b3e3bba8b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditRoleInfoSection.xml +++ b/app/code/Magento/User/Test/Mftf/Section/AdminEditRoleInfoSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminEditRoleInfoSection"> <element name="roleName" type="input" selector="#role_name"/> <element name="password" type="input" selector="#current_password"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserRoleSection.xml b/app/code/Magento/User/Test/Mftf/Section/AdminEditUserRoleSection.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserRoleSection.xml rename to app/code/Magento/User/Test/Mftf/Section/AdminEditUserRoleSection.xml index 857c36f9d71de..dc12205a84d9a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserRoleSection.xml +++ b/app/code/Magento/User/Test/Mftf/Section/AdminEditUserRoleSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminEditUserRoleSection"> <element name="usernameTextField" type="input" selector="#user_username"/> <element name="roleNameFilterTextField" type="input" selector="#permissionsUserRolesGrid_filter_role_name"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserSection.xml b/app/code/Magento/User/Test/Mftf/Section/AdminEditUserSection.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserSection.xml rename to app/code/Magento/User/Test/Mftf/Section/AdminEditUserSection.xml index 0dbac0a9386c9..1406758b86118 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminEditUserSection.xml +++ b/app/code/Magento/User/Test/Mftf/Section/AdminEditUserSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminEditUserSection"> <element name="usernameTextField" type="input" selector="#user_username"/> <element name="firstNameTextField" type="input" selector="#user_firstname"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminRoleGridSection.xml b/app/code/Magento/User/Test/Mftf/Section/AdminRoleGridSection.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminRoleGridSection.xml rename to app/code/Magento/User/Test/Mftf/Section/AdminRoleGridSection.xml index 9b91f4e1dd2a9..1e1f3457995fe 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminRoleGridSection.xml +++ b/app/code/Magento/User/Test/Mftf/Section/AdminRoleGridSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminRoleGridSection"> <element name="idFilterTextField" type="input" selector="#roleGrid_filter_role_id"/> <element name="roleNameFilterTextField" type="input" selector="#roleGrid_filter_role_name"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminUserGridSection.xml b/app/code/Magento/User/Test/Mftf/Section/AdminUserGridSection.xml similarity index 81% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminUserGridSection.xml rename to app/code/Magento/User/Test/Mftf/Section/AdminUserGridSection.xml index 98a714c6a3b64..b6d2645ac7384 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Section/AdminUserGridSection.xml +++ b/app/code/Magento/User/Test/Mftf/Section/AdminUserGridSection.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminUserGridSection"> <element name="usernameFilterTextField" type="input" selector="#permissionsUserGrid_filter_username"/> <element name="searchButton" type="button" selector=".admin__data-grid-header button[title=Search]"/> diff --git a/app/code/Magento/User/Test/Mftf/composer.json b/app/code/Magento/User/Test/Mftf/composer.json new file mode 100644 index 0000000000000..6deceeb6b856f --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-user", + "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-authorization": "100.0.0-dev", + "magento/functional-test-module-backend": "100.0.0-dev", + "magento/functional-test-module-email": "100.0.0-dev", + "magento/functional-test-module-integration": "100.0.0-dev", + "magento/functional-test-module-security": "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/User/Test/Unit/Model/ResourceModel/UserTest.php b/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php index 16cde3cfe2c06..1cc0cd54c60eb 100644 --- a/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php +++ b/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php @@ -330,7 +330,7 @@ public function testDeleteFromRole() $roleId = 44; $methodUserMock->expects($this->once())->method('getUserId')->willReturn($uid); $this->resourceMock->expects($this->atLeastOnce())->method('getConnection')->willReturn($this->dbAdapterMock); - $methodUserMock->expects($this->atleastOnce())->method('getRoleId')->willReturn($roleId); + $methodUserMock->expects($this->atLeastOnce())->method('getRoleId')->willReturn($roleId); $this->dbAdapterMock->expects($this->once())->method('delete'); $this->assertInstanceOf( diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/LICENSE.txt b/app/code/Magento/Usps/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/LICENSE.txt rename to app/code/Magento/Usps/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/LICENSE_AFL.txt b/app/code/Magento/Usps/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/LICENSE_AFL.txt rename to app/code/Magento/Usps/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Usps/Test/Mftf/README.md b/app/code/Magento/Usps/Test/Mftf/README.md new file mode 100644 index 0000000000000..368556a4ba50d --- /dev/null +++ b/app/code/Magento/Usps/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Usps Functional Tests + +The Functional Test Module for **Magento Usps** module. diff --git a/app/code/Magento/Usps/Test/Mftf/composer.json b/app/code/Magento/Usps/Test/Mftf/composer.json new file mode 100644 index 0000000000000..e3b487ad80d9f --- /dev/null +++ b/app/code/Magento/Usps/Test/Mftf/composer.json @@ -0,0 +1,24 @@ +{ + "name": "magento/functional-test-module-usps", + "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-inventory": "100.0.0-dev", + "magento/functional-test-module-config": "100.0.0-dev", + "magento/functional-test-module-directory": "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-shipping": "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/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/ActionGroup/CreateCustomVariableActionGroup.xml b/app/code/Magento/Variable/Test/Mftf/ActionGroup/CreateCustomVariableActionGroup.xml similarity index 90% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/ActionGroup/CreateCustomVariableActionGroup.xml rename to app/code/Magento/Variable/Test/Mftf/ActionGroup/CreateCustomVariableActionGroup.xml index 35742ad90bb76..0df617c876d8e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/ActionGroup/CreateCustomVariableActionGroup.xml +++ b/app/code/Magento/Variable/Test/Mftf/ActionGroup/CreateCustomVariableActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <actionGroup name="CreateCustomVariableActionGroup"> <amOnPage url="admin/admin/system_variable/new/" stepKey="goToNewCustomVarialePage" /> <waitForPageLoad stepKey="waitForPageLoad" /> diff --git a/app/code/Magento/Variable/Test/Mftf/Data/VariableData.xml b/app/code/Magento/Variable/Test/Mftf/Data/VariableData.xml new file mode 100644 index 0000000000000..9038030b30cbf --- /dev/null +++ b/app/code/Magento/Variable/Test/Mftf/Data/VariableData.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="_defaultVariable" type="cms_page"> + <data key="city"> Austin </data> + </entity> + <entity name="customVariable" type="cms_page"> + <data key="code" unique="suffix">variale-code</data> + <data key="name">Test Variable</data> + <data key="html"> Sample Variable </data> + <data key="plain">variable-plain-</data> + </entity> +</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/LICENSE.txt b/app/code/Magento/Variable/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/LICENSE.txt rename to app/code/Magento/Variable/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/LICENSE_AFL.txt b/app/code/Magento/Variable/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/LICENSE_AFL.txt rename to app/code/Magento/Variable/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Variable/Test/Mftf/README.md b/app/code/Magento/Variable/Test/Mftf/README.md new file mode 100644 index 0000000000000..f2cd2ce8f4623 --- /dev/null +++ b/app/code/Magento/Variable/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Variable Functional Tests + +The Functional Test Module for **Magento Variable** module. diff --git a/app/code/Magento/Variable/Test/Mftf/composer.json b/app/code/Magento/Variable/Test/Mftf/composer.json new file mode 100644 index 0000000000000..2360634369fed --- /dev/null +++ b/app/code/Magento/Variable/Test/Mftf/composer.json @@ -0,0 +1,19 @@ +{ + "name": "magento/functional-test-module-variable", + "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-store": "100.0.0-dev", + "magento/functional-test-module-config": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php b/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php index 87c1442048cf2..a4be2cd273407 100644 --- a/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php +++ b/app/code/Magento/Variable/Test/Unit/Model/VariableTest.php @@ -163,6 +163,9 @@ public function testGetVariablesOptionArrayWithGroup() $this->assertEquals($transformedOptions, $this->model->getVariablesOptionArray(true)); } + /** + * @return array + */ public function validateDataProvider() { $variable = [ @@ -175,6 +178,9 @@ public function validateDataProvider() ]; } + /** + * @return array + */ public function validateMissingInfoDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/LICENSE.txt b/app/code/Magento/Vault/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/LICENSE.txt rename to app/code/Magento/Vault/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/LICENSE_AFL.txt b/app/code/Magento/Vault/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/LICENSE_AFL.txt rename to app/code/Magento/Vault/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Vault/Test/Mftf/README.md b/app/code/Magento/Vault/Test/Mftf/README.md new file mode 100644 index 0000000000000..aeb4c78619eee --- /dev/null +++ b/app/code/Magento/Vault/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Vault Functional Tests + +The Functional Test Module for **Magento Vault** module. diff --git a/app/code/Magento/Vault/Test/Mftf/composer.json b/app/code/Magento/Vault/Test/Mftf/composer.json new file mode 100644 index 0000000000000..78e765bebc429 --- /dev/null +++ b/app/code/Magento/Vault/Test/Mftf/composer.json @@ -0,0 +1,21 @@ +{ + "name": "magento/functional-test-module-vault", + "description": "", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0", + "magento/functional-test-module-checkout": "100.0.0-dev", + "magento/functional-test-module-customer": "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" + }, + "type": "magento2-test", + "license": [ + "proprietary" + ] +} diff --git a/app/code/Magento/Vault/Test/Unit/Observer/AfterPaymentSaveObserverTest.php b/app/code/Magento/Vault/Test/Unit/Observer/AfterPaymentSaveObserverTest.php index efbe2e9745ef1..09c17d1e58d98 100644 --- a/app/code/Magento/Vault/Test/Unit/Observer/AfterPaymentSaveObserverTest.php +++ b/app/code/Magento/Vault/Test/Unit/Observer/AfterPaymentSaveObserverTest.php @@ -160,6 +160,9 @@ public function testPositiveCase($customerId, $createdAt, $token, $isActive, $me static::assertEquals($createdAt, $paymentToken->getCreatedAt()); } + /** + * @return array + */ public function positiveCaseDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/LICENSE.txt b/app/code/Magento/Version/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/LICENSE.txt rename to app/code/Magento/Version/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/LICENSE_AFL.txt b/app/code/Magento/Version/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/LICENSE_AFL.txt rename to app/code/Magento/Version/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Version/Test/Mftf/README.md b/app/code/Magento/Version/Test/Mftf/README.md new file mode 100644 index 0000000000000..a5b08aaa6d9d3 --- /dev/null +++ b/app/code/Magento/Version/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Version Functional Tests + +The Functional Test Module for **Magento Version** module. diff --git a/app/code/Magento/Version/Test/Mftf/composer.json b/app/code/Magento/Version/Test/Mftf/composer.json new file mode 100644 index 0000000000000..24037307b7878 --- /dev/null +++ b/app/code/Magento/Version/Test/Mftf/composer.json @@ -0,0 +1,16 @@ +{ + "name": "magento/functional-test-module-version", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "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/WebapiSecurity/LICENSE.txt b/app/code/Magento/Webapi/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WebapiSecurity/LICENSE.txt rename to app/code/Magento/Webapi/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WebapiSecurity/LICENSE_AFL.txt b/app/code/Magento/Webapi/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WebapiSecurity/LICENSE_AFL.txt rename to app/code/Magento/Webapi/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Webapi/Test/Mftf/README.md b/app/code/Magento/Webapi/Test/Mftf/README.md new file mode 100644 index 0000000000000..c59b55fed533d --- /dev/null +++ b/app/code/Magento/Webapi/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Webapi Functional Tests + +The Functional Test Module for **Magento Webapi** module. diff --git a/app/code/Magento/Webapi/Test/Mftf/composer.json b/app/code/Magento/Webapi/Test/Mftf/composer.json new file mode 100644 index 0000000000000..28d5769034a39 --- /dev/null +++ b/app/code/Magento/Webapi/Test/Mftf/composer.json @@ -0,0 +1,24 @@ +{ + "name": "magento/functional-test-module-webapi", + "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-authorization": "100.0.0-dev", + "magento/functional-test-module-backend": "100.0.0-dev", + "magento/functional-test-module-integration": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-user": "100.0.0-dev", + "magento/functional-test-module-customer": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Webapi/Test/Unit/Controller/PathProcessorTest.php b/app/code/Magento/Webapi/Test/Unit/Controller/PathProcessorTest.php index 7f3fe558a98eb..c213c72b5185a 100644 --- a/app/code/Magento/Webapi/Test/Unit/Controller/PathProcessorTest.php +++ b/app/code/Magento/Webapi/Test/Unit/Controller/PathProcessorTest.php @@ -51,6 +51,9 @@ public function testAllStoreCode($storeCodeInPath, $storeCodeSet, $setCurrentSto $this->assertSame($this->endpointPath, $result); } + /** + * @return array + */ public function processPathDataProvider() { return [ diff --git a/app/code/Magento/Webapi/Test/Unit/Model/Authorization/TokenUserContextTest.php b/app/code/Magento/Webapi/Test/Unit/Model/Authorization/TokenUserContextTest.php index b45f3e1a13df1..fd9b0d9302a18 100644 --- a/app/code/Magento/Webapi/Test/Unit/Model/Authorization/TokenUserContextTest.php +++ b/app/code/Magento/Webapi/Test/Unit/Model/Authorization/TokenUserContextTest.php @@ -297,6 +297,9 @@ public function testValidToken($userType, $userId, $expectedUserType, $expectedU $this->assertEquals($expectedUserId, $this->tokenUserContext->getUserId()); } + /** + * @return array + */ public function getValidTokenData() { return [ diff --git a/app/code/Magento/Webapi/Test/Unit/Model/Rest/Swagger/GeneratorTest.php b/app/code/Magento/Webapi/Test/Unit/Model/Rest/Swagger/GeneratorTest.php index 395add7fb1f60..66b59babb7189 100644 --- a/app/code/Magento/Webapi/Test/Unit/Model/Rest/Swagger/GeneratorTest.php +++ b/app/code/Magento/Webapi/Test/Unit/Model/Rest/Swagger/GeneratorTest.php @@ -295,6 +295,9 @@ public function testGetObjectSchema($typeName, $description, $result) $this->assertSame(json_encode($result), json_encode($actual)); } + /** + * @return array + */ public function getObjectSchemaDataProvider() { return [ @@ -354,6 +357,9 @@ public function testGenerateDefinition($typeData, $expected) $this->assertSame(json_encode($expected), json_encode($actual)); } + /** + * @return array + */ public function generateDefinitionDataProvider() { return [ diff --git a/app/code/Magento/WebapiAsync/Model/BulkServiceConfig.php b/app/code/Magento/WebapiAsync/Model/BulkServiceConfig.php index 4abd8fa4d1439..a0499087c35b9 100644 --- a/app/code/Magento/WebapiAsync/Model/BulkServiceConfig.php +++ b/app/code/Magento/WebapiAsync/Model/BulkServiceConfig.php @@ -74,6 +74,9 @@ public function getServices() return $this->services; } + /** + * @return array + */ private function getBulkServicesConfig() { $bulkServices = []; diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/LICENSE.txt b/app/code/Magento/WebapiAsync/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/LICENSE.txt rename to app/code/Magento/WebapiAsync/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/LICENSE_AFL.txt b/app/code/Magento/WebapiAsync/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/LICENSE_AFL.txt rename to app/code/Magento/WebapiAsync/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/WebapiAsync/Test/Mftf/README.md b/app/code/Magento/WebapiAsync/Test/Mftf/README.md new file mode 100644 index 0000000000000..58f8aa5e71308 --- /dev/null +++ b/app/code/Magento/WebapiAsync/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Webapi Async Functional Tests + +The Functional Test Module for **Magento Webapi Async** module. diff --git a/app/code/Magento/WebapiAsync/Test/Mftf/composer.json b/app/code/Magento/WebapiAsync/Test/Mftf/composer.json new file mode 100644 index 0000000000000..6bf5375b7c873 --- /dev/null +++ b/app/code/Magento/WebapiAsync/Test/Mftf/composer.json @@ -0,0 +1,22 @@ +{ + "name": "magento/functional-test-module-webapi-async", + "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-webapi": "100.0.0-dev", + "magento/functional-test-module-asynchronous-operations": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-user": "100.0.0-dev", + "magento/functional-test-module-customer": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/WebapiAsync/Test/Unit/Controller/PathProcessorTest.php b/app/code/Magento/WebapiAsync/Test/Unit/Controller/PathProcessorTest.php index 935ef0e8c96e4..e5453f7574540 100644 --- a/app/code/Magento/WebapiAsync/Test/Unit/Controller/PathProcessorTest.php +++ b/app/code/Magento/WebapiAsync/Test/Unit/Controller/PathProcessorTest.php @@ -56,6 +56,9 @@ public function testAllStoreCode($storeCodeInPath, $storeCodeSet, $setCurrentSto $this->assertSame($this->endpointPath, $result); } + /** + * @return array + */ public function processPathDataProvider() { return [ diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/LICENSE.txt b/app/code/Magento/WebapiSecurity/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/LICENSE.txt rename to app/code/Magento/WebapiSecurity/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/LICENSE_AFL.txt b/app/code/Magento/WebapiSecurity/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/LICENSE_AFL.txt rename to app/code/Magento/WebapiSecurity/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/WebapiSecurity/Test/Mftf/README.md b/app/code/Magento/WebapiSecurity/Test/Mftf/README.md new file mode 100644 index 0000000000000..e3a1132fb9bb2 --- /dev/null +++ b/app/code/Magento/WebapiSecurity/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Webapi Security Functional Tests + +The Functional Test Module for **Magento Webapi Security** module. diff --git a/app/code/Magento/WebapiSecurity/Test/Mftf/composer.json b/app/code/Magento/WebapiSecurity/Test/Mftf/composer.json new file mode 100644 index 0000000000000..de96b3a3210f0 --- /dev/null +++ b/app/code/Magento/WebapiSecurity/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-webapi-security", + "description": "WebapiSecurity module provides option to loosen security on some webapi resources.", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0", + "magento/functional-test-module-webapi": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php index ab6710fddcac2..94a6faf72aa96 100644 --- a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php @@ -32,7 +32,7 @@ class Tax extends \Magento\Backend\Block\Widget implements /** * @var string */ - protected $_template = 'renderer/tax.phtml'; + protected $_template = 'Magento_Weee::renderer/tax.phtml'; /** * Core registry diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/LICENSE.txt b/app/code/Magento/Weee/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/LICENSE.txt rename to app/code/Magento/Weee/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/LICENSE_AFL.txt b/app/code/Magento/Weee/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/LICENSE_AFL.txt rename to app/code/Magento/Weee/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Weee/Test/Mftf/README.md b/app/code/Magento/Weee/Test/Mftf/README.md new file mode 100644 index 0000000000000..78739e99958a5 --- /dev/null +++ b/app/code/Magento/Weee/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Weee Functional Tests + +The Functional Test Module for **Magento Weee** module. diff --git a/app/code/Magento/Weee/Test/Mftf/composer.json b/app/code/Magento/Weee/Test/Mftf/composer.json new file mode 100644 index 0000000000000..9e5f7c5772a4e --- /dev/null +++ b/app/code/Magento/Weee/Test/Mftf/composer.json @@ -0,0 +1,31 @@ +{ + "name": "magento/functional-test-module-weee", + "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-customer": "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-page-cache": "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-bundle": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Weee/Test/Unit/Block/Item/Price/RendererTest.php b/app/code/Magento/Weee/Test/Unit/Block/Item/Price/RendererTest.php index b49150fc6fac0..8b770ea763cdd 100644 --- a/app/code/Magento/Weee/Test/Unit/Block/Item/Price/RendererTest.php +++ b/app/code/Magento/Weee/Test/Unit/Block/Item/Price/RendererTest.php @@ -122,6 +122,9 @@ public function testDisplayPriceWithWeeeDetails( $this->assertEquals($expectedValue, $this->renderer->displayPriceWithWeeeDetails()); } + /** + * @return array + */ public function displayPriceWithWeeeDetailsDataProvider() { $data = [ @@ -472,6 +475,9 @@ public function testGetBaseRowDisplayPriceInclTax( $this->assertEquals($expectedValue, $this->renderer->getBaseRowDisplayPriceInclTax()); } + /** + * @return array + */ public function getDisplayPriceDataProvider() { $data = [ @@ -739,6 +745,9 @@ public function testGetBaseFinalRowDisplayPriceInclTax( $this->assertEquals($expectedValue, $this->renderer->getBaseFinalRowDisplayPriceInclTax()); } + /** + * @return array + */ public function getFinalDisplayPriceDataProvider() { $data = [ diff --git a/app/code/Magento/Weee/Test/Unit/Model/Total/Invoice/WeeeTest.php b/app/code/Magento/Weee/Test/Unit/Model/Total/Invoice/WeeeTest.php index 975580945bb3a..22d673e0c8b26 100644 --- a/app/code/Magento/Weee/Test/Unit/Model/Total/Invoice/WeeeTest.php +++ b/app/code/Magento/Weee/Test/Unit/Model/Total/Invoice/WeeeTest.php @@ -78,6 +78,9 @@ protected function setUp() $this->invoice->expects($this->atLeastOnce())->method('getOrder')->will($this->returnValue($this->order)); } + /** + * @param $orderData + */ private function setupOrder($orderData) { //Set up order mock diff --git a/app/code/Magento/Weee/Test/Unit/Observer/AfterAddressSaveTest.php b/app/code/Magento/Weee/Test/Unit/Observer/AfterAddressSaveTest.php index 19f55550bac65..6d363847bf9e6 100644 --- a/app/code/Magento/Weee/Test/Unit/Observer/AfterAddressSaveTest.php +++ b/app/code/Magento/Weee/Test/Unit/Observer/AfterAddressSaveTest.php @@ -130,6 +130,9 @@ public function testExecute( $this->session->execute($this->observerMock); } + /** + * @return array + */ public function getExecuteDataProvider() { return [ diff --git a/app/code/Magento/Weee/Test/Unit/Pricing/AdjustmentTest.php b/app/code/Magento/Weee/Test/Unit/Pricing/AdjustmentTest.php index fb2d058217089..a0d0b6486c7d9 100644 --- a/app/code/Magento/Weee/Test/Unit/Pricing/AdjustmentTest.php +++ b/app/code/Magento/Weee/Test/Unit/Pricing/AdjustmentTest.php @@ -134,6 +134,9 @@ public function testIsExcludedWith($adjustmentCode, $expectedResult) $this->assertEquals($expectedResult, $this->adjustment->isExcludedWith($adjustmentCode)); } + /** + * @return array + */ public function isExcludedWithDataProvider() { return [ @@ -157,6 +160,9 @@ public function testGetSortOrder($isTaxable, $expectedResult) $this->assertEquals($expectedResult, $this->adjustment->getSortOrder()); } + /** + * @return array + */ public function getSortOrderProvider() { return [ diff --git a/app/code/Magento/WeeeGraphQl/Test/Mftf/README.md b/app/code/Magento/WeeeGraphQl/Test/Mftf/README.md new file mode 100644 index 0000000000000..d39ee3cc685f4 --- /dev/null +++ b/app/code/Magento/WeeeGraphQl/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Weee Graph Ql Functional Tests + +The Functional Test Module for **Magento Weee Graph Ql** module. diff --git a/app/code/Magento/WeeeGraphQl/Test/Mftf/composer.json b/app/code/Magento/WeeeGraphQl/Test/Mftf/composer.json new file mode 100644 index 0000000000000..09b1dc9afe551 --- /dev/null +++ b/app/code/Magento/WeeeGraphQl/Test/Mftf/composer.json @@ -0,0 +1,20 @@ +{ + "name": "magento/functional-test-module-weee-graph-ql", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.1.3||~7.2.0", + "magento/magento2-functional-testing-framework": "2.2.0" + }, + "suggest": { + "magento/functional-test-module-weee": "100.0.0-dev", + "magento/functional-test-module-catalog-graph-ql": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 49345f29afd53..c48bf9e7e4c7a 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -27,7 +27,7 @@ class Layout extends Template implements RendererInterface /** * @var string */ - protected $_template = 'instance/edit/layout.phtml'; + protected $_template = 'Magento_Widget::instance/edit/layout.phtml'; /** * @var \Magento\Catalog\Model\Product\Type diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/LICENSE.txt b/app/code/Magento/Widget/Test/Mftf/LICENSE.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/LICENSE.txt rename to app/code/Magento/Widget/Test/Mftf/LICENSE.txt diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/LICENSE_AFL.txt b/app/code/Magento/Widget/Test/Mftf/LICENSE_AFL.txt similarity index 100% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/LICENSE_AFL.txt rename to app/code/Magento/Widget/Test/Mftf/LICENSE_AFL.txt diff --git a/app/code/Magento/Widget/Test/Mftf/README.md b/app/code/Magento/Widget/Test/Mftf/README.md new file mode 100644 index 0000000000000..0504cf39ca7f6 --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Widget Functional Tests + +The Functional Test Module for **Magento Widget** module. diff --git a/app/code/Magento/Widget/Test/Mftf/composer.json b/app/code/Magento/Widget/Test/Mftf/composer.json new file mode 100644 index 0000000000000..693fa651f5974 --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/composer.json @@ -0,0 +1,25 @@ +{ + "name": "magento/functional-test-module-widget", + "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-cms": "100.0.0-dev", + "magento/functional-test-module-store": "100.0.0-dev", + "magento/functional-test-module-theme": "100.0.0-dev", + "magento/functional-test-module-variable": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-widget-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php index 4a5f116cd8293..907dfd90e752e 100644 --- a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php +++ b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php @@ -21,7 +21,7 @@ class EmailLink extends Link /** * @var string */ - protected $_template = 'rss/email.phtml'; + protected $_template = 'Magento_Wishlist::rss/email.phtml'; /** * @return array diff --git a/app/code/Magento/Wishlist/Block/Share/Email/Items.php b/app/code/Magento/Wishlist/Block/Share/Email/Items.php index bc84f6a43df3c..d4e6587fd6519 100644 --- a/app/code/Magento/Wishlist/Block/Share/Email/Items.php +++ b/app/code/Magento/Wishlist/Block/Share/Email/Items.php @@ -20,7 +20,7 @@ class Items extends \Magento\Wishlist\Block\AbstractBlock /** * @var string */ - protected $_template = 'email/items.phtml'; + protected $_template = 'Magento_Wishlist::email/items.phtml'; /** * Retrieve Product View URL diff --git a/app/code/Magento/Wishlist/Model/Item.php b/app/code/Magento/Wishlist/Model/Item.php index b0e7c78cae5f4..41e83c7179e10 100644 --- a/app/code/Magento/Wishlist/Model/Item.php +++ b/app/code/Magento/Wishlist/Model/Item.php @@ -473,7 +473,7 @@ public function getProductUrl() public function getBuyRequest() { $option = $this->getOptionByCode('info_buyRequest'); - $initialData = $option ? $this->serializer->unserialize($option->getValue()) : null; + $initialData = $option ? $this->serializer->unserialize($option->getValue()) : []; if ($initialData instanceof \Magento\Framework\DataObject) { $initialData = $initialData->getData(); diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php index 9eb4e1f5ebcd2..ec0021c4949ea 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Wishlist.php @@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Wishlist\Model; use Magento\Catalog\Api\ProductRepositoryInterface; @@ -215,7 +217,7 @@ public function loadByCustomerId($customerId, $create = false) public function getName() { $name = $this->_getData('name'); - if (!strlen($name)) { + if ($name === null || !strlen($name)) { return $this->_wishlistData->getDefaultWishlistName(); } return $name; @@ -637,6 +639,7 @@ public function updateItem($itemId, $buyRequest, $params = null) $item = null; if ($itemId instanceof Item) { $item = $itemId; + $itemId = $item->getId(); } else { $item = $this->getItem((int)$itemId); } diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/ActionGroup/StorefrontCustomerWishlistActionGroup.xml b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerWishlistActionGroup.xml similarity index 95% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/ActionGroup/StorefrontCustomerWishlistActionGroup.xml rename to app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerWishlistActionGroup.xml index 122bfbe4cc1c5..dd816bb665782 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/ActionGroup/StorefrontCustomerWishlistActionGroup.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerWishlistActionGroup.xml @@ -7,7 +7,7 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> <!-- Add Product to wishlist from the category page and check message --> <actionGroup name="StorefrontCustomerAddCategoryProductToWishlistActionGroup"> <arguments> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Data/WishlistData.xml b/app/code/Magento/Wishlist/Test/Mftf/Data/WishlistData.xml new file mode 100644 index 0000000000000..93fb9a5689e17 --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Data/WishlistData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="Wishlist" type="wishlist"> + <data key="id">null</data> + <var key="product" entityType="product" entityKey="id"/> + <var key="customer_email" entityType="customer" entityKey="email"/> + <var key="customer_password" entityType="customer" entityKey="password"/> + </entity> +</entities> diff --git a/app/code/Magento/Wishlist/Test/Mftf/LICENSE.txt b/app/code/Magento/Wishlist/Test/Mftf/LICENSE.txt new file mode 100644 index 0000000000000..49525fd99da9c --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/LICENSE.txt @@ -0,0 +1,48 @@ + +Open Software License ("OSL") v. 3.0 + +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + +Licensed under the Open Software License version 3.0 + + 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + 1. to reproduce the Original Work in copies, either alone or as part of a collective work; + + 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + + 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License; + + 4. to perform the Original Work publicly; and + + 5. to display the Original Work publicly. + + 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + + 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + + 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + + 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + + 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + + 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + + 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + + 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + + 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + + 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + + 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + + 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + + 16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. \ No newline at end of file diff --git a/app/code/Magento/Wishlist/Test/Mftf/LICENSE_AFL.txt b/app/code/Magento/Wishlist/Test/Mftf/LICENSE_AFL.txt new file mode 100644 index 0000000000000..f39d641b18a19 --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/LICENSE_AFL.txt @@ -0,0 +1,48 @@ + +Academic Free License ("AFL") v. 3.0 + +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + +Licensed under the Academic Free License version 3.0 + + 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + 1. to reproduce the Original Work in copies, either alone or as part of a collective work; + + 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + + 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; + + 4. to perform the Original Work publicly; and + + 5. to display the Original Work publicly. + + 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + + 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + + 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + + 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + + 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + + 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + + 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + + 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + + 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + + 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + + 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + + 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + + 16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Metadata/wishlist-meta.xml b/app/code/Magento/Wishlist/Test/Mftf/Metadata/wishlist-meta.xml similarity index 76% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Metadata/wishlist-meta.xml rename to app/code/Magento/Wishlist/Test/Mftf/Metadata/wishlist-meta.xml index 0c793d9d1b07a..37f2bbe6a29d5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Metadata/wishlist-meta.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Metadata/wishlist-meta.xml @@ -7,7 +7,7 @@ --> <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> <operation name="CreateWishlist" dataType="wishlist" type="create" auth="customerFormKey" url="/wishlist/index/add/" method="POST" successRegex="" returnRegex="~\/wishlist_id\/(\d*?)\/~" > <contentType>application/x-www-form-urlencoded</contentType> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Page/StorefrontCustomerWishlistPage.xml b/app/code/Magento/Wishlist/Test/Mftf/Page/StorefrontCustomerWishlistPage.xml new file mode 100644 index 0000000000000..cf2db7efab6c6 --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Page/StorefrontCustomerWishlistPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="StorefrontCustomerWishlistPage" url="/wishlist/" area="storefront" module="Magento_Wishlist"> + <section name="StorefrontCustomerWishlistSection" /> + </page> +</pages> diff --git a/app/code/Magento/Wishlist/Test/Mftf/README.md b/app/code/Magento/Wishlist/Test/Mftf/README.md new file mode 100644 index 0000000000000..b0df8b018736c --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Wishlist Functional Tests + +The Functional Test Module for **Magento Wishlist** module. diff --git a/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCategoryProductSection.xml b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCategoryProductSection.xml new file mode 100644 index 0000000000000..20d72a0704699 --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCategoryProductSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontCategoryProductSection"> + <element name="ProductAddToWishlistByNumber" type="text" selector="//main//li[{{var1}}]//a[contains(@class, 'towishlist')]" parameterized="true"/> + <element name="ProductAddToWishlistByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'towishlist')]" parameterized="true"/> + </section> +</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistProductSection.xml b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistProductSection.xml similarity index 84% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistProductSection.xml rename to app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistProductSection.xml index 94681db830dd5..bd9fadb630c95 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistProductSection.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistProductSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCustomerWishlistProductSection"> <element name="ProductTitleByName" type="button" selector="//main//li//a[contains(text(), '{{var1}}')]" parameterized="true"/> <element name="ProductPriceByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistSection.xml b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistSection.xml similarity index 79% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistSection.xml rename to app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistSection.xml index 5a311f2a05d40..747ad958adbe0 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistSection.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCustomerWishlistSection"> <element name="pageTitle" type="text" selector="h1.page-title"/> <element name="successMsg" type="text" selector="div.message-success.success.message"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistSidebarSection.xml b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistSidebarSection.xml similarity index 85% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistSidebarSection.xml rename to app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistSidebarSection.xml index d4a81137dbc86..d3e89d419310c 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistSidebarSection.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistSidebarSection.xml @@ -7,7 +7,7 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="StorefrontCustomerWishlistSidebarSection"> <element name="ProductTitleByName" type="button" selector="//main//ol[@id='wishlist-sidebar']//a[@class='product-item-link']/span[text()='{{var1}}']" parameterized="true"/> <element name="ProductPriceByName" type="text" selector="//main//ol[@id='wishlist-sidebar']//a[@class='product-item-link']/span[text()='{{var1}}']//ancestor::ol//span[@class='price']" parameterized="true"/> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontProductInfoMainSection.xml new file mode 100644 index 0000000000000..ea2dfcbedaa27 --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontProductInfoMainSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontProductInfoMainSection"> + <element name="productAddToWishlist" type="button" selector="a.action.towishlist"/> + </section> +</sections> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml new file mode 100644 index 0000000000000..194737788eb7c --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="EndToEndB2CLoggedInUserTest"> + <!-- Step 5: Add products to wishlist --> + <comment userInput="Start of adding products to wishlist" stepKey="startOfAddingProductsToWishlist" after="endOfComparingProducts" /> + <!-- Add Simple Product 1 to wishlist --> + <comment userInput="Add Simple Product 1 to wishlist" stepKey="commentAddSimpleProduct1ToWishlist" after="startOfAddingProductsToWishlist" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" after="commentAddSimpleProduct1ToWishlist" stepKey="wishlistGotoCategory1"/> + <actionGroup ref="StorefrontCustomerAddCategoryProductToWishlistActionGroup" after="wishlistGotoCategory1" stepKey="wishlistAddSimpleProduct1ToWishlist"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + <actionGroup ref="StorefrontCustomerCheckProductInWishlist" after="wishlistAddSimpleProduct1ToWishlist" stepKey="wishlistCheckSimpleProduct1InWishlist"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + <actionGroup ref="StorefrontCustomerCheckProductInWishlistSidebar" after="wishlistCheckSimpleProduct1InWishlist" stepKey="wishlistCheckSimpleProduct1InWishlistSidebar"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + + <!-- Add Simple Product 2 to wishlist --> + <comment userInput="Add Simple Product 2 to wishlist" stepKey="commentAddSimpleProduct2ToWishlist" after="wishlistCheckSimpleProduct1InWishlistSidebar" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" after="commentAddSimpleProduct2ToWishlist" stepKey="wishlistGotoCategory2"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" after="wishlistGotoCategory2" stepKey="wishlistClickSimpleProduct2"/> + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" after="wishlistClickSimpleProduct2" stepKey="wishlistAddSimpleProduct2ToWishlist"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + <actionGroup ref="StorefrontCustomerCheckProductInWishlist" after="wishlistAddSimpleProduct2ToWishlist" stepKey="wishlistCheckSimpleProduct2InWishlist"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + <actionGroup ref="StorefrontCustomerCheckProductInWishlistSidebar" after="wishlistCheckSimpleProduct2InWishlist" stepKey="wishlistCheckSimpleProduct2InWishlistSidebar"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + <comment userInput="End of adding products to wishlist" after="wishlistCheckSimpleProduct2InWishlistSidebar" stepKey="endOfAddingProductsToWishlist" /> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml similarity index 97% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml rename to app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml index da2239a0da85e..0a4d241b0e4ab 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml @@ -6,7 +6,7 @@ */ --> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontAddMultipleStoreProductsToWishlistTest"> <annotations> <features value="Wishlist"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/StorefrontDeletePersistedWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeletePersistedWishlistTest.xml similarity index 94% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/StorefrontDeletePersistedWishlistTest.xml rename to app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeletePersistedWishlistTest.xml index 7b9c40d7f3d31..3ddb9d87073f3 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/StorefrontDeletePersistedWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeletePersistedWishlistTest.xml @@ -6,7 +6,7 @@ */ --> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <test name="StorefrontDeletePersistedWishlistTest"> <annotations> <features value="Wishlist"/> diff --git a/app/code/Magento/Wishlist/Test/Mftf/composer.json b/app/code/Magento/Wishlist/Test/Mftf/composer.json new file mode 100644 index 0000000000000..d016f9346f60c --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/composer.json @@ -0,0 +1,33 @@ +{ + "name": "magento/functional-test-module-wishlist", + "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-checkout": "100.0.0-dev", + "magento/functional-test-module-customer": "100.0.0-dev", + "magento/functional-test-module-rss": "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-ui": "100.0.0-dev" + }, + "suggest": { + "magento/functional-test-module-configurable-product": "100.0.0-dev", + "magento/functional-test-module-downloadable": "100.0.0-dev", + "magento/functional-test-module-bundle": "100.0.0-dev", + "magento/functional-test-module-cookie": "100.0.0-dev", + "magento/functional-test-module-grouped-product": "100.0.0-dev", + "magento/functional-test-module-wishlist-sample-data": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php b/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php index 4b3ff8b8dd23e..36c51547c5a42 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php @@ -114,6 +114,9 @@ public function testGetConfiguredOptions($options, $callNum, $expected) $this->assertEquals($expected, $this->block->getConfiguredOptions()); } + /** + * @return array + */ public function getConfiguredOptionsDataProvider() { return [ diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/AllcartTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/AllcartTest.php index d7195086850e4..2df44a912a09c 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/AllcartTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/AllcartTest.php @@ -136,6 +136,9 @@ protected function prepareContext() ->willReturn($this->resultFactoryMock); } + /** + * @return \Magento\Wishlist\Controller\Index\Allcart + */ public function getController() { $this->prepareContext(); diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/IndexTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/IndexTest.php index 136d0f7f36c3e..7c6ba740aa18d 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/IndexTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/IndexTest.php @@ -123,6 +123,9 @@ protected function prepareContext() ->willReturn($this->resultFactoryMock); } + /** + * @return \Magento\Wishlist\Controller\Index\Index + */ public function getController() { $this->prepareContext(); diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/PluginTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/PluginTest.php index 37c95d43bec95..399b48073b339 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/PluginTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/PluginTest.php @@ -74,6 +74,9 @@ protected function tearDown() ); } + /** + * @return \Magento\Wishlist\Controller\Index\Plugin + */ protected function getPlugin() { return new \Magento\Wishlist\Controller\Index\Plugin( diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/RemoveTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/RemoveTest.php index 2a36d3beb8558..6260a1292bee9 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/RemoveTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/RemoveTest.php @@ -139,6 +139,9 @@ protected function prepareContext() ->willReturn($this->resultFactoryMock); } + /** + * @return \Magento\Wishlist\Controller\Index\Remove + */ public function getController() { $this->prepareContext(); diff --git a/app/code/Magento/Wishlist/Test/Unit/Model/ItemTest.php b/app/code/Magento/Wishlist/Test/Unit/Model/ItemTest.php index 0b1057683de86..9876b3f6bb75e 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Model/ItemTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Model/ItemTest.php @@ -172,6 +172,9 @@ public function testRemoveOptionByCode($code, $option) $this->assertTrue($actualOption->isDeleted()); } + /** + * @return array + */ public function getOptionsDataProvider() { $optionMock = $this->getMockBuilder(\Magento\Wishlist\Model\Item\Option::class) diff --git a/app/code/Magento/Wishlist/Test/Unit/Model/LocaleQuantityProcessorTest.php b/app/code/Magento/Wishlist/Test/Unit/Model/LocaleQuantityProcessorTest.php index 145d282554634..6cac17aa8c3da 100644 --- a/app/code/Magento/Wishlist/Test/Unit/Model/LocaleQuantityProcessorTest.php +++ b/app/code/Magento/Wishlist/Test/Unit/Model/LocaleQuantityProcessorTest.php @@ -60,6 +60,9 @@ public function testProcess($qtyResult, $expectedResult) $this->assertEquals($expectedResult, $this->processor->process($qty)); } + /** + * @return array + */ public function processDataProvider() { return [ diff --git a/app/code/Magento/WishlistAnalytics/Test/Mftf/LICENSE.txt b/app/code/Magento/WishlistAnalytics/Test/Mftf/LICENSE.txt new file mode 100644 index 0000000000000..49525fd99da9c --- /dev/null +++ b/app/code/Magento/WishlistAnalytics/Test/Mftf/LICENSE.txt @@ -0,0 +1,48 @@ + +Open Software License ("OSL") v. 3.0 + +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + +Licensed under the Open Software License version 3.0 + + 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + 1. to reproduce the Original Work in copies, either alone or as part of a collective work; + + 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + + 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License; + + 4. to perform the Original Work publicly; and + + 5. to display the Original Work publicly. + + 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + + 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + + 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + + 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + + 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + + 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + + 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + + 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + + 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + + 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + + 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + + 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + + 16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. \ No newline at end of file diff --git a/app/code/Magento/WishlistAnalytics/Test/Mftf/LICENSE_AFL.txt b/app/code/Magento/WishlistAnalytics/Test/Mftf/LICENSE_AFL.txt new file mode 100644 index 0000000000000..f39d641b18a19 --- /dev/null +++ b/app/code/Magento/WishlistAnalytics/Test/Mftf/LICENSE_AFL.txt @@ -0,0 +1,48 @@ + +Academic Free License ("AFL") v. 3.0 + +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + +Licensed under the Academic Free License version 3.0 + + 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + 1. to reproduce the Original Work in copies, either alone or as part of a collective work; + + 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + + 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; + + 4. to perform the Original Work publicly; and + + 5. to display the Original Work publicly. + + 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + + 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + + 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + + 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + + 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + + 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + + 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + + 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + + 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + + 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + + 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + + 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + + 16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/app/code/Magento/WishlistAnalytics/Test/Mftf/README.md b/app/code/Magento/WishlistAnalytics/Test/Mftf/README.md new file mode 100644 index 0000000000000..ec5f69c59bac7 --- /dev/null +++ b/app/code/Magento/WishlistAnalytics/Test/Mftf/README.md @@ -0,0 +1,3 @@ +# Wishlist Analytics Functional Tests + +The Functional Test Module for **Magento Wishlist Analytics** module. diff --git a/app/code/Magento/WishlistAnalytics/Test/Mftf/composer.json b/app/code/Magento/WishlistAnalytics/Test/Mftf/composer.json new file mode 100644 index 0000000000000..6969178cfdaa6 --- /dev/null +++ b/app/code/Magento/WishlistAnalytics/Test/Mftf/composer.json @@ -0,0 +1,17 @@ +{ + "name": "magento/functional-test-module-wishlist-analytics", + "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-wishlist": "100.0.0-dev" + }, + "type": "magento2-test", + "license": [ + "OSL-3.0", + "AFL-3.0" + ] +} diff --git a/app/design/frontend/Magento/blank/Magento_Swatches/web/css/source/_module.less b/app/design/frontend/Magento/blank/Magento_Swatches/web/css/source/_module.less index 907180eb37444..b5d604597148a 100644 --- a/app/design/frontend/Magento/blank/Magento_Swatches/web/css/source/_module.less +++ b/app/design/frontend/Magento/blank/Magento_Swatches/web/css/source/_module.less @@ -4,289 +4,341 @@ // */ // -// Common +// Variables // _____________________________________________ - & when (@media-common = true) { - .swatch-attribute-label { - font-weight: bold; - position: relative; - } +@swatch-attribute-option__selected__color: #646464; - .swatch-attribute-label.required { - padding-right: 10px; - } +@swatch-option__background: @color-gray94; +@swatch-option__border: @border-width__base solid #dadada; - .swatch-attribute-label[data-required="1"]:after { - content: '*'; - color: red; - position: absolute; - right: -11px; - top: -2px; - font-weight: bold; - font-size: 1em; - } +@swatch-option__hover__border: @border-width__base solid @color-white; +@swatch-option__hover__color: @color-gray20; +@swatch-option__hover__outline: 1px solid @color-gray60; - .swatch-attribute-selected-option { - color: #646464; - padding-left: 17px; - } - - .swatch-attribute-options { - margin-top: 10px; - } - - .swatch-option { - padding: 1px 2px; - min-width: 30px; - max-width: 90px; - height: 20px; - float: left; - margin: 0 10px 5px 0; - text-align: center; - cursor: pointer; - position: relative; - border: 1px solid rgb(218, 218, 218); - overflow: hidden; - text-overflow: ellipsis; - } +@swatch-option__selected__border: @swatch-option__hover__border; +@swatch-option__selected__color: @swatch-option__hover__color; +@swatch-option__selected__outline: 2px solid @color-orange-red1; - .swatch-option.text { - background: #F0F0F0; - color: #686868; - font-size: 12px; - font-weight: 700; - line-height: 20px; - padding: 4px 8px; - min-width: 22px; - margin-right: 7px; - } +@swatch-option__disabled__background: @color-red10; - .swatch-option.selected { - outline: 2px solid #ff5501; - border: 1px solid #fff; - color: #333; - } +// Text attributes +@swatch-option-text__background: @swatch-option__background; +@swatch-option-text__color: #686868; - .swatch-option.text.selected { - background-color: #FFF !important; - } +@swatch-option-text__selected__background-color: @color-white !important; - .clearfix:after { - content: ''; - visibility: hidden; - display: block; - height: 0; - clear: both; - } +// Size and Manufacturer attributes +@attr-swatch-option__background: @swatch-option__background; +@attr-swatch-option__color: #949494; - .swatch-attribute.size .swatch-option, - .swatch-attribute.manufacturer .swatch-option { - background: rgb(240, 240, 240); - color: rgb(148, 148, 148); - } +@attr-swatch-option__selected__background: @color-white; +@attr-swatch-option__selected__border: @border-width__base solid @color-white; +@attr-swatch-option__selected__color: @color-black; - .swatch-attribute.size .swatch-option.selected, - .swatch-attribute.manufacturer .swatch-option.selected { - color: black; - background: #fff; - border: 1px solid #fff; - } +// Image and Color swatch +@img-color-swatch-option__hover__border: @swatch-option__hover__border; +@img-color-swatch-option__hover__outline: 2px solid #e00; - .swatch-option:not(.disabled):hover { - outline: 1px solid #999; - border: 1px solid #fff; - color: #333; - } +// Tooltip +@swatch-option-tooltip__background: @color-white; +@swatch-option-tooltip__border: @swatch-option__border; +@swatch-option-tooltip__color: #949494; - .swatch-option.image:not(.disabled):hover, - .swatch-option.color:not(.disabled):hover { - outline: 2px solid #ee0000; - border: 1px solid #fff; - } +@swatch-option-tooltip-title__color: #282828; - .swatch-option.disabled { - cursor: default; - } +@swatch-option-tooltip-layered__background: @swatch-option-tooltip__background; +@swatch-option-tooltip-layered__border: @swatch-option__border; +@swatch-option-tooltip-layered__color: @swatch-option-tooltip__color; - .swatch-option.disabled:after { - content: ''; - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - background: -moz-linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); - background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(42%, rgba(255, 255, 255, 0)), color-stop(43%, rgba(255, 255, 255, 1)), color-stop(46%, rgba(255, 255, 255, 1)), color-stop(47%, rgba(255, 82, 22, 1)), color-stop(53%, rgba(255, 82, 22, 1)), color-stop(54%, rgba(255, 255, 255, 1)), color-stop(57%, rgba(255, 255, 255, 1)), color-stop(58%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(255, 255, 255, 0))); - background: -webkit-linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); - background: -o-linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); - background: -ms-linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); - background: linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#00ffffff', GradientType=1); - } +@swatch-option-tooltip-layered-title__color: @swatch-option-tooltip-title__color; - .swatch-option-tooltip { - max-width: 140px; - max-height: 100%; - min-height: 20px; - min-width: 20px; - position: absolute; - padding: 5px; - background: #fff; - color: rgb(148, 148, 148); - border: 1px solid #adadad; - display: none; - z-index: 999; - text-align: center; - } +// Layered Features +@swatch-option-link-layered__focus__box-shadow: 0 0 3px 1px @color-sky-blue1; - .swatch-option-tooltip .corner, - .swatch-option-tooltip-layered .corner { - left: 40%; - position: absolute; - bottom: 0; - height: 8px; - } +// +// Common +// _____________________________________________ - .swatch-option-tooltip .corner:after, - .swatch-option-tooltip-layered .corner:after { - content: ''; - position: relative; - top: 1px; - left: -15px; - width: 0; - height: 0; - border-style: solid; - border-width: 7px 7.5px 0 7.5px; - border-color: #fff transparent transparent transparent; - font-size: 1px; +& when (@media-common = true) { + + .swatch { + &-attribute { + &-label { + font-weight: @font-weight__bold; + position: relative; + + &.required { + padding-right: @indent__s; + } + + &[data-required='1']:after { + .lib-css(color, @form-field-label-asterisk__color); + content: '*'; + font-size: @font-size__base; + font-weight: @font-weight__bold; + position: absolute; + right: -11px; + top: -2px; + } + } + + &-selected-option { + .lib-css(color, @swatch-attribute-option__selected__color); + padding-left: 17px; + } + + &-options { + margin-top: @indent__s; + + .swatch-option-tooltip-layered .title { + .lib-css(color, @swatch-option-tooltip-layered-title__color); + width: 100%; + height: 20px; + position: absolute; + bottom: -5px; + left: 0; + text-align: center; + margin-bottom: @indent__s; + } + } + + &.size, + &.manufacturer { + .swatch-option { + .lib-css(background, @attr-swatch-option__background); + .lib-css(color, @attr-swatch-option__color); + + &.selected { + .lib-css(blackground, @attr-swatch-option__selected__background); + .lib-css(border, @attr-swatch-option__selected__border); + .lib-css(color, @attr-swatch-option__selected__color); + } + } + } + } + + &-option { + .lib-css(border, @swatch-option__border); + cursor: pointer; + float: left; + height: 20px; + margin: 0 @indent__s @indent__xs 0; + max-width: 90px; + min-width: 30px; + overflow: hidden; + padding: 1px 2px; + position: relative; + text-align: center; + text-overflow: ellipsis; + + &.text { + .lib-css(background, @swatch-option-text__background); + .lib-css(color, @swatch-option-text__color); + font-size: @font-size__s; + font-weight: @font-weight__bold; + line-height: 20px; + padding: 4px 8px; + min-width: 22px; + margin-right: 7px; + + &.selected { + .lib-css(background-color, @swatch-option-text__selected__background-color); + } + } + + &.selected { + .lib-css(outline, @swatch-option__selected__outline); + .lib-css(border, @swatch-option__selected__border); + .lib-css(color, @swatch-option__selected__color); + } + + &:not(.disabled):hover { + .lib-css(border, @swatch-option__hover__border); + .lib-css(color, @swatch-option__hover__color); + .lib-css(outline, @swatch-option__hover__outline); + } + + &.image, + &.color { + &:not(.disabled):hover { + .lib-css(border, @img-color-swatch-option__hover__border); + .lib-css(outline, @img-color-swatch-option__hover__outline); + } + } + + &.disabled { + cursor: default; + + &:after { + // ToDo: improve .lib-background-gradient() to support diagonal gradient + background: linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); + background: -moz-linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); + background: -ms-linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); + background: -o-linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); + background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(42%, rgba(255, 255, 255, 0)), color-stop(43%, rgba(255, 255, 255, 1)), color-stop(46%, rgba(255, 255, 255, 1)), color-stop(47%, rgba(255, 82, 22, 1)), color-stop(53%, rgba(255, 82, 22, 1)), color-stop(54%, rgba(255, 255, 255, 1)), color-stop(57%, rgba(255, 255, 255, 1)), color-stop(58%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(255, 255, 255, 0))); + background: -webkit-linear-gradient(to left top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 1) 43%, rgba(255, 255, 255, 1) 46%, rgba(255, 82, 22, 1) 47%, rgba(255, 82, 22, 1) 53%, rgba(255, 255, 255, 1) 54%, rgba(255, 255, 255, 1) 57%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0) 100%); + bottom: 0; + content: ''; + filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#00ffffff, endColorstr=#00ffffff, GradientType=1)'; + left: 0; + position: absolute; + right: 0; + top: 0; + } + } + &-disabled { + border: 0; + cursor: default; + outline: none !important; + + &:after { + .lib-rotate(-30deg); + content: ''; + height: 2px; + left: -4px; + position: absolute; + top: 10px; + width: 42px; + z-index: 995; + .lib-css(background, @swatch-option__disabled__background); + } + } + + &-loading { + .lib-css(content, @loading__background-image); + } + + &-tooltip { + .lib-css(border, @swatch-option-tooltip__border); + .lib-css(color, @swatch-option-tooltip__color); + display: none; + max-height: 100%; + max-width: 140px; + min-height: 20px; + min-width: 20px; + padding: @indent__xs; + position: absolute; + text-align: center; + z-index: 999; + .lib-css(background, @swatch-option-tooltip__background); + + &, + &-layered { + .corner { + bottom: 0; + height: 8px; + left: 40%; + position: absolute; + + &:before, + &:after { + border-style: solid; + content: ''; + font-size: 1px; + height: 0; + position: relative; + width: 0; + } + + &:before { + border-color: @color-gray68 transparent transparent transparent; + border-width: 8px 8.5px 0 8.5px; + left: 0; + top: 2px; + } + + &:after { + border-color: @color-white transparent transparent transparent; + border-width: 7px 7.5px 0 7.5px; + left: -15px; + top: 1px; + } + } + + .image { + display: block; + height: 130px; + margin: 0 auto; + width: 130px; + } + } + + &-layered { + .lib-css(border, @swatch-option-tooltip-layered__border); + .lib-css(color, @swatch-option-tooltip-layered__color); + .lib-css(background, @swatch-option-tooltip-layered__background); + display: none; + left: -47px; + position: absolute; + width: 140px; + z-index: 999; + } + + .title { + .lib-css(color, @swatch-option-tooltip-title__color); + display: block; + max-height: 200px; + max-width: 140px; + min-height: 20px; + overflow: hidden; + text-align: center; + } + } + + &-link-layered { + margin: 0 !important; + padding: 0 !important; + position: relative; + + &:focus > div { + .lib-css(box-shadow, @swatch-option-link-layered__focus__box-shadow); + } + + &:hover > .swatch-option-tooltip-layered { + display: block; + } + } + } + + &-opt { + margin: @indent__base 0; + + &-listing { + margin-bottom: @indent__s; + } + } + + &-more { + display: inline-block; + margin: 2px 0; + position: static; + text-decoration: none !important; + z-index: 1; + } + + &-visual-tooltip-layered { + height: 160px; + top: -170px; + } + + &-textual-tooltip-layered { + height: 30px; + top: -40px; + } + + &-input { + left: -1000px; + position: absolute; + visibility: hidden; + } } - .swatch-option-tooltip .corner:before, - .swatch-option-tooltip-layered .corner:before { + .clearfix:after { + clear: both; content: ''; - position: relative; - top: 2px; - left: 0; - width: 0; - height: 0; - border-style: solid; - border-width: 8px 8.5px 0 8.5px; - border-color: #adadad transparent transparent transparent; - font-size: 1px; - } - - .swatch-option-tooltip .image, - .swatch-option-tooltip-layered .image { - display: block; - height: 130px; - width: 130px; - margin: 0 auto; - } - - .swatch-option-tooltip .title { - max-width: 140px; - min-height: 20px; - max-height: 200px; - color: rgb(40, 40, 40); - text-align: center; - display: block; - overflow: hidden; - } - - .swatch-opt { - margin: 20px 0; - } - - .swatch-more { - display: inline-block; - margin: 2px 0; - text-decoration: none !important; - position: static; - z-index: 1; - } - - // Layered Features - .swatch-option-link-layered { - position: relative; - margin: 0 !important; - padding: 0 !important; - } - - .swatch-option-link-layered:focus>div { - box-shadow: 0 0 3px 1px #68a8e0; - } - - .swatch-option-tooltip-layered { - width: 140px; - position: absolute; - background: #fff; - color: rgb(148, 148, 148); - border: 1px solid #adadad; - display: none; - z-index: 999; - left: -47px; - } - - .swatch-visual-tooltip-layered { - height: 160px; - top: -170px; - } - - .swatch-textual-tooltip-layered { - height: 30px; - top: -40px; - } - - .swatch-option-link-layered:hover>.swatch-option-tooltip-layered { display: block; - } - - .swatch-attribute-options .swatch-option-tooltip-layered .title { - width: 100%; - height: 20px; - position: absolute; - bottom: -5px; - left: 0; - color: rgb(40, 40, 40); - text-align: center; - margin-bottom: 10px; - } - - .swatch-option-disabled:after { - content: ''; - position: absolute; - width: 42px; - height: 2px; - background: red; - transform: rotate(-30deg); - -o-transform: rotate(-30deg); - -moz-transform: rotate(-30deg); - -ms-transform: rotate(-30deg); - -webkit-transform: rotate(-30deg); - z-index: 995; - left: -4px; - top: 10px; - } - - .swatch-option-disabled { - outline: none !important; - cursor: default; - border: 0; - } - - // Bugfix for Add To Cart button - .swatch-opt-listing { - margin-bottom: 10px; - } - - .swatch-option-loading { - content: url(../Magento_Swatches/images/loader-2.gif); - } - - .swatch-input { - left: -1000px; - position: absolute; + height: 0; visibility: hidden; } } diff --git a/app/design/frontend/Magento/blank/Magento_Swatches/web/images/loader-2.gif b/app/design/frontend/Magento/blank/Magento_Swatches/web/images/loader-2.gif deleted file mode 100644 index 362e2455f4be8..0000000000000 Binary files a/app/design/frontend/Magento/blank/Magento_Swatches/web/images/loader-2.gif and /dev/null differ diff --git a/app/design/frontend/Magento/blank/i18n/en_US.csv b/app/design/frontend/Magento/blank/i18n/en_US.csv index b9a1d343b7f2d..a491a567a3777 100644 --- a/app/design/frontend/Magento/blank/i18n/en_US.csv +++ b/app/design/frontend/Magento/blank/i18n/en_US.csv @@ -1,5 +1,4 @@ Summary,Summary -"Account Dashboard","Account Dashboard" "Account Information","Account Information" "Address Book","Address Book" Menu,Menu diff --git a/app/design/frontend/Magento/blank/web/css/source/components/_modals_extend.less b/app/design/frontend/Magento/blank/web/css/source/components/_modals_extend.less index d76630b5cea47..5cdb1444094e9 100644 --- a/app/design/frontend/Magento/blank/web/css/source/components/_modals_extend.less +++ b/app/design/frontend/Magento/blank/web/css/source/components/_modals_extend.less @@ -63,6 +63,8 @@ } .modal-popup { + pointer-events: none; + .modal-title { .lib-css(border-bottom, @modal-title__border); .lib-css(font-weight, @font-weight__light); diff --git a/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml b/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml index c193be0884449..5ef5dcac1131d 100644 --- a/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml +++ b/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml @@ -10,7 +10,7 @@ <referenceContainer name="sidebar.main"> <block class="Magento\Framework\View\Element\Template" name="customer_account_navigation_block" template="Magento_Theme::html/collapsible.phtml" before="-"> <arguments> - <argument name="block_title" translate="true" xsi:type="string">Account Dashboard</argument> + <argument name="block_title" translate="true" xsi:type="string">My Account</argument> <argument name="block_css" xsi:type="string">block-collapsible-nav</argument> </arguments> <block class="Magento\Customer\Block\Account\Navigation" name="customer_account_navigation" before="-"> @@ -19,7 +19,7 @@ </arguments> <block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-account-navigation-account-link"> <arguments> - <argument name="label" xsi:type="string" translate="true">Account Dashboard</argument> + <argument name="label" xsi:type="string" translate="true">My Account</argument> <argument name="path" xsi:type="string">customer/account</argument> <argument name="sortOrder" xsi:type="number">250</argument> </arguments> diff --git a/app/design/frontend/Magento/luma/i18n/en_US.csv b/app/design/frontend/Magento/luma/i18n/en_US.csv index 66f5d51218d73..7bf9e0afaf015 100644 --- a/app/design/frontend/Magento/luma/i18n/en_US.csv +++ b/app/design/frontend/Magento/luma/i18n/en_US.csv @@ -52,6 +52,5 @@ Footer,Footer "Your shipping confirmation is below. Thank you again for your business.","Your shipping confirmation is below. Thank you again for your business." "Your Shipment #%shipment_id for Order #%order_id","Your Shipment #%shipment_id for Order #%order_id" "Update to your %store_name shipment","Update to your %store_name shipment" -"Account Dashboard","Account Dashboard" "Address Book","Address Book" "Account Information","Account Information" diff --git a/app/design/frontend/Magento/luma/web/css/source/components/_modals_extend.less b/app/design/frontend/Magento/luma/web/css/source/components/_modals_extend.less index e90d312aa7801..ae68fc81acd6e 100644 --- a/app/design/frontend/Magento/luma/web/css/source/components/_modals_extend.less +++ b/app/design/frontend/Magento/luma/web/css/source/components/_modals_extend.less @@ -63,6 +63,8 @@ } .modal-popup { + pointer-events: none; + .modal-title { .lib-css(border-bottom, @modal-title__border); .lib-css(font-weight, @font-weight__light); diff --git a/app/etc/di.xml b/app/etc/di.xml index 76f9e8f590f1c..1f5507deb0519 100755 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -279,6 +279,11 @@ <argument name="pathInfoProcessor" xsi:type="object">Magento\Backend\App\Request\PathInfoProcessor\Proxy</argument> </arguments> </type> + <type name="Magento\Framework\App\Response\Http"> + <arguments> + <argument name="sessionConfig" xsi:type="object">Magento\Framework\Session\Config\ConfigInterface\Proxy</argument> + </arguments> + </type> <preference for="Magento\Framework\Session\SaveHandlerInterface" type="Magento\Framework\Session\SaveHandler" /> <type name="Magento\Framework\Session\SaveHandlerFactory"> <arguments> diff --git a/composer.json b/composer.json index e2a89ae1207a7..f8182c96f78a0 100644 --- a/composer.json +++ b/composer.json @@ -29,26 +29,26 @@ "ext-zip": "*", "ext-bcmath": "*", "lib-libxml": "*", - "braintree/braintree_php": "3.28.0", + "braintree/braintree_php": "3.34.0", "colinmollenhour/cache-backend-file": "~1.4.1", - "colinmollenhour/cache-backend-redis": "1.10.4", - "colinmollenhour/credis": "1.9.1", - "colinmollenhour/php-redis-session-abstract": "~1.3.8", + "colinmollenhour/cache-backend-redis": "1.10.5", + "colinmollenhour/credis": "1.10.0", + "colinmollenhour/php-redis-session-abstract": "~1.4.0", "composer/composer": "^1.6", "elasticsearch/elasticsearch": "~2.0|~5.1", - "magento/composer": "~1.3.0", + "magento/composer": "~1.4.0", "magento/magento-composer-installer": ">=0.1.11", "magento/zendframework1": "~1.14.0", "monolog/monolog": "^1.17", "oyejorge/less.php": "~1.7.0", "pelago/emogrifier": "^2.0.0", "php-amqplib/php-amqplib": "~2.7.0", - "phpseclib/mcrypt_compat": "1.0.4", + "phpseclib/mcrypt_compat": "1.0.5", "phpseclib/phpseclib": "2.0.*", "ramsey/uuid": "~3.7.3", - "symfony/console": "~4.0.0", - "symfony/event-dispatcher": "~4.0.0", - "symfony/process": "~4.0.0", + "symfony/console": "~4.1.0", + "symfony/event-dispatcher": "~4.1.0", + "symfony/process": "~4.1.0", "tedivm/jshrink": "~1.3.0", "tubalmartin/cssmin": "4.1.1", "webonyx/graphql-php": "^0.11.1", @@ -81,13 +81,13 @@ "zendframework/zend-view": "~2.10.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2.10.0", + "friendsofphp/php-cs-fixer": "~2.12.0", "lusitanian/oauth": "~0.8.10", "pdepend/pdepend": "2.5.2", "phpmd/phpmd": "@stable", - "phpunit/phpunit": "~6.2.0", + "phpunit/phpunit": "~6.5.0", "sebastian/phpcpd": "~3.0.0", - "squizlabs/php_codesniffer": "3.2.2" + "squizlabs/php_codesniffer": "3.3.0" }, "replace": { "magento/module-marketplace": "*", diff --git a/composer.lock b/composer.lock index b104cf2929ba7..0966aee19489e 100644 --- a/composer.lock +++ b/composer.lock @@ -1,23 +1,23 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "daacd8800615d44aa1af0ac06c1ecc46", + "content-hash": "c6ae2be0f066e566e8280b2954aad257", "packages": [ { "name": "braintree/braintree_php", - "version": "3.28.0", + "version": "3.34.0", "source": { "type": "git", "url": "https://github.com/braintree/braintree_php.git", - "reference": "f8ab5ca7b3397536de622fc9640e5b257fc33e71" + "reference": "fd55c466d0d0088c67705d7ba0b3876d9767bfda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/braintree/braintree_php/zipball/f8ab5ca7b3397536de622fc9640e5b257fc33e71", - "reference": "f8ab5ca7b3397536de622fc9640e5b257fc33e71", + "url": "https://api.github.com/repos/braintree/braintree_php/zipball/fd55c466d0d0088c67705d7ba0b3876d9767bfda", + "reference": "fd55c466d0d0088c67705d7ba0b3876d9767bfda", "shasum": "" }, "require": { @@ -51,7 +51,7 @@ } ], "description": "Braintree PHP Client Library", - "time": "2018-02-08T23:03:34+00:00" + "time": "2018-05-21T18:14:47+00:00" }, { "name": "colinmollenhour/cache-backend-file", @@ -88,16 +88,16 @@ }, { "name": "colinmollenhour/cache-backend-redis", - "version": "1.10.4", + "version": "1.10.5", "source": { "type": "git", "url": "https://github.com/colinmollenhour/Cm_Cache_Backend_Redis.git", - "reference": "6bf0a4b7a3f8dc4a6255fad5b6e42213253d9972" + "reference": "91d949e28d939e607484a4bbf9307cff5afa689b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/Cm_Cache_Backend_Redis/zipball/6bf0a4b7a3f8dc4a6255fad5b6e42213253d9972", - "reference": "6bf0a4b7a3f8dc4a6255fad5b6e42213253d9972", + "url": "https://api.github.com/repos/colinmollenhour/Cm_Cache_Backend_Redis/zipball/91d949e28d939e607484a4bbf9307cff5afa689b", + "reference": "91d949e28d939e607484a4bbf9307cff5afa689b", "shasum": "" }, "require": { @@ -120,20 +120,20 @@ ], "description": "Zend_Cache backend using Redis with full support for tags.", "homepage": "https://github.com/colinmollenhour/Cm_Cache_Backend_Redis", - "time": "2017-10-05T20:50:44+00:00" + "time": "2018-05-15T16:02:25+00:00" }, { "name": "colinmollenhour/credis", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/colinmollenhour/credis.git", - "reference": "049ccfb2c680e4dfa6adcfa97f2f29d086919abd" + "reference": "8ab6db707c821055f9856b8cf76d5f44beb6fd8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/049ccfb2c680e4dfa6adcfa97f2f29d086919abd", - "reference": "049ccfb2c680e4dfa6adcfa97f2f29d086919abd", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/8ab6db707c821055f9856b8cf76d5f44beb6fd8a", + "reference": "8ab6db707c821055f9856b8cf76d5f44beb6fd8a", "shasum": "" }, "require": { @@ -160,20 +160,20 @@ ], "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", "homepage": "https://github.com/colinmollenhour/credis", - "time": "2017-10-05T20:28:58+00:00" + "time": "2018-05-07T14:45:04+00:00" }, { "name": "colinmollenhour/php-redis-session-abstract", - "version": "v1.3.8", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/colinmollenhour/php-redis-session-abstract.git", - "reference": "9f69f5c1be512d5ff168e731e7fa29ab2905d847" + "reference": "4cb15d557f58f45ad257cbcce3c12511e6deb5bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/php-redis-session-abstract/zipball/9f69f5c1be512d5ff168e731e7fa29ab2905d847", - "reference": "9f69f5c1be512d5ff168e731e7fa29ab2905d847", + "url": "https://api.github.com/repos/colinmollenhour/php-redis-session-abstract/zipball/4cb15d557f58f45ad257cbcce3c12511e6deb5bc", + "reference": "4cb15d557f58f45ad257cbcce3c12511e6deb5bc", "shasum": "" }, "require": { @@ -197,7 +197,7 @@ ], "description": "A Redis-based session handler with optimistic locking", "homepage": "https://github.com/colinmollenhour/php-redis-session-abstract", - "time": "2018-01-08T14:53:13+00:00" + "time": "2018-03-29T15:54:15+00:00" }, { "name": "composer/ca-bundle", @@ -257,16 +257,16 @@ }, { "name": "composer/composer", - "version": "1.6.4", + "version": "1.6.5", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "86ad51e8a3c64c9782446aae740a61fc6faa2522" + "reference": "b184a92419cc9a9c4c6a09db555a94d441cb11c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/86ad51e8a3c64c9782446aae740a61fc6faa2522", - "reference": "86ad51e8a3c64c9782446aae740a61fc6faa2522", + "url": "https://api.github.com/repos/composer/composer/zipball/b184a92419cc9a9c4c6a09db555a94d441cb11c9", + "reference": "b184a92419cc9a9c4c6a09db555a94d441cb11c9", "shasum": "" }, "require": { @@ -284,6 +284,9 @@ "symfony/finder": "^2.7 || ^3.0 || ^4.0", "symfony/process": "^2.7 || ^3.0 || ^4.0" }, + "conflict": { + "symfony/console": "2.8.38" + }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7", "phpunit/phpunit-mock-objects": "^2.3 || ^3.0" @@ -330,7 +333,7 @@ "dependency", "package" ], - "time": "2018-04-13T10:04:24+00:00" + "time": "2018-05-04T09:44:59+00:00" }, { "name": "composer/semver", @@ -396,16 +399,16 @@ }, { "name": "composer/spdx-licenses", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "7e111c50db92fa2ced140f5ba23b4e261bc77a30" + "reference": "cb17687e9f936acd7e7245ad3890f953770dec1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7e111c50db92fa2ced140f5ba23b4e261bc77a30", - "reference": "7e111c50db92fa2ced140f5ba23b4e261bc77a30", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/cb17687e9f936acd7e7245ad3890f953770dec1b", + "reference": "cb17687e9f936acd7e7245ad3890f953770dec1b", "shasum": "" }, "require": { @@ -453,7 +456,7 @@ "spdx", "validator" ], - "time": "2018-01-31T13:17:27+00:00" + "time": "2018-04-30T10:33:04+00:00" }, { "name": "container-interop/container-interop", @@ -710,22 +713,22 @@ }, { "name": "magento/composer", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/magento/composer.git", - "reference": "38fdaa51967cd3dbed85cf695b6a70e3c2ff8a92" + "reference": "6fb9eb3dd72a5e70aa53983f132f8e1883e79978" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/composer/zipball/38fdaa51967cd3dbed85cf695b6a70e3c2ff8a92", - "reference": "38fdaa51967cd3dbed85cf695b6a70e3c2ff8a92", + "url": "https://api.github.com/repos/magento/composer/zipball/6fb9eb3dd72a5e70aa53983f132f8e1883e79978", + "reference": "6fb9eb3dd72a5e70aa53983f132f8e1883e79978", "shasum": "" }, "require": { "composer/composer": "^1.6", "php": "~7.1.3|~7.2.0", - "symfony/console": "~4.0.0" + "symfony/console": "~4.0.0 || ~4.1.0" }, "require-dev": { "phpunit/phpunit": "~7.0.0" @@ -742,7 +745,7 @@ "AFL-3.0" ], "description": "Magento composer library helps to instantiate Composer application and run composer commands.", - "time": "2018-03-26T16:19:52+00:00" + "time": "2018-06-29T18:46:51+00:00" }, { "name": "magento/magento-composer-installer", @@ -1022,16 +1025,16 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.12", + "version": "v2.0.15", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb" + "reference": "10bcb46e8f3d365170f6de9d05245aa066b81f09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb", - "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/10bcb46e8f3d365170f6de9d05245aa066b81f09", + "reference": "10bcb46e8f3d365170f6de9d05245aa066b81f09", "shasum": "" }, "require": { @@ -1063,10 +1066,11 @@ "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "keywords": [ "csprng", + "polyfill", "pseudorandom", "random" ], - "time": "2018-04-04T21:24:14+00:00" + "time": "2018-06-08T15:26:40+00:00" }, { "name": "pelago/emogrifier", @@ -1210,21 +1214,21 @@ }, { "name": "phpseclib/mcrypt_compat", - "version": "1.0.4", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/phpseclib/mcrypt_compat.git", - "reference": "034ee0e920c70b589196d0bb0a7e8babae5fce08" + "reference": "9646c46c7286284bd6c774b0c02f172fa302b879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/mcrypt_compat/zipball/034ee0e920c70b589196d0bb0a7e8babae5fce08", - "reference": "034ee0e920c70b589196d0bb0a7e8babae5fce08", + "url": "https://api.github.com/repos/phpseclib/mcrypt_compat/zipball/9646c46c7286284bd6c774b0c02f172fa302b879", + "reference": "9646c46c7286284bd6c774b0c02f172fa302b879", "shasum": "" }, "require": { "php": ">=5.3.3", - "phpseclib/phpseclib": "~2.0" + "phpseclib/phpseclib": ">=2.0.10 <3.0.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35|^5.7|^6.0" @@ -1255,7 +1259,7 @@ "encryption", "mcrypt" ], - "time": "2018-01-13T23:07:52+00:00" + "time": "2018-04-15T18:49:21+00:00" }, { "name": "phpseclib/phpseclib", @@ -1577,16 +1581,16 @@ }, { "name": "react/promise", - "version": "v2.5.1", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "62785ae604c8d69725d693eb370e1d67e94c4053" + "reference": "f4edc2581617431aea50430749db55cc3fc031b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/62785ae604c8d69725d693eb370e1d67e94c4053", - "reference": "62785ae604c8d69725d693eb370e1d67e94c4053", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f4edc2581617431aea50430749db55cc3fc031b3", + "reference": "f4edc2581617431aea50430749db55cc3fc031b3", "shasum": "" }, "require": { @@ -1619,7 +1623,7 @@ "promise", "promises" ], - "time": "2017-03-25T12:08:31+00:00" + "time": "2018-06-13T15:59:06+00:00" }, { "name": "seld/cli-prompt", @@ -1764,16 +1768,16 @@ }, { "name": "symfony/console", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64" + "reference": "70591cda56b4b47c55776ac78e157c4bb6c8b43f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", - "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", + "url": "https://api.github.com/repos/symfony/console/zipball/70591cda56b4b47c55776ac78e157c4bb6c8b43f", + "reference": "70591cda56b4b47c55776ac78e157c4bb6c8b43f", "shasum": "" }, "require": { @@ -1793,7 +1797,7 @@ "symfony/process": "~3.4|~4.0" }, "suggest": { - "psr/log": "For using the console logger", + "psr/log-implementation": "For using the console logger", "symfony/event-dispatcher": "", "symfony/lock": "", "symfony/process": "" @@ -1801,7 +1805,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -1828,20 +1832,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" + "time": "2018-05-31T10:17:53+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "63353a71073faf08f62caab4e6889b06a787f07b" + "reference": "2391ed210a239868e7256eb6921b1bd83f3087b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/63353a71073faf08f62caab4e6889b06a787f07b", - "reference": "63353a71073faf08f62caab4e6889b06a787f07b", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2391ed210a239868e7256eb6921b1bd83f3087b5", + "reference": "2391ed210a239868e7256eb6921b1bd83f3087b5", "shasum": "" }, "require": { @@ -1864,7 +1868,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -1891,29 +1895,30 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-04-06T07:35:43+00:00" + "time": "2018-04-06T07:35:57+00:00" }, { "name": "symfony/filesystem", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21" + "reference": "562bf7005b55fd80d26b582d28e3e10f2dd5ae9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/562bf7005b55fd80d26b582d28e3e10f2dd5ae9c", + "reference": "562bf7005b55fd80d26b582d28e3e10f2dd5ae9c", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -1940,20 +1945,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" + "time": "2018-05-30T07:26:09+00:00" }, { "name": "symfony/finder", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49" + "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", - "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "url": "https://api.github.com/repos/symfony/finder/zipball/84714b8417d19e4ba02ea78a41a975b3efaafddb", + "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb", "shasum": "" }, "require": { @@ -1962,7 +1967,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -1989,20 +1994,75 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-04-04T05:10:37+00:00" + "time": "2018-06-19T21:38:16+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-04-30T19:57:29+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" + "reference": "3296adf6a6454a050679cde90f95350ad604b171" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", + "reference": "3296adf6a6454a050679cde90f95350ad604b171", "shasum": "" }, "require": { @@ -2014,7 +2074,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -2048,20 +2108,20 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/process", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25" + "reference": "1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25", - "reference": "d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25", + "url": "https://api.github.com/repos/symfony/process/zipball/1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a", + "reference": "1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a", "shasum": "" }, "require": { @@ -2070,7 +2130,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2097,7 +2157,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" + "time": "2018-05-31T10:17:53+00:00" }, { "name": "tedivm/jshrink", @@ -2145,6 +2205,52 @@ ], "time": "2017-12-08T00:59:56+00:00" }, + { + "name": "true/punycode", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/true/php-punycode.git", + "reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/true/php-punycode/zipball/a4d0c11a36dd7f4e7cd7096076cab6d3378a071e", + "reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.7", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "TrueBV\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Renan Gonçalves", + "email": "renan.saddam@gmail.com" + } + ], + "description": "A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)", + "homepage": "https://github.com/true/php-punycode", + "keywords": [ + "idna", + "punycode" + ], + "time": "2016-11-16T10:37:54+00:00" + }, { "name": "tubalmartin/cssmin", "version": "v4.1.1", @@ -2200,16 +2306,16 @@ }, { "name": "webonyx/graphql-php", - "version": "v0.11.5", + "version": "v0.11.6", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "b97cad0f4a50131c85d9224e8e36ebbcf1c6b425" + "reference": "f438a726cd523bc584e78d866eca270165c42fd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/b97cad0f4a50131c85d9224e8e36ebbcf1c6b425", - "reference": "b97cad0f4a50131c85d9224e8e36ebbcf1c6b425", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/f438a726cd523bc584e78d866eca270165c42fd5", + "reference": "f438a726cd523bc584e78d866eca270165c42fd5", "shasum": "" }, "require": { @@ -2235,7 +2341,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD" + "MIT" ], "description": "A PHP port of GraphQL reference implementation", "homepage": "https://github.com/webonyx/graphql-php", @@ -2243,33 +2349,33 @@ "api", "graphql" ], - "time": "2017-12-12T09:03:21+00:00" + "time": "2018-04-17T10:34:43+00:00" }, { "name": "zendframework/zend-captcha", - "version": "2.7.1", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-captcha.git", - "reference": "2d56293a5ae3e45e7c8ee7030aa8b305768d8014" + "reference": "37e9b6a4f632a9399eecbf2e5e325ad89083f87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-captcha/zipball/2d56293a5ae3e45e7c8ee7030aa8b305768d8014", - "reference": "2d56293a5ae3e45e7c8ee7030aa8b305768d8014", + "url": "https://api.github.com/repos/zendframework/zend-captcha/zipball/37e9b6a4f632a9399eecbf2e5e325ad89083f87b", + "reference": "37e9b6a4f632a9399eecbf2e5e325ad89083f87b", "shasum": "" }, "require": { "php": "^5.6 || ^7.0", - "zendframework/zend-math": "^2.6 || ^3.0", - "zendframework/zend-stdlib": "^2.7 || ^3.0" + "zendframework/zend-math": "^2.7 || ^3.0", + "zendframework/zend-stdlib": "^2.7.7 || ^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.8", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-session": "^2.6", + "zendframework/zend-session": "^2.8", "zendframework/zend-text": "^2.6", - "zendframework/zend-validator": "^2.6", + "zendframework/zend-validator": "^2.10.1", "zendframework/zendservice-recaptcha": "^3.0" }, "suggest": { @@ -2282,8 +2388,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" + "dev-master": "2.8.x-dev", + "dev-develop": "2.9.x-dev" } }, "autoload": { @@ -2295,12 +2401,13 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-captcha", + "description": "Generate and validate CAPTCHAs using Figlets, images, ReCaptcha, and more", "keywords": [ + "ZendFramework", "captcha", - "zf2" + "zf" ], - "time": "2017-02-23T08:09:44+00:00" + "time": "2018-04-24T17:24:10+00:00" }, { "name": "zendframework/zend-code", @@ -2621,16 +2728,16 @@ }, { "name": "zendframework/zend-diactoros", - "version": "1.7.1", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "bf26aff803a11c5cc8eb7c4878a702c403ec67f1" + "reference": "11c9c1835e60eef6f9234377a480fcec096ebd9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/bf26aff803a11c5cc8eb7c4878a702c403ec67f1", - "reference": "bf26aff803a11c5cc8eb7c4878a702c403ec67f1", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/11c9c1835e60eef6f9234377a480fcec096ebd9e", + "reference": "11c9c1835e60eef6f9234377a480fcec096ebd9e", "shasum": "" }, "require": { @@ -2649,11 +2756,22 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev", - "dev-develop": "1.8.x-dev" + "dev-master": "1.8.x-dev", + "dev-develop": "1.9.x-dev", + "dev-release-2.0": "2.0.x-dev" } }, "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], "psr-4": { "Zend\\Diactoros\\": "src/" } @@ -2669,34 +2787,34 @@ "psr", "psr-7" ], - "time": "2018-02-26T15:44:50+00:00" + "time": "2018-06-27T18:52:43+00:00" }, { "name": "zendframework/zend-escaper", - "version": "2.5.2", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-escaper.git", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/31d8aafae982f9568287cb4dce987e6aff8fd074", + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "autoload": { @@ -2708,12 +2826,13 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-escaper", + "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", "keywords": [ + "ZendFramework", "escaper", - "zf2" + "zf" ], - "time": "2016-06-30T19:48:38+00:00" + "time": "2018-04-25T15:48:53+00:00" }, { "name": "zendframework/zend-eventmanager", @@ -2764,16 +2883,16 @@ }, { "name": "zendframework/zend-feed", - "version": "2.9.0", + "version": "2.10.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-feed.git", - "reference": "abe88686124d492e0a2a84656f15e5482bfbe030" + "reference": "5253f949f4ad999086ab9b408908b6c6776f24db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-feed/zipball/abe88686124d492e0a2a84656f15e5482bfbe030", - "reference": "abe88686124d492e0a2a84656f15e5482bfbe030", + "url": "https://api.github.com/repos/zendframework/zend-feed/zipball/5253f949f4ad999086ab9b408908b6c6776f24db", + "reference": "5253f949f4ad999086ab9b408908b6c6776f24db", "shasum": "" }, "require": { @@ -2802,8 +2921,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.9-dev", - "dev-develop": "2.10-dev" + "dev-master": "2.10.x-dev", + "dev-develop": "2.11.x-dev" } }, "autoload": { @@ -2821,7 +2940,7 @@ "feed", "zf" ], - "time": "2017-12-04T17:59:38+00:00" + "time": "2018-06-18T20:14:01+00:00" }, { "name": "zendframework/zend-filter", @@ -2888,16 +3007,16 @@ }, { "name": "zendframework/zend-form", - "version": "2.11.0", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-form.git", - "reference": "b68a9f07d93381613b68817091d0505ca94d3363" + "reference": "565fb4f4bb3e0dbeea0173c923c4a8be77de9441" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-form/zipball/b68a9f07d93381613b68817091d0505ca94d3363", - "reference": "b68a9f07d93381613b68817091d0505ca94d3363", + "url": "https://api.github.com/repos/zendframework/zend-form/zipball/565fb4f4bb3e0dbeea0173c923c4a8be77de9441", + "reference": "565fb4f4bb3e0dbeea0173c923c4a8be77de9441", "shasum": "" }, "require": { @@ -2936,8 +3055,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.11.x-dev", - "dev-develop": "2.12.x-dev" + "dev-master": "2.12.x-dev", + "dev-develop": "2.13.x-dev" }, "zf": { "component": "Zend\\Form", @@ -2962,20 +3081,20 @@ "form", "zf" ], - "time": "2017-12-06T21:09:08+00:00" + "time": "2018-05-16T18:49:44+00:00" }, { "name": "zendframework/zend-http", - "version": "2.7.0", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-http.git", - "reference": "78aa510c0ea64bfb2aa234f50c4f232c9531acfa" + "reference": "f48b276ffa11b48dd1ae3c6bc306d6ed7958ef51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-http/zipball/78aa510c0ea64bfb2aa234f50c4f232c9531acfa", - "reference": "78aa510c0ea64bfb2aa234f50c4f232c9531acfa", + "url": "https://api.github.com/repos/zendframework/zend-http/zipball/f48b276ffa11b48dd1ae3c6bc306d6ed7958ef51", + "reference": "f48b276ffa11b48dd1ae3c6bc306d6ed7958ef51", "shasum": "" }, "require": { @@ -2986,15 +3105,18 @@ "zendframework/zend-validator": "^2.10.1" }, "require-dev": { - "phpunit/phpunit": "^6.4.1 || ^5.7.15", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.3", "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-config": "^3.1 || ^2.6" }, + "suggest": { + "paragonie/certainty": "For automated management of cacert.pem" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" + "dev-master": "2.8.x-dev", + "dev-develop": "2.9.x-dev" } }, "autoload": { @@ -3006,8 +3128,7 @@ "license": [ "BSD-3-Clause" ], - "description": "provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", - "homepage": "https://github.com/zendframework/zend-http", + "description": "Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", "keywords": [ "ZendFramework", "http", @@ -3015,7 +3136,7 @@ "zend", "zf" ], - "time": "2017-10-13T12:06:24+00:00" + "time": "2018-04-26T21:04:50+00:00" }, { "name": "zendframework/zend-hydrator", @@ -3077,24 +3198,24 @@ }, { "name": "zendframework/zend-i18n", - "version": "2.7.4", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-i18n.git", - "reference": "d3431e29cc00c2a1c6704e601d4371dbf24f6a31" + "reference": "6d69af5a04e1a4de7250043cb1322f077a0cdb7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/d3431e29cc00c2a1c6704e601d4371dbf24f6a31", - "reference": "d3431e29cc00c2a1c6704e601d4371dbf24f6a31", + "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/6d69af5a04e1a4de7250043cb1322f077a0cdb7f", + "reference": "6d69af5a04e1a4de7250043cb1322f077a0cdb7f", "shasum": "" }, "require": { - "php": "^7.0 || ^5.6", + "php": "^5.6 || ^7.0", "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0.8 || ^5.7.15", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", "zendframework/zend-cache": "^2.6.1", "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-config": "^2.6", @@ -3118,8 +3239,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" + "dev-master": "2.9.x-dev", + "dev-develop": "2.10.x-dev" }, "zf": { "component": "Zend\\I18n", @@ -3135,25 +3256,26 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-i18n", + "description": "Provide translations for your application, and filter and validate internationalized values", "keywords": [ + "ZendFramework", "i18n", - "zf2" + "zf" ], - "time": "2017-05-17T17:00:12+00:00" + "time": "2018-05-16T16:39:13+00:00" }, { "name": "zendframework/zend-inputfilter", - "version": "2.8.1", + "version": "2.8.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-inputfilter.git", - "reference": "55d1430db559e9781b147e73c2c0ce6635d8efe2" + "reference": "3f02179e014d9ef0faccda2ad6c65d38adc338d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-inputfilter/zipball/55d1430db559e9781b147e73c2c0ce6635d8efe2", - "reference": "55d1430db559e9781b147e73c2c0ce6635d8efe2", + "url": "https://api.github.com/repos/zendframework/zend-inputfilter/zipball/3f02179e014d9ef0faccda2ad6c65d38adc338d8", + "reference": "3f02179e014d9ef0faccda2ad6c65d38adc338d8", "shasum": "" }, "require": { @@ -3193,7 +3315,7 @@ "inputfilter", "zf" ], - "time": "2018-01-22T19:41:18+00:00" + "time": "2018-05-14T17:38:03+00:00" }, { "name": "zendframework/zend-json", @@ -3252,30 +3374,30 @@ }, { "name": "zendframework/zend-loader", - "version": "2.5.1", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-loader.git", - "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c" + "reference": "78f11749ea340f6ca316bca5958eef80b38f9b6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/c5fd2f071bde071f4363def7dea8dec7393e135c", - "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c", + "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/78f11749ea340f6ca316bca5958eef80b38f9b6c", + "reference": "78f11749ea340f6ca316bca5958eef80b38f9b6c", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "autoload": { @@ -3287,12 +3409,13 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-loader", + "description": "Autoloading and plugin loading strategies", "keywords": [ + "ZendFramework", "loader", - "zf2" + "zf" ], - "time": "2015-06-03T14:05:47+00:00" + "time": "2018-04-30T15:20:54+00:00" }, { "name": "zendframework/zend-log", @@ -3367,43 +3490,43 @@ }, { "name": "zendframework/zend-mail", - "version": "2.9.0", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-mail.git", - "reference": "067248425f285dec0bdb74256a8f67f9092f115e" + "reference": "d7beb63d5f7144a21ac100072c453e63860cdab8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-mail/zipball/067248425f285dec0bdb74256a8f67f9092f115e", - "reference": "067248425f285dec0bdb74256a8f67f9092f115e", + "url": "https://api.github.com/repos/zendframework/zend-mail/zipball/d7beb63d5f7144a21ac100072c453e63860cdab8", + "reference": "d7beb63d5f7144a21ac100072c453e63860cdab8", "shasum": "" }, "require": { "ext-iconv": "*", - "php": "^7.1", + "php": "^5.6 || ^7.0", + "true/punycode": "^2.1", "zendframework/zend-loader": "^2.5", "zendframework/zend-mime": "^2.5", "zendframework/zend-stdlib": "^2.7 || ^3.0", "zendframework/zend-validator": "^2.10.2" }, "require-dev": { - "phpunit/phpunit": "^6.0.8 || ^5.7.15", + "phpunit/phpunit": "^5.7.25 || ^6.4.4 || ^7.1.4", "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-config": "^2.6", - "zendframework/zend-crypt": "^2.6", - "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" + "zendframework/zend-crypt": "^2.6 || ^3.0", + "zendframework/zend-servicemanager": "^2.7.10 || ^3.3.1" }, "suggest": { - "ext-intl": "Handle IDN in AddressList hostnames", "zendframework/zend-crypt": "Crammd5 support in SMTP Auth", - "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3 when using SMTP to deliver messages" + "zendframework/zend-servicemanager": "^2.7.10 || ^3.3.1 when using SMTP to deliver messages" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev", - "dev-develop": "2.9-dev" + "dev-master": "2.10.x-dev", + "dev-develop": "2.11.x-dev" }, "zf": { "component": "Zend\\Mail", @@ -3419,13 +3542,13 @@ "license": [ "BSD-3-Clause" ], - "description": "provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages", - "homepage": "https://github.com/zendframework/zend-mail", + "description": "Provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages", "keywords": [ + "ZendFramework", "mail", - "zf2" + "zf" ], - "time": "2018-03-01T18:57:00+00:00" + "time": "2018-06-07T13:37:07+00:00" }, { "name": "zendframework/zend-math", @@ -3479,16 +3602,16 @@ }, { "name": "zendframework/zend-mime", - "version": "2.7.0", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-mime.git", - "reference": "5db38e92f8a6c7c5e25c8afce6e2d0bd49340c5f" + "reference": "52ae5fa9f12845cae749271034a2d594f0e4c6f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-mime/zipball/5db38e92f8a6c7c5e25c8afce6e2d0bd49340c5f", - "reference": "5db38e92f8a6c7c5e25c8afce6e2d0bd49340c5f", + "url": "https://api.github.com/repos/zendframework/zend-mime/zipball/52ae5fa9f12845cae749271034a2d594f0e4c6f2", + "reference": "52ae5fa9f12845cae749271034a2d594f0e4c6f2", "shasum": "" }, "require": { @@ -3526,7 +3649,7 @@ "mime", "zf" ], - "time": "2017-11-28T15:02:22+00:00" + "time": "2018-05-14T19:02:50+00:00" }, { "name": "zendframework/zend-modulemanager", @@ -3590,26 +3713,27 @@ }, { "name": "zendframework/zend-mvc", - "version": "2.7.13", + "version": "2.7.15", "source": { "type": "git", "url": "https://github.com/zendframework/zend-mvc.git", - "reference": "9dcaaad145254d023d3cd3559bf29e430f2884b2" + "reference": "a8d45689d37a9e4ff4b75ea0b7478fa3d4f9c089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-mvc/zipball/9dcaaad145254d023d3cd3559bf29e430f2884b2", - "reference": "9dcaaad145254d023d3cd3559bf29e430f2884b2", + "url": "https://api.github.com/repos/zendframework/zend-mvc/zipball/a8d45689d37a9e4ff4b75ea0b7478fa3d4f9c089", + "reference": "a8d45689d37a9e4ff4b75ea0b7478fa3d4f9c089", "shasum": "" }, "require": { "container-interop/container-interop": "^1.1", "php": "^5.5 || ^7.0", - "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", - "zendframework/zend-form": "^2.8.2", - "zendframework/zend-hydrator": "^1.1 || ^2.1", + "zendframework/zend-console": "^2.7", + "zendframework/zend-eventmanager": "^2.6.4 || ^3.0", + "zendframework/zend-form": "^2.11", + "zendframework/zend-hydrator": "^1.1 || ^2.4", "zendframework/zend-psr7bridge": "^0.2", - "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-servicemanager": "^2.7.10 || ^3.0.3", "zendframework/zend-stdlib": "^2.7.5 || ^3.0" }, "replace": { @@ -3617,30 +3741,29 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "^4.5", + "phpunit/phpunit": "^4.8.36", + "sebastian/comparator": "^1.2.4", "sebastian/version": "^1.0.4", - "zendframework/zend-authentication": "^2.5.3", - "zendframework/zend-cache": "^2.6.1", - "zendframework/zend-console": "^2.6", + "zendframework/zend-authentication": "^2.6", + "zendframework/zend-cache": "^2.8", "zendframework/zend-di": "^2.6", - "zendframework/zend-filter": "^2.6.1", - "zendframework/zend-http": "^2.5.4", - "zendframework/zend-i18n": "^2.6", - "zendframework/zend-inputfilter": "^2.6", + "zendframework/zend-filter": "^2.8", + "zendframework/zend-http": "^2.8", + "zendframework/zend-i18n": "^2.8", + "zendframework/zend-inputfilter": "^2.8", "zendframework/zend-json": "^2.6.1", - "zendframework/zend-log": "^2.7.1", - "zendframework/zend-modulemanager": "^2.7.1", - "zendframework/zend-serializer": "^2.6.1", - "zendframework/zend-session": "^2.6.2", - "zendframework/zend-text": "^2.6", - "zendframework/zend-uri": "^2.5", - "zendframework/zend-validator": "^2.6", - "zendframework/zend-view": "^2.6.3" + "zendframework/zend-log": "^2.9.3", + "zendframework/zend-modulemanager": "^2.8", + "zendframework/zend-serializer": "^2.8", + "zendframework/zend-session": "^2.8.1", + "zendframework/zend-text": "^2.7", + "zendframework/zend-uri": "^2.6", + "zendframework/zend-validator": "^2.10", + "zendframework/zend-view": "^2.9" }, "suggest": { "zendframework/zend-authentication": "Zend\\Authentication component for Identity plugin", "zendframework/zend-config": "Zend\\Config component", - "zendframework/zend-console": "Zend\\Console component", "zendframework/zend-di": "Zend\\Di component", "zendframework/zend-filter": "Zend\\Filter component", "zendframework/zend-http": "Zend\\Http component", @@ -3665,6 +3788,9 @@ } }, "autoload": { + "files": [ + "src/autoload.php" + ], "psr-4": { "Zend\\Mvc\\": "src/" } @@ -3678,7 +3804,7 @@ "mvc", "zf2" ], - "time": "2017-12-14T22:44:10+00:00" + "time": "2018-05-03T13:13:41+00:00" }, { "name": "zendframework/zend-psr7bridge", @@ -3731,16 +3857,16 @@ }, { "name": "zendframework/zend-serializer", - "version": "2.8.1", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-serializer.git", - "reference": "7ac42b9a47e9cb23895173a3096bc3b3fb7ac580" + "reference": "0172690db48d8935edaf625c4cba38b79719892c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/7ac42b9a47e9cb23895173a3096bc3b3fb7ac580", - "reference": "7ac42b9a47e9cb23895173a3096bc3b3fb7ac580", + "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/0172690db48d8935edaf625c4cba38b79719892c", + "reference": "0172690db48d8935edaf625c4cba38b79719892c", "shasum": "" }, "require": { @@ -3749,10 +3875,9 @@ "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "doctrine/instantiator": "1.0.*", - "phpunit/phpunit": "^5.5", + "phpunit/phpunit": "^5.7.25 || ^6.4.4", "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-math": "^2.6", + "zendframework/zend-math": "^2.6 || ^3.0", "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" }, "suggest": { @@ -3762,8 +3887,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev", - "dev-develop": "2.9-dev" + "dev-master": "2.9.x-dev", + "dev-develop": "2.10.x-dev" }, "zf": { "component": "Zend\\Serializer", @@ -3780,25 +3905,25 @@ "BSD-3-Clause" ], "description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover", - "homepage": "https://github.com/zendframework/zend-serializer", "keywords": [ + "ZendFramework", "serializer", - "zf2" + "zf" ], - "time": "2017-11-20T22:21:04+00:00" + "time": "2018-05-14T18:45:18+00:00" }, { "name": "zendframework/zend-server", - "version": "2.7.0", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-server.git", - "reference": "7cb617ca3e9b24579f544a244ee79ae61f480914" + "reference": "23a2e9a5599c83c05da831cb7c649e8a7809595e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-server/zipball/7cb617ca3e9b24579f544a244ee79ae61f480914", - "reference": "7cb617ca3e9b24579f544a244ee79ae61f480914", + "url": "https://api.github.com/repos/zendframework/zend-server/zipball/23a2e9a5599c83c05da831cb7c649e8a7809595e", + "reference": "23a2e9a5599c83c05da831cb7c649e8a7809595e", "shasum": "" }, "require": { @@ -3807,14 +3932,14 @@ "zendframework/zend-stdlib": "^2.5 || ^3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "squizlabs/php_codesniffer": "^2.3.1" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" + "dev-master": "2.8.x-dev", + "dev-develop": "2.9.x-dev" } }, "autoload": { @@ -3826,25 +3951,26 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-server", + "description": "Create Reflection-based RPC servers", "keywords": [ + "ZendFramework", "server", - "zf2" + "zf" ], - "time": "2016-06-20T22:27:55+00:00" + "time": "2018-04-30T22:21:28+00:00" }, { "name": "zendframework/zend-servicemanager", - "version": "2.7.10", + "version": "2.7.11", "source": { "type": "git", "url": "https://github.com/zendframework/zend-servicemanager.git", - "reference": "ba7069c94c9af93122be9fa31cddd37f7707d5b4" + "reference": "99ec9ed5d0f15aed9876433c74c2709eb933d4c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/ba7069c94c9af93122be9fa31cddd37f7707d5b4", - "reference": "ba7069c94c9af93122be9fa31cddd37f7707d5b4", + "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/99ec9ed5d0f15aed9876433c74c2709eb933d4c7", + "reference": "99ec9ed5d0f15aed9876433c74c2709eb933d4c7", "shasum": "" }, "require": { @@ -3883,7 +4009,7 @@ "servicemanager", "zf2" ], - "time": "2017-12-05T16:27:36+00:00" + "time": "2018-06-22T14:49:54+00:00" }, { "name": "zendframework/zend-session", @@ -4066,33 +4192,33 @@ }, { "name": "zendframework/zend-text", - "version": "2.6.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-text.git", - "reference": "07ad9388e4d4f12620ad37b52a5b0e4ee7845f92" + "reference": "ca987dd4594f5f9508771fccd82c89bc7fbb39ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-text/zipball/07ad9388e4d4f12620ad37b52a5b0e4ee7845f92", - "reference": "07ad9388e4d4f12620ad37b52a5b0e4ee7845f92", + "url": "https://api.github.com/repos/zendframework/zend-text/zipball/ca987dd4594f5f9508771fccd82c89bc7fbb39ac", + "reference": "ca987dd4594f5f9508771fccd82c89bc7fbb39ac", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", + "php": "^5.6 || ^7.0", "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-config": "^2.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev", - "dev-develop": "2.7-dev" + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" } }, "autoload": { @@ -4104,34 +4230,35 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-text", + "description": "Create FIGlets and text-based tables", "keywords": [ + "ZendFramework", "text", - "zf2" + "zf" ], - "time": "2016-02-08T19:03:52+00:00" + "time": "2018-04-30T14:55:10+00:00" }, { "name": "zendframework/zend-uri", - "version": "2.6.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-uri.git", - "reference": "fb998b9487ea8c5f4aaac0e536190709bdd5353b" + "reference": "3b6463645c6766f78ce537c70cb4fdabee1e725f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/fb998b9487ea8c5f4aaac0e536190709bdd5353b", - "reference": "fb998b9487ea8c5f4aaac0e536190709bdd5353b", + "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/3b6463645c6766f78ce537c70cb4fdabee1e725f", + "reference": "3b6463645c6766f78ce537c70cb4fdabee1e725f", "shasum": "" }, "require": { "php": "^5.6 || ^7.0", "zendframework/zend-escaper": "^2.5", - "zendframework/zend-validator": "^2.5" + "zendframework/zend-validator": "^2.10" }, "require-dev": { - "phpunit/phpunit": "^6.2.1 || ^5.7.15", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", @@ -4150,13 +4277,13 @@ "license": [ "BSD-3-Clause" ], - "description": "a component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", - "homepage": "https://github.com/zendframework/zend-uri", + "description": "A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", "keywords": [ + "ZendFramework", "uri", - "zf2" + "zf" ], - "time": "2018-04-10T17:08:10+00:00" + "time": "2018-04-30T13:40:08+00:00" }, { "name": "zendframework/zend-validator", @@ -4318,6 +4445,50 @@ } ], "packages-dev": [ + { + "name": "composer/xdebug-handler", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08", + "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2018-04-11T15:42:36+00:00" + }, { "name": "doctrine/annotations", "version": "v1.6.0", @@ -4496,25 +4667,26 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.10.5", + "version": "v2.12.1", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "e49993dfb9b96ec8b8d9964c4627599b050a6e99" + "reference": "beef6cbe6dec7205edcd143842a49f9a691859a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/e49993dfb9b96ec8b8d9964c4627599b050a6e99", - "reference": "e49993dfb9b96ec8b8d9964c4627599b050a6e99", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/beef6cbe6dec7205edcd143842a49f9a691859a6", + "reference": "beef6cbe6dec7205edcd143842a49f9a691859a6", "shasum": "" }, "require": { "composer/semver": "^1.4", + "composer/xdebug-handler": "^1.0", "doctrine/annotations": "^1.2", "ext-json": "*", "ext-tokenizer": "*", "php": "^5.6 || >=7.0 <7.3", - "php-cs-fixer/diff": "^1.2", + "php-cs-fixer/diff": "^1.3", "symfony/console": "^3.2 || ^4.0", "symfony/event-dispatcher": "^3.0 || ^4.0", "symfony/filesystem": "^3.0 || ^4.0", @@ -4531,16 +4703,20 @@ "require-dev": { "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.0", + "keradus/cli-executor": "^1.1", "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.0", + "php-coveralls/php-coveralls": "^2.1", "php-cs-fixer/accessible-object": "^1.0", - "phpunit/phpunit": "^5.7.23 || ^6.4.3", - "phpunitgoodpractices/traits": "^1.3.1", - "symfony/phpunit-bridge": "^3.2.2 || ^4.0" + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.0.1", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.0.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1", + "phpunitgoodpractices/traits": "^1.5", + "symfony/phpunit-bridge": "^4.0" }, "suggest": { "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." }, "bin": [ @@ -4556,7 +4732,6 @@ "tests/Test/AbstractIntegrationCaseFactory.php", "tests/Test/AbstractIntegrationTestCase.php", "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/Constraint/SameStringsConstraint.php", "tests/Test/IntegrationCase.php", "tests/Test/IntegrationCaseFactory.php", "tests/Test/IntegrationCaseFactoryInterface.php", @@ -4579,20 +4754,20 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2018-03-20T18:07:08+00:00" + "time": "2018-06-10T08:26:56+00:00" }, { "name": "lusitanian/oauth", - "version": "v0.8.10", + "version": "v0.8.11", "source": { "type": "git", "url": "https://github.com/Lusitanian/PHPoAuthLib.git", - "reference": "09f4af38f17db6938253f4d1b171d537913ac1ed" + "reference": "fc11a53db4b66da555a6a11fce294f574a8374f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/09f4af38f17db6938253f4d1b171d537913ac1ed", - "reference": "09f4af38f17db6938253f4d1b171d537913ac1ed", + "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/fc11a53db4b66da555a6a11fce294f574a8374f9", + "reference": "fc11a53db4b66da555a6a11fce294f574a8374f9", "shasum": "" }, "require": { @@ -4646,29 +4821,32 @@ "oauth", "security" ], - "time": "2016-07-12T22:15:40+00:00" + "time": "2018-02-14T22:37:14+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.7.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { @@ -4691,7 +4869,7 @@ "object", "object graph" ], - "time": "2017-10-19T19:58:43+00:00" + "time": "2018-06-11T23:09:50+00:00" }, { "name": "pdepend/pdepend", @@ -5106,23 +5284,23 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.5", + "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { @@ -5165,7 +5343,7 @@ "spy", "stub" ], - "time": "2018-02-19T10:16:54+00:00" + "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5418,16 +5596,16 @@ }, { "name": "phpunit/phpunit", - "version": "6.2.4", + "version": "6.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ff3a76a58ac293657808aefd58c8aaf05945f4d9" + "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ff3a76a58ac293657808aefd58c8aaf05945f4d9", - "reference": "ff3a76a58ac293657808aefd58c8aaf05945f4d9", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4f21a3c6b97c42952fd5c2837bb354ec0199b97b", + "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b", "shasum": "" }, "require": { @@ -5436,24 +5614,24 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.3", + "myclabs/deep-copy": "^1.6.1", "phar-io/manifest": "^1.0.1", "phar-io/version": "^1.0", "php": "^7.0", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.2", - "phpunit/php-file-iterator": "^1.4", - "phpunit/php-text-template": "^1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^4.0", - "sebastian/comparator": "^2.0", - "sebastian/diff": "^1.4.3", - "sebastian/environment": "^3.0.2", + "phpunit/php-code-coverage": "^5.3", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^5.0.5", + "sebastian/comparator": "^2.1", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", - "sebastian/global-state": "^1.1 || ^2.0", - "sebastian/object-enumerator": "^3.0.2", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0" + "sebastian/version": "^2.0.1" }, "conflict": { "phpdocumentor/reflection-docblock": "3.0.2", @@ -5472,7 +5650,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.2.x-dev" + "dev-master": "6.5.x-dev" } }, "autoload": { @@ -5498,33 +5676,33 @@ "testing", "xunit" ], - "time": "2017-08-03T13:59:28+00:00" + "time": "2018-04-10T11:38:34+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "4.0.4", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "2f789b59ab89669015ad984afa350c4ec577ade0" + "reference": "3eaf040f20154d27d6da59ca2c6e28ac8fd56dce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0", - "reference": "2f789b59ab89669015ad984afa350c4ec577ade0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3eaf040f20154d27d6da59ca2c6e28ac8fd56dce", + "reference": "3eaf040f20154d27d6da59ca2c6e28ac8fd56dce", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.5", "php": "^7.0", "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.0" + "sebastian/exporter": "^3.1" }, "conflict": { "phpunit/phpunit": "<6.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^6.5" }, "suggest": { "ext-soap": "*" @@ -5532,7 +5710,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "5.0.x-dev" } }, "autoload": { @@ -5547,7 +5725,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -5557,7 +5735,7 @@ "mock", "xunit" ], - "time": "2017-08-03T14:08:16+00:00" + "time": "2018-05-29T13:50:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5606,30 +5784,30 @@ }, { "name": "sebastian/comparator", - "version": "2.0.0", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "20f84f468cb67efee293246e6a09619b891f55f0" + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/20f84f468cb67efee293246e6a09619b891f55f0", - "reference": "20f84f468cb67efee293246e6a09619b891f55f0", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", "shasum": "" }, "require": { "php": "^7.0", - "sebastian/diff": "^1.2", - "sebastian/exporter": "^3.0" + "sebastian/diff": "^2.0 || ^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -5660,38 +5838,38 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-03-03T06:26:08+00:00" + "time": "2018-02-01T13:46:46+00:00" }, { "name": "sebastian/diff", - "version": "1.4.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -5718,7 +5896,7 @@ "keywords": [ "diff" ], - "time": "2017-05-22T07:24:03+00:00" + "time": "2017-08-03T08:09:46+00:00" }, { "name": "sebastian/environment", @@ -6209,16 +6387,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.2.2", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "d7c00c3000ac0ce79c96fcbfef86b49a71158cd1" + "reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d7c00c3000ac0ce79c96fcbfef86b49a71158cd1", - "reference": "d7c00c3000ac0ce79c96fcbfef86b49a71158cd1", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d86873af43b4aa9d1f39a3601cc0cfcf02b25266", + "reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266", "shasum": "" }, "require": { @@ -6228,7 +6406,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ "bin/phpcs", @@ -6256,25 +6434,26 @@ "phpcs", "standards" ], - "time": "2017-12-19T21:44:46+00:00" + "time": "2018-06-06T23:58:19+00:00" }, { "name": "symfony/config", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8" + "reference": "e57e7b573df9d0eaa8c0152768c708ee7ea2b8e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/7c19370ab04e9ac05b74a504198e165f5ccf6dd8", - "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8", + "url": "https://api.github.com/repos/symfony/config/zipball/e57e7b573df9d0eaa8c0152768c708ee7ea2b8e5", + "reference": "e57e7b573df9d0eaa8c0152768c708ee7ea2b8e5", "shasum": "" }, "require": { "php": "^7.1.3", - "symfony/filesystem": "~3.4|~4.0" + "symfony/filesystem": "~3.4|~4.0", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/finder": "<3.4" @@ -6291,7 +6470,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -6318,20 +6497,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-03-19T22:35:49+00:00" + "time": "2018-06-20T11:15:17+00:00" }, { "name": "symfony/dependency-injection", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "9f1cea656afc5512c6f5e58d61fcea12acee113e" + "reference": "e761828a85d7dfc00b927f94ccbe1851ce0b6535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9f1cea656afc5512c6f5e58d61fcea12acee113e", - "reference": "9f1cea656afc5512c6f5e58d61fcea12acee113e", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/e761828a85d7dfc00b927f94ccbe1851ce0b6535", + "reference": "e761828a85d7dfc00b927f94ccbe1851ce0b6535", "shasum": "" }, "require": { @@ -6339,7 +6518,7 @@ "psr/container": "^1.0" }, "conflict": { - "symfony/config": "<3.4", + "symfony/config": "<4.1.1", "symfony/finder": "<3.4", "symfony/proxy-manager-bridge": "<3.4", "symfony/yaml": "<3.4" @@ -6348,7 +6527,7 @@ "psr/container-implementation": "1.0" }, "require-dev": { - "symfony/config": "~3.4|~4.0", + "symfony/config": "~4.1", "symfony/expression-language": "~3.4|~4.0", "symfony/yaml": "~3.4|~4.0" }, @@ -6362,7 +6541,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -6389,20 +6568,20 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2018-04-02T09:52:41+00:00" + "time": "2018-06-25T11:12:43+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "371532a2cfe932f7a3766dd4c45364566def1dd0" + "reference": "45cdcc8a96ef92b43a50723e6d1f5f83096e8cef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/371532a2cfe932f7a3766dd4c45364566def1dd0", - "reference": "371532a2cfe932f7a3766dd4c45364566def1dd0", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/45cdcc8a96ef92b43a50723e6d1f5f83096e8cef", + "reference": "45cdcc8a96ef92b43a50723e6d1f5f83096e8cef", "shasum": "" }, "require": { @@ -6411,7 +6590,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -6443,20 +6622,20 @@ "configuration", "options" ], - "time": "2018-01-18T22:19:33+00:00" + "time": "2018-05-31T10:17:53+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f" + "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3532bfcd8f933a7816f3a0a59682fc404776600f", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6", + "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6", "shasum": "" }, "require": { @@ -6466,7 +6645,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -6502,20 +6681,20 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422" + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/8eca20c8a369e069d4f4c2ac9895144112867422", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", "shasum": "" }, "require": { @@ -6524,7 +6703,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -6557,20 +6736,20 @@ "portable", "shim" ], - "time": "2018-01-31T17:43:24+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042" + "reference": "07463bbbbbfe119045a24c4a516f92ebd2752784" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6795ffa2f8eebedac77f045aa62c0c10b2763042", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/07463bbbbbfe119045a24c4a516f92ebd2752784", + "reference": "07463bbbbbfe119045a24c4a516f92ebd2752784", "shasum": "" }, "require": { @@ -6579,7 +6758,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -6606,7 +6785,7 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-02-19T16:50:22+00:00" + "time": "2018-02-19T16:51:42+00:00" }, { "name": "theseer/fdomdocument", diff --git a/dev/tests/acceptance/tests/_data/lorem_ipsum.docx b/dev/tests/acceptance/tests/_data/lorem_ipsum.docx new file mode 100644 index 0000000000000..488f64e86b6ff Binary files /dev/null and b/dev/tests/acceptance/tests/_data/lorem_ipsum.docx differ diff --git a/dev/tests/acceptance/tests/_data/lorem_ipsum.txt b/dev/tests/acceptance/tests/_data/lorem_ipsum.txt new file mode 100644 index 0000000000000..64cb8d023361a --- /dev/null +++ b/dev/tests/acceptance/tests/_data/lorem_ipsum.txt @@ -0,0 +1,9 @@ +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc venenatis cursus eros, eu congue risus eleifend ut. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean aliquet mi diam, at consequat ex imperdiet eu. Nullam vulputate sollicitudin libero, tristique ullamcorper ante pretium eget. Nunc vehicula, risus ut hendrerit ornare, tortor est mattis urna, vitae egestas arcu tellus quis est. Sed mollis est sem. Aenean rhoncus ultricies sapien, id tempus elit lobortis ac. Pellentesque condimentum gravida purus a pretium. Nulla sed sapien mattis, auctor lacus quis, volutpat metus. Nunc mattis diam elit, viverra tincidunt nisl faucibus eu. Duis ac nisl tellus. Aenean eros lectus, malesuada in ex non, pharetra aliquam odio. Aenean ultricies pharetra mauris, ac rutrum quam posuere at. Phasellus et tempor turpis, ut sodales turpis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. + +Sed fringilla orci at elit gravida, posuere varius elit eleifend. Nam libero dui, rutrum ac massa et, dictum egestas massa. Fusce rutrum, neque vitae vestibulum mattis, magna orci dictum turpis, ut laoreet eros urna lacinia ipsum. Donec eget ultrices eros. Duis sollicitudin ante est. Maecenas semper pellentesque scelerisque. Vestibulum eu venenatis tellus. Etiam nec massa sem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam blandit molestie justo, non euismod dolor aliquet ac. Duis consectetur enim in arcu suscipit, in tempus nisi commodo. + +Donec sed venenatis nunc. Proin velit leo, porta eget erat elementum, dapibus posuere odio. Nam varius lectus eu cursus tristique. Ut tempus libero vehicula, iaculis augue sit amet, vestibulum justo. Vivamus porta diam vitae malesuada vestibulum. Donec mi dolor, semper at rutrum eget, vehicula non orci. Nunc dolor urna, laoreet et egestas vitae, sodales quis ipsum. Vivamus aliquet viverra enim cursus tincidunt. Pellentesque vel laoreet mi. Aenean ut rhoncus orci. Donec a purus venenatis, tempor dolor in, facilisis ex. Sed nec metus convallis, viverra nisl nec, luctus arcu. Integer blandit arcu a est posuere pharetra. + +Aliquam ultricies lectus ac mauris luctus, a viverra neque rhoncus. Vestibulum id velit eu nisl efficitur lobortis. Sed id metus at ipsum imperdiet porta. Quisque in quam in turpis fermentum condimentum. Phasellus sagittis risus eu tempus scelerisque. Vivamus dapibus sem odio, vitae fermentum sem viverra et. Quisque sit amet cursus neque, vel hendrerit risus. Integer ut diam porta, volutpat risus in, iaculis diam. Suspendisse vulputate non quam et finibus. + +Donec blandit, sem ut posuere dignissim, dolor lorem egestas magna, vel faucibus dui metus eget orci. Nullam ipsum lacus, imperdiet at nisl sed, condimentum dignissim lectus. Nunc orci libero, tincidunt a molestie vel, dapibus at mi. Quisque scelerisque sem quis massa suscipit, sit amet suscipit arcu volutpat. In tincidunt lacus in porttitor mattis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi rutrum gravida orci quis porta. \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/README.md deleted file mode 100644 index c9275af071fa4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_AdminNotification** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/composer.json deleted file mode 100644 index 49a59426cfa6d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdminNotification/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-admin-notification", - "description": "Magento 2 Functional Test Module Admin Notification", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\AdminNotification\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/AdminNotification" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/README.md deleted file mode 100644 index 2f01efe59522b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_AdvancedPricingImportExport** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/composer.json deleted file mode 100644 index 96be03e146356..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-advanced-pricing-import-export", - "description": "Magento 2 Functional Test Module Advanced Pricing Import Export", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\AdvancedPricingImportExport\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/AdvancedPricingImportExport" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/README.md deleted file mode 100644 index d01404e4a1e9a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_AdvancedSearch** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/composer.json deleted file mode 100644 index cd266da628c37..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-advanced-search", - "description": "Magento 2 Functional Test Module Advanced Search", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "proprietary" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-search": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-search": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\AdvancedSearch\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AdvancedSearch" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/README.md deleted file mode 100644 index 49028ae41818b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Amqp** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/composer.json deleted file mode 100644 index 82c2915dce58b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-amqp", - "description": "Magento 2 Functional Test Module Amqp", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "proprietary" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Amqp\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Amqp" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Data/UserData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Data/UserData.xml deleted file mode 100644 index c15e6004ed64a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Data/UserData.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="adminNoReport" type="user"> - <data key="username" unique="suffix">noreport</data> - <data key="firstname">No</data> - <data key="lastname">Report</data> - <data key="email" unique="prefix">noreport@example.com</data> - <data key="password">123123q</data> - <data key="password_confirmation">123123q</data> - <data key="interface_local">en_US</data> - <data key="is_active">true</data> - <data key="current_password">123123q</data> -</entity> - <entity name="restrictedWebUser" type="user"> - <data key="username" unique="suffix">restrictedWebUser</data> - <data key="firstname">restricted</data> - <data key="lastname">webUser</data> - <data key="email" unique="prefix">restrictedWebUser@example.com</data> - <data key="password">123123q</data> - <data key="password_confirmation">123123q</data> - <data key="interface_local">en_US</data> - <data key="is_active">true</data> - <data key="current_password">123123q</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Data/UserRoleData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Data/UserRoleData.xml deleted file mode 100644 index 162b477ff68fb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Data/UserRoleData.xml +++ /dev/null @@ -1,171 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="adminNoReportRole" type="user_role"> - <data key="rolename" unique="suffix">noreport</data> - <data key="current_password">123123q</data> - <array key="resource"> - <item>Magento_Backend::dashboard</item> - <item>Magento_Sales::sales</item> - <item>Magento_Sales::sales_operation</item> - <item>Magento_Sales::sales_order</item> - <item>Magento_Sales::actions</item> - <item>Magento_Sales::create</item> - <item>Magento_Sales::actions_view</item> - <item>Magento_Sales::email</item> - <item>Magento_Sales::reorder</item> - <item>Magento_Sales::actions_edit</item> - <item>Magento_Sales::cancel</item> - <item>Magento_Sales::review_payment</item> - <item>Magento_Sales::capture</item> - <item>Magento_Sales::invoice</item> - <item>Magento_Sales::creditmemo</item> - <item>Magento_Sales::hold</item> - <item>Magento_Sales::unhold</item> - <item>Magento_Sales::ship</item> - <item>Magento_Sales::comment</item> - <item>Magento_Sales::emails</item> - <item>Magento_Sales::sales_invoice</item> - <item>Magento_Sales::shipment</item> - <item>Magento_Sales::sales_creditmemo</item> - <item>Magento_Paypal::billing_agreement</item> - <item>Magento_Paypal::billing_agreement_actions</item> - <item>Magento_Paypal::billing_agreement_actions_view</item> - <item>Magento_Paypal::actions_manage</item> - <item>Magento_Paypal::use</item> - <item>Magento_Sales::transactions</item> - <item>Magento_Sales::transactions_fetch</item> - <item>Magento_Catalog::catalog</item> - <item>Magento_Catalog::catalog_inventory</item> - <item>Magento_Catalog::products</item> - <item>Magento_Catalog::categories</item> - <item>Magento_Customer::customer</item> - <item>Magento_Customer::manage</item> - <item>Magento_Customer::online</item> - <item>Magento_Cart::cart</item> - <item>Magento_Cart::manage</item> - <item>Magento_Backend::myaccount</item> - <item>Magento_Backend::marketing</item> - <item>Magento_CatalogRule::promo</item> - <item>Magento_CatalogRule::promo_catalog</item> - <item>Magento_SalesRule::quote</item> - <item>Magento_Backend::marketing_communications</item> - <item>Magento_Email::template</item> - <item>Magento_Newsletter::template</item> - <item>Magento_Newsletter::queue</item> - <item>Magento_Newsletter::subscriber</item> - <item>Magento_Backend::marketing_seo</item> - <item>Magento_Search::search</item> - <item>Magento_Search::synonyms</item> - <item>Magento_UrlRewrite::urlrewrite</item> - <item>Magento_Sitemap::sitemap</item> - <item>Magento_Backend::marketing_user_content</item> - <item>Magento_Review::reviews_all</item> - <item>Magento_Review::pending</item> - <item>Magento_Backend::content</item> - <item>Magento_Backend::content_elements</item> - <item>Magento_Cms::page</item> - <item>Magento_Cms::save</item> - <item>Magento_Cms::page_delete</item> - <item>Magento_Cms::block</item> - <item>Magento_Widget::widget_instance</item> - <item>Magento_Cms::media_gallery</item> - <item>Magento_Backend::design</item> - <item>Magento_Theme::theme</item> - <item>Magento_Backend::schedule</item> - <item>Magento_Backend::content_translation</item> - <item>Magento_Backend::stores</item> - <item>Magento_Backend::stores_settings</item> - <item>Magento_Backend::store</item> - <item>Magento_Config::config</item> - <item>Magento_Payment::payment</item> - <item>Magento_Cms::config_cms</item> - <item>Magento_GoogleAnalytics::google</item> - <item>Magento_Downloadable::downloadable</item> - <item>Magento_Contact::contact</item> - <item>Magento_CatalogInventory::cataloginventory</item> - <item>Magento_Payment::payment_services</item> - <item>Magento_Newsletter::newsletter</item> - <item>Magento_Catalog::config_catalog</item> - <item>Magento_CatalogSearch::config_catalog_search</item> - <item>Magento_Shipping::config_shipping</item> - <item>Magento_Shipping::shipping_policy</item> - <item>Magento_Shipping::carriers</item> - <item>Magento_Multishipping::config_multishipping</item> - <item>Magento_Config::config_general</item> - <item>Magento_Config::web</item> - <item>Magento_Config::config_design</item> - <item>Magento_Paypal::paypal</item> - <item>Magento_Customer::config_customer</item> - <item>Magento_Tax::config_tax</item> - <item>Magento_Checkout::checkout</item> - <item>Magento_Persistent::persistent</item> - <item>Magento_Sales::config_sales</item> - <item>Magento_Sales::sales_email</item> - <item>Magento_Sales::sales_pdf</item> - <item>Magento_Reports::reports</item> - <item>Magento_Sitemap::config_sitemap</item> - <item>Magento_Wishlist::config_wishlist</item> - <item>Magento_Config::config_system</item> - <item>Magento_SalesRule::config_promo</item> - <item>Magento_Config::advanced</item> - <item>Magento_Config::config_admin</item> - <item>Magento_Config::trans_email</item> - <item>Magento_Config::dev</item> - <item>Magento_Config::currency</item> - <item>Magento_Rss::rss</item> - <item>Magento_Config::sendfriend</item> - <item>Magento_NewRelicReporting::config_newrelicreporting</item> - <item>Magento_CheckoutAgreements::checkoutagreement</item> - <item>Magento_Sales::order_statuses</item> - <item>Magento_Tax::manage_tax</item> - <item>Magento_CurrencySymbol::system_currency</item> - <item>Magento_CurrencySymbol::currency_rates</item> - <item>Magento_CurrencySymbol::symbols</item> - <item>Magento_Backend::stores_attributes</item> - <item>Magento_Catalog::attributes_attributes</item> - <item>Magento_Catalog::update_attributes</item> - <item>Magento_Catalog::sets</item> - <item>Magento_Review::ratings</item> - <item>Magento_Swatches::iframe</item> - <item>Magento_Backend::stores_other_settings</item> - <item>Magento_Customer::group</item> - <item>Magento_Backend::system</item> - <item>Magento_Backend::convert</item> - <item>Magento_ImportExport::import</item> - <item>Magento_ImportExport::export</item> - <item>Magento_TaxImportExport::import_export</item> - <item>Magento_ImportExport::history</item> - <item>Magento_Backend::extensions</item> - <item>Magento_Backend::local</item> - <item>Magento_Backend::custom</item> - <item>Magento_Backend::tools</item> - <item>Magento_Backend::cache</item> - <item>Magento_Backend::setup_wizard</item> - <item>Magento_Backup::backup</item> - <item>Magento_Backup::rollback</item> - <item>Magento_Indexer::index</item> - <item>Magento_Indexer::changeMode</item> - <item>Magento_User::acl</item> - <item>Magento_User::acl_users</item> - <item>Magento_User::locks</item> - <item>Magento_User::acl_roles</item> - <item>Magento_Backend::system_other_settings</item> - <item>Magento_AdminNotification::adminnotification</item> - <item>Magento_AdminNotification::show_toolbar</item> - <item>Magento_AdminNotification::show_list</item> - <item>Magento_AdminNotification::mark_as_read</item> - <item>Magento_AdminNotification::adminnotification_remove</item> - <item>Magento_Variable::variable</item> - <item>Magento_EncryptionKey::crypt_key</item> - <item>Magento_Backend::global_search</item> - </array> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/README.md deleted file mode 100644 index 56c1d77deeed0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_Analytics** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/composer.json deleted file mode 100644 index cb59843c9cba8..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-analytics", - "description": "Magento 2 Acceptance Test Module Analytics", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-integration": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Analytics\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Analytics" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AsynchronousOperations/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AsynchronousOperations/README.md deleted file mode 100644 index 39f11e663cf01..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AsynchronousOperations/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_AsynchronousOperations** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AsynchronousOperations/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AsynchronousOperations/composer.json deleted file mode 100644 index 240b8aa3cca35..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AsynchronousOperations/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-asynchronous-operations", - "description": "Magento 2 Functional Test Module Asynchronous Operations", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "proprietary" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-authorization": "100.0.0-dev", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-logging": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-user": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\AsynchronousOperations\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "dev/tests/acceptance/tests/functional/Magento/FunctionalTest/AsynchronousOperations" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/README.md deleted file mode 100644 index c21edf02d3bc2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Authorization** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/composer.json deleted file mode 100644 index 2eab99a968a9a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorization/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-authorization", - "description": "Magento 2 Functional Test Module Authorization", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Authorization\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Authorization" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/README.md deleted file mode 100644 index c3a550699f661..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Authorizenet** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/composer.json deleted file mode 100644 index 06dce68805cd9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Authorizenet/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-authorizenet", - "description": "Magento 2 Functional Test Module Authorizenet", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Authorizenet\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Authorizenet" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/LogoutActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/LogoutActionGroup.xml deleted file mode 100644 index 4a5bed2ed0a68..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/ActionGroup/LogoutActionGroup.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <actionGroup name="logout"> - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - </actionGroup> -</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Data/BackenedData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Data/BackenedData.xml deleted file mode 100644 index 79185b3a9db55..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Data/BackenedData.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="backendDataOne" type="backend"> - <data key="backendConfigName">data</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Page/AdminConfigurationStoresPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Page/AdminConfigurationStoresPage.xml deleted file mode 100644 index 08448464b4c4a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Page/AdminConfigurationStoresPage.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="ConfigurationStoresPage" url="admin/system_config/edit/section/cms/" area="admin" module="Catalog"> - <section name="WYSIWYGOptionsSection"/> - </page> - <page name="WebConfigurationPage" url="admin/system_config/edit/section/web/" area="admin" module="Backend"> - <section name="WYSIWYGOptionsSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Page/AdminLoginPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Page/AdminLoginPage.xml deleted file mode 100644 index 8b4b7307e1f97..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Page/AdminLoginPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminLoginPage" url="admin" area="admin" module="Magento_Backend"> - <section name="AdminLoginFormSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Page/AdminLogoutPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Page/AdminLogoutPage.xml deleted file mode 100644 index 6eb02dfb3b7fb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Page/AdminLogoutPage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminLogoutPage" url="admin/auth/logout/" area="admin" module="Magento_Backend"/> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/README.md deleted file mode 100644 index 0a7d14223c0b2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Backend** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminGridTableSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminGridTableSection.xml deleted file mode 100644 index 3d96a48ac79b5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminGridTableSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminGridTableSection"> - <element name="row" type="text" selector="table.data-grid tbody tr[data-role=row]:nth-of-type({{row}})" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminHeaderSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminHeaderSection.xml deleted file mode 100644 index 4f972d84ed236..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminHeaderSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminHeaderSection"> - <element name="pageTitle" type="text" selector=".page-header h1.page-title"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminLoginFormSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminLoginFormSection.xml deleted file mode 100644 index 3d43a267026c2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminLoginFormSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminLoginFormSection"> - <element name="username" type="input" selector="#username"/> - <element name="password" type="input" selector="#login"/> - <element name="signIn" type="button" selector=".actions .action-primary" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminMainActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminMainActionsSection.xml deleted file mode 100644 index 26c37fee8c12a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminMainActionsSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminMainActionsSection"> - <element name="save" type="button" selector="#save"/> - <element name="delete" type="button" selector="#delete"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminMessagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminMessagesSection.xml deleted file mode 100644 index d072f4aecb576..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminMessagesSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminMessagesSection"> - <element name="success" type="text" selector="#messages div.message-success"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminSecondaryGridSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminSecondaryGridSection.xml deleted file mode 100644 index a3268630567ad..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminSecondaryGridSection.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminSecondaryGridSection"> - <element name="resetFilters" type="button" selector="[title='Reset Filter']"/> - <element name="taxIdentifierSearch" type="input" selector=".col-code .admin__control-text"/> - <element name="searchButton" type="input" selector=".admin__filter-actions [title='Search']"/> - <element name="firstRow" type="block" selector="tr[data-role='row']"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/composer.json deleted file mode 100644 index b2a99b07f0255..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/composer.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-backend", - "description": "Magento 2 Functional Test Module Backend", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backup": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-developer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-reports": "100.0.0-dev", - "magento/magento2-functional-test-module-require-js": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-security": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-translation": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-user": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Backend\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Backend" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/README.md deleted file mode 100644 index dc2a3ab06f9d3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Backup** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/composer.json deleted file mode 100644 index c6e51064c592f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backup/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-backup", - "description": "Magento 2 Functional Test Module Backup", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-cron": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Backup\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Backup" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/README.md deleted file mode 100644 index b0b637c9d9621..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Braintree** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/composer.json deleted file mode 100644 index d3a13786a0a9d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Braintree/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-braintree", - "description": "Magento 2 Functional Test Module Braintree", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-instant-purchase": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-paypal": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-vault": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Braintree\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Braintree" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/CreateBundleProductActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/CreateBundleProductActionGroup.xml deleted file mode 100644 index fa44b7df150e4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/ActionGroup/CreateBundleProductActionGroup.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <actionGroup name="CreateBasicBundleProduct"> - <!--Prereq: Go to bundle product creation page--> - <!--Product name and SKU--> - <fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/> - <fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/> - - <!--Trigger SEO drop down--> - <conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed"/> - <waitForPageLoad stepKey="WaitForDropDownSEO"/> - - <!--Fill URL input--> - <fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension"/> - </actionGroup> -</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/CustomAttributeData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/CustomAttributeData.xml deleted file mode 100644 index c7f150e7ad6fb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/CustomAttributeData.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="CustomAttributeDynamicPrice" type="custom_attribute"> - <data key="attribute_code">price_type</data> - <data key="value">0</data> - </entity> - <entity name="CustomAttributeFixPrice" type="custom_attribute"> - <data key="attribute_code">price_type</data> - <data key="value">1</data> - </entity> - <entity name="CustomAttributePriceView" type="custom_attribute"> - <data key="attribute_code">price_view</data> - <data key="value">1</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/ProductData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/ProductData.xml deleted file mode 100644 index 3683721909ab2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/ProductData.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="BundleProduct" type="product"> - <data key="name" unique="suffix">BundleProduct</data> - <data key="name" unique="suffix">BundleProduct</data> - <data key="name2" unique="suffix">BundleProduct2</data> - <data key="sku" unique="suffix">bundleproduct</data> - <data key="sku2" unique="suffix">bundleproduct2</data> - <data key="type_id">bundle</data> - <data key="attribute_set_id">4</data> - <data key="optionTitle1">BundleOption</data> - <data key="optionInputType1">checkbox</data> - <data key="defaultQuantity">10</data> - <data key="status">1</data> - <data key="urlKey" unique="suffix">bundleproduct</data> - <data key="urlKey2" unique="suffix">bundleproduct2</data> - <data key="default_quantity1">10</data> - <data key="default_quantity2">20</data> - <data key="set">4</data> - <data key="type">bundle</data> - <data key="fixedPrice">10</data> - <data key="fixedPriceFormatted">$10.00</data> - <data key="defaultAttribute">Default</data> - </entity> - <entity name="ApiBundleProduct" type="product2"> - <data key="name" unique="suffix">Api Bundle Product</data> - <data key="sku" unique="suffix">api-bundle-product</data> - <data key="type_id">bundle</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="status">1</data> - <data key="urlKey" unique="suffix">api-bundle-product</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute">ApiProductDescription</requiredEntity> - <requiredEntity type="custom_attribute">ApiProductShortDescription</requiredEntity> - <requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity> - <requiredEntity type="custom_attribute">CustomAttributePriceView</requiredEntity> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Metadata/bundle_options-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Metadata/bundle_options-meta.xml deleted file mode 100644 index a81d5dda6a40b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Metadata/bundle_options-meta.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="GetAllBundleOptions" dataType="bundle_options" type="get" auth="adminOauth" url="/V1/bundle-products/{sku}/options/all" method="GET"> - <contentType>application/json</contentType> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Page/AdminCatalogProductPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Page/AdminCatalogProductPage.xml deleted file mode 100644 index f3e9366bb2bf6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Page/AdminCatalogProductPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminCatalogProductPage" url="catalog/product/" area="admin" module="Magento_Bundle"> - <section name="AdminCatalogProductSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Page/AdminProductCreatePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Page/AdminProductCreatePage.xml deleted file mode 100644 index 5a17304ab28b8..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Page/AdminProductCreatePage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - --> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true"> - <section name="AdminProductFormBundleSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/README.md deleted file mode 100644 index 9579aec287f4c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Bundle** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/StorefrontBundledSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/StorefrontBundledSection.xml deleted file mode 100644 index 2b9a1ca624f79..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/StorefrontBundledSection.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontBundledSection"> - <element name="nthBundledOption" type="input" selector=".option:nth-of-type({{numOption}}) .choice:nth-of-type({{numOptionSelect}}) input" parameterized="true"/> - <element name="addToCart" type="button" selector="#bundle-slide" timeout="30"/> - <element name="addToCartConfigured" type="button" selector="#product-addtocart-button" timeout="30"/> - <element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/> - <element name="configuredPrice" type="block" selector=".price-configured_price .price"/> - <element name="fixedPricing" type="text" selector="//div[@class='price-box price-final_price']//span[@id]//..//span[contains(text(),'{{var1}}')]" parameterized="true"/> - <element name="customizeProduct" type="button" selector="//*[@id='bundle-slide']"/> - <element name="customizableBundleItemOption" type="text" selector="//div[@class='field choice'][1]//input[@type='checkbox']"/> - <element name="customizableBundleItemOption2" type="text" selector="//div[@class='field choice'][2]//input[@type='checkbox']"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/EndToEndB2CAdminTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/EndToEndB2CAdminTest.xml deleted file mode 100644 index dc98f5f43d880..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/EndToEndB2CAdminTest.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CAdminTest"> - <!--Create Bundle Product--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle" after="seeSimpleProductInGrid"/> - <waitForPageLoad stepKey="waitForProductPageLoadBundle" after="visitAdminProductPageBundle"/> - <actionGroup ref="goToCreateProductPage" stepKey="goToCreateBundleProduct" after="waitForProductPageLoadBundle"> - <argument name="product" value="BundleProduct"/> - </actionGroup> - - <fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillBundleName" after="goToCreateBundleProduct"/> - <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillBundleSku" after="fillBundleName"/> - <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3" after="fillBundleSku"/> - <waitForElementVisible selector="{{AdminProductFormBundleSection.firstOptionTitle}}" stepKey="waitForBundleOptions" after="clickAddOption3"/> - <fillField selector="{{AdminProductFormBundleSection.firstOptionTitle}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle" after="waitForBundleOptions"/> - <selectOption selector="{{AdminProductFormBundleSection.firstInputType}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType" after="fillOptionTitle"/> - <waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle" after="selectInputType"/> - <click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption" after="waitForAddProductsToBundle"/> - <waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts" after="clickAddProductsToOption"/> - <actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions" after="waitForPageLoadAfterBundleProducts"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow" after="filterBundleProductOptions"/> - <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts" after="selectFirstGridRow"/> - <fillField selector="{{AdminProductFormBundleSection.firstProductQuantity}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty" after="clickAddSelectedBundleProducts"/> - <actionGroup ref="saveProductForm" stepKey="saveBundleProduct" after="fillProductDefaultQty"/> - <actionGroup ref="viewBundleProductInAdminGrid" stepKey="viewBundleProductInGrid" after="saveBundleProduct"> - <argument name="product" value="BundleProduct"/> - </actionGroup> - - <!--@TODO Move cleanup to "after" when MQE-830 is resolved--> - <comment userInput="Clean up bundle product" stepKey="cleanUpBundleProduct" after="deleteSimpleProduct"/> - <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteBundleProduct" after="cleanUpBundleProduct"> - <argument name="product" value="BundleProduct"/> - </actionGroup> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/composer.json deleted file mode 100644 index 2219c9aa586bf..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/composer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-bundle", - "description": "Magento 2 Functional Test Module Bundle", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-gift-message": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Bundle\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Bundle" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/README.md deleted file mode 100644 index dc155d12f30db..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_BundleImportExport** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/composer.json deleted file mode 100644 index fd79ec03d4ea9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/BundleImportExport/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-bundle-import-export", - "description": "Magento 2 Functional Test Module Bundle Import Export", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-bundle": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-import-export": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\BundleImportExport\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/BundleImportExport" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/README.md deleted file mode 100644 index 47571bdb7f212..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CacheInvalidate** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/composer.json deleted file mode 100644 index f59864d2a14ea..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CacheInvalidate/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-cache-invalidate", - "description": "Magento 2 Functional Test Module Cache Invalidate", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-page-cache": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CacheInvalidate\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CacheInvalidate" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/README.md deleted file mode 100644 index f0d35613be75d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Captcha** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/composer.json deleted file mode 100644 index 0297dbb343bcb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Captcha/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-captcha", - "description": "Magento 2 Functional Test Module Captcha", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Captcha\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Captcha" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/CustomOptionsActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/CustomOptionsActionGroup.xml deleted file mode 100644 index 0409c3f195013..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/CustomOptionsActionGroup.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - - - <actionGroup name="CreateCustomRadioOptions"> - - <!-- ActionGroup will add a single custom option to a product --> - <!-- You must already be on the product creation page --> - <arguments> - <argument name="customOptionName"/> - <argument name="productOption"/> - <argument name="productOption2"/> - </arguments> - - <click stepKey="clickAddOptions" selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}"/> - <waitForPageLoad stepKey="waitForAddProductPageLoad"/> - - <!-- Fill in the option and select the type of radio (once) --> - <fillField stepKey="fillInOptionTitle" selector="{{AdminProductCustomizableOptionsSection.lastOptionTitle}}" userInput="{{customOptionName}}"/> - <click stepKey="clickOptionTypeParent" selector="{{AdminProductCustomizableOptionsSection.lastOptionTypeParent}}"/> - <waitForPageLoad stepKey="waitForDropdownOpen"/> - <click stepKey="clickOptionType" selector="{{AdminProductCustomizableOptionsSection.optionType('Radio Buttons')}}"/> - - <!-- Add three radio options based on the parameter --> - <click stepKey="clickAddValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/> - - <fillField stepKey="fillInValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{productOption.title}}"/> - <fillField stepKey="fillInValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{productOption.price}}"/> - - <click stepKey="clickAddValue2" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/> - - <fillField stepKey="fillInValueTitle2" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{productOption2.title}}"/> - <fillField stepKey="fillInValuePrice2" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{productOption2.price}}"/> - - - </actionGroup> - -</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/RestoreLayoutSettingActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/RestoreLayoutSettingActionGroup.xml deleted file mode 100644 index b9119a5ab9ff2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/RestoreLayoutSettingActionGroup.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <actionGroup name="RestoreLayoutSetting"> - <selectOption selector="{{DefaultLayoutsSection.categoryLayout}}" userInput="No layout updates" stepKey="selectNoLayoutUpdates1" after="expandDefaultLayouts"/> - <selectOption selector="{{DefaultLayoutsSection.productLayout}}" userInput="No layout updates" stepKey="selectNoLayoutUpdates2" before="clickSaveConfig"/> - </actionGroup> -</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCategoryActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCategoryActionGroup.xml deleted file mode 100644 index 3b04df7fdd115..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCategoryActionGroup.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <!-- Check the category page --> - <actionGroup name="StorefrontCheckCategoryActionGroup"> - <arguments> - <argument name="category"/> - <argument name="productCount" type="string"/> - </arguments> - <seeInCurrentUrl url="/{{category.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> - <seeInTitle userInput="{{category.name}}" stepKey="assertCategoryNameInTitle"/> - <see userInput="{{category.name}}" selector="{{StorefrontCategoryMainSection.CategoryTitle}}" stepKey="assertCategoryName"/> - <see userInput="{{productCount}}" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="assertProductCount"/> - </actionGroup> - - <!-- Check simple product on the category page --> - <actionGroup name="StorefrontCheckCategorySimpleProduct"> - <arguments> - <argument name="product"/> - </arguments> - <seeElement selector="{{StorefrontCategoryProductSection.ProductTitleByName(product.name)}}" stepKey="assertProductName"/> - <see userInput="${{product.price}}.00" selector="{{StorefrontCategoryProductSection.ProductPriceByName(product.name)}}" stepKey="AssertProductPrice"/> - <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> - <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" /> - <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> - <seeElement selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="AssertAddToCart" /> - </actionGroup> -</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCompareActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCompareActionGroup.xml deleted file mode 100644 index 86141fede78ff..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCompareActionGroup.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <!-- Add Product to Compare from the category page and check message --> - <actionGroup name="StorefrontAddCategoryProductToCompareActionGroup"> - <arguments> - <argument name="productVar"/> - </arguments> - <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(productVar.name)}}" stepKey="moveMouseOverProduct" /> - <click selector="{{StorefrontCategoryProductSection.ProductAddToCompareByName(productVar.name)}}" stepKey="clickAddProductToCompare"/> - <waitForElement selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForAddCategoryProductToCompareSuccessMessage"/> - <see selector="{{StorefrontMessagesSection.success}}" userInput="You added product {{productVar.name}} to the comparison list." stepKey="assertAddCategoryProductToCompareSuccessMessage"/> - </actionGroup> - - <!-- Add Product to Compare from the product page and check message --> - <actionGroup name="StorefrontAddProductToCompareActionGroup"> - <arguments> - <argument name="productVar"/> - </arguments> - <click selector="{{StorefrontProductInfoMainSection.productAddToCompare}}" stepKey="clickAddToCompare" /> - <waitForElement selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForAddProductToCompareSuccessMessage"/> - <see selector="{{StorefrontMessagesSection.success}}" userInput="You added product {{productVar.name}} to the comparison list." stepKey="assertAddProductToCompareSuccessMessage"/> - </actionGroup> - - <!-- Check the product in compare sidebar --> - <actionGroup name="StorefrontCheckCompareSidebarProductActionGroup"> - <arguments> - <argument name="productVar"/> - </arguments> - <waitForElement selector="{{StorefrontComparisonSidebarSection.ProductTitleByName(productVar.name)}}" stepKey="waitForProduct"/> - </actionGroup> - - <!-- Open and check comparison page --> - <actionGroup name="StorefrontOpenAndCheckComparisionActionGroup"> - <click selector="{{StorefrontComparisonSidebarSection.Compare}}" stepKey="clickCompare"/> - <waitForLoadingMaskToDisappear stepKey="waitForComparePageloaded" /> - <seeInCurrentUrl url="{{StorefrontProductComparePage.url}}" stepKey="checkUrl"/> - <seeInTitle userInput="Products Comparison List" stepKey="assertPageNameInTitle"/> - <see userInput="Compare Products" selector="{{StorefrontProductCompareMainSection.PageName}}" stepKey="assertPageName"/> - </actionGroup> - - <!-- Check the simple product in comparison page --> - <actionGroup name="StorefrontCheckCompareSimpleProductActionGroup"> - <arguments> - <argument name="productVar"/> - </arguments> - <seeElement selector="{{StorefrontProductCompareMainSection.ProductLinkByName(productVar.name)}}" stepKey="assertProductName"/> - <see userInput="${{productVar.price}}.00" selector="{{StorefrontProductCompareMainSection.ProductPriceByName(productVar.name)}}" stepKey="assertProductPrice1"/> - <see userInput="{{productVar.sku}}" selector="{{StorefrontProductCompareMainSection.ProductAttributeByCodeAndProductName('SKU', productVar.name)}}" stepKey="assertProductPrice2"/> - <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> - <seeElement selector="{{StorefrontProductCompareMainSection.ProductAddToCartByName(productVar.name)}}" stepKey="assertProductAddToCart"/> - </actionGroup> - - <!-- Clear the compare list --> - <actionGroup name="StorefrontClearCompareActionGroup"> - <waitForElementVisible selector="{{StorefrontComparisonSidebarSection.ClearAll}}" time="30" stepKey="waitForClearAll"/> - <click selector="{{StorefrontComparisonSidebarSection.ClearAll}}" stepKey="clickClearAll"/> - <waitForElementVisible selector="{{ModalConfirmationSection.OkButton}}" time="30" stepKey="waitForClearOk"/> - <scrollTo selector="{{ModalConfirmationSection.OkButton}}" stepKey="scrollToClearOk"/> - <click selector="{{ModalConfirmationSection.OkButton}}" stepKey="clickClearOk"/> - <waitForElement selector="{{StorefrontMessagesSection.message('You cleared the comparison list.')}}" time="30" stepKey="AssertMessageCleared"/> - <waitForElement selector="{{StorefrontComparisonSidebarSection.NoItemsMessage}}" time="30" stepKey="assertNoItems"/> - </actionGroup> -</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml deleted file mode 100644 index 7673ce6874482..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <!-- Check the simple product on the product page --> - <actionGroup name="StorefrontCheckSimpleProduct"> - <arguments> - <argument name="product"/> - </arguments> - <seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> - <seeInTitle userInput="{{product.name}}" stepKey="AssertProductNameInTitle"/> - <see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/> - <see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/> - <see userInput="${{product.price}}.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/> - <see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertInStock"/> - <seeElement selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="assertAddToCart" /> - <see userInput="{{product.custom_attributes[description]}}" selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="assertProductDescription"/> - <see userInput="{{product.custom_attributes[short_description]}}" selector="{{StorefrontProductInfoMainSection.productShortDescription}}" stepKey="assertProductShortDescription"/> - </actionGroup> - - <!-- Assert product image in Storefront Product page --> - <actionGroup name="assertProductImageStorefrontProductPage"> - <arguments> - <argument name="product"/> - <argument name="image" defaultValue="MagentoLogo"/> - </arguments> - <seeInCurrentUrl url="/{{product.urlKey}}.html" stepKey="checkUrl"/> - <waitForPageLoad stepKey="waitForPageLoad"/> - <seeElement selector="{{StorefrontProductMediaSection.imageFile(image.filename)}}" stepKey="seeImage"/> - </actionGroup> - - <!-- Assert product image in Storefront Product page --> - <actionGroup name="assertProductImageStorefrontProductPage2"> - <arguments> - <argument name="product"/> - <argument name="image" defaultValue="MagentoLogo"/> - </arguments> - <seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> - <waitForPageLoad stepKey="waitForPageLoad"/> - <seeElement selector="{{StorefrontProductMediaSection.imageFile(image.filename)}}" stepKey="seeImage"/> - </actionGroup> - - <!-- Assert no product image in Storefront Product page --> - <actionGroup name="assertProductImageNotInStorefrontProductPage"> - <arguments> - <argument name="product"/> - <argument name="image" defaultValue="MagentoLogo"/> - </arguments> - <seeInCurrentUrl url="/{{product.urlKey}}.html" stepKey="checkUrl"/> - <waitForPageLoad stepKey="waitForPageLoad"/> - <dontSeeElement selector="{{StorefrontProductMediaSection.imageFile(image.filename)}}" stepKey="seeImage"/> - </actionGroup> - - <!-- Assert no product image in Storefront Product page --> - <actionGroup name="assertProductImageNotInStorefrontProductPage2"> - <arguments> - <argument name="product"/> - <argument name="image" defaultValue="MagentoLogo"/> - </arguments> - <seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> - <waitForPageLoad stepKey="waitForPageLoad"/> - <dontSeeElement selector="{{StorefrontProductMediaSection.imageFile(image.filename)}}" stepKey="seeImage"/> - </actionGroup> -</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ConstData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ConstData.xml deleted file mode 100644 index b26fa64bceae9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ConstData.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> - <entity name="CONST" type="CONST"> - <data key="one">1</data> - <data key="two">2</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CustomAttributeData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CustomAttributeData.xml deleted file mode 100644 index c0f2e391a4e2b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CustomAttributeData.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="CustomAttributeCategoryUrlKey" type="custom_attribute"> - <data key="attribute_code">url_key</data> - <data key="value" unique="suffix">category</data> - </entity> - <entity name="CustomAttributeProductUrlKey" type="custom_attribute"> - <data key="attribute_code">url_key</data> - <data key="value" unique="suffix">product</data> - </entity> - <entity name="CustomAttributeCategoryIds" type="custom_attribute_array"> - <data key="attribute_code">category_ids</data> - <var key="value" entityType="category" entityKey="id"/> - </entity> - <entity name="CustomAttributeProductAttribute" type="custom_attribute"> - <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> - <var key="value" entityKey="value" entityType="ProductAttributeOption"/> - </entity> - <entity name="ApiProductDescription" type="custom_attribute"> - <data key="attribute_code">description</data> - <data key="value" unique="suffix">API Product Description</data> - </entity> - <entity name="ApiProductShortDescription" type="custom_attribute"> - <data key="attribute_code">short_description</data> - <data key="value" unique="suffix">API Product Short Description</data> - </entity> - <entity name="ApiProductNewsFromDate" type="custom_attribute"> - <data key="attribute_code">news_from_date</data> - <data key="value">2018-05-17 00:00:00</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/FrontendLabelData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/FrontendLabelData.xml deleted file mode 100644 index 96104f632798e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/FrontendLabelData.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="ProductAttributeFrontendLabel" type="FrontendLabel"> - <data key="store_id">0</data> - <data key="label" unique="suffix">attribute</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeOptionData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeOptionData.xml deleted file mode 100644 index 22d0e83d7b338..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeOptionData.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="productAttributeOption1" type="ProductAttributeOption"> - <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> - <data key="label" unique="suffix">option1</data> - <data key="is_default">false</data> - <data key="sort_order">0</data> - <requiredEntity type="StoreLabel">Option1Store0</requiredEntity> - <requiredEntity type="StoreLabel">Option1Store1</requiredEntity> - </entity> - <entity name="productAttributeOption2" type="ProductAttributeOption"> - <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> - <data key="label" unique="suffix">option2</data> - <data key="is_default">true</data> - <data key="sort_order">1</data> - <requiredEntity type="StoreLabel">Option2Store0</requiredEntity> - <requiredEntity type="StoreLabel">Option2Store1</requiredEntity> - </entity> - <entity name="ProductAttributeOptionGetter" type="ProductAttributeOption"> - <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> - </entity> - <entity name="productAttributeOption" type="ProductAttributeOption"> - <var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/> - <data key="label" unique="suffix">customOption</data> - <data key="is_default">false</data> - <data key="sort_order">0</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeSetData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeSetData.xml deleted file mode 100644 index 579f592e44ee9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductAttributeSetData.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="AddToDefaultSet" type="ProductAttributeSet"> - <var key="attributeCode" entityKey="attribute_code" entityType="ProductAttribute"/> - <data key="attributeSetId">4</data> - <data key="attributeGroupId">7</data> - <data key="sortOrder">0</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductData.xml deleted file mode 100644 index 3c6e7d3ddc319..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductData.xml +++ /dev/null @@ -1,322 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="_defaultProduct" type="product"> - <data key="sku" unique="suffix">testSku</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">testProductName</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">testurlkey</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> - </entity> - <entity name="ApiSimpleProduct" type="product"> - <data key="sku" unique="suffix">api-simple-product</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">Api Simple Product</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">api-simple-product</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> - </entity> - <entity name="ApiSimpleProductUpdateDescription" type="product2"> - <requiredEntity type="custom_attribute">ApiProductDescription</requiredEntity> - <requiredEntity type="custom_attribute">ApiProductShortDescription</requiredEntity> - </entity> - <entity name="ApiSimpleProductUpdateName" type="product"> - <data key="name" unique="suffix">Updated Api Simple Product</data> - <data key="urlKey" unique="suffix">api-simple-product</data> - </entity> - <entity name="SimpleProduct" type="product"> - <data key="sku" unique="suffix">SimpleProduct</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="name" unique="suffix">SimpleProduct</data> - <data key="price">123.00</data> - <data key="visibility">4</data> - <data key="status">1</data> - <data key="quantity">1000</data> - <data key="urlKey" unique="suffix">simpleproduct</data> - <data key="weight">1</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> - </entity> - <entity name="SimpleProduct2" type="product"> - <data key="sku" unique="suffix">SimpleProduct</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="name" unique="suffix">SimpleProduct</data> - <data key="price">123.00</data> - <data key="visibility">4</data> - <data key="status">1</data> - <data key="quantity">1000</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - </entity> - <entity name="SimpleProduct3" type="product"> - <data key="sku" unique="suffix">simple</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="name" unique="suffix">simple</data> - <data key="price">123.00</data> - <data key="visibility">4</data> - <data key="status">1</data> - <data key="quantity">1000</data> - <data key="urlKey" unique="suffix">simple</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> - </entity> - <entity name="SimpleProduct4" type="product"> - <data key="sku" unique="suffix">testSku</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">OutOfStockProduct</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">testurlkey</data> - <data key="status">1</data> - <data key="quantity">0</data> - <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> - </entity> - <entity name="NewSimpleProduct" type="product"> - <data key="price">321.00</data> - </entity> - <entity name="SimpleOne" type="product2"> - <data key="sku" unique="suffix">SimpleOne</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="name" unique="suffix">SimpleProduct</data> - <data key="price">1.23</data> - <data key="visibility">4</data> - <data key="status">1</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity> - </entity> - <entity name="ApiSimpleOne" type="product2"> - <data key="sku" unique="suffix">api-simple-product</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">Api Simple Product</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">api-simple-product</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity> - </entity> - <entity name="ApiSimpleTwo" type="product2"> - <data key="sku" unique="suffix">api-simple-product-two</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">Api Simple Product Two</data> - <data key="price">234.00</data> - <data key="urlKey" unique="suffix">api-simple-product-two</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity> - </entity> - <entity name="VirtualProduct" type="product"> - <data key="sku" unique="suffix">virtualproduct</data> - <data key="type_id">virtual</data> - <data key="attribute_set_id">4</data> - <data key="name" unique="suffix">VirtualProduct</data> - <data key="price">99.99</data> - <data key="quantity">250</data> - <data key="weight">0</data> - <data key="status">1</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - </entity> - <entity name="SimpleTwo" type="product2"> - <data key="sku" unique="suffix">SimpleTwo</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="name" unique="suffix">SimpleProduct</data> - <data key="price">1.23</data> - <data key="visibility">4</data> - <data key="status">1</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute">CustomAttributeProductUrlKey</requiredEntity> - </entity> - <entity name="ProductImage" type="uploadImage"> - <data key="title" unique="suffix">Image1</data> - <data key="price">1.00</data> - <data key="file_type">Upload File</data> - <data key="shareable">Yes</data> - <data key="file">magento-logo.png</data> - <data key="fileName">magento-logo</data> - </entity> - <entity name="MagentoLogo" type="image"> - <data key="title" unique="suffix">MagentoLogo</data> - <data key="price">1.00</data> - <data key="file_type">Upload File</data> - <data key="shareable">Yes</data> - <data key="file">magento-logo.png</data> - <data key="filename">magento-logo</data> - <data key="file_extension">png</data> - </entity> - <entity name="ProductWithUnicode" type="product"> - <data key="sku" unique="suffix">霁产品</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">霁产品</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">testurlkey</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> - </entity> - <entity name="defaultVirtualProduct" type="product"> - <data key="sku" unique="suffix">virtualProduct</data> - <data key="type_id">virtual</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">virtualProduct</data> - <data key="price">12.34</data> - <data key="urlKey" unique="suffix">virtualproduct</data> - <data key="status">1</data> - <data key="quantity">100</data> - <data key="weight">0</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> - </entity> - <entity name="productWithDescription" type="product"> - <data key="sku" unique="suffix">testProductWithDescriptionSku</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">testProductWithDescriptionName</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">testproductwithdescriptionurlkey</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> - <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> - <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> - </entity> - <entity name="ApiProductWithDescription" type="product"> - <data key="sku" unique="suffix">api-simple-product</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">Api Simple Product</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">api-simple-product</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> - <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> - </entity> - <entity name="_newDefaultProduct" type="product"> - <data key="sku" unique="suffix">testSku</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">testproductname</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">testurlkey</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> - </entity> - <entity name="productWithOptions" type="product"> - <var key="sku" entityType="product" entityKey="sku" /> - <data key="file">magento.jpg</data> - <requiredEntity type="product_option">ProductOptionField</requiredEntity> - <requiredEntity type="product_option">ProductOptionArea</requiredEntity> - <requiredEntity type="product_option">ProductOptionFile</requiredEntity> - <requiredEntity type="product_option">ProductOptionDropDown</requiredEntity> - <requiredEntity type="product_option">ProductOptionRadiobutton</requiredEntity> - <requiredEntity type="product_option">ProductOptionCheckbox</requiredEntity> - <requiredEntity type="product_option">ProductOptionMultiSelect</requiredEntity> - <requiredEntity type="product_option">ProductOptionDate</requiredEntity> - <requiredEntity type="product_option">ProductOptionDateTime</requiredEntity> - <requiredEntity type="product_option">ProductOptionTime</requiredEntity> - </entity> - <entity name="ApiVirtualProductWithDescription" type="product"> - <data key="sku" unique="suffix">api-virtual-product</data> - <data key="type_id">virtual</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">Api Virtual Product</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">api-virtual-product</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> - <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> - </entity> - <entity name="SimpleProductWithNewFromDate" type="product"> - <data key="sku" unique="suffix">SimpleProduct</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="name" unique="suffix">SimpleProduct</data> - <data key="price">125.00</data> - <data key="visibility">4</data> - <data key="status">1</data> - <data key="quantity">1000</data> - <data key="urlKey" unique="suffix">simpleproduct</data> - <data key="weight">1</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">ApiProductNewsFromDate</requiredEntity> - </entity> - <entity name="SimpleProductNameWithDoubleQuote" type="product"> - <data key="name" unique="prefix">Double Quote"</data> - <data key="sku" unique="prefix">doubleQuote</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="price">10.00</data> - <data key="visibility">4</data> - <data key="status">1</data> - <data key="quantity">1000</data> - <data key="weight">1</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - </entity> - <entity name="GetProduct" type="product"> - <var key="sku" entityKey="sku" entityType="product"/> - </entity> - <entity name="GetProduct2" type="product2"> - <var key="sku" entityKey="sku" entityType="product2"/> - </entity> - <entity name="GetProduct3" type="product3"> - <var key="sku" entityKey="sku" entityType="product3"/> - </entity> - <entity name="ApiSimplePrice1" type="product"> - <data key="sku" unique="suffix">api-simple-product</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">Api Simple Product</data> - <data key="price">1.00</data> - </entity> - <entity name="ApiSimplePrice100" type="product"> - <data key="sku" unique="suffix">api-simple-product</data> - <data key="type_id">simple</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">Api Simple Product</data> - <data key="price">100.00</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductExtensionAttributeData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductExtensionAttributeData.xml deleted file mode 100644 index 39cd17effeffc..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductExtensionAttributeData.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="EavStockItem" type="product_extension_attribute"> - <requiredEntity type="stock_item">Qty_1000</requiredEntity> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductGridData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductGridData.xml deleted file mode 100644 index f1f5d342e4804..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductGridData.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="PriceFilterRange" type="filter"> - <data key="from">10</data> - <data key="to">100</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/StockItemData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/StockItemData.xml deleted file mode 100644 index d76370d4ea0d2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/StockItemData.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="Qty_1000" type="stock_item"> - <data key="qty">1000</data> - <data key="is_in_stock">true</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/StoreLabelData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/StoreLabelData.xml deleted file mode 100644 index 1a1d781de448c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/StoreLabelData.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="Option1Store0" type="StoreLabel"> - <data key="store_id">0</data> - <data key="label">option1</data> - </entity> - <entity name="Option1Store1" type="StoreLabel"> - <data key="store_id">1</data> - <data key="label">option1</data> - </entity> - <entity name="Option2Store0" type="StoreLabel"> - <data key="store_id">0</data> - <data key="label">option2</data> - </entity> - <entity name="Option2Store1" type="StoreLabel"> - <data key="store_id">1</data> - <data key="label">option2</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/empty_extension_attribute-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/empty_extension_attribute-meta.xml deleted file mode 100644 index 1ec100a367a5b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/empty_extension_attribute-meta.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="CreateEmptyExtensionAttribute" dataType="empty_extension_attribute" type="create"> - </operation> - <operation name="UpdateEmptyExtensionAttribute" dataType="empty_extension_attribute" type="update"> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/frontend_label-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/frontend_label-meta.xml deleted file mode 100644 index 47769888dc8eb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/frontend_label-meta.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="CreateFrontendLabel" dataType="FrontendLabel" type="create"> - <field key="store_id">integer</field> - <field key="label">string</field> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_extension_attribute-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_extension_attribute-meta.xml deleted file mode 100644 index fa19659be032e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_extension_attribute-meta.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="CreateProductExtensionAttribute" dataType="product_extension_attribute" type="create"> - <field key="stock_item">stock_item</field> - </operation> - <operation name="UpdateProductExtensionAttribute" dataType="product_extension_attribute" type="update"> - <field key="stock_item">stock_item</field> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/stock_item-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/stock_item-meta.xml deleted file mode 100644 index eb3413be61fd3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/stock_item-meta.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="CreateStockItem" dataType="stock_item" type="create"> - <field key="qty">integer</field> - <field key="is_in_stock">boolean</field> - </operation> - <operation name="UpdateStockItem" dataType="stock_item" type="update"> - <field key="qty">integer</field> - <field key="is_in_stock">boolean</field> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/store_label-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/store_label-meta.xml deleted file mode 100644 index 8b1eae6d885dd..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/store_label-meta.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="CreateStoreLabel" dataType="StoreLabel" type="create"> - <field key="store_id">integer</field> - <field key="label">string</field> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/validation_rule-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/validation_rule-meta.xml deleted file mode 100644 index 2d4eac0a971ef..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/validation_rule-meta.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="CreateValidationRule" dataType="validation_rule" type="create"> - <field key="key">string</field> - <field key="value">string</field> - </operation> - <operation name="UpdateValidationRule" dataType="validation_rule" type="update"> - <field key="key">string</field> - <field key="value">string</field> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeFormPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeFormPage.xml deleted file mode 100644 index 4339f2615e780..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeFormPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="ProductAttributePage" url="catalog/product_attribute/new/" area="admin" module="Catalog"> - <section name="AdminCreateProductAttributeSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeGridPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeGridPage.xml deleted file mode 100644 index ce8f33fa57433..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeGridPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminProductAttributeGridPage" url="catalog/product_attribute" area="admin" module="Catalog"> - <section name="AdminProductAttributeGridSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeSetEditPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeSetEditPage.xml deleted file mode 100644 index 42a5be5e31334..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeSetEditPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminProductAttributeSetEditPage" url="catalog/product_set/edit/id" area="admin" module="Catalog"> - <section name="AdminProductAttributeSetEditSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeSetGridPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeSetGridPage.xml deleted file mode 100644 index 574b5891dc2ef..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributeSetGridPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminProductAttributeSetGridPage" url="catalog/product_set/" area="admin" module="ProductAttributeSet"> - <section name="AdminProductAttributeSetGridSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributesEditPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributesEditPage.xml deleted file mode 100644 index e9a40a7541a98..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductAttributesEditPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="ProductAttributesEditPage" url="catalog/product_action_attribute/edit/" area="admin" module="Catalog"> - <section name="AdminEditProductAttributesSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductCreatePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductCreatePage.xml deleted file mode 100644 index 305dcb59704f8..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductCreatePage.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true"> - <section name="AdminProductFormSection"/> - <section name="AdminProductFormActionSection"/> - <section name="AdminProductSEOSection"/> - <section name="AdminProductImagesSection"/> - <section name="AdminAddProductsToOptionPanel"/> - <section name="AdminProductMessagesSection"/> - <section name="AdminProductFormRelatedUpSellCrossSellSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductEditPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductEditPage.xml deleted file mode 100644 index a08c3e5fb1fec..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminProductEditPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminProductEditPage" url="catalog/product/edit/id/{{productId}}/" area="admin" module="Magento_Catalog" parameterized="true"> - <!-- This page object only exists for the url. Use the AdminProductCreatePage for selectors. --> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/ProductCatalogPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/ProductCatalogPage.xml deleted file mode 100644 index e56cc122c44cb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/ProductCatalogPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - --> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="ProductCatalogPage" url="/catalog/product/" area="admin" module="Magento_Catalog"> - <section name="ProductCatalogPageSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/StorefrontCategoryPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/StorefrontCategoryPage.xml deleted file mode 100644 index ac699e55f45b2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/StorefrontCategoryPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCategoryPage" url="/{{var1}}.html" area="storefront" module="Catalog" parameterized="true"> - <section name="StorefrontCategoryMainSection"/> - <section name="WYSIWYGToolbarSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/StorefrontProductComparePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/StorefrontProductComparePage.xml deleted file mode 100644 index e110ee7f3bc61..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/StorefrontProductComparePage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontProductComparePage" url="catalog/product_compare/index" module="Magento_Catalog" area="storefront"> - <section name="StorefrontProductCompareMainSection" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/README.md deleted file mode 100644 index 41bb2b0d6042a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Catalog** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminAddProductsToOptionPanelSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminAddProductsToOptionPanelSection.xml deleted file mode 100644 index 42d92966e3d45..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminAddProductsToOptionPanelSection.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminAddProductsToOptionPanel"> - <element name="addSelectedProducts" type="button" selector=".product_form_product_form_bundle-items_modal button.action-primary" timeout="30"/> - <element name="filters" type="button" selector=".product_form_product_form_bundle-items_modal button[data-action='grid-filter-expand']" timeout="30"/> - <element name="applyFilters" type="button" selector=".product_form_product_form_bundle-items_modal [data-action='grid-filter-apply']" timeout="30"/> - <element name="nameFilter" type="input" selector=".product_form_product_form_bundle-items_modal input[name='name']"/> - <element name="firstCheckbox" type="input" selector="tr[data-repeat-index='0'] .admin__control-checkbox"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryMessagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryMessagesSection.xml deleted file mode 100644 index e78a7f06927d8..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryMessagesSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminCategoryMessagesSection"> - <element name="SuccessMessage" type="text" selector=".message-success"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryProductsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryProductsSection.xml deleted file mode 100644 index 8d2bf3f572a0e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryProductsSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminCategoryProductsSection"> - <element name="sectionHeader" type="button" selector="div[data-index='assign_products']" timeout="30"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarActionSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarActionSection.xml deleted file mode 100644 index b6d3bee0cc01b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarActionSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminCategorySidebarActionSection"> - <element name="AddRootCategoryButton" type="button" selector="#add_root_category_button" timeout="30"/> - <element name="AddSubcategoryButton" type="button" selector="#add_subcategory_button" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetActionSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetActionSection.xml deleted file mode 100644 index 280c41ae4206e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductAttributeSetActionSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductAttributeSetActionSection"> - <element name="save" type="button" selector="button[title='Save']" timeout="30"/> - <element name="reset" type="button" selector="button[title='Reset']" timeout="30"/> - <element name="back" type="button" selector="button[title='Back']" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductContentSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductContentSection.xml deleted file mode 100644 index 12a00ae8b3777..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductContentSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductContentSection"> - <element name="sectionHeader" type="button" selector="div[data-index='content']" timeout="30"/> - <element name="descriptionTextArea" type="textarea" selector="#product_form_description"/> - <element name="shortDescriptionTextArea" type="textarea" selector="#product_form_short_description"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormActionSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormActionSection.xml deleted file mode 100644 index e55a45d590910..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormActionSection.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductFormActionSection"> - <element name="backButton" type="button" selector="#back" timeout="30"/> - <element name="saveButton" type="button" selector="#save-button" timeout="30"/> - <element name="saveArrow" type="button" selector="button[data-ui-id='save-button-dropdown']" timeout="30"/> - <!--<element name="saveAndClose" type="button" selector="span[title='Save & Close']" timeout="30"/>--> - <element name="saveAndClose" type="button" selector="span[id='save_and_close']" timeout="30"/> - <element name="changeStoreButton" type="button" selector="#store-change-button" timeout="10"/> - <element name="selectStoreView" type="button" selector="//ul[@data-role='stores-list']/li/a[normalize-space(.)='{{var1}}']" timeout="10" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormChangeStoreSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormChangeStoreSection.xml deleted file mode 100644 index 15654534efd3e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormChangeStoreSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductFormChangeStoreSection"> - <element name="storeSelector" type="button" selector="//a[contains(text(),'{{var1}}')]" parameterized="true"/> - <element name="acceptButton" type="button" selector="button[class='action-primary action-accept']" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridActionSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridActionSection.xml deleted file mode 100644 index e43791470ead0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridActionSection.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductGridActionSection"> - <element name="addProductToggle" type="button" selector=".action-toggle.primary.add"/> - <element name="addSimpleProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-simple']" timeout="30"/> - <element name="addGroupedProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-grouped']" timeout="30"/> - <element name="addVirtualProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-virtual']" timeout="30"/> - <element name="addBundleProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-bundle']" timeout="30"/> - <element name="addDownloadableProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-downloadable']" timeout="30"/> - <element name="addTypeProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-{{type}}']" parameterized="true"/> - <element name="productName" type="text" selector="//div[text()='{{var1}}']" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridTableHeaderSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridTableHeaderSection.xml deleted file mode 100644 index 7b9fe410f7c94..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductGridTableHeaderSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductGridTableHeaderSection"> - <element name="id" type="button" selector=".//*[@class='sticky-header']/following-sibling::*//th[@class='data-grid-th _sortable _draggable _{{order}}']/span[text()='ID']" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductImagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductImagesSection.xml deleted file mode 100644 index 2133781df0575..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductImagesSection.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductImagesSection"> - <element name="productImagesToggle" type="button" selector="div[data-index=gallery] .admin__collapsible-title"/> - <element name="imageFileUpload" type="input" selector="#fileupload"/> - <element name="imageUploadButton" type="button" selector="div.image div.fileinput-button"/> - <element name="imageFile" type="text" selector="//*[@id='media_gallery_content']//img[contains(@src, '{{url}}')]" parameterized="true"/> - <element name="removeImageButton" type="button" selector=".action-remove"/> - <element name="modalOkBtn" type="button" selector="button.action-primary.action-accept"/> - <element name="uploadProgressBar" type="text" selector=".uploader .file-row"/> - - <element name="nthProductImage" type="button" selector="#media_gallery_content > div:nth-child({{var}}) img.product-image" parameterized="true"/> - <element name="nthRemoveImageBtn" type="button" selector="#media_gallery_content > div:nth-child({{var}}) button.action-remove" parameterized="true"/> - - <element name="altText" type="textarea" selector="textarea[data-role='image-description']"/> - - <element name="roleBase" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Base']"/> - <element name="roleSmall" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Small']"/> - <element name="roleThumbnail" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Thumbnail']"/> - <element name="roleSwatch" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Swatch']"/> - - <element name="isBaseSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Base']"/> - <element name="isSmallSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Small']"/> - <element name="isThumbnailSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Thumbnail']"/> - <element name="isSwatchSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Swatch']"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductMessagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductMessagesSection.xml deleted file mode 100644 index f88f8c72c64e1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductMessagesSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductMessagesSection"> - <element name="successMessage" type="text" selector=".message-success"/> - <element name="errorMessage" type="text" selector=".message.message-error.error"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductModalSlideGridSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductModalSlideGridSection.xml deleted file mode 100644 index 746b95f4201ec..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductModalSlideGridSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductModalSlideGridSection"> - <element name="productGridXRowYColumnButton" type="input" selector=".modal-slide table.data-grid tr.data-row:nth-child({{row}}) td:nth-child({{column}})" parameterized="true" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductSEOSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductSEOSection.xml deleted file mode 100644 index 4b419c9d85a2c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductSEOSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductSEOSection"> - <element name="sectionHeader" type="button" selector="div[data-index='search-engine-optimization']" timeout="30"/> - <element name="urlKeyInput" type="input" selector="input[name='product[url_key]']"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategoryFilterSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategoryFilterSection.xml deleted file mode 100644 index 8f612e4d99e45..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategoryFilterSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontCategoryFilterSection"> - <element name="CategoryFilter" type="button" selector="//main//div[@class='filter-options']//div[contains(text(), 'Category')]"/> - <element name="CategoryByName" type="button" selector="//main//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{var1}}')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategoryProductSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategoryProductSection.xml deleted file mode 100644 index aaec0600f8bf7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontCategoryProductSection.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontCategoryProductSection"> - <element name="ProductTitleByNumber" type="button" selector="//main//li[{{var1}}]//a[@class='product-item-link']" parameterized="true"/> - <element name="ProductPriceByNumber" type="text" selector="//main//li[{{var1}}]//span[@class='price']" parameterized="true"/> - <element name="ProductInfoByNumber" type="text" selector="//main//li[{{var1}}]//div[@class='product-item-info']" parameterized="true"/> - <element name="ProductAddToCompareByNumber" type="text" selector="//main//li[{{var1}}]//a[contains(@class, 'tocompare')]" parameterized="true"/> - - <element name="ProductTitleByName" type="button" selector="//main//li//a[contains(text(), '{{var1}}')]" parameterized="true"/> - <element name="ProductPriceByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/> - <element name="ProductImageByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[@class='product-image-photo']" parameterized="true"/> - <element name="ProductImageBySrc" type="text" selector=".products-grid img[src*='{{pattern}}']" parameterized="true"/> - <element name="ProductInfoByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//div[@class='product-item-info']" parameterized="true"/> - <element name="ProductAddToCompareByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocompare')]" parameterized="true"/> - <element name="ProductImageByNameAndSrc" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[contains(@src, '{{src}}')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontFooterSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontFooterSection.xml deleted file mode 100644 index 6cd64712aa70c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontFooterSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontFooterSection"> - <element name="switchStoreButton" type="button" selector="#switcher-store-trigger"/> - <element name="storeLink" type="button" selector="//ul[@class='dropdown switcher-dropdown']//a[contains(text(),'{{var1}}')]" parameterized="true" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontHeaderSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontHeaderSection.xml deleted file mode 100644 index dbca5f06a1413..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontHeaderSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontHeaderSection"> - <element name="NavigationCategoryByName" type="button" selector="//nav//a[span[contains(., '{{var1}}')]]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontMessagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontMessagesSection.xml deleted file mode 100644 index 5f3851ad9b20d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontMessagesSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontMessagesSection"> - <element name="success" type="text" selector="div.message-success.success.message"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductActionSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductActionSection.xml deleted file mode 100644 index c2360efc05fa4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductActionSection.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductActionSection"> - <element name="quantity" type="input" selector="#qty"/> - <element name="addToCart" type="button" selector="#product-addtocart-button"/> - <element name="addToCartButtonTitleIsAdding" type="text" selector="//button/span[text()='Adding...']"/> - <element name="addToCartButtonTitleIsAdded" type="text" selector="//button/span[text()='Added']"/> - <element name="addToCartButtonTitleIsAddToCart" type="text" selector="//button/span[text()='Add to Cart']"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductCompareMainSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductCompareMainSection.xml deleted file mode 100644 index cd7e7637b2766..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductCompareMainSection.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductCompareMainSection"> - <element name="PageName" type="text" selector="//*[@id='maincontent']//h1//span"/> - <element name="ProductLinkByName" type="button" selector="//*[@id='product-comparison']//tr//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]" parameterized="true"/> - <element name="ProductPriceByName" type="text" selector="//*[@id='product-comparison']//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/> - <element name="ProductImageByName" type="text" selector="//*[@id='product-comparison']//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]]//img[@class='product-image-photo']" parameterized="true"/> - <element name="ProductAttributeByCodeAndProductName" type="text" selector="//*[@id='product-comparison']//tr[.//th[./span[contains(text(), '{{var1}}')]]]//td[count(//*[@id='product-comparison']//tr//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var2}}')]]/preceding-sibling::td)+1]/div" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoDetailsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoDetailsSection.xml deleted file mode 100644 index b66590871c011..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoDetailsSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductInfoDetailsSection"> - <element name="productNameForReview" type="text" selector=".legend.review-legend>strong" /> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoMainSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoMainSection.xml deleted file mode 100644 index a981f125c5e90..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoMainSection.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductInfoMainSection"> - <element name="stock" type="input" selector=".stock.available"/> - <element name="productName" type="text" selector=".base"/> - <element name="productSku" type="text" selector=".product.attribute.sku>.value"/> - <element name="productPriceLabel" type="text" selector=".price-label"/> - <element name="productPrice" type="text" selector="div.price-box.price-final_price"/> - <element name="specialPrice" type="text" selector=".special-price"/> - <element name="oldPrice" type="text" selector=".old-price"/> - <element name="productStockStatus" type="text" selector=".stock[title=Availability]>span"/> - <element name="productImage" type="text" selector="//*[@id='maincontent']//div[@class='gallery-placeholder']//img[@class='fotorama__img']"/> - <element name="productImageSrc" type="text" selector="//*[@id='maincontent']//div[@class='gallery-placeholder']//img[contains(@src, '{{src}}')]" parameterized="true"/> - <element name="productDescription" type="text" selector="#description .value"/> - <element name="productOptionFieldInput" type="input" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//input[@type='text']" parameterized="true"/> - <element name="productOptionAreaInput" type="textarea" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//textarea" parameterized="true"/> - <element name="productOptionFile" type="file" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'OptionFile')]/../div[@class='control']//input[@type='file']" parameterized="true"/> - <element name="productOptionSelect" type="select" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//select" parameterized="true"/> - - - <!-- The parameter is the nth custom option that you want to get --> - <element name="nthCustomOption" type="block" selector="//*[@id='product-options-wrapper']/*[@class='fieldset']/*[contains(@class, 'field')][{{customOptionNum}}]" parameterized="true" /> - <!-- The 1st parameter is the nth custom option, the 2nd parameter is the nth value in the option --> - <element name="nthCustomOptionInput" type="radio" selector="//*[@id='product-options-wrapper']/*[@class='fieldset']/*[contains(@class, 'field')][{{customOptionNum}}]//*[contains(@class, 'admin__field-option')][{{customOptionValueNum}}]//input" parameterized="true" /> - <element name="productOptionRadioButtonsCheckbox" type="checkbox" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//input[@price='{{var2}}']" parameterized="true"/> - - <element name="productOptionDataMonth" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='month']" parameterized="true"/> - <element name="productOptionDataDay" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='day']" parameterized="true"/> - <element name="productOptionDataYear" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='year']" parameterized="true"/> - <element name="productOptionDateAndTimeMonth" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='month']" parameterized="true"/> - <element name="productOptionDateAndTimeDay" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='day']" parameterized="true"/> - <element name="productOptionDateAndTimeYear" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='year']" parameterized="true"/> - <element name="productOptionDateAndTimeHour" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='hour']" parameterized="true"/> - <element name="productOptionDateAndTimeMinute" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='minute']" parameterized="true"/> - <element name="productOptionTimeHour" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='hour']" parameterized="true"/> - <element name="productOptionTimeMinute" type="date" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//legend[contains(.,'{{var1}}')]/../div[@class='control']//select[@data-calendar-role='minute']" parameterized="true"/> - - <!-- Only one of Upload/Url Inputs are available for File and Sample depending on the value of the corresponding TypeSelector --> - <element name="addLinkFileUploadFile" type="file" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//input[@type='file']" parameterized="true" /> - - <element name="productShortDescription" type="text" selector="//div[@class='product attribute overview']//div[@class='value']"/> - <element name="productAttributeTitle1" type="text" selector="#product-options-wrapper div[tabindex='0'] label"/> - <element name="productAttributeOptions1" type="select" selector="#product-options-wrapper div[tabindex='0'] option"/> - <element name="productAttributeOptionsPrice" type="text" selector="//label[contains(.,'{{var1}}')]//span[@data-price-amount='{{var2}}']" parameterized="true"/> - <element name="productAttributeOptionsDropDown" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[@price='{{var2}}']" parameterized="true"/> - <element name="productAttributeOptionsRadioButtons" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//span[@data-price-amount='{{var2}}']" parameterized="true"/> - <element name="productAttributeOptionsCheckbox" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//span[@data-price-amount='{{var2}}']" parameterized="true"/> - <element name="productAttributeOptionsMultiselect" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[@price='{{var2}}']" parameterized="true"/> - <element name="productAttributeOptionsData" type="text" selector="//span[contains(.,'{{var1}}')]/../span[@class='price-notice']//span[@data-price-amount='{{var2}}']" parameterized="true"/> - <element name="mediaDescription" type="text" selector=".product.attribute.description>div>p>img"/> - <element name="mediaShortDescription" type="text" selector=".product.attribute.overview>div>p>img"/> - <element name="productAddToCompare" type="button" selector="a.action.tocompare"/> - <element name="productOptionDropDownTitle" type="text" selector="//label[contains(.,'{{var1}}')]" parameterized="true"/> - <element name="productOptionDropDownOptionTitle" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[contains(.,'{{var2}}')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductMediaSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductMediaSection.xml deleted file mode 100644 index 89b9a344e7d12..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductMediaSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductMediaSection"> - <element name="imageFile" type="text" selector="//*[@class='product media']//img[contains(@src, '{{filename}}')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductPageSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductPageSection.xml deleted file mode 100644 index a3703839601fd..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductPageSection.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductPageSection"> - <element name="qtyInput" type="button" selector="input.input-text.qty"/> - <element name="addToCartBtn" type="button" selector="button.action.tocart.primary"/> - <element name="successMsg" type="button" selector="div.message-success"/> - <element name="addToWishlist" type="button" selector="//a[@class='action towishlist']" timeout="30"/> - <element name="customTextOptionInput" type="input" selector=".input-text.product-custom-option"/> - <element name="charCounter" type="text" selector=".character-counter"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdvanceCatalogSearchSimpleProductTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdvanceCatalogSearchSimpleProductTest.xml deleted file mode 100644 index a302fa58ec241..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdvanceCatalogSearchSimpleProductTest.xml +++ /dev/null @@ -1,105 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="AdvanceCatalogSearchSimpleProductByNameTest"> - <annotations> - <features value="Catalog"/> - <stories value="Advanced Catalog Product Search for all product types"/> - <title value="Guest customer should be able to advance search simple product with product name"/> - <description value="Guest customer should be able to advance search simple product with product name"/> - <severity value="MAJOR"/> - <testCaseId value="MC-132"/> - <group value="Catalog"/> - </annotations> - <before> - <createData entity="ApiProductWithDescription" stepKey="product"/> - </before> - <after> - <deleteData createDataKey="product" stepKey="delete"/> - </after> - </test> - <test name="AdvanceCatalogSearchSimpleProductBySkuTest"> - <annotations> - <features value="Catalog"/> - <stories value="Advanced Catalog Product Search for all product types"/> - <title value="Guest customer should be able to advance search simple product with product sku"/> - <description value="Guest customer should be able to advance search simple product with product sku"/> - <severity value="MAJOR"/> - <testCaseId value="MC-133"/> - <group value="Catalog"/> - </annotations> - <before> - <createData entity="ApiProductWithDescription" stepKey="product"/> - </before> - <after> - <deleteData createDataKey="product" stepKey="delete"/> - </after> - </test> - <test name="AdvanceCatalogSearchSimpleProductByDescriptionTest"> - <annotations> - <features value="Catalog"/> - <stories value="Advanced Catalog Product Search for all product types"/> - <title value="Guest customer should be able to advance search simple product with product description"/> - <description value="Guest customer should be able to advance search simple product with product description"/> - <severity value="MAJOR"/> - <testCaseId value="MC-134"/> - <group value="Catalog"/> - </annotations> - <before> - <createData entity="ApiProductWithDescription" stepKey="product"/> - </before> - <after> - <deleteData createDataKey="product" stepKey="delete"/> - </after> - </test> - <test name="AdvanceCatalogSearchSimpleProductByShortDescriptionTest"> - <annotations> - <features value="Catalog"/> - <stories value="Advanced Catalog Product Search for all product types"/> - <title value="Guest customer should be able to advance search simple product with product short description"/> - <description value="Guest customer should be able to advance search simple product with product short description"/> - <severity value="MAJOR"/> - <testCaseId value="MC-135"/> - <group value="Catalog"/> - </annotations> - <before> - <createData entity="ApiProductWithDescription" stepKey="product"/> - </before> - <after> - <deleteData createDataKey="product" stepKey="delete"/> - </after> - </test> - <test name="AdvanceCatalogSearchSimpleProductByPriceTest"> - <annotations> - <features value="Catalog"/> - <stories value="Advanced Catalog Product Search for all product types"/> - <title value="Guest customer should be able to advance search simple product with product price"/> - <description value="Guest customer should be able to advance search simple product with product price"/> - <severity value="MAJOR"/> - <testCaseId value="MC-136"/> - <group value="Catalog"/> - </annotations> - <before> - <createData entity="ApiProductWithDescription" stepKey="product"/> - <getData entity="GetProduct" stepKey="arg1"> - <requiredEntity createDataKey="product"/> - </getData> - <getData entity="GetProduct" stepKey="arg2"> - <requiredEntity createDataKey="product"/> - </getData> - <getData entity="GetProduct" stepKey="arg3"> - <requiredEntity createDataKey="product"/> - </getData> - </before> - <after> - <deleteData createDataKey="product" stepKey="delete"/> - </after> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CAdminTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CAdminTest.xml deleted file mode 100644 index 0f466ccc3d994..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CAdminTest.xml +++ /dev/null @@ -1,233 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CAdminTest"> - <annotations> - <features value="End to End scenarios"/> - <stories value="B2C admin - MAGETWO-75412"/> - <group value="e2e"/> - <title value="Pass End to End B2C Admin scenario"/> - <description value="Admin creates products, creates and manages categories, creates promotions, creates an order, processes an order, processes a return, uses admin grids"/> - <severity value="CRITICAL"/> - <testCaseId value="MAGETWO-87014"/> - <!-- Skipped, see: https://jira.corp.magento.com/browse/MQE-891 --> - <group value="skip"/> - </annotations> - <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> - </after> - - <!--Login to Admin Area--> - <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/> - - <!--Admin creates product--> - <!--Create Simple Product--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageSimple"/> - <waitForPageLoad time="30" stepKey="waitForProductPageLoadSimple"/> - <actionGroup ref="resetProductGridToDefaultView" stepKey="resetProductGridColumnsInitial"/> - <actionGroup ref="goToCreateProductPage" stepKey="goToCreateSimpleProduct"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <actionGroup ref="checkRequiredFieldsInProductForm" stepKey="checkRequiredFieldsProductSimple"/> - <actionGroup ref="fillMainProductForm" stepKey="fillSimpleProductMain"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <actionGroup ref="addProductImage" stepKey="addImageForProductSimple"> - <argument name="image" value="ProductImage"/> - </actionGroup> - <actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/> - <click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackToGridSimple"/> - <actionGroup ref="filterProductGridBySku" stepKey="filterProductGridSimple"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <grabAttributeFrom selector="{{AdminProductGridSection.productThumbnail('1')}}" userInput="src" stepKey="getSimpleProductThumbnail"/> - <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$getSimpleProductThumbnail" stepKey="simpleThumbnailIsNotDefault"/> - <actionGroup ref="viewProductInAdminGrid" stepKey="seeSimpleProductInGrid"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - - <!--Create Virtual Product--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageVirtual"/> - <waitForPageLoad time="30" stepKey="waitForProductPageLoadVirtual"/> - <actionGroup ref="goToCreateProductPage" stepKey="goToCreateVirtualProduct"> - <argument name="product" value="VirtualProduct"/> - </actionGroup> - <fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{VirtualProduct.sku}}" stepKey="fillVirtualName"/> - <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{VirtualProduct.name}}" stepKey="fillVirtualSku"/> - <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{VirtualProduct.price}}" stepKey="fillVirtualPrice"/> - <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{VirtualProduct.quantity}}" stepKey="fillVirtualQty"/> - <actionGroup ref="saveProductForm" stepKey="saveVirtualProduct"/> - <actionGroup ref="viewProductInAdminGrid" stepKey="viewVirtualProductInGrid"> - <argument name="product" value="VirtualProduct"/> - </actionGroup> - - <!--Admin uses product grid--> - <!--Start with default view--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageGrid"/> - <waitForPageLoad stepKey="waitForProductGridPageLoad"/> - - <!--Search by keyword--> - <actionGroup ref="resetProductGridToDefaultView" stepKey="resetGridToDefaultKeywordSearch"/> - <actionGroup ref="searchProductGridByKeyword" stepKey="useKeywordSearchSimpleProduct"> - <argument name="keyword" value="SimpleProduct.name"/> - </actionGroup> - <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" userInput="1" stepKey="seeOnlyOneProductInGrid"/> - <see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="{{SimpleProduct.name}}" stepKey="seeOnlySimpleProductInGrid"/> - - <!--Paging works--> - <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultPagination"/> - <comment userInput="Admin uses paging on product grid" stepKey="usePagingProductGridComment"/> - <click selector="{{AdminProductGridPaginationSection.perPageDropdown}}" stepKey="clickProductPerPageDropdown"/> - <click selector="{{AdminProductGridPaginationSection.perPageOption('50')}}" stepKey="selectProductsPerPage"/> - <waitForLoadingMaskToDisappear stepKey="waitForProductGridLoad50PerPage"/> - <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" parameterArray="[5,50]" stepKey="see50ProductsInGrid"/> - <click selector="{{AdminProductGridPaginationSection.perPageDropdown}}" stepKey="clickProductPerPageDropdownCustom"/> - <click selector="{{AdminProductGridPaginationSection.perPageOption('Custom')}}" stepKey="selectCustomPerPage"/> - <fillField selector="{{AdminProductGridPaginationSection.perPageInput}}" userInput="5" stepKey="fillCustomPerPage"/> - <click selector="{{AdminProductGridPaginationSection.perPageApplyInput}}" stepKey="applyCustomPerPage"/> - <waitForPageLoad stepKey="waitForPageRefreshCustomPerPage"/> - <seeInField selector="{{AdminProductGridPaginationSection.currentPage}}" userInput="1" stepKey="seeOnFirstProductPage"/> - <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" userInput="5" stepKey="seeProductsOnFirstPage"/> - <click selector="{{AdminProductGridPaginationSection.nextPage}}" stepKey="clickNextProductPage"/> - <seeInField selector="{{AdminProductGridPaginationSection.currentPage}}" userInput="2" stepKey="seeOnSecondProductPage"/> - <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" parameterArray="[1,5]" stepKey="seeProductsOnSecondPage"/> - - <!--Filtering works (by Name, By Price, by Status)--> - <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultFiltering"/> - <actionGroup ref="filterProductGridBySku" stepKey="filterProductGridByGroupedSku"> - <argument name="product" value="GroupedProduct"/> - </actionGroup> - <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" userInput="1" stepKey="seeOneMatchingSkuInProductGrid"/> - <see selector="{{AdminProductGridSection.productGridCell('1','SKU')}}" userInput="{{GroupedProduct.sku}}" stepKey="seeProductInFilteredGridSku"/> - <!--Filter by price--> - <actionGroup ref="filterProductGridByPriceRange" stepKey="filterProductGridByPrice"> - <argument name="filter" value="PriceFilterRange"/> - </actionGroup> - <click selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="clickPriceHeaderToSortAscForFilter"/> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'Price')}}" stepKey="getMinimumPriceInGrid"/> - <click selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="clickPriceHeaderToSortDescForFilter"/> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'Price')}}" stepKey="getMaximumPriceInGrid"/> - <assertRegExp expected="'/\$[0-9]{2}\.[0-9]{2}/'" actual="$getMinimumPriceInGrid" stepKey="assertMinimumPriceIsCorrect"/> - <assertRegExp expected="'/\$[0-9]{2}\.[0-9]{2}/'" actual="$getMaximumPriceInGrid" stepKey="assertMaximumPriceIsCorrect"/> - <assertLessThan expected="$getMaximumPriceInGrid" actual="$getMinimumPriceInGrid" stepKey="checkPriceSortCorrect"/> - <!--Filter by status--> - <actionGroup ref="filterProductGridByEnabledStatus" stepKey="filterGridByEnabledProducts"/> - <seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" parameterArray="[1,20]" stepKey="seeEnabledProductsNotEmpty"/> - <see selector="{{AdminProductGridSection.column('Status')}}" userInput="Enabled" stepKey="seeOnlyEnabledProducts"/> - <actionGroup ref="filterProductGridByDisabledStatus" stepKey="filterGridByDisabledProducts"/> - <dontSee selector="{{AdminProductGridSection.column('Status')}}" userInput="Enabled" stepKey="dontSeeEnabledProducts"/> - - <!--Sorting works (By Price, by ID)--> - <!--By Price--> - <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultSortingPrice"/> - <!--Filter by price so grid contains prices that we can compare correctly--> - <actionGroup ref="filterProductGridByPriceRange" stepKey="filterProductGridByPriceForCompare"> - <argument name="filter" value="PriceFilterRange"/> - </actionGroup> - <!--Sort Ascending--> - <click selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="clickPriceHeaderToSortAsc"/> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'Price')}}" stepKey="getFirstPriceSortAsc"/> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('2', 'Price')}}" stepKey="getSecondPriceSortAsc"/> - <assertLessThanOrEqual expected="$getSecondPriceSortAsc" actual="$getFirstPriceSortAsc" stepKey="checkPriceAscSortCorrect"/> - <!--Sort Descending--> - <click selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="clickPriceHeaderToSortDesc"/> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'Price')}}" stepKey="getFirstPriceSortDesc"/> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('2', 'Price')}}" stepKey="getSecondPriceSortDesc"/> - <assertGreaterThanOrEqual expected="$getSecondPriceSortDesc" actual="$getFirstPriceSortDesc" stepKey="checkPriceDescSortCorrect"/> - <!--By Product ID--> - <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultSortingId"/> - <!--Sort Ascending--> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'ID')}}" stepKey="getFirstProductIdSortAsc"/> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('2', 'ID')}}" stepKey="getSecondProductIdSortAsc"/> - <assertLessThan expected="$getSecondProductIdSortAsc" actual="$getFirstProductIdSortAsc" stepKey="checkProductIdAscSortCorrect"/> - <!--Sort Descending--> - <click selector="{{AdminProductGridSection.columnHeader('ID')}}" stepKey="clickIdHeaderToSortDesc"/> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'ID')}}" stepKey="getFirstProductIdSortDesc"/> - <grabTextFrom selector="{{AdminProductGridSection.productGridCell('2', 'ID')}}" stepKey="getSecondProductIdSortDesc"/> - <assertGreaterThan expected="$getSecondProductIdSortDesc" actual="$getFirstProductIdSortDesc" stepKey="checkProductIdDescSortCorrect"/> - - <!--Adding column works--> - <actionGroup ref="resetProductGridToDefaultView" stepKey="setProductGridToDefaultColumns"/> - <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdownToReset"/> - <click selector="{{AdminProductGridFilterSection.resetGridColumns}}" stepKey="resetProductGridColumns"/> - <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsDropdownAfterReset"/> - <!--Remove Price column--> - <seeElement selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="seeProductPriceColumn"/> - <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdown"/> - <uncheckOption selector="{{AdminProductGridFilterSection.viewColumnOption('Price')}}" stepKey="hidePriceColumn"/> - <dontSeeElement selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="dontSeeProductPriceColumn"/> - <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsDropdown"/> - <!--Add Weight column--> - <dontSeeElement selector="{{AdminProductGridSection.columnHeader('Weight')}}" stepKey="dontSeeWeightColumn"/> - <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdownWeight"/> - <checkOption selector="{{AdminProductGridFilterSection.viewColumnOption('Weight')}}" stepKey="showWeightColumn"/> - <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsDropdownWeight"/> - <seeElement selector="{{AdminProductGridSection.columnHeader('Weight')}}" stepKey="seeWeightColumn"/> - <actionGroup ref="filterProductGridBySku" stepKey="filterProductGridToCheckWeightColumn"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <see selector="{{AdminProductGridSection.productGridCell('1','Weight')}}" userInput="{{SimpleProduct.weight}}" stepKey="seeCorrectProductWeightInGrid"/> - <!--END Admin uses product grid--> - - <!--Admin creates category--> - <comment userInput="Admin creates category." stepKey="adminCreatesCategoryComment" before="navigateToCategoryPage"/> - <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/> - <waitForPageLoad time="30" stepKey="waitForCategoryPageLoad"/> - <!--Create category under Default Category--> - <click selector="{{AdminCategorySidebarTreeSection.categoryTreeRoot}}" stepKey="clickDefaultCategory"/> - <actionGroup ref="CheckCategoryNameIsRequiredField" stepKey="checkCategoryNameIsRequired"/> - <actionGroup ref="CreateCategory" stepKey="createCategory"> - <argument name="categoryEntity" value="_defaultCategory"/> - </actionGroup> - <!--Create category under newly created category--> - <click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="clickCreatedCategoryInTree"/> - <actionGroup ref="CreateCategory" stepKey="createSubCategory"> - <argument name="categoryEntity" value="SimpleSubCategory"/> - </actionGroup> - - <!--Admin moves category--> - <comment userInput="Admin moves category." stepKey="adminMovesCategoryComment" before="onCategoryPageToMoveCategory"/> - <amOnPage url="{{AdminCategoryPage.url}}" stepKey="onCategoryPageToMoveCategory"/> - <waitForPageLoad time="30" stepKey="waitForPageLoadMoveCategory"/> - <click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="expandTree"/> - <dragAndDrop selector1="{{AdminCategorySidebarTreeSection.categoryInTree(SimpleSubCategory.name)}}" - selector2="{{AdminCategorySidebarTreeSection.categoryTreeRoot}}" - stepKey="dragAndDropCategory"/> - <waitForPageLoad time="30" stepKey="waitForMoveConfirmation"/> - <see selector="{{AdminCategoryModalSection.title}}" userInput="Warning Message" stepKey="seeMoveConfirmationModal"/> - <click selector="{{AdminCategoryModalSection.ok}}" stepKey="clickOkConfirmMove"/> - <waitForPageLoad time="30" stepKey="waitForMove"/> - <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You moved the category." stepKey="seeCategoryMoveSuccessMessage"/> - <seeElement selector="{{AdminCategorySidebarTreeSection.categoryInTreeUnderRoot(SimpleSubCategory.name)}}" stepKey="seeSubcategoryIsUnderDefault"/> - - <!--Admin deletes category--> - <comment userInput="Admin deletes category" stepKey="deleteCategoryComment"/> - <amOnPage url="{{AdminCategoryPage.url}}" stepKey="onCategoryPageToDeleteCategory"/> - <waitForPageLoad time="30" stepKey="waitForCategoryPageDelete"/> - <actionGroup ref="DeleteCategory" stepKey="deleteCategory"> - <argument name="categoryEntity" value="_defaultCategory"/> - </actionGroup> - - <!--@TODO Move cleanup to "after" when MQE-830 is resolved--> - <!--Clean up categories--> - <comment userInput="Clean up categories" stepKey="cleanupCategoriesComment"/> - <actionGroup ref="DeleteCategory" stepKey="cleanSimpleSubCategory"> - <argument name="categoryEntity" value="SimpleSubCategory"/> - </actionGroup> - <!--Clean up products--> - <comment userInput="Clean up simple product" stepKey="cleanUpSimpleProduct"/> - <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteSimpleProduct"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <comment userInput="Clean up virtual product" stepKey="cleanUpVirtualProduct"/> - <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteVirtualProduct"> - <argument name="product" value="VirtualProduct"/> - </actionGroup> - </test> -</tests> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CGuestUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CGuestUserTest.xml deleted file mode 100644 index 54782ca8ca530..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CGuestUserTest.xml +++ /dev/null @@ -1,201 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CGuestUserTest"> - <annotations> - <features value="End to End scenarios"/> - <stories value="B2C guest user - MAGETWO-75411"/> - <group value="e2e"/> - <title value="You should be able to pass End to End B2C Guest User scenario"/> - <description value="User browses catalog, searches for product, adds product to cart, adds product to wishlist, compares products, uses coupon code and checks out."/> - <severity value="CRITICAL"/> - <testCaseId value="MAGETWO-87435"/> - </annotations> - <before> - <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> - - <createData entity="ApiCategory" stepKey="createCategory"/> - - <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct1"> - <requiredEntity createDataKey="createCategory"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct1Image"> - <requiredEntity createDataKey="createSimpleProduct1"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createSimpleProduct1Image1"> - <requiredEntity createDataKey="createSimpleProduct1"/> - </createData> - <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct1" createDataKey="createSimpleProduct1"/> - - <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct2"> - <requiredEntity createDataKey="createCategory"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct2Image"> - <requiredEntity createDataKey="createSimpleProduct2"/> - </createData> - <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct2" createDataKey="createSimpleProduct2"/> - </before> - <after> - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createSimpleProduct1Image" stepKey="deleteSimpleProduct1Image"/>--> - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createSimpleProduct1Image1" stepKey="deleteSimpleProduct1Image1"/>--> - <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> - - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createSimpleProduct2Image" stepKey="deleteSimpleProduct2Image"/>--> - <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> - </after> - - <!-- Step 1: User browses catalog --> - <comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog" /> - <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/> - <waitForPageLoad stepKey="homeWaitForPageLoad"/> - <waitForElementVisible selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeWaitForWelcomeMessage"/> - <see userInput="Default welcome msg!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome"/> - - <!-- Open Category --> - <comment userInput="Open category" stepKey="commentOpenCategory" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="browseClickCategory"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategory"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <!-- Check simple product 1 in category --> - <comment userInput="Check simple product 1 in category" stepKey="commentCheckSimpleProductInCategory" /> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct1ImageSrc"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct1ImageSrc" stepKey="browseAssertSimpleProduct1ImageNotDefault"/> - <!-- Check simple product 2 in category --> - <comment userInput="Check simple product 2 in category" stepKey="commentCheckSimpleProduct2InCategory" /> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct2"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct2ImageSrc"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct2ImageSrc" stepKey="browseAssertSimpleProduct2ImageNotDefault"/> - - <!-- View Simple Product 1 --> - <comment userInput="View simple product 1" stepKey="commentViewSimpleProduct1" after="browseAssertSimpleProduct2ImageNotDefault"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="browseClickCategorySimpleProduct1View" after="commentViewSimpleProduct1"/> - <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct1Viewloaded" /> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct1PageImageSrc"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct1PageImageSrc" stepKey="browseAssertSimpleProduct1PageImageNotDefault"/> - - <!-- View Simple Product 2 --> - <comment userInput="View simple product 2" stepKey="commentViewSimpleProduct2" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory1"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" stepKey="browseClickCategorySimpleProduct2View"/> - <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct2ViewLoaded" /> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct2PageImageSrc"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct2PageImageSrc" stepKey="browseAssertSimpleProduct2PageImageNotDefault"/> - <comment userInput="End of browsing catalog" stepKey="endOfBrowsingCatalog" after="browseAssertSimpleProduct2PageImageNotDefault"/> - - <!-- Step 4: User compares products --> - <comment userInput="Start of comparing products" stepKey="startOfComparingProducts" after="endOfBrowsingCatalog"/> - <!-- Add Simple Product 1 to comparison --> - <comment userInput="Add simple product 1 to comparison" stepKey="commentAddSimpleProduct1ToComparison" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory" /> - <waitForLoadingMaskToDisappear stepKey="waitForCategoryloaded" /> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct1"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrc"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrc" stepKey="compareAssertSimpleProduct1ImageNotDefault"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="compareClickSimpleProduct1"/> - <waitForLoadingMaskToDisappear stepKey="waitForCompareSimpleProduct1loaded" /> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="compareGrabSimpleProduct1PageImageSrc"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$compareGrabSimpleProduct1PageImageSrc" stepKey="compareAssertSimpleProduct2PageImageNotDefault"/> - <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="compareAddSimpleProduct1ToCompare"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - - <!-- Add Simple Product 2 to comparison --> - <comment userInput="Add simple product 2 to comparison" stepKey="commentAddSimpleProduct2ToComparison" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory1"/> - <waitForLoadingMaskToDisappear stepKey="waitForCompareCategory1loaded" /> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct2"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrc"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrc" stepKey="compareAssertSimpleProduct2ImageNotDefault"/> - <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddSimpleProduct2ToCompare"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - - <!-- Check products in comparison sidebar --> - <!-- Check simple product 1 in comparison sidebar --> - <comment userInput="Check simple product 1 in comparison sidebar" stepKey="commentCheckSimpleProduct1InComparisonSidebar" after="compareAddSimpleProduct2ToCompare"/> - <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct1InSidebar" after="commentCheckSimpleProduct1InComparisonSidebar"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- Check simple product 2 in comparison sidebar --> - <comment userInput="Check simple product 2 in comparison sidebar" stepKey="commentCheckSimpleProduct2InComparisonSidebar" /> - <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct2InSidebar"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - - <!-- Check products on comparison page --> - <!-- Check simple product 1 on comparison page --> - <comment userInput="Check simple product 1 on comparison page" stepKey="commentCheckSimpleProduct1OnComparisonPage" after="compareSimpleProduct2InSidebar"/> - <actionGroup ref="StorefrontOpenAndCheckComparisionActionGroup" stepKey="compareOpenComparePage" after="commentCheckSimpleProduct1OnComparisonPage"/> - <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct1InComparison"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrcInComparison"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrcInComparison" stepKey="compareAssertSimpleProduct1ImageNotDefaultInComparison"/> - <!-- Check simple product2 on comparison page --> - <comment userInput="Check simple product 2 on comparison page" stepKey="commentCheckSimpleProduct2OnComparisonPage" /> - <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct2InComparison"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrcInComparison"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrcInComparison" stepKey="compareAssertSimpleProduct2ImageNotDefaultInComparison"/> - - <!-- Clear comparison sidebar --> - <comment userInput="Clear comparison sidebar" stepKey="commentClearComparisonSidebar" after="compareAssertSimpleProduct2ImageNotDefaultInComparison"/> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategoryBeforeClear" after="commentClearComparisonSidebar"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory2"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontClearCompareActionGroup" stepKey="compareClearCompare"/> - <comment userInput="End of Comparing Products" stepKey="endOfComparingProducts" /> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CLoggedInUserTest.xml deleted file mode 100644 index 9bd00ea3aef32..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CLoggedInUserTest.xml +++ /dev/null @@ -1,188 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CLoggedInUserTest"> - <before> - <createData entity="ApiCategory" stepKey="createCategory"/> - - <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct1"> - <requiredEntity createDataKey="createCategory"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct1Image"> - <requiredEntity createDataKey="createSimpleProduct1"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createSimpleProduct1Image1"> - <requiredEntity createDataKey="createSimpleProduct1"/> - </createData> - <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct1" createDataKey="createSimpleProduct1"/> - - <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct2"> - <requiredEntity createDataKey="createCategory"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct2Image"> - <requiredEntity createDataKey="createSimpleProduct2"/> - </createData> - <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct2" createDataKey="createSimpleProduct2"/> - </before> - <after> - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createSimpleProduct1Image" stepKey="deleteSimpleProduct1Image"/>--> - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createSimpleProduct1Image1" stepKey="deleteSimpleProduct1Image1"/>--> - <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> - - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createSimpleProduct2Image" stepKey="deleteSimpleProduct2Image"/>--> - <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> - </after> - - <!-- Step 1: User browses catalog --> - <comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog" after="endOfSigningUpUserAccount"/> - <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage" after="startOfBrowsingCatalog"/> - <waitForPageLoad stepKey="homeWaitForPageLoad" after="amOnHomePage"/> - <waitForElementVisible selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeWaitForWelcomeMessage" after="homeWaitForPageLoad"/> - <see userInput="Welcome, John Doe!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome" after="homeWaitForWelcomeMessage"/> - - <!-- Open Category --> - <comment userInput="Open category" stepKey="commentOpenCategory" after="homeCheckWelcome"/> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="browseClickCategory" after="commentOpenCategory"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategory" after="browseClickCategory"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <!-- Check simple product 1 in category --> - <comment userInput="Check simple product 1 in category" stepKey="commentCheckSimpleProductInCategory" after="browseAssertCategory"/> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1" after="commentCheckSimpleProductInCategory"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct1ImageSrc" after="browseAssertCategoryProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct1ImageSrc" stepKey="browseAssertSimpleProduct1ImageNotDefault" after="browseGrabSimpleProduct1ImageSrc"/> - <!-- Check simple product 2 in category --> - <comment userInput="Check simple product 2 in category" stepKey="commentCheckSimpleProduct2InCategory" after="browseAssertSimpleProduct1ImageNotDefault"/> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct2" after="commentCheckSimpleProduct2InCategory"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct2ImageSrc" after="browseAssertCategoryProduct2"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct2ImageSrc" stepKey="browseAssertSimpleProduct2ImageNotDefault" after="browseGrabSimpleProduct2ImageSrc"/> - - <!-- View Simple Product 1 --> - <comment userInput="View simple product 1" stepKey="commentViewSimpleProduct1" after="browseAssertSimpleProduct2ImageNotDefault"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="browseClickCategorySimpleProduct1View" after="commentViewSimpleProduct1"/> - <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct1Viewloaded" after="browseClickCategorySimpleProduct1View"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page" after="waitForSimpleProduct1Viewloaded"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct1PageImageSrc" after="browseAssertProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct1PageImageSrc" stepKey="browseAssertSimpleProduct1PageImageNotDefault" after="browseGrabSimpleProduct1PageImageSrc"/> - - <!-- View Simple Product 2 --> - <comment userInput="View simple product 2" stepKey="commentViewSimpleProduct2" after="browseAssertSimpleProduct1PageImageNotDefault"/> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory1" after="commentViewSimpleProduct2"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" stepKey="browseClickCategorySimpleProduct2View" after="clickCategory1"/> - <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct2ViewLoaded" after="browseClickCategorySimpleProduct2View"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page" after="waitForSimpleProduct2ViewLoaded"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct2PageImageSrc" after="browseAssertProduct2Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct2PageImageSrc" stepKey="browseAssertSimpleProduct2PageImageNotDefault" after="browseGrabSimpleProduct2PageImageSrc"/> - <comment userInput="End of browsing catalog" stepKey="endOfBrowsingCatalog" after="browseAssertSimpleProduct2PageImageNotDefault"/> - - <!-- Step 4: User compares products --> - <comment userInput="Start of comparing products" stepKey="startOfComparingProducts" after="endOfBrowsingCatalog"/> - <!-- Add Simple Product 1 to comparison --> - <comment userInput="Add simple product 1 to comparison" stepKey="commentAddSimpleProduct1ToComparison" after="startOfComparingProducts"/> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory" after="commentAddSimpleProduct1ToComparison"/> - <waitForLoadingMaskToDisappear stepKey="waitForCategoryloaded" after="compareClickCategory"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory" after="waitForCategoryloaded"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct1" after="compareAssertCategory"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrc" after="compareAssertSimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrc" stepKey="compareAssertSimpleProduct1ImageNotDefault" after="compareGrabSimpleProduct1ImageSrc"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="compareClickSimpleProduct1" after="compareAssertSimpleProduct1ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForCompareSimpleProduct1loaded" after="compareClickSimpleProduct1"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page" after="waitForCompareSimpleProduct1loaded"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="compareGrabSimpleProduct1PageImageSrc" after="compareAssertProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$compareGrabSimpleProduct1PageImageSrc" stepKey="compareAssertSimpleProduct2PageImageNotDefault" after="compareGrabSimpleProduct1PageImageSrc"/> - <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="compareAddSimpleProduct1ToCompare" after="compareAssertSimpleProduct2PageImageNotDefault"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - - <!-- Add Simple Product 2 to comparison --> - <comment userInput="Add simple product 2 to comparison" stepKey="commentAddSimpleProduct2ToComparison" after="compareAddSimpleProduct1ToCompare"/> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory1" after="commentAddSimpleProduct2ToComparison"/> - <waitForLoadingMaskToDisappear stepKey="waitForCompareCategory1loaded" after="compareClickCategory1"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1" after="waitForCompareCategory1loaded"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct2" after="compareAssertCategory1"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrc" after="compareAssertSimpleProduct2"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrc" stepKey="compareAssertSimpleProduct2ImageNotDefault" after="compareGrabSimpleProduct2ImageSrc"/> - <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddSimpleProduct2ToCompare" after="compareAssertSimpleProduct2ImageNotDefault"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - - <!-- Check products in comparison sidebar --> - <!-- Check simple product 1 in comparison sidebar --> - <comment userInput="Check simple product 1 in comparison sidebar" stepKey="commentCheckSimpleProduct1InComparisonSidebar" after="compareAddSimpleProduct2ToCompare"/> - <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct1InSidebar" after="commentCheckSimpleProduct1InComparisonSidebar"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- Check simple product2 in comparison sidebar --> - <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct2InSidebar" after="compareSimpleProduct1InSidebar"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - - <!-- Check products on comparison page --> - <!-- Check simple product 1 on comparison page --> - <comment userInput="Check simple product 1 on comparison page" stepKey="commentCheckSimpleProduct1OnComparisonPage" after="compareSimpleProduct2InSidebar"/> - <actionGroup ref="StorefrontOpenAndCheckComparisionActionGroup" stepKey="compareOpenComparePage" after="commentCheckSimpleProduct1OnComparisonPage"/> - <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct1InComparison" after="compareOpenComparePage"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrcInComparison" after="compareAssertSimpleProduct1InComparison"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrcInComparison" stepKey="compareAssertSimpleProduct1ImageNotDefaultInComparison" after="compareGrabSimpleProduct1ImageSrcInComparison"/> - <!-- Check simple product2 on comparison page --> - <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct2InComparison" after="compareAssertSimpleProduct1ImageNotDefaultInComparison"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrcInComparison" after="compareAssertSimpleProduct2InComparison"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrcInComparison" stepKey="compareAssertSimpleProduct2ImageNotDefaultInComparison" after="compareGrabSimpleProduct2ImageSrcInComparison"/> - - <!-- Clear comparison sidebar --> - <comment userInput="Clear comparison sidebar" stepKey="commentClearComparisonSidebar" after="compareAssertSimpleProduct2ImageNotDefaultInComparison"/> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategoryBeforeClear" after="commentClearComparisonSidebar"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory2" after="compareClickCategoryBeforeClear"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontClearCompareActionGroup" stepKey="compareClearCompare" after="compareAssertCategory2"/> - <comment userInput="End of Comparing Products" stepKey="endOfComparingProducts" after="compareClearCompare"/> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/composer.json deleted file mode 100644 index c8f2484c9025a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/composer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-catalog", - "description": "Magento 2 Functional Test Module Catalog", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "~2.0.0", - "magento/magento2-functional-test-framework": "100.0.0-dev", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-url-rewrite": "100.0.0-dev", - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-indexer": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-msrp": "100.0.0-dev", - "magento/magento2-functional-test-module-page-cache": "100.0.0-dev", - "magento/magento2-functional-test-module-product-alert": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev", - "magento/magento2-functional-test-module-url-rewrite": "100.0.0-dev", - "magento/magento2-functional-test-module-widget": "100.0.0-dev", - "magento/magento2-functional-test-module-wishlist": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Catalog\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Catalog" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/README.md deleted file mode 100644 index ee39f1deb58d3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_CatalogAnalytics** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/composer.json deleted file mode 100644 index cce1015d0d2e5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogAnalytics/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-catalog-analytics", - "description": "Magento 2 Acceptance Test Module Catalog Analytics", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CatalogAnalytics\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CatalogAnalytics" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/README.md deleted file mode 100644 index 9a514f1c83fd7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_CatalogImportExport** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/composer.json deleted file mode 100644 index b2b0b3965429a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogImportExport/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-catalog-import-export", - "description": "Magento 2 Functional Test Module Catalog Import Export", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-url-rewrite": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CatalogImportExport\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CatalogImportExport" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/Page/InventoryConfigurationPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/Page/InventoryConfigurationPage.xml deleted file mode 100644 index d138aadb144d8..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/Page/InventoryConfigurationPage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="InventoryConfigurationPage" url="admin/system_config/edit/section/cataloginventory/" area="admin" module="Magento_Config"> - <section name="InventorySection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/README.md deleted file mode 100644 index 512a5f319fed4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CatalogInventory** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/composer.json deleted file mode 100644 index 432acba351bc3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogInventory/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-catalog-inventory", - "description": "Magento 2 Functional Test Module Catalog Inventory", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CatalogInventory\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CatalogInventory" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Data/CatalogRuleData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Data/CatalogRuleData.xml deleted file mode 100644 index bf750bc3c9944..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/Data/CatalogRuleData.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="_defaultCatalogRule" type="catalogRule"> - <data key="name" unique="suffix">CatalogPriceRule</data> - <data key="description">Catalog Price Rule Description</data> - <data key="is_active">1</data> - <array key="customer_group_ids"> - <item>0</item> - </array> - <array key="website_ids"> - <item>1</item> - </array> - <data key="simple_action">by_percent</data> - <data key="discount_amount">10</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/README.md deleted file mode 100644 index 5c67ac5b0ba9c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CatalogRule** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/composer.json deleted file mode 100644 index 49b2aeb653fb1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRule/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-catalog-rule", - "description": "Magento 2 Functional Test Module Catalog Rule", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CatalogRule\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CatalogRule" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/README.md deleted file mode 100644 index ed2796d211d25..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CatalogRuleConfigurable** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/composer.json deleted file mode 100644 index 62be67eaed6da..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-catalog-rule-configurable", - "description": "Magento 2 Functional Test Module Catalog Rule Configurable", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-configurable-product": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CatalogRuleConfigurable\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CatalogRuleConfigurable" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Data/ConstData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Data/ConstData.xml deleted file mode 100644 index fd28b0ddc5c6c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Data/ConstData.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> - <entity name="CONST" type="CONST"> - <data key="apiSimpleProduct">Api Simple Product</data> - <data key="nonexistentProductName">NonexistentProductName</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Page/StorefrontCatalogSearchAdvancedFormPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Page/StorefrontCatalogSearchAdvancedFormPage.xml deleted file mode 100644 index 0fa4333ca2088..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Page/StorefrontCatalogSearchAdvancedFormPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCatalogSearchAdvancedFormPage" url="/catalogsearch/advanced/" area="storefront" module="Magento_CatalogSearch"> - <section name="StorefrontCatalogSearchAdvancedFormSection" /> - <section name="StorefrontQuickSearchSection" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Page/StorefrontCatalogSearchAdvancedResultPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Page/StorefrontCatalogSearchAdvancedResultPage.xml deleted file mode 100644 index 4afdbea5f9263..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Page/StorefrontCatalogSearchAdvancedResultPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCatalogSearchAdvancedResultPage" url="/catalogsearch/advanced/result" area="storefront" module="Magento_CatalogSearch"> - <section name="StorefrontCatalogSearchAdvancedResultMainSection" /> - <section name="StorefrontQuickSearchSection" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Page/StorefrontCatalogSearchPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Page/StorefrontCatalogSearchPage.xml deleted file mode 100644 index bbca39348ba26..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Page/StorefrontCatalogSearchPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCatalogSearchPage" url="/catalogsearch/result/" area="storefront" module="Magento_CatalogSearch"> - <section name="StorefrontCatalogSearchMainSection" /> - <section name="StorefrontQuickSearchSection" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/README.md deleted file mode 100644 index 092e7bc142598..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CatalogSearch** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontFooterSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontFooterSection.xml deleted file mode 100644 index 97f4c35537099..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Section/StorefrontFooterSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontFooterSection"> - <element name="AdvancedSearch" type="button" selector="//footer//ul//li//a[text()='Advanced Search']"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/AdvanceCatalogSearchSimpleProductTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/AdvanceCatalogSearchSimpleProductTest.xml deleted file mode 100644 index 11bc308902ca0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/AdvanceCatalogSearchSimpleProductTest.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="AdvanceCatalogSearchSimpleProductByNameTest"> - <annotations> - <features value="CatalogSearch"/> - <group value="CatalogSearch"/> - </annotations> - <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> - <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameActionGroup" stepKey="search"> - <argument name="name" value="$$product.name$$"/> - </actionGroup> - <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> - <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> - <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> - </test> - <test name="AdvanceCatalogSearchSimpleProductBySkuTest"> - <annotations> - <features value="CatalogSearch"/> - <group value="CatalogSearch"/> - </annotations> - <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> - <actionGroup ref="StorefrontAdvancedCatalogSearchByProductSkuActionGroup" stepKey="search"> - <argument name="sku" value="$$product.sku$$"/> - </actionGroup> - <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> - <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> - <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> - </test> - <test name="AdvanceCatalogSearchSimpleProductByDescriptionTest"> - <annotations> - <features value="CatalogSearch"/> - <group value="CatalogSearch"/> - </annotations> - <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> - <actionGroup ref="StorefrontAdvancedCatalogSearchByDescriptionActionGroup" stepKey="search"> - <argument name="description" value="$$product.custom_attributes[description]$$"/> - </actionGroup> - <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> - <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> - <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> - </test> - <test name="AdvanceCatalogSearchSimpleProductByShortDescriptionTest"> - <annotations> - <features value="CatalogSearch"/> - <group value="CatalogSearch"/> - </annotations> - <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> - <actionGroup ref="StorefrontAdvancedCatalogSearchByShortDescriptionActionGroup" stepKey="search"> - <argument name="shortDescription" value="$$product.custom_attributes[short_description]$$"/> - </actionGroup> - <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> - <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> - <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> - </test> - <test name="AdvanceCatalogSearchSimpleProductByPriceTest"> - <annotations> - <features value="CatalogSearch"/> - <group value="CatalogSearch"/> - </annotations> - <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> - <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="search"> - <argument name="name" value="$$arg1.name$$"/> - <argument name="priceFrom" value="$$arg2.price$$"/> - <argument name="priceTo" value="$$arg3.price$$"/> - </actionGroup> - <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> - <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> - <see userInput="$$arg1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/EndToEndB2CGuestUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/EndToEndB2CGuestUserTest.xml deleted file mode 100644 index a5b7e520a76e4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/EndToEndB2CGuestUserTest.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CGuestUserTest"> - <!-- Step 2: User searches for product --> - <comment userInput="Start of searching products" stepKey="startOfSearchingProducts" after="endOfBrowsingCatalog"/> - <!-- Advanced Search with Product 1 Data --> - <comment userInput="Advanced search" stepKey="commentAdvancedSearch" after="startOfSearchingProducts"/> - <actionGroup ref="StorefrontOpenAdvancedSearchActionGroup" stepKey="searchOpenAdvancedSearchForm" after="commentAdvancedSearch"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <fillField userInput="$$createSimpleProduct1.name$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.ProductName}}" stepKey="searchAdvancedFillProductName" after="searchOpenAdvancedSearchForm"/> - <fillField userInput="$$createSimpleProduct1.sku$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.SKU}}" stepKey="searchAdvancedFillSKU" after="searchAdvancedFillProductName"/> - <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" stepKey="searchAdvancedFillPriceFrom" after="searchAdvancedFillSKU"/> - <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" stepKey="searchAdvancedFillPriceTo" after="searchAdvancedFillPriceFrom"/> - <click selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="searchClickAdvancedSearchSubmitButton" after="searchAdvancedFillPriceTo"/> - <waitForLoadingMaskToDisappear stepKey="waitForSearchProductsloaded" after="searchClickAdvancedSearchSubmitButton"/> - <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="searchCheckAdvancedSearchResult" after="waitForSearchProductsloaded"/> - <see userInput="1" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productCount}} span" stepKey="searchAdvancedAssertProductCount" after="searchCheckAdvancedSearchResult"/> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertSimpleProduct1" after="searchAdvancedAssertProductCount"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1ImageSrc" after="searchAssertSimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1ImageSrc" stepKey="searchAdvancedAssertSimpleProduct1ImageNotDefault" after="searchAdvancedGrabSimpleProduct1ImageSrc"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="searchClickSimpleProduct1View" after="searchAdvancedAssertSimpleProduct1ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForSearchSimpleProduct1Viewloaded" after="searchClickSimpleProduct1View"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="searchAssertSimpleProduct1Page" after="waitForSearchSimpleProduct1Viewloaded"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1PageImageSrc" after="searchAssertSimpleProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1PageImageSrc" stepKey="searchAdvancedAssertSimpleProduct1PageImageNotDefault" after="searchAdvancedGrabSimpleProduct1PageImageSrc"/> - - <!-- Quick Search with common part of product names --> - <comment userInput="Quick search" stepKey="commentQuickSearch" after="searchAdvancedAssertSimpleProduct1PageImageNotDefault"/> - <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchQuickSearchCommonPart" after="commentQuickSearch"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="phrase" value="CONST.apiSimpleProduct"/> - </actionGroup> - <actionGroup ref="StorefrontSelectSearchFilterCategoryActionGroup" stepKey="searchSelectFilterCategoryCommonPart" after="searchQuickSearchCommonPart"> - <argument name="category" value="$$createCategory$$"/> - </actionGroup> - <see userInput="3" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="searchAssertFilterCategoryProductCountCommonPart" after="searchSelectFilterCategoryCommonPart"/> - - <!-- Search simple product 1 --> - <comment userInput="Search simple product 1" stepKey="commentSearchSimpleProduct1" after="searchAssertFilterCategoryProductCountCommonPart"/> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct1" after="commentSearchSimpleProduct1"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct1ImageSrc" after="searchAssertFilterCategorySimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct1ImageSrc" stepKey="searchAssertSimpleProduct1ImageNotDefault" after="searchGrabSimpleProduct1ImageSrc"/> - <!-- Search simple product2 --> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct2" after="searchAssertSimpleProduct1ImageNotDefault"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct2ImageSrc" after="searchAssertFilterCategorySimpleProduct2"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct2ImageSrc" stepKey="searchAssertSimpleProduct2ImageNotDefault" after="searchGrabSimpleProduct2ImageSrc"/> - - <!-- Quick Search with non-existent product name --> - <comment userInput="Quick Search with non-existent product name" stepKey="commentQuickSearchWithNonExistentProductName" after="searchAssertSimpleProduct2ImageNotDefault" /> - <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchFillQuickSearchNonExistent" after="commentQuickSearchWithNonExistentProductName"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="phrase" value="CONST.nonexistentProductName"/> - </actionGroup> - <see userInput="Your search returned no results." selector="{{StorefrontCatalogSearchMainSection.message}}" stepKey="searchAssertQuickSearchMessageNonExistent" after="searchFillQuickSearchNonExistent"/> - <comment userInput="End of searching products" stepKey="endOfSearchingProducts" after="searchAssertQuickSearchMessageNonExistent" /> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/EndToEndB2CLoggedInUserTest.xml deleted file mode 100644 index cb84e46ebf54c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/Test/EndToEndB2CLoggedInUserTest.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CLoggedInUserTest"> - <!-- Step 2: User searches for product --> - <comment userInput="Start of searching products" stepKey="startOfSearchingProducts" after="endOfBrowsingCatalog"/> - <!-- Advanced Search with Product 1 Data --> - <comment userInput="Advanced search" stepKey="commentAdvancedSearch" after="startOfSearchingProducts"/> - <actionGroup ref="StorefrontOpenAdvancedSearchActionGroup" stepKey="searchOpenAdvancedSearchForm" after="commentAdvancedSearch"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <fillField userInput="$$createSimpleProduct1.name$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.ProductName}}" stepKey="searchAdvancedFillProductName" after="searchOpenAdvancedSearchForm"/> - <fillField userInput="$$createSimpleProduct1.sku$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.SKU}}" stepKey="searchAdvancedFillSKU" after="searchAdvancedFillProductName"/> - <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" stepKey="searchAdvancedFillPriceFrom" after="searchAdvancedFillSKU"/> - <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" stepKey="searchAdvancedFillPriceTo" after="searchAdvancedFillPriceFrom"/> - <click selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="searchClickAdvancedSearchSubmitButton" after="searchAdvancedFillPriceTo"/> - <waitForLoadingMaskToDisappear stepKey="waitForSearchProductsloaded" after="searchClickAdvancedSearchSubmitButton"/> - <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="searchCheckAdvancedSearchResult" after="waitForSearchProductsloaded"/> - <see userInput="1" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productCount}} span" stepKey="searchAdvancedAssertProductCount" after="searchCheckAdvancedSearchResult"/> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertSimpleProduct1" after="searchAdvancedAssertProductCount"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1ImageSrc" after="searchAssertSimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1ImageSrc" stepKey="searchAdvancedAssertSimpleProduct1ImageNotDefault" after="searchAdvancedGrabSimpleProduct1ImageSrc"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="searchClickSimpleProduct1View" after="searchAdvancedAssertSimpleProduct1ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForSearchSimpleProduct1Viewloaded" after="searchClickSimpleProduct1View"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="searchAssertSimpleProduct1Page" after="waitForSearchSimpleProduct1Viewloaded"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1PageImageSrc" after="searchAssertSimpleProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1PageImageSrc" stepKey="searchAdvancedAssertSimpleProduct1PageImageNotDefault" after="searchAdvancedGrabSimpleProduct1PageImageSrc"/> - - <!-- Quick Search with common part of product names --> - <comment userInput="Quick search" stepKey="commentQuickSearch" after="searchAdvancedAssertSimpleProduct1PageImageNotDefault"/> - <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchQuickSearchCommonPart" after="commentQuickSearch"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="phrase" value="CONST.apiSimpleProduct"/> - </actionGroup> - <actionGroup ref="StorefrontSelectSearchFilterCategoryActionGroup" stepKey="searchSelectFilterCategoryCommonPart" after="searchQuickSearchCommonPart"> - <argument name="category" value="$$createCategory$$"/> - </actionGroup> - <see userInput="3" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="searchAssertFilterCategoryProductCountCommonPart" after="searchSelectFilterCategoryCommonPart"/> - - <!-- Search simple product 1 --> - <comment userInput="Search simple product 1" stepKey="commentSearchSimpleProduct1" after="searchAssertFilterCategoryProductCountCommonPart"/> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct1" after="commentSearchSimpleProduct1"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct1ImageSrc" after="searchAssertFilterCategorySimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct1ImageSrc" stepKey="searchAssertSimpleProduct1ImageNotDefault" after="searchGrabSimpleProduct1ImageSrc"/> - <!-- Search simple product2 --> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct2" after="searchAssertSimpleProduct1ImageNotDefault"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct2ImageSrc" after="searchAssertFilterCategorySimpleProduct2"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct2ImageSrc" stepKey="searchAssertSimpleProduct2ImageNotDefault" after="searchGrabSimpleProduct2ImageSrc"/> - - <!-- Quick Search with non-existent product name --> - <comment userInput="Quick Search with non-existent product name" stepKey="commentQuickSearchWithNonExistentProductName" after="searchAssertSimpleProduct2ImageNotDefault" /> - <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchFillQuickSearchNonExistent" after="commentQuickSearchWithNonExistentProductName"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="phrase" value="CONST.nonexistentProductName"/> - </actionGroup> - <see userInput="Your search returned no results." selector="{{StorefrontCatalogSearchMainSection.message}}" stepKey="searchAssertQuickSearchMessageNonExistent" after="searchFillQuickSearchNonExistent"/> - <comment userInput="End of searching products" stepKey="endOfSearchingProducts" after="searchAssertQuickSearchMessageNonExistent" /> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/composer.json deleted file mode 100644 index 65e7b9c781e61..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogSearch/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-catalog-search", - "description": "Magento 2 Functional Test Module Catalog Search", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-search": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CatalogSearch\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CatalogSearch" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/README.md deleted file mode 100644 index 7329f664baa03..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_CatalogUrlRewrite** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/composer.json deleted file mode 100644 index a6b42de511466..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogUrlRewrite/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-catalog-url-rewrite", - "description": "Magento 2 Functional Test Module Catalog Url Rewrite", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-url-rewrite": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CatalogUrlRewrite\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CatalogUrlRewrite" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/README.md deleted file mode 100644 index 43aa796462c76..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CatalogWidget** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/composer.json deleted file mode 100644 index 5550db57606ba..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CatalogWidget/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-catalog-widget", - "description": "Magento 2 Functional Test Module Catalog Widget", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-widget": "100.0.0-dev", - "magento/magento2-functional-test-module-wishlist": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CatalogWidget\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CatalogWidget" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/StorefrontProductCartActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/StorefrontProductCartActionGroup.xml deleted file mode 100644 index b98e1046c4a5b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/StorefrontProductCartActionGroup.xml +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <!-- Add Product to Cart from the category page and check message and product count in Minicart --> - <actionGroup name="StorefrontAddCategoryProductToCartActionGroup"> - <arguments> - <argument name="product"/> - <argument name="productCount"/> - </arguments> - <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" /> - <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart" /> - <!-- @TODO: Use general message selector after MQE-694 is fixed --> - <waitForElement selector="{{StorefrontMessagesSection.messageProductAddedToCart(product.name)}}" time="30" stepKey="assertMessage"/> - <waitForText userInput="{{productCount}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/> - </actionGroup> - - <!-- Add Product to Cart from the product page and check message and product count in Minicart --> - <actionGroup name="StorefrontAddProductToCartActionGroup"> - <arguments> - <argument name="product"/> - <argument name="productCount" type="string"/> - </arguments> - <click selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="clickAddToCart" /> - <!-- @TODO: Use general message selector after MQE-694 is fixed --> - <waitForElement selector="{{StorefrontMessagesSection.messageProductAddedToCart(product.name)}}" time="30" stepKey="assertMessage"/> - <waitForText userInput="{{productCount}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/> - </actionGroup> - - <!-- Open the Minicart and check Simple Product --> - <actionGroup name="StorefrontOpenMinicartAndCheckSimpleProductActionGroup"> - <arguments> - <argument name="product"/> - </arguments> - <waitForElement selector="{{StorefrontMinicartSection.productLinkByName(product.name)}}" stepKey="waitForMinicartProduct" /> - <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart" /> - <see userInput="${{product.price}}.00" selector="{{StorefrontMinicartSection.productPriceByName(product.name)}}" stepKey="assertProductPrice"/> - </actionGroup> - - <!-- Check Simple Product in the Cart --> - <actionGroup name="StorefrontCheckCartSimpleProductActionGroup"> - <arguments> - <argument name="product"/> - <argument name="productQuantity"/> - </arguments> - <seeElement selector="{{CheckoutCartProductSection.ProductLinkByName(product.name)}}" stepKey="assertProductName"/> - <see userInput="${{product.price}}.00" selector="{{CheckoutCartProductSection.ProductPriceByName(product.name)}}" stepKey="assertProductPrice"/> - <seeInField userInput="{{productQuantity}}" selector="{{CheckoutCartProductSection.ProductQuantityByName(product.name)}}" stepKey="assertProductQuantity"/> - </actionGroup> - - <!-- Check the Cart --> - <actionGroup name="StorefrontCheckCartActionGroup"> - <arguments> - <argument name="subtotal"/> - <argument name="shipping"/> - <argument name="shippingMethod"/> - <argument name="total"/> - </arguments> - <seeInCurrentUrl url="{{CheckoutCartPage.url}}" stepKey="assertUrl"/> - <waitForText userInput="${{total}}" selector="{{CheckoutCartSummarySection.total}}" time="30" stepKey="waitForTotal"/> - <see userInput="${{subtotal}}" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertSubtotal"/> - <see userInput="${{shipping}}" selector="{{CheckoutCartSummarySection.shipping}}" stepKey="assertShipping"/> - <see userInput="({{shippingMethod}})" selector="{{CheckoutCartSummarySection.shippingMethod}}" stepKey="assertShippingMethod"/> - <see userInput="${{total}}" selector="{{CheckoutCartSummarySection.total}}" stepKey="assertTotal"/> - </actionGroup> - - <!-- Open the Cart from Minicart--> - <actionGroup name="StorefrontOpenCartFromMinicartActionGroup"> - <waitForElement selector="{{StorefrontMinicartSection.showCart}}" stepKey="waitForShowMinicart" /> - <waitForElement selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForCartLink" /> - <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart" /> - <click selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="clickCart" /> - </actionGroup> - - <actionGroup name="changeSummaryQuoteAddress"> - <arguments> - <argument name="taxCode"/> - </arguments> - <conditionalClick stepKey="openShippingDetails" selector="{{CheckoutCartSummarySection.shippingHeading}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false"/> - <selectOption stepKey="selectCountry" selector="{{CheckoutCartSummarySection.country}}" userInput="{{taxCode.country}}"/> - <selectOption stepKey="selectStateProvince" selector="{{CheckoutCartSummarySection.country}}" userInput="{{taxCode.country}}"/> - <fillField stepKey="fillZip" selector="{{CheckoutCartSummarySection.postcode}}" userInput="{{taxCode.zip}}"/> - <waitForPageLoad stepKey="waitForFormUpdate"/> - </actionGroup> -</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Data/ConstData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Data/ConstData.xml deleted file mode 100644 index 10bc4fd90e7f9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Data/ConstData.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> - <entity name="CONST" type="CONST"> - <data key="successGuestCheckoutOrderNumberMessage">Your order # is:</data> - <data key="successCheckoutOrderNumberMessage">Your order number is:</data> - <data key="successCheckoutEmailYouMessage">We'll email you an order confirmation with details and tracking info.</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Data/QuoteData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Data/QuoteData.xml deleted file mode 100644 index d3c7507390973..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Data/QuoteData.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> - <entity name="E2EB2CQuote" type="Quote"> - <data key="subtotal">480.00</data> - <data key="shipping">15.00</data> - <data key="total">495.00</data> - <data key="shippingMethod">Flat Rate - Fixed</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutCartPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutCartPage.xml deleted file mode 100644 index 30e9bb0c95796..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutCartPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="CheckoutCartPage" url="/checkout/cart" module="Checkout" area="storefront"> - <section name="CheckoutCartProductSection"/> - <section name="CheckoutCartSummarySection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutPage.xml deleted file mode 100644 index a0efb0668fe1d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutPage.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="CheckoutPage" url="/checkout" area="storefront" module="Magento_Checkout"> - <section name="CheckoutShippingSection"/> - <section name="CheckoutShippingMethodsSection"/> - <section name="CheckoutOrderSummarySection"/> - <section name="CheckoutSuccessMainSection"/> - <section name="CheckoutPaymentSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutSuccessPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutSuccessPage.xml deleted file mode 100644 index a9ca77ab6b203..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/CheckoutSuccessPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="CheckoutSuccessPage" url="/checkout/onepage/success/" area="storefront" module="Checkout"> - <section name="CheckoutSuccessMainSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/GuestCheckoutReviewAndPaymentsPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/GuestCheckoutReviewAndPaymentsPage.xml deleted file mode 100644 index 3fb6e99ed6730..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Page/GuestCheckoutReviewAndPaymentsPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="GuestCheckoutReviewAndPaymentsPage" url="/checkout/#payment" area="storefront" module="Magento_Checkout"> - <section name="CheckoutPaymentSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/README.md deleted file mode 100644 index fc63b2f394813..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Checkout** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutCartSummarySection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutCartSummarySection.xml deleted file mode 100644 index 248070940542c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutCartSummarySection.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="CheckoutCartSummarySection"> - <element name="subtotal" type="text" selector="//*[@id='cart-totals']//tr[@class='totals sub']//td//span[@class='price']"/> - <element name="shippingMethod" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//th//span[@class='value']"/> - <element name="shipping" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//td//span[@class='price']"/> - <element name="total" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price']"/> - <element name="proceedToCheckout" type="button" selector=".action.primary.checkout span" timeout="30"/> - <element name="discountAmount" type="text" selector="td[data-th='Discount']"/> - <element name="shippingHeading" type="button" selector="#block-shipping-heading"/> - <element name="postcode" type="input" selector="input[name='postcode']"/> - <element name="stateProvince" type="select" selector="select[name='region_id']"/> - <element name="country" type="select" selector="select[name='country_id']"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutHeaderSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutHeaderSection.xml deleted file mode 100644 index 29685f2ed54ac..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutHeaderSection.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="CheckoutHeaderSection"> - <element name="shippingMethodStep" type="text" selector=".opc-progress-bar-item:nth-of-type(1)"/> - <element name="reviewAndPaymentsStep" type="text" selector=".opc-progress-bar-item:nth-of-type(2)"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutOrderSummarySection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutOrderSummarySection.xml deleted file mode 100644 index 44bd86065b808..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutOrderSummarySection.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="CheckoutOrderSummarySection"> - <element name="miniCartTab" type="button" selector=".title[role='tab']"/> - <element name="productItemName" type="text" selector=".product-item-name"/> - <element name="productItemQty" type="text" selector=".value"/> - <element name="productItemPrice" type="text" selector=".price"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutSuccessMainSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutSuccessMainSection.xml deleted file mode 100644 index 84b31b49eadc6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutSuccessMainSection.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="CheckoutSuccessMainSection"> - <element name="success" type="text" selector="div.checkout-success"/> - <element name="orderNumber" type="text" selector="div.checkout-success > p:nth-child(1) > span"/> - <element name="orderNumber22" type="text" selector=".order-number>strong"/> - <element name="orderLink" type="text" selector="a[href*=order_id].order-number"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StoreFrontRemoveItemModalSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StoreFrontRemoveItemModalSection.xml deleted file mode 100644 index e6d994fb587b0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StoreFrontRemoveItemModalSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StoreFrontRemoveItemModalSection"> - <element name="message" type="text" selector="aside.confirm div.modal-content"/> - <element name="ok" type="button" selector="aside.confirm .modal-footer .action-primary"/> - <element name="cancel" type="button" selector="aside.confirm .modal-footer .action-secondary"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontCategoryProductSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontCategoryProductSection.xml deleted file mode 100644 index a23caf141fc07..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontCategoryProductSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontCategoryProductSection"> - <element name="ProductAddToCartByNumber" type="button" selector="//main//li[{{var1}}]//button[contains(@class, 'tocart')]" parameterized="true"/> - <element name="ProductAddToCartByName" type="button" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//button[contains(@class, 'tocart')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMessagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMessagesSection.xml deleted file mode 100644 index d6f260ecaaac3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMessagesSection.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontMessagesSection"> - <!-- @TODO: Use general message selector after MQE-694 is fixed --> - <element name="messageProductAddedToCart" type="text" - selector="//main//div[contains(@class, 'messages')]//div[contains(@class, 'message')]/div[contains(text(), 'You added {{var1}} to your shopping cart.')]" - parameterized="true" - /> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontProductCompareMainSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontProductCompareMainSection.xml deleted file mode 100644 index ba706aca8fe4a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontProductCompareMainSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductCompareMainSection"> - <element name="ProductAddToCartByName" type="button" selector="//*[@id='product-comparison']//td[.//strong[@class='product-item-name']/a[contains(text(), '{{var1}}')]]//button[contains(@class, 'tocart')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontProductInfoMainSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontProductInfoMainSection.xml deleted file mode 100644 index 798bbdf115d66..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontProductInfoMainSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductInfoMainSection"> - <element name="AddToCart" type="button" selector="#product-addtocart-button"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CGuestUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CGuestUserTest.xml deleted file mode 100644 index 1a056983ef3cb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CGuestUserTest.xml +++ /dev/null @@ -1,207 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CGuestUserTest"> - <!-- Step 3: User adds products to cart --> - <comment userInput="Start of adding products to cart" stepKey="startOfAddingProductsToCart" after="endOfBrowsingCatalog"/> - <!-- Add Simple Product 1 to cart --> - <comment userInput="Add Simple Product 1 to cart" stepKey="commentAddSimpleProduct1ToCart" after="startOfAddingProductsToCart" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory" after="commentAddSimpleProduct1ToCart"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartCategoryloaded" after="cartClickCategory"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="waitForCartCategoryloaded"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct1" after="cartAssertCategory"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct1ImageSrc" after="cartAssertSimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct1ImageSrc" stepKey="cartAssertSimpleProduct1ImageNotDefault" after="cartGrabSimpleProduct1ImageSrc"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickSimpleProduct1" after="cartAssertSimpleProduct1ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loaded" after="cartClickSimpleProduct1"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertProduct1Page" after="waitForCartSimpleProduct1loaded"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabSimpleProduct1PageImageSrc" after="cartAssertProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabSimpleProduct1PageImageSrc" stepKey="cartAssertSimpleProduct1PageImageNotDefault" after="cartGrabSimpleProduct1PageImageSrc"/> - <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddProduct1ToCart" after="cartAssertSimpleProduct1PageImageNotDefault"> - <argument name="product" value="$$createSimpleProduct1$$"/> - <argument name="productCount" value="1"/> - </actionGroup> - - <!-- Add Simple Product 2 to cart --> - <comment userInput="Add Simple Product 2 to cart" stepKey="commentAddSimpleProduct2ToCart" after="cartAddProduct1ToCart" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory1" after="commentAddSimpleProduct2ToCart"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartCategory1loaded" after="cartClickCategory1"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="waitForCartCategory1loaded"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct2" after="cartAssertCategory1ForSimpleProduct2"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct2ImageSrc" after="cartAssertSimpleProduct2"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct2ImageSrc" stepKey="cartAssertSimpleProduct2ImageNotDefault" after="cartGrabSimpleProduct2ImageSrc"/> - <actionGroup ref="StorefrontAddCategoryProductToCartActionGroup" stepKey="cartAddProduct2ToCart" after="cartAssertSimpleProduct2ImageNotDefault"> - <argument name="product" value="$$createSimpleProduct2$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.two"/> - </actionGroup> - - <!-- Check products in minicart --> - <!-- Check simple product 1 in minicart --> - <comment userInput="Check simple product 1 in minicart" stepKey="commentCheckSimpleProduct1InMinicart" after="cartAddProduct2ToCart"/> - <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct1" after="commentCheckSimpleProduct1InMinicart"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1ImageSrc" after="cartOpenMinicartAndCheckSimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct1ImageSrc" stepKey="cartMinicartAssertSimpleProduct1ImageNotDefault" after="cartMinicartGrabSimpleProduct1ImageSrc"/> - <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartMinicartClickSimpleProduct1" after="cartMinicartAssertSimpleProduct1ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct1loaded" after="cartMinicartClickSimpleProduct1"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct1Page" after="waitForMinicartSimpleProduct1loaded"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1PageImageSrc" after="cartAssertMinicartProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct1PageImageSrc" stepKey="cartMinicartAssertSimpleProduct1PageImageNotDefault" after="cartMinicartGrabSimpleProduct1PageImageSrc"/> - <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct2" after="cartMinicartAssertSimpleProduct1PageImageNotDefault"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- Check simple product2 in minicart --> - <comment userInput="Check simple product 2 in minicart" stepKey="commentCheckSimpleProduct2InMinicart" after="cartOpenMinicartAndCheckSimpleProduct2"/> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2ImageSrc" after="commentCheckSimpleProduct2InMinicart"/> - <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct2ImageSrc" stepKey="cartMinicartAssertSimpleProduct2ImageNotDefault" after="cartMinicartGrabSimpleProduct2ImageSrc"/> - <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartMinicartClickSimpleProduct2" after="cartMinicartAssertSimpleProduct2ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct2loaded" after="cartMinicartClickSimpleProduct2"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct2Page" after="waitForMinicartSimpleProduct2loaded"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2PageImageSrc" after="cartAssertMinicartProduct2Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct2PageImageSrc" stepKey="cartMinicartAssertSimpleProduct2PageImageNotDefault" after="cartMinicartGrabSimpleProduct2PageImageSrc"/> - - <!-- Check products in cart --> - <comment userInput="Check cart information" stepKey="commentCheckCartInformation" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> - <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart" after="commentCheckCartInformation"/> - <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCart" after="cartOpenCart"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="subtotal" value="E2EB2CQuote.subtotal"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shipping" value="E2EB2CQuote.shipping"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="total" value="E2EB2CQuote.total"/> - </actionGroup> - - <!-- Check simple product 1 in cart --> - <comment userInput="Check simple product 1 in cart" stepKey="commentCheckSimpleProduct1InCart" after="cartAssertCart"/> - <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct1" after="commentCheckSimpleProduct1InCart"> - <argument name="product" value="$$createSimpleProduct1$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productQuantity" value="CONST.one"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct1ImageSrc" after="cartAssertCartSimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct1ImageSrc" stepKey="cartCartAssertSimpleProduct1ImageNotDefault" after="cartCartGrabSimpleProduct1ImageSrc"/> - <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickCartSimpleProduct1" after="cartCartAssertSimpleProduct1ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loadedAgain" after="cartClickCartSimpleProduct1"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct1Page" after="waitForCartSimpleProduct1loadedAgain"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc1" after="cartAssertCartProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc1" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault1" after="cartCartGrabSimpleProduct2PageImageSrc1"/> - - <!-- Check simple product 2 in cart --> - <comment userInput="Check simple product 2 in cart" stepKey="commentCheckSimpleProduct2InCart" after="cartCartAssertSimpleProduct2PageImageNotDefault1"/> - <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart1" after="commentCheckSimpleProduct2InCart"/> - <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct2" after="cartOpenCart1"> - <argument name="product" value="$$createSimpleProduct2$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productQuantity" value="CONST.one"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct2ImageSrc" after="cartAssertCartSimpleProduct2"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct2ImageSrc" stepKey="cartCartAssertSimpleProduct2ImageNotDefault" after="cartCartGrabSimpleProduct2ImageSrc"/> - <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartClickCartSimpleProduct2" after="cartCartAssertSimpleProduct2ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct2loaded" after="cartClickCartSimpleProduct2"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct2Page" after="waitForCartSimpleProduct2loaded"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc2" after="cartAssertCartProduct2Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc2" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault2" after="cartCartGrabSimpleProduct2PageImageSrc2"/> - <comment userInput="End of adding products to cart" stepKey="endOfAddingProductsToCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> - - <!-- Step 6: Check out --> - <comment userInput="Start of checking out" stepKey="startOfCheckingOut" after="endOfUsingCouponCode" /> - <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMinicart" after="startOfCheckingOut"/> - <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection" after="guestGoToCheckoutFromMinicart"> - <argument name="customerVar" value="CustomerEntityOne" /> - <argument name="customerAddressVar" value="CustomerAddressSimple" /> - </actionGroup> - - <!-- Check order summary in checkout --> - <comment userInput="Check order summary in checkout" stepKey="commentCheckOrderSummaryInCheckout" after="guestCheckoutFillingShippingSection" /> - <actionGroup ref="CheckOrderSummaryInCheckoutActionGroup" stepKey="guestCheckoutCheckOrderSummary" after="commentCheckOrderSummaryInCheckout"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="subtotal" value="E2EB2CQuote.subtotal"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingTotal" value="E2EB2CQuote.shipping"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="total" value="E2EB2CQuote.total"/> - </actionGroup> - - <!-- Check ship to information in checkout --> - <comment userInput="Check ship to information in checkout" stepKey="commentCheckShipToInformationInCheckout" after="guestCheckoutCheckOrderSummary" /> - <actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="guestCheckoutCheckShipToInformation" after="commentCheckShipToInformationInCheckout"> - <argument name="customerVar" value="CustomerEntityOne" /> - <argument name="customerAddressVar" value="CustomerAddressSimple" /> - </actionGroup> - - <!-- Check shipping method in checkout --> - <comment userInput="Check shipping method in checkout" stepKey="commentCheckShippingMethodInCheckout" after="guestCheckoutCheckShipToInformation" /> - <actionGroup ref="CheckShippingMethodInCheckoutActionGroup" stepKey="guestCheckoutCheckShippingMethod" after="commentCheckShippingMethodInCheckout"> - <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod" /> - </actionGroup> - - <!-- Verify Simple Product 1 is in checkout cart items --> - <comment userInput="Verify Simple Product 1 is in checkout cart items" stepKey="commentVerifySimpleProduct1IsInCheckoutCartItems" after="guestCheckoutCheckShippingMethod" /> - <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="guestCheckoutCheckSimpleProduct1InCartItems" after="commentVerifySimpleProduct1IsInCheckoutCartItems"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - - <!-- Verify Simple Product 2 is in checkout cart items --> - <comment userInput="Verify Simple Product 2 is in checkout cart items" stepKey="commentVerifySimpleProduct2IsInCheckoutCartItems" after="guestCheckoutCheckSimpleProduct1InCartItems" /> - <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="guestCheckoutCheckSimpleProduct2InCartItems" after="commentVerifySimpleProduct2IsInCheckoutCartItems"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - - <comment userInput="Place order with check money order payment" stepKey="commentPlaceOrderWithCheckMoneyOrderPayment" after="guestCheckoutCheckSimpleProduct2InCartItems" /> - <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="guestSelectCheckMoneyOrderPayment" after="commentPlaceOrderWithCheckMoneyOrderPayment"/> - <actionGroup ref="CheckBillingAddressInCheckoutActionGroup" stepKey="guestSeeBillingAddress" after="guestSelectCheckMoneyOrderPayment"> - <argument name="customerVar" value="CustomerEntityOne" /> - <argument name="customerAddressVar" value="CustomerAddressSimple" /> - </actionGroup> - <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="guestPlaceorder" after="guestSeeBillingAddress"> - <argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage" /> - <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> - </actionGroup> - <comment userInput="End of checking out" stepKey="endOfCheckingOut" after="guestPlaceorder" /> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CLoggedInUserTest.xml deleted file mode 100644 index 8d7bbdeff7fb4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CLoggedInUserTest.xml +++ /dev/null @@ -1,207 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CLoggedInUserTest"> - <!-- Step 3: User adds products to cart --> - <comment userInput="Start of adding products to cart" stepKey="startOfAddingProductsToCart" after="endOfBrowsingCatalog"/> - <!-- Add Simple Product 1 to cart --> - <comment userInput="Add Simple Product 1 to cart" stepKey="commentAddSimpleProduct1ToCart" after="startOfAddingProductsToCart" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory" after="commentAddSimpleProduct1ToCart"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartCategoryloaded" after="cartClickCategory"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="waitForCartCategoryloaded"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct1" after="cartAssertCategory"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct1ImageSrc" after="cartAssertSimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct1ImageSrc" stepKey="cartAssertSimpleProduct1ImageNotDefault" after="cartGrabSimpleProduct1ImageSrc"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickSimpleProduct1" after="cartAssertSimpleProduct1ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loaded" after="cartClickSimpleProduct1"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertProduct1Page" after="waitForCartSimpleProduct1loaded"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabSimpleProduct1PageImageSrc" after="cartAssertProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabSimpleProduct1PageImageSrc" stepKey="cartAssertSimpleProduct1PageImageNotDefault" after="cartGrabSimpleProduct1PageImageSrc"/> - <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddProduct1ToCart" after="cartAssertSimpleProduct1PageImageNotDefault"> - <argument name="product" value="$$createSimpleProduct1$$"/> - <argument name="productCount" value="1"/> - </actionGroup> - - <!-- Add Simple Product 2 to cart --> - <comment userInput="Add Simple Product 2 to cart" stepKey="commentAddSimpleProduct2ToCart" after="cartAddProduct1ToCart" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory1" after="commentAddSimpleProduct2ToCart"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartCategory1loaded" after="cartClickCategory1"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="waitForCartCategory1loaded"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct2" after="cartAssertCategory1ForSimpleProduct2"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct2ImageSrc" after="cartAssertSimpleProduct2"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct2ImageSrc" stepKey="cartAssertSimpleProduct2ImageNotDefault" after="cartGrabSimpleProduct2ImageSrc"/> - <actionGroup ref="StorefrontAddCategoryProductToCartActionGroup" stepKey="cartAddProduct2ToCart" after="cartAssertSimpleProduct2ImageNotDefault"> - <argument name="product" value="$$createSimpleProduct2$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.two"/> - </actionGroup> - - <!-- Check products in minicart --> - <!-- Check simple product 1 in minicart --> - <comment userInput="Check simple product 1 in minicart" stepKey="commentCheckSimpleProduct1InMinicart" after="cartAddProduct2ToCart"/> - <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct1" after="commentCheckSimpleProduct1InMinicart"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1ImageSrc" after="cartOpenMinicartAndCheckSimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct1ImageSrc" stepKey="cartMinicartAssertSimpleProduct1ImageNotDefault" after="cartMinicartGrabSimpleProduct1ImageSrc"/> - <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartMinicartClickSimpleProduct1" after="cartMinicartAssertSimpleProduct1ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct1loaded" after="cartMinicartClickSimpleProduct1"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct1Page" after="waitForMinicartSimpleProduct1loaded"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1PageImageSrc" after="cartAssertMinicartProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct1PageImageSrc" stepKey="cartMinicartAssertSimpleProduct1PageImageNotDefault" after="cartMinicartGrabSimpleProduct1PageImageSrc"/> - <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct2" after="cartMinicartAssertSimpleProduct1PageImageNotDefault"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- Check simple product2 in minicart --> - <comment userInput="Check simple product 2 in minicart" stepKey="commentCheckSimpleProduct2InMinicart" after="cartOpenMinicartAndCheckSimpleProduct2"/> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2ImageSrc" after="commentCheckSimpleProduct2InMinicart"/> - <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct2ImageSrc" stepKey="cartMinicartAssertSimpleProduct2ImageNotDefault" after="cartMinicartGrabSimpleProduct2ImageSrc"/> - <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartMinicartClickSimpleProduct2" after="cartMinicartAssertSimpleProduct2ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct2loaded" after="cartMinicartClickSimpleProduct2"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct2Page" after="waitForMinicartSimpleProduct2loaded"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2PageImageSrc" after="cartAssertMinicartProduct2Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct2PageImageSrc" stepKey="cartMinicartAssertSimpleProduct2PageImageNotDefault" after="cartMinicartGrabSimpleProduct2PageImageSrc"/> - - <!-- Check products in cart --> - <comment userInput="Check cart information" stepKey="commentCheckCartInformation" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> - <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart" after="commentCheckCartInformation"/> - <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCart" after="cartOpenCart"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="subtotal" value="E2EB2CQuote.subtotal"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shipping" value="E2EB2CQuote.shipping"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="total" value="E2EB2CQuote.total"/> - </actionGroup> - - <!-- Check simple product 1 in cart --> - <comment userInput="Check simple product 1 in cart" stepKey="commentCheckSimpleProduct1InCart" after="cartAssertCart"/> - <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct1" after="commentCheckSimpleProduct1InCart"> - <argument name="product" value="$$createSimpleProduct1$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productQuantity" value="CONST.one"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct1ImageSrc" after="cartAssertCartSimpleProduct1"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct1ImageSrc" stepKey="cartCartAssertSimpleProduct1ImageNotDefault" after="cartCartGrabSimpleProduct1ImageSrc"/> - <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickCartSimpleProduct1" after="cartCartAssertSimpleProduct1ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loadedAgain" after="cartClickCartSimpleProduct1"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct1Page" after="waitForCartSimpleProduct1loadedAgain"> - <argument name="product" value="$$createSimpleProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc1" after="cartAssertCartProduct1Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc1" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault1" after="cartCartGrabSimpleProduct2PageImageSrc1"/> - - <!-- Check simple product 2 in cart --> - <comment userInput="Check simple product 2 in cart" stepKey="commentCheckSimpleProduct2InCart" after="cartCartAssertSimpleProduct2PageImageNotDefault1"/> - <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart1" after="commentCheckSimpleProduct2InCart"/> - <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct2" after="cartOpenCart1"> - <argument name="product" value="$$createSimpleProduct2$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productQuantity" value="CONST.one"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct2ImageSrc" after="cartAssertCartSimpleProduct2"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct2ImageSrc" stepKey="cartCartAssertSimpleProduct2ImageNotDefault" after="cartCartGrabSimpleProduct2ImageSrc"/> - <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartClickCartSimpleProduct2" after="cartCartAssertSimpleProduct2ImageNotDefault"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct2loaded" after="cartClickCartSimpleProduct2"/> - <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct2Page" after="waitForCartSimpleProduct2loaded"> - <argument name="product" value="$$createSimpleProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc2" after="cartAssertCartProduct2Page"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc2" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault2" after="cartCartGrabSimpleProduct2PageImageSrc2"/> - <comment userInput="End of adding products to cart" stepKey="endOfAddingProductsToCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> - - <!-- Step 7: Check out --> - <comment userInput="Start of checking out" stepKey="startOfCheckingOut" after="endOfUsingCouponCode" /> - <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" after="startOfCheckingOut"/> - <actionGroup ref="LoggedInUserCheckoutFillingShippingSectionActionGroup" stepKey="checkoutFillingShippingSection" after="goToCheckoutFromMinicart"> - <argument name="customerVar" value="CustomerEntityOne" /> - <argument name="customerAddressVar" value="CustomerAddressSimple" /> - </actionGroup> - - <!-- Check order summary in checkout --> - <comment userInput="Check order summary in checkout" stepKey="commentCheckOrderSummaryInCheckout" after="checkoutFillingShippingSection" /> - <actionGroup ref="CheckOrderSummaryInCheckoutActionGroup" stepKey="checkoutCheckOrderSummary" after="commentCheckOrderSummaryInCheckout"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="subtotal" value="E2EB2CQuote.subtotal"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingTotal" value="E2EB2CQuote.shipping"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="total" value="E2EB2CQuote.total"/> - </actionGroup> - - <!-- Check ship to information in checkout --> - <comment userInput="Check ship to information in checkout" stepKey="commentCheckShipToInformationInCheckout" after="checkoutCheckOrderSummary" /> - <actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="checkoutCheckShipToInformation" after="commentCheckShipToInformationInCheckout"> - <argument name="customerVar" value="CustomerEntityOne" /> - <argument name="customerAddressVar" value="CustomerAddressSimple" /> - </actionGroup> - - <!-- Check shipping method in checkout --> - <comment userInput="Check shipping method in checkout" stepKey="commentCheckShippingMethodInCheckout" after="checkoutCheckShipToInformation" /> - <actionGroup ref="CheckShippingMethodInCheckoutActionGroup" stepKey="checkoutCheckShippingMethod" after="commentCheckShippingMethodInCheckout"> - <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod" /> - </actionGroup> - - <!-- Verify Simple Product 1 is in checkout cart items --> - <comment userInput="Verify Simple Product 1 is in checkout cart items" stepKey="commentVerifySimpleProduct1IsInCheckoutCartItems" after="checkoutCheckShippingMethod" /> - <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="checkoutCheckSimpleProduct1InCartItems" after="commentVerifySimpleProduct1IsInCheckoutCartItems"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - - <!-- Verify Simple Product 2 is in checkout cart items --> - <comment userInput="Verify Simple Product 2 is in checkout cart items" stepKey="commentVerifySimpleProduct2IsInCheckoutCartItems" after="checkoutCheckSimpleProduct1InCartItems" /> - <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="checkoutCheckSimpleProduct2InCartItems" after="commentVerifySimpleProduct2IsInCheckoutCartItems"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - - <comment userInput="Place order with check money order payment" stepKey="commentPlaceOrderWithCheckMoneyOrderPayment" after="checkoutCheckSimpleProduct2InCartItems" /> - <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrderPayment" after="commentPlaceOrderWithCheckMoneyOrderPayment"/> - <actionGroup ref="CheckBillingAddressInCheckoutActionGroup" stepKey="seeBillingAddress" after="selectCheckMoneyOrderPayment"> - <argument name="customerVar" value="CustomerEntityOne" /> - <argument name="customerAddressVar" value="CustomerAddressSimple" /> - </actionGroup> - <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeorder" after="seeBillingAddress"> - <argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage" /> - <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> - </actionGroup> - <comment userInput="End of checking out" stepKey="endOfCheckingOut" after="placeorder" /> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/composer.json deleted file mode 100644 index 130cd79c8d5ef..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-checkout", - "description": "Magento 2 Functional Test Module Checkout", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "~2.0.0", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-sales-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-msrp": "100.0.0-dev", - "magento/magento2-functional-test-module-page-cache": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Checkout\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Checkout" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/README.md deleted file mode 100644 index 35423659f629f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CheckoutAgreements** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/composer.json deleted file mode 100644 index fe061803b297b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CheckoutAgreements/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-checkout-agreements", - "description": "Magento 2 Functional Test Module Checkout Agreements", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CheckoutAgreements\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CheckoutAgreements" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/RestoreLayoutSettingActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/RestoreLayoutSettingActionGroup.xml deleted file mode 100644 index 2e2acb8ac316f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/RestoreLayoutSettingActionGroup.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <actionGroup name="RestoreLayoutSetting"> - <waitForElementVisible selector="{{DefaultLayoutsSection.pageLayout}}" stepKey="waittForDefaultCMSLayout" after="expandDefaultLayouts" /> - <selectOption selector="{{DefaultLayoutsSection.pageLayout}}" userInput="1 column" stepKey="selectOneColumn" before="clickSaveConfig"/> - </actionGroup> -</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Data/BlockPageData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Data/BlockPageData.xml deleted file mode 100644 index 89feb54a69f76..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Data/BlockPageData.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="_defaultBlock" type="block"> - <data key="title">Default Block</data> - <data key="identifier" unique="suffix" >block</data> - <data key="content">Here is a block test. Yeah!</data> - <data key="active">true</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsBlocksPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsBlocksPage.xml deleted file mode 100644 index e2db4ced8c4d0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsBlocksPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="CmsBlocksPage" url="/cms/block/" area="admin" module="Magento_Cms"> - <section name="BlockPageActionsSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsNewBlockPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsNewBlockPage.xml deleted file mode 100644 index 5cccbf2943114..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsNewBlockPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="CmsNewBlock" area="admin" url="/cms/block/new" module="Magento_Cms"> - <section name="CmsNewBlockBlockActionsSection"/> - <section name="CmsNewBlockBlockBasicFieldsSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsNewPagePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsNewPagePage.xml deleted file mode 100644 index 846f00f48a73f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsNewPagePage.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="CmsNewPagePage" url="/cms/page/new" area="admin" module="Magento_Cms"> - <section name="CmsNewPagePageActionsSection"/> - <section name="CmsNewPagePageBasicFieldsSection"/> - <section name="CmsNewPagePageContentSection"/> - <section name="CmsNewPagePageSeoSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsPagesPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsPagesPage.xml deleted file mode 100644 index 1605a98d23a01..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/CmsPagesPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="CmsPagesPage" url="/cms/page" area="admin" module="Magento_Cms"> - <section name="CmsPagesPageActionsSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/StorefrontHomePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/StorefrontHomePage.xml deleted file mode 100644 index a6cdd6d333984..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Page/StorefrontHomePage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontHomePage" url="/" module="Magento_Cms" area="storefront"> - <section name="StorefrontHeaderSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/README.md deleted file mode 100644 index d1214efec9128..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Cms** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageSeoSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageSeoSection.xml deleted file mode 100644 index c0ccda1ff5475..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsNewPagePageSeoSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="CmsNewPagePageSeoSection"> - <element name="header" type="button" selector="div[data-index=search_engine_optimisation]" timeout="30"/> - <element name="urlKey" type="input" selector="input[name=identifier]"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/StorefrontBlockSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/StorefrontBlockSection.xml deleted file mode 100644 index 259eb61b4c4dc..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/StorefrontBlockSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontBlockSection"> - <element name="mediaDescription" type="text" selector=".widget.block.block-static-block>p>img"/> - <element name="imageSource" type="text" selector="//img[contains(@src,'{{var1}}')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/StorefrontCMSPageSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/StorefrontCMSPageSection.xml deleted file mode 100644 index b43bc436c498d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/StorefrontCMSPageSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontCMSPageSection"> - <element name="mediaDescription" type="text" selector=".column.main>p>img"/> - <element name="imageSource" type="text" selector="//img[contains(@src,'{{var1}}')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/StorefrontHeaderSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/StorefrontHeaderSection.xml deleted file mode 100644 index 0a2fb1179ebbd..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/StorefrontHeaderSection.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontHeaderSection"> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/composer.json deleted file mode 100644 index 07aa529e45e14..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-cms", - "description": "Magento 2 Functional Test Module Cms", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-email": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-variable": "100.0.0-dev", - "magento/magento2-functional-test-module-widget": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Cms\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Cms" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/README.md deleted file mode 100644 index cc52700eba988..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CmsUrlRewrite** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/composer.json deleted file mode 100644 index 7c35ddafd671d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CmsUrlRewrite/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-cms-url-rewrite", - "description": "Magento 2 Functional Test Module Cms Url Rewrite", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-url-rewrite": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CmsUrlRewrite\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CmsUrlRewrite" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/RestoreLayoutSettingActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/RestoreLayoutSettingActionGroup.xml deleted file mode 100644 index ed0b1a352eb86..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/ActionGroup/RestoreLayoutSettingActionGroup.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <actionGroup name="RestoreLayoutSetting"> - <amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/> - <waitForPageLoad stepKey="waitForPageLoad"/> - <conditionalClick stepKey="expandDefaultLayouts" selector="{{WebSection.DefaultLayoutsTab}}" dependentSelector="{{WebSection.CheckIfTabExpand}}" visible="true" /> - <click selector="{{ContentManagementSection.Save}}" stepKey="clickSaveConfig" /> - </actionGroup> -</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Page/AdminConfigPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Page/AdminConfigPage.xml deleted file mode 100644 index 9ae1ecab1c26e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/Page/AdminConfigPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminConfigPage" url="admin/system_config/" area="admin" module="Magento_Config"> - <section name="AdminConfigSection"/> - </page> - <page name="AdminContentManagementPage" url="admin/system_config/edit/section/cms/" area="admin" module="Magento_Config"> - <section name="ContentManagementSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/README.md deleted file mode 100644 index eb0b57b2886f2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Config** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/composer.json deleted file mode 100644 index 4f3c721c582b1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Config/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-config", - "description": "Magento 2 Functional Test Module Config", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-cron": "100.0.0-dev", - "magento/magento2-functional-test-module-deploy": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-email": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Config\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Config" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/README.md deleted file mode 100644 index 1cf979955a3cd..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_ConfigurableImportExport** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/composer.json deleted file mode 100644 index 2d8699d4999d5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableImportExport/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-configurable-import-export", - "description": "Magento 2 Functional Test Module Configurable Import Export", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-configurable-product": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-import-export": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\ConfigurableImportExport\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/ConfigurableImportExport" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontCategoryActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontCategoryActionGroup.xml deleted file mode 100644 index 6baf48fa6de04..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontCategoryActionGroup.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <!-- Check configurable product on the category page --> - <actionGroup name="StorefrontCheckCategoryConfigurableProduct"> - <arguments> - <argument name="product"/> - <argument name="optionProduct"/> - </arguments> - <seeElement selector="{{StorefrontCategoryProductSection.ProductTitleByName(product.name)}}" stepKey="assertProductName"/> - <see userInput="${{optionProduct.price}}.00" selector="{{StorefrontCategoryProductSection.ProductPriceByName(product.name)}}" stepKey="AssertProductPrice"/> - <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> - <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" /> - <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> - <seeElement selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="AssertAddToCart" /> - </actionGroup> -</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontCompareActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontCompareActionGroup.xml deleted file mode 100644 index 61bc922e6a7e1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontCompareActionGroup.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <!-- Check the configurable product in comparison page --> - <actionGroup name="StorefrontCheckCompareConfigurableProductActionGroup"> - <arguments> - <argument name="product"/> - <argument name="optionProduct"/> - </arguments> - <seeElement selector="{{StorefrontProductCompareMainSection.ProductLinkByName(product.name)}}" stepKey="assertProductName"/> - <see userInput="${{optionProduct.price}}.00" selector="{{StorefrontProductCompareMainSection.ProductPriceByName(product.name)}}" stepKey="assertProductPrice"/> - <see userInput="{{product.sku}}" selector="{{StorefrontProductCompareMainSection.ProductAttributeByCodeAndProductName('SKU', product.name)}}" stepKey="assertProductSku"/> - <!-- @TODO: MAGETWO-80272 Move to Magento_Checkout --> - <seeElement selector="{{StorefrontProductCompareMainSection.ProductAddToCartByName(product.name)}}" stepKey="assertProductAddToCart"/> - </actionGroup> -</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontProductActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontProductActionGroup.xml deleted file mode 100644 index 9358faeca4625..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontProductActionGroup.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <!-- Check the configurable product on the product page --> - <actionGroup name="StorefrontCheckConfigurableProduct"> - <arguments> - <argument name="product"/> - <argument name="optionProduct"/> - </arguments> - <seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> - <seeInTitle userInput="{{product.name}}" stepKey="AssertProductNameInTitle"/> - <see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/> - <see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/> - <see userInput="${{optionProduct.price}}.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/> - <see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertInStock"/> - <seeElement selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="assertAddToCart" /> - <see userInput="{{product.custom_attributes[description]}}" selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="assertProductDescription"/> - <see userInput="{{product.custom_attributes[short_description]}}" selector="{{StorefrontProductInfoMainSection.productShortDescription}}" stepKey="assertProductShortDescription"/> - </actionGroup> -</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontProductCartActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontProductCartActionGroup.xml deleted file mode 100644 index 3d813d4a06e43..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/ActionGroup/StorefrontProductCartActionGroup.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <!-- Check Configurable Product in the Cart --> - <actionGroup name="StorefrontCheckCartConfigurableProductActionGroup"> - <arguments> - <argument name="product"/> - <argument name="optionProduct"/> - <argument name="productQuantity"/> - </arguments> - <seeElement selector="{{CheckoutCartProductSection.ProductLinkByName(product.name)}}" stepKey="assertProductName"/> - <see userInput="${{optionProduct.price}}.00" selector="{{CheckoutCartProductSection.ProductPriceByName(product.name)}}" stepKey="assertProductPrice"/> - <seeInField userInput="{{productQuantity}}" selector="{{CheckoutCartProductSection.ProductQuantityByName(product.name)}}" stepKey="assertProductQuantity"/> - </actionGroup> - - <!-- Open the Minicart and check Configurable Product --> - <actionGroup name="StorefrontOpenMinicartAndCheckConfigurableProductActionGroup"> - <arguments> - <argument name="product"/> - <argument name="optionProduct"/> - </arguments> - <waitForElement selector="{{StorefrontMinicartSection.productLinkByName(product.name)}}" stepKey="waitForMinicartProduct" /> - <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickShowMinicart" /> - <see userInput="${{optionProduct.price}}.00" selector="{{StorefrontMinicartSection.productPriceByName(product.name)}}" stepKey="assertProductPrice"/> - </actionGroup> -</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConfigurableProductOptionData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConfigurableProductOptionData.xml deleted file mode 100644 index 2174abf07d448..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConfigurableProductOptionData.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="ConfigurableProductTwoOptions" type="ConfigurableProductOption"> - <var key="attribute_id" entityKey="attribute_id" entityType="ProductAttribute" /> - <data key="label">option</data> - <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity> - <requiredEntity type="ValueIndex">ValueIndex2</requiredEntity> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConstData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConstData.xml deleted file mode 100644 index 457f59f214f9e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ConstData.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> - <entity name="CONST" type="CONST"> - <data key="three">3</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ValueIndexData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ValueIndexData.xml deleted file mode 100644 index e42185e9a01c5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Data/ValueIndexData.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="ValueIndex1" type="ValueIndex"> - <var key="value_index" entityKey="value" entityType="ProductAttributeOption"/> - </entity> - <entity name="ValueIndex2" type="ValueIndex"> - <var key="value_index" entityKey="value" entityType="ProductAttributeOption"/> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/configurable_product_add_child-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/configurable_product_add_child-meta.xml deleted file mode 100644 index 9799409c7de43..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/configurable_product_add_child-meta.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="ConfigurableProductAddChild" dataType="ConfigurableProductAddChild" type="create" auth="adminOauth" url="/V1/configurable-products/{sku}/child" method="POST"> - <contentType>application/json</contentType> - <field key="childSku">string</field> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/valueIndex-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/valueIndex-meta.xml deleted file mode 100644 index 891281cba01ca..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Metadata/valueIndex-meta.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="ValueIndex" dataType="ValueIndex" type="create"> - <field key="value_index">integer</field> - </operation> -</operations> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Page/AdminProductCreatePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Page/AdminProductCreatePage.xml deleted file mode 100644 index 6053aa3085ac0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Page/AdminProductCreatePage.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true"> - <section name="AdminProductFormConfigurationsSection"/> - <section name="AdminCreateProductConfigurationsPanel"/> - <section name="AdminNewAttributePanel"/> - <section name="AdminChooseAffectedAttributeSetPopup"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/README.md deleted file mode 100644 index 3db572028f728..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_ConfigurableProduct** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminChooseAffectedAttributeSetSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminChooseAffectedAttributeSetSection.xml deleted file mode 100644 index 69f81a2360999..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminChooseAffectedAttributeSetSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminChooseAffectedAttributeSetPopup"> - <element name="confirm" type="button" selector="button[data-index='confirm_button']" timeout="30"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminNewAttributePanelSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminNewAttributePanelSection.xml deleted file mode 100644 index 469afa426bc1f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminNewAttributePanelSection.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminNewAttributePanel"> - <element name="container" type="text" selector="#create_new_attribute"/> - <element name="saveAttribute" type="button" selector="#save"/> - <element name="newAttributeIFrame" type="iframe" selector="create_new_attribute_container"/> - <element name="defaultLabel" type="input" selector="input[name='frontend_label[0]']"/> - <element name="inputType" type="select" selector="select[name='frontend_input']" timeout="30"/> - <element name="addOption" type="button" selector="#add_new_option_button"/> - <element name="isDefault" type="radio" selector="[data-role='options-container'] tr:nth-of-type({{row}}) input[name='default[]']" parameterized="true"/> - <element name="optionAdminValue" type="input" selector="[data-role='options-container'] input[name='option[value][option_{{row}}][0]']" parameterized="true"/> - <element name="optionDefaultStoreValue" type="input" selector="[data-role='options-container'] input[name='option[value][option_{{row}}][1]']" parameterized="true"/> - <element name="deleteOption" type="button" selector="#delete_button_option_{{row}}" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductGridActionSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductGridActionSection.xml deleted file mode 100644 index c09e58294abcc..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductGridActionSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductGridActionSection"> - <element name="addConfigurableProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-configurable']" timeout="30"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/StorefrontProductInfoMainSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/StorefrontProductInfoMainSection.xml deleted file mode 100644 index 45bf866551319..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/StorefrontProductInfoMainSection.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductInfoMainSection"> - <element name="optionByAttributeId" type="input" selector="#attribute{{var1}}" parameterized="true"/> - <element name="productAttributeTitle1" type="text" selector="#product-options-wrapper div[tabindex='0'] label"/> - <element name="productAttributeOptions1" type="select" selector="#product-options-wrapper div[tabindex='0'] option"/> - <element name="productAttributeOptionsSelectButton" type="select" selector="#product-options-wrapper .super-attribute-select"/> - <element name="productAttributeOptionsError" type="text" selector="//div[@class='mage-error']"/> - <!-- Parameter is the order number of the attribute on the page (1 is the newest) --> - <element name="nthAttributeOnPage" type="block" selector="tr:nth-of-type({{numElement}}) .data" parameterized="true"/> - <element name="stockIndication" type="block" selector=".stock" /> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductOutOfStockTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductOutOfStockTest.xml deleted file mode 100644 index 96651e303c5f2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductOutOfStockTest.xml +++ /dev/null @@ -1,134 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="AdminConfigurableProductOutOfStockTest"> - <annotations> - <features value="ConfigurableProduct"/> - <stories value="Product visibility when in stock/out of stock"/> - <title value="Configurable Product goes 'Out of Stock' if all associated Simple Products are 'Out of Stock'"/> - <description value="Configurable Product goes 'Out of Stock' if all associated Simple Products are 'Out of Stock'"/> - <testCaseId value="MC-181"/> - <group value="ConfigurableProduct"/> - </annotations> - <before> - <!-- TODO: This should be converted to an actionGroup once MQE-993 is fixed. --> - <!-- Create the category to put the product in --> - <createData entity="ApiCategory" stepKey="createCategory"/> - - <!-- Create the configurable product based on the data in the /data folder --> - <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> - <requiredEntity createDataKey="createCategory"/> - </createData> - - <!-- Make the configurable product have two options, that are children of the default attribute set --> - <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> - <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </createData> - <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </createData> - <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </createData> - <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </getData> - <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </getData> - - <!-- Create the 2 children that will be a part of the configurable product --> - <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - <requiredEntity createDataKey="getConfigAttributeOption1"/> - </createData> - <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - <requiredEntity createDataKey="getConfigAttributeOption2"/> - </createData> - - <!-- Assign the two products to the configurable product --> - <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> - <requiredEntity createDataKey="createConfigProduct"/> - <requiredEntity createDataKey="createConfigProductAttribute"/> - <requiredEntity createDataKey="getConfigAttributeOption1"/> - <requiredEntity createDataKey="getConfigAttributeOption2"/> - </createData> - <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> - <requiredEntity createDataKey="createConfigProduct"/> - <requiredEntity createDataKey="createConfigChildProduct1"/> - </createData> - <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> - <requiredEntity createDataKey="createConfigProduct"/> - <requiredEntity createDataKey="createConfigChildProduct2"/> - </createData> - - <!-- log in --> - <actionGroup ref="LoginAsAdmin" stepKey="login"/> - </before> - - <after> - <amOnPage url="admin/admin/auth/logout/" stepKey="logout"/> - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> - <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> - <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> - <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> - </after> - - <!-- Check to make sure that the configurable product shows up as in stock --> - <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage"/> - <waitForPageLoad stepKey="waitForStoreFrontLoad"/> - <see stepKey="lookForOutOfStock" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK" /> - - <!-- Find the first simple product that we just created using the product grid and go to its page--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> - <waitForPageLoad stepKey="waitForAdminProductGridLoad"/> - <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/> - <actionGroup ref="filterProductGridBySku" stepKey="findCreatedProduct"> - <argument name="product" value="ApiSimpleOne"/> - </actionGroup> - <waitForPageLoad stepKey="waitForFiltersToBeApplied"/> - <click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/> - <waitForPageLoad stepKey="waitForProductPageLoad"/> - - <!-- Edit the quantity of the simple first product as 0 --> - <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="0" stepKey="fillProductQuantity"/> - <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/> - <waitForPageLoad stepKey="waitForProductPageSaved"/> - - <!-- Check to make sure that the configurable product shows up as in stock --> - <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage2"/> - <waitForPageLoad stepKey="waitForStoreFrontLoad2"/> - <see stepKey="lookForOutOfStock2" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK"/> - - <!-- Find the second simple product that we just created using the product grid and go to its page--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage2"/> - <waitForPageLoad stepKey="waitForAdminProductGridLoad2"/> - <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial2"/> - <actionGroup ref="filterProductGridBySku" stepKey="findCreatedProduct2"> - <argument name="product" value="ApiSimpleTwo"/> - </actionGroup> - <waitForPageLoad stepKey="waitForFiltersToBeApplied2"/> - <click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage2"/> - <waitForPageLoad stepKey="waitForProductPageLoad2"/> - - <!-- Edit the quantity of the second simple product as 0 --> - <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="0" stepKey="fillProductQuantity2"/> - <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct2"/> - <waitForPageLoad stepKey="waitForProductPageSaved2"/> - - <!-- Check to make sure that the configurable product shows up as out of stock --> - <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage3"/> - <waitForPageLoad stepKey="waitForStoreFrontLoad3"/> - <see stepKey="lookForOutOfStock3" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="OUT OF STOCK"/> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CAdminTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CAdminTest.xml deleted file mode 100644 index 44b59de43a9be..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CAdminTest.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CAdminTest"> - <!--Create configurable product--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageConfigurable" after="seeSimpleProductInGrid"/> - <waitForPageLoad stepKey="waitForProductPageLoadConfigurable" after="visitAdminProductPageConfigurable"/> - <actionGroup ref="goToCreateProductPage" stepKey="goToCreateConfigurableProduct" after="waitForProductPageLoadConfigurable"> - <argument name="product" value="BaseConfigurableProduct"/> - </actionGroup> - <actionGroup ref="checkRequiredFieldsInProductForm" stepKey="checkRequiredFieldsProductConfigurable" after="goToCreateConfigurableProduct"/> - <actionGroup ref="fillMainProductForm" stepKey="fillConfigurableProductMain" after="checkRequiredFieldsProductConfigurable"> - <argument name="product" value="BaseConfigurableProduct"/> - </actionGroup> - <!--Create product configurations--> - <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickCreateConfigurations" after="fillConfigurableProductMain"/> - <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" time="30" stepKey="waitForConfigurationModalOpen" after="clickCreateConfigurations"/> - <!--Create new attribute--> - <click selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" stepKey="clickCreateNewAttribute" after="waitForConfigurationModalOpen"/> - <switchToIFrame selector="{{AdminNewAttributePanel.newAttributeIFrame}}" stepKey="enterAttributePanelIFrame" after="clickCreateNewAttribute"/> - <wait time="2" stepKey="waitForModalIframeReady" after="enterAttributePanelIFrame"/> - <waitForElementVisible selector="{{AdminNewAttributePanel.defaultLabel}}" time="30" stepKey="waitForIframeLoad" after="waitForModalIframeReady"/> - <fillField selector="{{AdminNewAttributePanel.defaultLabel}}" userInput="{{colorProductAttribute.default_label}}" stepKey="fillDefaultLabel" after="waitForIframeLoad"/> - <selectOption selector="{{AdminNewAttributePanel.inputType}}" userInput="{{colorProductAttribute.input_type}}" stepKey="selectAttributeInputType" after="fillDefaultLabel"/> - <!--Add option 1 to attribute--> - <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption1" after="selectAttributeInputType"/> - <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('1')}}" time="30" stepKey="waitForOptionRow1" after="clickAddOption1"/> - <fillField selector="{{AdminNewAttributePanel.optionAdminValue('0')}}" userInput="{{colorProductAttribute1.name}}" stepKey="fillAdminLabel1" after="waitForOptionRow1"/> - <fillField selector="{{AdminNewAttributePanel.optionDefaultStoreValue('0')}}" userInput="{{colorProductAttribute1.name}}" stepKey="fillDefaultLabel1" after="fillAdminLabel1"/> - <!--Add option 2 to attribute--> - <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption2" after="fillDefaultLabel1"/> - <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('2')}}" time="30" stepKey="waitForOptionRow2" after="clickAddOption2"/> - <fillField selector="{{AdminNewAttributePanel.optionAdminValue('1')}}" userInput="{{colorProductAttribute2.name}}" stepKey="fillAdminLabel2" after="waitForOptionRow2"/> - <fillField selector="{{AdminNewAttributePanel.optionDefaultStoreValue('1')}}" userInput="{{colorProductAttribute2.name}}" stepKey="fillDefaultLabel2" after="fillAdminLabel2"/> - <!--Save new attribute--> - <click selector="{{AdminNewAttributePanel.saveAttribute}}" stepKey="clickSaveAttribute" after="fillDefaultLabel2"/> - <switchToIFrame stepKey="switchToParentPage" after="clickSaveAttribute"/> - <waitForElementNotVisible selector="{{AdminNewAttributePanel.container}}" time="30" stepKey="waitForNewAttributePanelClose" after="switchToParentPage"/> - <waitForLoadingMaskToDisappear stepKey="waitForSaveAttributeLoadingMask" after="waitForNewAttributePanelClose"/> - <!--Find new attribute in grid and select--> - <click selector="{{AdminCreateProductConfigurationsPanel.filters}}" stepKey="openFilterPanel" after="waitForSaveAttributeLoadingMask"/> - <fillField selector="{{AdminCreateProductConfigurationsPanel.attributeCode}}" userInput="{{colorProductAttribute.default_label}}" stepKey="fillAttributeCodeFilter" after="openFilterPanel"/> - <click selector="{{AdminCreateProductConfigurationsPanel.applyFilters}}" stepKey="clickApplyFiltersAttribute" after="fillAttributeCodeFilter"/> - <checkOption selector="{{AdminCreateProductConfigurationsPanel.firstCheckbox}}" stepKey="checkAttributeInGrid" after="clickApplyFiltersAttribute"/> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNext1" after="checkAttributeInGrid"/> - <!--Select all options for attribute--> - <click selector="{{AdminCreateProductConfigurationsPanel.selectAll}}" stepKey="selectAllAttributeOptions" after="clickNext1"/> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNext2" after="selectAllAttributeOptions"/> - <!--Images, price and quantity configuration--> - <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="selectApplySingleQty" after="clickNext2"/> - <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="{{BaseConfigurableProduct.quantity}}" stepKey="fillConfigurableQuantity" after="selectApplySingleQty"/> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNext3" after="fillConfigurableQuantity"/> - <!--Generate products--> - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickGenerateProducts" after="clickNext3"/> - <!--Save configurable product--> - <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveConfigurableProduct" after="clickGenerateProducts"/> - <waitForElementVisible selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" time="30" stepKey="waitForAttributeSetConfirmation" after="clickSaveConfigurableProduct"/> - <click selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="clickConfirmAttributeSet" after="waitForAttributeSetConfirmation"/> - <see selector="You saved the product" stepKey="seeConfigurableSaveConfirmation" after="clickConfirmAttributeSet"/> - <actionGroup ref="viewConfigurableProductInAdminGrid" stepKey="viewConfigurableProductInGrid" after="seeConfigurableSaveConfirmation"> - <argument name="product" value="BaseConfigurableProduct"/> - </actionGroup> - - <!--@TODO Move cleanup to "after" when MQE-830 is resolved--> - <comment userInput="Clean up configurable product" stepKey="cleanUpConfigurableProduct" after="deleteSimpleProduct"/> - <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteConfigurableProduct" after="cleanUpConfigurableProduct"> - <argument name="product" value="BaseConfigurableProduct"/> - </actionGroup> - </test> -</tests> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CGuestUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CGuestUserTest.xml deleted file mode 100644 index 2102bf0a24195..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CGuestUserTest.xml +++ /dev/null @@ -1,220 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CGuestUserTest"> - <before> - <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> - <requiredEntity createDataKey="createCategory"/> - </createData> - <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> - <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </createData> - <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </createData> - <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </createData> - <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </getData> - <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </getData> - <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - <requiredEntity createDataKey="getConfigAttributeOption1"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigChildProduct1Image"> - <requiredEntity createDataKey="createConfigChildProduct1"/> - </createData> - <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - <requiredEntity createDataKey="getConfigAttributeOption2"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createConfigChildProduct2Image"> - <requiredEntity createDataKey="createConfigChildProduct2"/> - </createData> - <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> - <requiredEntity createDataKey="createConfigProduct"/> - <requiredEntity createDataKey="createConfigProductAttribute"/> - <requiredEntity createDataKey="getConfigAttributeOption1"/> - <requiredEntity createDataKey="getConfigAttributeOption2"/> - </createData> - <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> - <requiredEntity createDataKey="createConfigProduct"/> - <requiredEntity createDataKey="createConfigChildProduct1"/> - </createData> - <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> - <requiredEntity createDataKey="createConfigProduct"/> - <requiredEntity createDataKey="createConfigChildProduct2"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigProductImage"> - <requiredEntity createDataKey="createConfigProduct"/> - </createData> - <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateConfigProduct" createDataKey="createConfigProduct"/> - </before> - <after> - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createConfigChildProduct1Image" stepKey="deleteConfigChildProduct1Image"/>--> - <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createConfigChildProduct2Image" stepKey="deleteConfigChildProduct2Image"/>--> - <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createConfigProductImage" stepKey="deleteConfigProductImage"/>--> - <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> - <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> - </after> - - <!-- Verify Configurable Product in checkout cart items --> - <comment userInput="Verify Configurable Product in checkout cart items" stepKey="commentVerifyConfigurableProductInCheckoutCartItems" after="guestCheckoutCheckSimpleProduct2InCartItems" /> - <actionGroup ref="CheckConfigurableProductInCheckoutCartItemsActionGroup" stepKey="guestCheckoutCheckConfigurableProductInCartItems" after="commentVerifyConfigurableProductInCheckoutCartItems"> - <argument name="productVar" value="$$createConfigProduct$$"/> - <argument name="optionLabel" value="$$createConfigProductAttribute.attribute[frontend_labels][0][label]$$" /> - <argument name="optionValue" value="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" /> - </actionGroup> - - <!-- Check configurable product in category --> - <comment userInput="Verify Configurable Product in category" stepKey="commentVerifyConfigurableProductInCategory" after="browseAssertSimpleProduct2ImageNotDefault" /> - <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="browseAssertCategoryConfigProduct" after="commentVerifyConfigurableProductInCategory"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="browseGrabConfigProductImageSrc" after="browseAssertCategoryConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabConfigProductImageSrc" stepKey="browseAssertConfigProductImageNotDefault" after="browseGrabConfigProductImageSrc"/> - - <!-- View Configurable Product --> - <comment userInput="View Configurable Product" stepKey="commentViewConfigurableProduct" after="browseAssertSimpleProduct2PageImageNotDefault" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory2" after="commentViewConfigurableProduct"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="browseClickCategoryConfigProductView" after="clickCategory2"/> - <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductViewloaded" after="browseClickCategoryConfigProductView"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="browseAssertConfigProductPage" after="waitForConfigurableProductViewloaded"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabConfigProductPageImageSrc" after="browseAssertConfigProductPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabConfigProductPageImageSrc" stepKey="browseAssertConfigProductPageImageNotDefault" after="browseGrabConfigProductPageImageSrc"/> - - <!-- Add Configurable Product to cart --> - <comment userInput="Add Configurable Product to cart" stepKey="commentAddConfigurableProductToCart" after="cartAddProduct2ToCart" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory2" after="commentAddConfigurableProductToCart"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartCategory2loaded" after="cartClickCategory2"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForConfigurableProduct" after="waitForCartCategory2loaded"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="cartAssertConfigProduct" after="cartAssertCategory1ForConfigurableProduct"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartGrabConfigProductImageSrc" after="cartAssertConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabConfigProductImageSrc" stepKey="cartAssertConfigProductImageNotDefault" after="cartGrabConfigProductImageSrc"/> - <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName($$createConfigProduct.name$$)}}" stepKey="cartClickCategoryConfigProductAddToCart" after="cartAssertConfigProductImageNotDefault"/> - <waitForElement selector="{{StorefrontMessagesSection.message('You need to choose options for your item.')}}" time="30" stepKey="cartWaitForConfigProductPageLoad" after="cartClickCategoryConfigProductAddToCart"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductPage" after="cartWaitForConfigProductPageLoad"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc1" after="cartAssertConfigProductPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc1" stepKey="cartAssertConfigProductPageImageNotDefault1" after="cartGrabConfigProductPageImageSrc1"/> - <selectOption userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontProductInfoMainSection.optionByAttributeId($$createConfigProductAttribute.attribute_id$$)}}" stepKey="cartConfigProductFillOption" after="cartAssertConfigProductPageImageNotDefault1"/> - <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductOptionloaded" after="cartConfigProductFillOption"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductWithOptionPage" after="waitForConfigurableProductOptionloaded"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc2" after="cartAssertConfigProductWithOptionPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc2" stepKey="cartAssertConfigProductPageImageNotDefault2" after="cartGrabConfigProductPageImageSrc2"/> - <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddConfigProductToCart" after="cartAssertConfigProductPageImageNotDefault2"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - - <!-- Check configurable product in minicart --> - <comment userInput="Check configurable product in minicart" stepKey="commentCheckConfigurableProductInMinicart" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> - <actionGroup ref="StorefrontOpenMinicartAndCheckConfigurableProductActionGroup" stepKey="cartOpenMinicartAndCheckConfigProduct" after="commentCheckConfigurableProductInMinicart"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartMinicartGrabConfigProductImageSrc" after="cartOpenMinicartAndCheckConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabConfigProductImageSrc" stepKey="cartMinicartAssertConfigProductImageNotDefault" after="cartMinicartGrabConfigProductImageSrc"/> - <click selector="{{StorefrontMinicartSection.productOptionsDetailsByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProductDetails" after="cartMinicartAssertConfigProductImageNotDefault"/> - <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontMinicartSection.productOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartMinicartCheckConfigProductOption" after="cartMinicartClickConfigProductDetails"/> - <click selector="{{StorefrontMinicartSection.productLinkByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProduct" after="cartMinicartCheckConfigProductOption"/> - <waitForLoadingMaskToDisappear stepKey="waitForMinicartConfigProductloaded" after="cartMinicartClickConfigProduct"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertMinicartConfigProductPage" after="waitForMinicartConfigProductloaded"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabConfigProductPageImageSrc" after="cartAssertMinicartConfigProductPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabConfigProductPageImageSrc" stepKey="cartMinicartAssertConfigProductPageImageNotDefault" after="cartMinicartGrabConfigProductPageImageSrc"/> - - <!-- Check configurable product in cart --> - <comment userInput="Check configurable product in cart" stepKey="commentCheckConfigurableProductInCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> - <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart2" after="commentCheckConfigurableProductInCart"/> - <actionGroup ref="StorefrontCheckCartConfigurableProductActionGroup" stepKey="cartAssertCartConfigProduct" after="cartOpenCart2"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productQuantity" value="CONST.one"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartCartGrabConfigProduct2ImageSrc" after="cartAssertCartConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabConfigProduct2ImageSrc" stepKey="cartCartAssertConfigProduct2ImageNotDefault" after="cartCartGrabConfigProduct2ImageSrc"/> - <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{CheckoutCartProductSection.ProductOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartCheckConfigProductOption" after="cartCartAssertConfigProduct2ImageNotDefault"/> - <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createConfigProduct.name$$)}}" stepKey="cartClickCartConfigProduct" after="cartCheckConfigProductOption"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartConfigProductloaded" after="cartClickCartConfigProduct"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertCartConfigProductPage" after="waitForCartConfigProductloaded"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabConfigProductPageImageSrc" after="cartAssertCartConfigProductPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabConfigProductPageImageSrc" stepKey="cartCartAssertConfigProductPageImageNotDefault" after="cartCartGrabConfigProductPageImageSrc"/> - - <!-- Add Configurable Product to comparison --> - <comment userInput="Add Configurable Product to comparison" stepKey="commentAddConfigurableProductToComparison" after="compareAddSimpleProduct2ToCompare" /> - <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="compareAssertConfigProduct" after="commentAddConfigurableProductToComparison"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrc" after="compareAssertConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrc" stepKey="compareAssertConfigProductImageNotDefault" after="compareGrabConfigProductImageSrc"/> - <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddConfigProductToCompare" after="compareAssertConfigProductImageNotDefault"> - <argument name="productVar" value="$$createConfigProduct$$"/> - </actionGroup> - - <!-- Check configurable product in comparison sidebar --> - <comment userInput="Add Configurable Product in comparison sidebar" stepKey="commentAddConfigurableProductInComparisonSidebar" after="compareSimpleProduct2InSidebar" /> - <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareConfigProductInSidebar" after="commentAddConfigurableProductInComparisonSidebar"> - <argument name="productVar" value="$$createConfigProduct$$"/> - </actionGroup> - - <!-- Check configurable product on comparison page --> - <comment userInput="Add Configurable Product on comparison page" stepKey="commentAddConfigurableProductOnComparisonPage" after="compareAssertSimpleProduct2ImageNotDefaultInComparison" /> - <actionGroup ref="StorefrontCheckCompareConfigurableProductActionGroup" stepKey="compareAssertConfigProductInComparison" after="commentAddConfigurableProductOnComparisonPage"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrcInComparison" after="compareAssertConfigProductInComparison"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrcInComparison" stepKey="compareAssertConfigProductImageNotDefaultInComparison" after="compareGrabConfigProductImageSrcInComparison"/> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CLoggedInUserTest.xml deleted file mode 100644 index 3d29b0e96c874..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CLoggedInUserTest.xml +++ /dev/null @@ -1,220 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CLoggedInUserTest"> - <before> - <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> - <requiredEntity createDataKey="createCategory"/> - </createData> - <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> - <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </createData> - <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </createData> - <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </createData> - <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </getData> - <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - </getData> - <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - <requiredEntity createDataKey="getConfigAttributeOption1"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigChildProduct1Image"> - <requiredEntity createDataKey="createConfigChildProduct1"/> - </createData> - <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> - <requiredEntity createDataKey="createConfigProductAttribute"/> - <requiredEntity createDataKey="getConfigAttributeOption2"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createConfigChildProduct2Image"> - <requiredEntity createDataKey="createConfigChildProduct2"/> - </createData> - <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> - <requiredEntity createDataKey="createConfigProduct"/> - <requiredEntity createDataKey="createConfigProductAttribute"/> - <requiredEntity createDataKey="getConfigAttributeOption1"/> - <requiredEntity createDataKey="getConfigAttributeOption2"/> - </createData> - <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> - <requiredEntity createDataKey="createConfigProduct"/> - <requiredEntity createDataKey="createConfigChildProduct1"/> - </createData> - <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> - <requiredEntity createDataKey="createConfigProduct"/> - <requiredEntity createDataKey="createConfigChildProduct2"/> - </createData> - <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigProductImage"> - <requiredEntity createDataKey="createConfigProduct"/> - </createData> - <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateConfigProduct" createDataKey="createConfigProduct"/> - </before> - <after> - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createConfigChildProduct1Image" stepKey="deleteConfigChildProduct1Image"/>--> - <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createConfigChildProduct2Image" stepKey="deleteConfigChildProduct2Image"/>--> - <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> - <!-- @TODO: Uncomment once MQE-679 is fixed --> - <!--<deleteData createDataKey="createConfigProductImage" stepKey="deleteConfigProductImage"/>--> - <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> - <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> - </after> - - <!-- Verify Configurable Product in checkout cart items --> - <comment userInput="Verify Configurable Product in checkout cart items" stepKey="commentVerifyConfigurableProductInCheckoutCartItems" after="checkoutCheckSimpleProduct2InCartItems" /> - <actionGroup ref="CheckConfigurableProductInCheckoutCartItemsActionGroup" stepKey="checkoutCheckConfigurableProductInCartItems" after="commentVerifyConfigurableProductInCheckoutCartItems"> - <argument name="productVar" value="$$createConfigProduct$$"/> - <argument name="optionLabel" value="$$createConfigProductAttribute.attribute[frontend_labels][0][label]$$" /> - <argument name="optionValue" value="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" /> - </actionGroup> - - <!-- Check configurable product in category --> - <comment userInput="Verify Configurable Product in category" stepKey="commentVerifyConfigurableProductInCategory" after="browseAssertSimpleProduct2ImageNotDefault" /> - <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="browseAssertCategoryConfigProduct" after="commentVerifyConfigurableProductInCategory"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="browseGrabConfigProductImageSrc" after="browseAssertCategoryConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabConfigProductImageSrc" stepKey="browseAssertConfigProductImageNotDefault" after="browseGrabConfigProductImageSrc"/> - - <!-- View Configurable Product --> - <comment userInput="View Configurable Product" stepKey="commentViewConfigurableProduct" after="browseAssertSimpleProduct2PageImageNotDefault" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory2" after="commentViewConfigurableProduct"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="browseClickCategoryConfigProductView" after="clickCategory2"/> - <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductViewloaded" after="browseClickCategoryConfigProductView"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="browseAssertConfigProductPage" after="waitForConfigurableProductViewloaded"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabConfigProductPageImageSrc" after="browseAssertConfigProductPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabConfigProductPageImageSrc" stepKey="browseAssertConfigProductPageImageNotDefault" after="browseGrabConfigProductPageImageSrc"/> - - <!-- Add Configurable Product to cart --> - <comment userInput="Add Configurable Product to cart" stepKey="commentAddConfigurableProductToCart" after="cartAddProduct2ToCart" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory2" after="commentAddConfigurableProductToCart"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartCategory2loaded" after="cartClickCategory2"/> - <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForConfigurableProduct" after="waitForCartCategory2loaded"> - <argument name="category" value="$$createCategory$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="cartAssertConfigProduct" after="cartAssertCategory1ForConfigurableProduct"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartGrabConfigProductImageSrc" after="cartAssertConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabConfigProductImageSrc" stepKey="cartAssertConfigProductImageNotDefault" after="cartGrabConfigProductImageSrc"/> - <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName($$createConfigProduct.name$$)}}" stepKey="cartClickCategoryConfigProductAddToCart" after="cartAssertConfigProductImageNotDefault"/> - <waitForElement selector="{{StorefrontMessagesSection.message('You need to choose options for your item.')}}" time="30" stepKey="cartWaitForConfigProductPageLoad" after="cartClickCategoryConfigProductAddToCart"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductPage" after="cartWaitForConfigProductPageLoad"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc1" after="cartAssertConfigProductPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc1" stepKey="cartAssertConfigProductPageImageNotDefault1" after="cartGrabConfigProductPageImageSrc1"/> - <selectOption userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontProductInfoMainSection.optionByAttributeId($$createConfigProductAttribute.attribute_id$$)}}" stepKey="cartConfigProductFillOption" after="cartAssertConfigProductPageImageNotDefault1"/> - <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductOptionloaded" after="cartConfigProductFillOption"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductWithOptionPage" after="waitForConfigurableProductOptionloaded"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc2" after="cartAssertConfigProductWithOptionPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc2" stepKey="cartAssertConfigProductPageImageNotDefault2" after="cartGrabConfigProductPageImageSrc2"/> - <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddConfigProductToCart" after="cartAssertConfigProductPageImageNotDefault2"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="productCount" value="3"/> - </actionGroup> - - <!-- Check configurable product in minicart --> - <comment userInput="Check configurable product in minicart" stepKey="commentCheckConfigurableProductInMinicart" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> - <actionGroup ref="StorefrontOpenMinicartAndCheckConfigurableProductActionGroup" stepKey="cartOpenMinicartAndCheckConfigProduct" after="commentCheckConfigurableProductInMinicart"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartMinicartGrabConfigProductImageSrc" after="cartOpenMinicartAndCheckConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabConfigProductImageSrc" stepKey="cartMinicartAssertConfigProductImageNotDefault" after="cartMinicartGrabConfigProductImageSrc"/> - <click selector="{{StorefrontMinicartSection.productOptionsDetailsByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProductDetails" after="cartMinicartAssertConfigProductImageNotDefault"/> - <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontMinicartSection.productOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartMinicartCheckConfigProductOption" after="cartMinicartClickConfigProductDetails"/> - <click selector="{{StorefrontMinicartSection.productLinkByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProduct" after="cartMinicartCheckConfigProductOption"/> - <waitForLoadingMaskToDisappear stepKey="waitForMinicartConfigProductloaded" after="cartMinicartClickConfigProduct"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertMinicartConfigProductPage" after="waitForMinicartConfigProductloaded"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabConfigProductPageImageSrc" after="cartAssertMinicartConfigProductPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabConfigProductPageImageSrc" stepKey="cartMinicartAssertConfigProductPageImageNotDefault" after="cartMinicartGrabConfigProductPageImageSrc"/> - - <!-- Check configurable product in cart --> - <comment userInput="Check configurable product in cart" stepKey="commentCheckConfigurableProductInCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> - <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart2" after="commentCheckConfigurableProductInCart"/> - <actionGroup ref="StorefrontCheckCartConfigurableProductActionGroup" stepKey="cartAssertCartConfigProduct" after="cartOpenCart2"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productQuantity" value="CONST.one"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartCartGrabConfigProduct2ImageSrc" after="cartAssertCartConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabConfigProduct2ImageSrc" stepKey="cartCartAssertConfigProduct2ImageNotDefault" after="cartCartGrabConfigProduct2ImageSrc"/> - <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{CheckoutCartProductSection.ProductOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartCheckConfigProductOption" after="cartCartAssertConfigProduct2ImageNotDefault"/> - <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createConfigProduct.name$$)}}" stepKey="cartClickCartConfigProduct" after="cartCheckConfigProductOption"/> - <waitForLoadingMaskToDisappear stepKey="waitForCartConfigProductloaded" after="cartClickCartConfigProduct"/> - <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertCartConfigProductPage" after="waitForCartConfigProductloaded"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabConfigProductPageImageSrc" after="cartAssertCartConfigProductPage"/> - <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabConfigProductPageImageSrc" stepKey="cartCartAssertConfigProductPageImageNotDefault" after="cartCartGrabConfigProductPageImageSrc"/> - - <!-- Add Configurable Product to comparison --> - <comment userInput="Add Configurable Product to comparison" stepKey="commentAddConfigurableProductToComparison" after="compareAddSimpleProduct2ToCompare" /> - <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="compareAssertConfigProduct" after="commentAddConfigurableProductToComparison"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrc" after="compareAssertConfigProduct"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrc" stepKey="compareAssertConfigProductImageNotDefault" after="compareGrabConfigProductImageSrc"/> - <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddConfigProductToCompare" after="compareAssertConfigProductImageNotDefault"> - <argument name="productVar" value="$$createConfigProduct$$"/> - </actionGroup> - - <!-- Check configurable product in comparison sidebar --> - <comment userInput="Add Configurable Product in comparison sidebar" stepKey="commentAddConfigurableProductInComparisonSidebar" after="compareSimpleProduct2InSidebar" /> - <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareConfigProductInSidebar" after="commentAddConfigurableProductInComparisonSidebar"> - <argument name="productVar" value="$$createConfigProduct$$"/> - </actionGroup> - - <!-- Check configurable product on comparison page --> - <comment userInput="Add Configurable Product on comparison page" stepKey="commentAddConfigurableProductOnComparisonPage" after="compareAssertSimpleProduct2ImageNotDefaultInComparison" /> - <actionGroup ref="StorefrontCheckCompareConfigurableProductActionGroup" stepKey="compareAssertConfigProductInComparison" after="commentAddConfigurableProductOnComparisonPage"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> - </actionGroup> - <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> - <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrcInComparison" after="compareAssertConfigProductInComparison"/> - <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrcInComparison" stepKey="compareAssertConfigProductImageNotDefaultInComparison" after="compareGrabConfigProductImageSrcInComparison"/> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/composer.json deleted file mode 100644 index e9f74ef5ddbc6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-configurable-product", - "description": "Magento 2 Functional Test Module Configurable Product", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-msrp": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\ConfigurableProduct\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/ConfigurableProduct" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductSales/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductSales/README.md deleted file mode 100644 index ebd5a01b14fa9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductSales/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_ConfigurableProductSales** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductSales/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductSales/composer.json deleted file mode 100644 index 629ead23ae981..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductSales/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-configurable-product-sales", - "description": "Magento 2 Functional Test Module Configurable Product Sales", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\ConfigurableProductSales\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/ConfigurableProductSales" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/README.md deleted file mode 100644 index 1baafbefac03a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Contact** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/composer.json deleted file mode 100644 index b77a865b04de1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Contact/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-contact", - "description": "Magento 2 Functional Test Module Contact", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Contact\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Contact" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/README.md deleted file mode 100644 index ed80d8f232ca7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Cookie** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/composer.json deleted file mode 100644 index 4d55d54479092..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cookie/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-cookie", - "description": "Magento 2 Functional Test Module Cookie", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Cookie\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Cookie" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/README.md deleted file mode 100644 index a3394b9a18177..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Cron** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/composer.json deleted file mode 100644 index ad913508c5cbb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cron/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-cron", - "description": "Magento 2 Functional Test Module Cron", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Cron\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Cron" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/README.md deleted file mode 100644 index e5e9c0458b1b6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CurrencySymbol** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/composer.json deleted file mode 100644 index 335cee4939672..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CurrencySymbol/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-currency-symbol", - "description": "Magento 2 Functional Test Module Currency Symbol", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-page-cache": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CurrencySymbol\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CurrencySymbol" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/AddressData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/AddressData.xml deleted file mode 100644 index efa7a1cdb5e69..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/AddressData.xml +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="CustomerAddressSimple" type="address"> - <data key="id">0</data> - <data key="customer_id">12</data> - <requiredEntity type="region">CustomerRegionOne</requiredEntity> - <data key="region_id">0</data> - <data key="country_id">USA</data> - <array key="street"> - <item>7700 W Parmer Ln</item> - <item>Bld D</item> - </array> - <data key="company">Magento</data> - <data key="telephone">1234568910</data> - <data key="fax">1234568910</data> - <data key="postcode">78729</data> - <data key="city">Austin</data> - <data key="state">Texas</data> - <data key="firstname">John</data> - <data key="lastname">Doe</data> - <data key="middlename">string</data> - <data key="prefix">Mr</data> - <data key="suffix">Sr</data> - <data key="vat_id">vatData</data> - <data key="default_shipping">true</data> - <data key="default_billing">true</data> - </entity> - <entity name="US_Address_TX" type="address"> - <data key="firstname">John</data> - <data key="lastname">Doe</data> - <data key="company">Magento</data> - <array key="street"> - <item>7700 West Parmer Lane</item> - </array> - <data key="city">Austin</data> - <data key="state">Texas</data> - <data key="country_id">US</data> - <data key="postcode">78729</data> - <data key="telephone">512-345-6789</data> - <data key="default_billing">Yes</data> - <data key="default_shipping">Yes</data> - <requiredEntity type="region">RegionTX</requiredEntity> - </entity> - <entity name="US_Address_NY" type="address"> - <data key="firstname">John</data> - <data key="lastname">Doe</data> - <data key="company">368</data> - <array key="street"> - <item>368 Broadway St.</item> - <item>113</item> - </array> - <data key="city">New York</data> - <data key="state">New York</data> - <data key="country_id">US</data> - <data key="postcode">10001</data> - <data key="telephone">512-345-6789</data> - <data key="default_billing">Yes</data> - <data key="default_shipping">Yes</data> - <requiredEntity type="region">RegionNY</requiredEntity> - </entity> - <entity name="US_Address_CA" type="address"> - <data key="firstname">John</data> - <data key="lastname">Doe</data> - <data key="company">Magento</data> - <array key="street"> - <item>7700 West Parmer Lane</item> - <item>113</item> - </array> - <data key="city">Los Angeles</data> - <data key="state">California</data> - <data key="country_id">US</data> - <data key="postcode">90001</data> - <data key="telephone">512-345-6789</data> - <data key="default_billing">Yes</data> - <data key="default_shipping">Yes</data> - <requiredEntity type="region">RegionCA</requiredEntity> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/CustomerGroupData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/CustomerGroupData.xml deleted file mode 100644 index 5279f4216898e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/CustomerGroupData.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="GeneralCustomerGroup" type="customerGroup"> - <data key="code">General</data> - <data key="tax_class_id">3</data> - <data key="tax_class_name">Retail Customer</data> - </entity> - <entity name="DefaultCustomerGroup" type="customerGroup"> - <array key="group_names"> - <item>General</item> - </array> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/ExtensionAttributeSimple.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/ExtensionAttributeSimple.xml deleted file mode 100644 index ff02f8f165b0f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/ExtensionAttributeSimple.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="ExtensionAttributeSimple" type="extension_attribute"> - <data key="is_subscribed">true</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminCustomerPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminCustomerPage.xml deleted file mode 100644 index 4ee00034e867a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminCustomerPage.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminCustomerPage" url="/customer/index/" area="admin" module="Magento_Customer"> - <section name="AdminCustomerGridMainActionsSection"/> - <section name="AdminCustomerMessagesSection"/> - <section name="AdminCustomerGridSection"/> - <section name="AdminCustomerFiltersSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminEditCustomerPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminEditCustomerPage.xml deleted file mode 100644 index 19f2cd54e7992..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminEditCustomerPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminEditCustomerPage" url="/customer/index/edit/id/{{var1}}" area="admin" module="Magento_Customer" parameterized="true"> - <section name="AdminCustomerAccountInformationSection"/> - <section name="AdminCustomerMainActionsSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminNewCustomerPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminNewCustomerPage.xml deleted file mode 100644 index 21307e7c3d0f0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/AdminNewCustomerPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminNewCustomerPage" url="/customer/index/new" area="admin" module="Magento_Customer"> - <section name="AdminCustomerAccountInformationSection"/> - <section name="AdminCustomerMainActionsSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerCreatePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerCreatePage.xml deleted file mode 100644 index 8e0dc1079137c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerCreatePage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCustomerCreatePage" url="/customer/account/create/" area="storefront" module="Magento_Customer"> - <section name="StorefrontCustomerCreateFormSection" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerDashboardPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerDashboardPage.xml deleted file mode 100644 index 21afad8803170..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerDashboardPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCustomerDashboardPage" url="/customer/account/" area="storefront" module="Magento_Customer"> - <section name="StorefrontCustomerDashboardAccountInformationSection" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerOrderPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerOrderPage.xml deleted file mode 100644 index ab66fe2556758..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerOrderPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCustomerOrderPage" url="sales/order/view/order_id/" area="storefront" module="Magento_Customer"> - <section name="StorefrontCustomerOrderViewSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerOrderViewPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerOrderViewPage.xml deleted file mode 100644 index 2e754d6da74c6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerOrderViewPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCustomerOrderViewPage" url="sales/order/view/order_id/{{var1}}" area="storefront" module="Magento_Customer" parameterized="true"> - <section name="StorefrontCustomerOrderSection" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerSignInPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerSignInPage.xml deleted file mode 100644 index 908c3695342d5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontCustomerSignInPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCustomerSignInPage" url="/customer/account/login/" area="storefront" module="Magento_Customer"> - <section name="StorefrontCustomerSignInFormSection" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontHomePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontHomePage.xml deleted file mode 100644 index cbc04aa33b9a6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Page/StorefrontHomePage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontHomePage" url="/" area="storefront" module="Magento_Customer"> - <section name="StorefrontPanelHeader" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/README.md deleted file mode 100644 index cb51dcef8c48e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Customer** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerGridMainActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerGridMainActionsSection.xml deleted file mode 100644 index 3e43fdc923a05..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerGridMainActionsSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminCustomerGridMainActionsSection"> - <element name="addNewCustomer" type="button" selector="#add" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerGridSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerGridSection.xml deleted file mode 100644 index 314e749b1fadf..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerGridSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminCustomerGridSection"> - <element name="customerGrid" type="text" selector="table[data-role='grid']"/> - <element name="firstRowEditLink" type="text" selector="tr[data-repeat-index='0'] .action-menu-item" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerMainActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerMainActionsSection.xml deleted file mode 100644 index cea098694771a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerMainActionsSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminCustomerMainActionsSection"> - <element name="saveButton" type="button" selector="#save" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerMessagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerMessagesSection.xml deleted file mode 100644 index 957c9d9df370f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerMessagesSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminCustomerMessagesSection"> - <element name="successMessage" type="text" selector=".message-success"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminEditCustomerInformationSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminEditCustomerInformationSection.xml deleted file mode 100644 index 7b98951771c24..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminEditCustomerInformationSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminEditCustomerInformationSection"> - <element name="orders" type="button" selector="#tab_orders_content" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminEditCustomerOrdersSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminEditCustomerOrdersSection.xml deleted file mode 100644 index 2e685d636d1c7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminEditCustomerOrdersSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminEditCustomerOrdersSection"> - <element name="orderGrid" type="text" selector="#customer_orders_grid_table"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerSignInFormSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerSignInFormSection.xml deleted file mode 100644 index 9c005876b911a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontCustomerSignInFormSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontCustomerSignInFormSection"> - <element name="emailField" type="input" selector="#email"/> - <element name="passwordField" type="input" selector="#pass"/> - <element name="signInAccountButton" type="button" selector="#send2" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontPanelHeaderSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontPanelHeaderSection.xml deleted file mode 100644 index f3efca32c3243..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/StorefrontPanelHeaderSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontPanelHeaderSection"> - <element name="WelcomeMessage" type="text" selector=".greet.welcome span"/> - <element name="createAnAccountLink" type="select" selector=".panel.header li:nth-child(3)"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/EndToEndB2CLoggedInUserTest.xml deleted file mode 100644 index cc1fc78ca691a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Test/EndToEndB2CLoggedInUserTest.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CLoggedInUserTest"> - <annotations> - <features value="End to End scenarios"/> - <stories value="B2C logged in user - MAGETWO-72524"/> - <group value="e2e"/> - <title value="You should be able to pass End to End B2C Logged In User scenario"/> - <description value="New user signup and browses catalog, searches for product, adds product to cart, adds product to wishlist, compares products, uses coupon code and checks out."/> - <severity value="CRITICAL"/> - <testCaseId value="MAGETWO-87653"/> - </annotations> - <before> - <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> - </before> - <after> - <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> - </after> - <!-- Step 0: User signs up an account --> - <comment userInput="Start of signing up user account" stepKey="startOfSigningUpUserAccount" /> - <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> - <argument name="Customer" value="CustomerEntityOne"/> - </actionGroup> - <comment userInput="End of signing up user account" stepKey="endOfSigningUpUserAccount" /> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/composer.json deleted file mode 100644 index e6e178fbcd163..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-customer", - "description": "Magento 2 Functional Test Module Customer", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-authorization": "100.0.0-dev", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-integration": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-newsletter": "100.0.0-dev", - "magento/magento2-functional-test-module-page-cache": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-review": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-wishlist": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Customer\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Customer" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/README.md deleted file mode 100644 index ad6ab29c57026..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_CustomerAnalytics** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/composer.json deleted file mode 100644 index 6082e25ee87ac..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerAnalytics/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-customer-analytics", - "description": "Magento 2 Acceptance Test Module Customer Analytics", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-customer": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CustomerAnalytics\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CustomerAnalytics" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/README.md deleted file mode 100644 index ebeb51bf1e4f2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_CustomerImportExport** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/composer.json deleted file mode 100644 index 09caca0289949..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/CustomerImportExport/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-customer-import-export", - "description": "Magento 2 Functional Test Module Customer Import Export", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\CustomerImportExport\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/CustomerImportExport" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/README.md deleted file mode 100644 index 20704cfd90ce6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Deploy** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/composer.json deleted file mode 100644 index 6cc25c9975ac9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Deploy/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-deploy", - "description": "Magento 2 Functional Test Module Deploy", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-require-js": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-user": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Deploy\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Deploy" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/README.md deleted file mode 100644 index 4aff70291bbf6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Developer** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/composer.json deleted file mode 100644 index d20bf30c17289..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Developer/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-developer", - "description": "Magento 2 Functional Test Module Developer", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Developer\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Developer" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/README.md deleted file mode 100644 index bda156c74e0ca..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Dhl** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/composer.json deleted file mode 100644 index 9d2da35038bfe..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Dhl/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-dhl", - "description": "Magento 2 Functional Test Module Dhl", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Dhl\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Dhl" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/README.md deleted file mode 100644 index b028b5b4c9ca5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Directory** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/composer.json deleted file mode 100644 index 8262f404e93a3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Directory/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-directory", - "description": "Magento 2 Functional Test Module Directory", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Directory\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Directory" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Data/ProductData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Data/ProductData.xml deleted file mode 100644 index f71ebd481a97d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Data/ProductData.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="DownloadableProduct" type="product"> - <data key="sku" unique="suffix">downloadableproduct</data> - <data key="type_id">downloadable</data> - <data key="attribute_set_id">4</data> - <data key="name" unique="suffix">DownloadableProduct</data> - <data key="price">50.99</data> - <data key="quantity">100</data> - <data key="weight">0</data> - <data key="status">1</data> - <data key="urlKey" unique="suffix">downloadableproduct</data> - </entity> - <entity name="ApiDownloadableProduct" type="product"> - <data key="sku" unique="suffix">api-downloadable-product</data> - <data key="type_id">downloadable</data> - <data key="attribute_set_id">4</data> - <data key="visibility">4</data> - <data key="name" unique="suffix">Api Downloadable Product</data> - <data key="price">123.00</data> - <data key="urlKey" unique="suffix">api-downloadable-product</data> - <data key="status">1</data> - <data key="quantity">100</data> - <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> - <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> - <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> - <requiredEntity type="downloadable_link">apiDownloadableLink</requiredEntity> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Metadata/link_file_content-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Metadata/link_file_content-meta.xml deleted file mode 100644 index 72f643e06800d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Metadata/link_file_content-meta.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="CreateLinkFileContent" dataType="link_file_content" type="create"> - <field key="file_data">string</field> - <field key="name">string</field> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Metadata/sample_file_content-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Metadata/sample_file_content-meta.xml deleted file mode 100644 index 144ce67bb25bb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Metadata/sample_file_content-meta.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="CreateSampleFileContent" dataType="sample_file_content" type="create"> - <field key="file_data">string</field> - <field key="name">string</field> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Page/AdminProductCreatePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Page/AdminProductCreatePage.xml deleted file mode 100644 index cc95f4dc9d2d1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Page/AdminProductCreatePage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true"> - <section name="AdminProductDownloadableSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/README.md deleted file mode 100644 index cf2e356526c00..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Downloadable** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Test/EndToEndB2CAdminTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Test/EndToEndB2CAdminTest.xml deleted file mode 100644 index 86c8fc0bd9ab2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Test/EndToEndB2CAdminTest.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CAdminTest"> - <!--Create Downloadable Product--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitProductPageDownloadable" after="seeSimpleProductInGrid"/> - <waitForPageLoad stepKey="waitForProductPageLoadDownloadable" after="visitProductPageDownloadable"/> - <actionGroup ref="goToCreateProductPage" stepKey="goToCreateDownloadableProduct" after="waitForProductPageLoadDownloadable"> - <argument name="product" value="DownloadableProduct"/> - </actionGroup> - <actionGroup ref="fillMainDownloadableProductForm" stepKey="fillMainProductFormDownloadable" after="goToCreateDownloadableProduct"> - <argument name="product" value="DownloadableProduct"/> - </actionGroup> - - <click selector="{{AdminProductDownloadableSection.sectionHeader}}" stepKey="openDownloadableSection" after="fillMainProductFormDownloadable"/> - <checkOption selector="{{AdminProductDownloadableSection.isDownloadableProduct}}" stepKey="checkIsDownloadable" after="openDownloadableSection"/> - <fillField userInput="{{downloadableData.link_title}}" selector="{{AdminProductDownloadableSection.linksTitleInput}}" stepKey="fillDownloadableLinkTitle" after="checkIsDownloadable"/> - <checkOption selector="{{AdminProductDownloadableSection.isLinksPurchasedSeparately}}" stepKey="checkLinksPurchasedSeparately" after="fillDownloadableLinkTitle"/> - <fillField userInput="{{downloadableData.sample_title}}" selector="{{AdminProductDownloadableSection.samplesTitleInput}}" stepKey="fillDownloadableSampleTitle" after="checkLinksPurchasedSeparately"/> - - <!-- Link 1 --> - <actionGroup ref="addDownloadableProductLinkWithMaxDownloads" stepKey="addDownloadableLinkWithMaxDownloads" after="fillDownloadableSampleTitle"> - <argument name="link" value="downloadableLinkWithMaxDownloads"/> - </actionGroup> - - <!-- Link 2 --> - <actionGroup ref="addDownloadableProductLink" stepKey="addDownloadableLink" after="addDownloadableLinkWithMaxDownloads"> - <argument name="link" value="downloadableLink"/> - </actionGroup> - - <!-- Sample 1 --> - <actionGroup ref="addDownloadableSampleFile" stepKey="addDownloadSampleFile" after="addDownloadableLink"> - <argument name="sample" value="downloadableSampleFile"/> - </actionGroup> - - <!-- Sample 2 --> - <actionGroup ref="addDownloadableSampleUrl" stepKey="addDownloadableSampleUrl" after="addDownloadSampleFile"> - <argument name="sample" value="downloadableSampleUrl"/> - </actionGroup> - - <!--Save Product--> - <actionGroup ref="saveProductForm" stepKey="saveDownloadableProduct" after="addDownloadableSampleUrl"/> - <actionGroup ref="viewProductInAdminGrid" stepKey="viewDownloadableProductInGrid" after="saveDownloadableProduct"> - <argument name="product" value="DownloadableProduct"/> - </actionGroup> - - <!--@TODO Move cleanup to "after" when MQE-830 is resolved--> - <comment userInput="Clean up downloadable product" stepKey="cleanUpDownloadableProduct" after="deleteSimpleProduct"/> - <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteDownloadableProduct" after="cleanUpDownloadableProduct"> - <argument name="product" value="DownloadableProduct"/> - </actionGroup> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/composer.json deleted file mode 100644 index 16f9f02ac24a4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/composer.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-downloadable", - "description": "Magento 2 Functional Test Module Downloadable", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-gift-message": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Downloadable\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Downloadable" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/README.md deleted file mode 100644 index 7edcc4ffcb395..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_DownloadableImportExport** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/composer.json deleted file mode 100644 index 2c3b8fd9ce566..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/DownloadableImportExport/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-downloadable-import-export", - "description": "Magento 2 Functional Test Module Downloadable Import Export", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-downloadable": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\DownloadableImportExport\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/DownloadableImportExport" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/README.md deleted file mode 100644 index 23724b09bd2cf..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Eav** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/composer.json deleted file mode 100644 index 06db9b63d7387..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Eav/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-eav", - "description": "Magento 2 Functional Test Module Eav", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Eav\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Eav" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/README.md deleted file mode 100644 index dab22d5d01827..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Elasticsearch** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/composer.json deleted file mode 100644 index c6f85999d3dea..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-elasticsearch", - "description": "Magento 2 Functional Test Module Elasticsearch", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "proprietary" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-advanced-search": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-search": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-search": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Elasticsearch\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Elasticsearch" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/README.md deleted file mode 100644 index 413b1bcbbb525..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Email** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/composer.json deleted file mode 100644 index e95fc4ca907e3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Email/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-email", - "description": "Magento 2 Functional Test Module Email", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-variable": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Email\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Email" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/README.md deleted file mode 100644 index 61aa9a448b743..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_EncryptionKey** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/composer.json deleted file mode 100644 index 0252e03b31808..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/EncryptionKey/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-encryption-key", - "description": "Magento 2 Functional Test Module Encryption Key", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\EncryptionKey\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/EncryptionKey" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/README.md deleted file mode 100644 index 93d1828ef4ccd..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Fedex** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/composer.json deleted file mode 100644 index 5cf3ea9132e2a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Fedex/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-fedex", - "description": "Magento 2 Functional Test Module Fedex", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Fedex\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Fedex" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/README.md deleted file mode 100644 index 49fd114a43a24..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_GiftMessage** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/composer.json deleted file mode 100644 index 5cc515e5922d9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GiftMessage/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-gift-message", - "description": "Magento 2 Functional Test Module Gift Message", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\GiftMessage\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/GiftMessage" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/README.md deleted file mode 100644 index 6e3595cd366c6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_GoogleAdwords** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/composer.json deleted file mode 100644 index 8710e25cd469d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAdwords/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-google-adwords", - "description": "Magento 2 Functional Test Module Google Adwords", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\GoogleAdwords\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/GoogleAdwords" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/README.md deleted file mode 100644 index 0fa9dbd614ae7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_GoogleAnalytics** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/composer.json deleted file mode 100644 index 63b7597a9d391..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleAnalytics/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-google-analytics", - "description": "Magento 2 Functional Test Module Google Analytics", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-cookie": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\GoogleAnalytics\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/GoogleAnalytics" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/README.md deleted file mode 100644 index 9bdf02b6170ed..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_GoogleOptimizer** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/composer.json deleted file mode 100644 index 71d48969544e3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GoogleOptimizer/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-google-optimizer", - "description": "Magento 2 Functional Test Module Google Optimizer", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-google-analytics": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\GoogleOptimizer\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/GoogleOptimizer" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/README.md deleted file mode 100644 index 1f48eef7f97a7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_GraphQl** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/composer.json deleted file mode 100644 index 701ed734f896c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GraphQl/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-graph-ql", - "description": "Magento 2 Functional Test Module Graph Ql", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-webapi": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\GraphQl\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/GraphQl" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/README.md deleted file mode 100644 index 36fb828bbdff7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_GroupedImportExport** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/composer.json deleted file mode 100644 index 4460aef0ac60f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedImportExport/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-grouped-import-export", - "description": "Magento 2 Functional Test Module Grouped Import Export", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-import-export": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-grouped-product": "100.0.0-dev", - "magento/magento2-functional-test-module-import-export": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\GroupedImportExport\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/GroupedImportExport" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/ProductLinkExtensionAttributeData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/ProductLinkExtensionAttributeData.xml deleted file mode 100644 index 5f5dcb3a0ef4f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/ProductLinkExtensionAttributeData.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="Qty1000" type="product_link_extension_attribute"> - <data key="qty">1000</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Page/AdminProductCreatePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Page/AdminProductCreatePage.xml deleted file mode 100644 index 9d2b3075df6a9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Page/AdminProductCreatePage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true"> - <section name="AdminProductFormGroupedProductsSection"/> - <section name="AdminAddProductsToGroupPanel"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/README.md deleted file mode 100644 index edf1e0dc3d2f5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_GroupedProduct** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Section/AdminAddProductsToGroupPanelSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Section/AdminAddProductsToGroupPanelSection.xml deleted file mode 100644 index 45e32e7f2cd04..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Section/AdminAddProductsToGroupPanelSection.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminAddProductsToGroupPanel"> - <element name="addSelectedProducts" type="button" selector=".product_form_product_form_grouped_grouped_products_modal button.action-primary" timeout="30"/> - <element name="filters" type="button" selector=".product_form_product_form_grouped_grouped_products_modal [data-action='grid-filter-expand']" timeout="30"/> - <element name="applyFilters" type="button" selector=".product_form_product_form_grouped_grouped_products_modal [data-action='grid-filter-apply']" timeout="30"/> - <element name="nameFilter" type="input" selector=".product_form_product_form_grouped_grouped_products_modal [name='name']"/> - <element name="firstCheckbox" type="input" selector="tr[data-repeat-index='0'] .admin__control-checkbox"/> - <element name="nThCheckbox" type="input" selector="tr[data-repeat-index='{{n}}'] .admin__control-checkbox" parameterized="true"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Section/AdminProductFormGroupedProductsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Section/AdminProductFormGroupedProductsSection.xml deleted file mode 100644 index 99bc5045ac22e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Section/AdminProductFormGroupedProductsSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductFormGroupedProductsSection"> - <element name="toggleGroupedProduct" type="button" selector="div[data-index=grouped] .admin__collapsible-title"/> - <element name="addProductsToGroup" type="button" selector="button[data-index='grouped_products_button']" timeout="30"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Test/EndToEndB2CAdminTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Test/EndToEndB2CAdminTest.xml deleted file mode 100644 index 7b5612a211af5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Test/EndToEndB2CAdminTest.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CAdminTest"> - <!--Create Grouped Product--> - <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageGrouped" after="seeSimpleProductInGrid"/> - <waitForPageLoad stepKey="waitForProductPageLoadGrouped" after="visitAdminProductPageGrouped"/> - <actionGroup ref="goToCreateProductPage" stepKey="goToCreateGroupedProduct" after="waitForProductPageLoadGrouped"> - <argument name="product" value="GroupedProduct"/> - </actionGroup> - <actionGroup ref="checkRequiredFieldsInGroupedProductForm" stepKey="checkRequiredFieldsProductGrouped" after="goToCreateGroupedProduct"/> - <actionGroup ref="fillGroupedProductForm" stepKey="fillGroupedProductForm" after="checkRequiredFieldsProductGrouped"> - <argument name="product" value="GroupedProduct"/> - </actionGroup> - <scrollTo selector="{{AdminProductFormGroupedProductsSection.toggleGroupedProduct}}" x="0" y="-100" stepKey="scrollToGroupedSection" after="fillGroupedProductForm"/> - <conditionalClick selector="{{AdminProductFormGroupedProductsSection.toggleGroupedProduct}}" dependentSelector="{{AdminProductFormGroupedProductsSection.addProductsToGroup}}" visible="false" stepKey="openGroupedProductsSection" after="scrollToGroupedSection"/> - <click selector="body" stepKey="clickBodyToCorrectFocusGrouped" after="openGroupedProductsSection"/> - <click selector="{{AdminProductFormGroupedProductsSection.addProductsToGroup}}" stepKey="clickAddProductsToGroup" after="clickBodyToCorrectFocusGrouped"/> - <waitForElementVisible selector="{{AdminAddProductsToGroupPanel.filters}}" stepKey="waitForGroupedProductModal" after="clickAddProductsToGroup"/> - <actionGroup ref="filterProductGridBySku" stepKey="filterGroupedProductOptions" after="waitForGroupedProductModal"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <checkOption selector="{{AdminAddProductsToGroupPanel.firstCheckbox}}" stepKey="checkFilterResult" after="filterGroupedProductOptions"/> - <click selector="{{AdminAddProductsToGroupPanel.addSelectedProducts}}" stepKey="clickAddSelectedGroupProducts" after="checkFilterResult"/> - <actionGroup ref="saveProductForm" stepKey="saveGroupedProduct" after="clickAddSelectedGroupProducts"/> - <actionGroup ref="viewGroupedProductInAdminGrid" stepKey="viewGroupedProductInGrid" after="saveGroupedProduct"> - <argument name="product" value="GroupedProduct"/> - </actionGroup> - - <!--@TODO Move cleanup to "after" when MQE-830 is resolved--> - <comment userInput="Clean up grouped product" stepKey="cleanUpGroupedProduct" after="deleteSimpleProduct"/> - <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteGroupedProduct" after="cleanUpGroupedProduct"> - <argument name="product" value="GroupedProduct"/> - </actionGroup> - </test> -</tests> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/composer.json deleted file mode 100644 index ddc23e730436d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-grouped-product", - "description": "Magento 2 Functional Test Module Grouped Product", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-msrp": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\GroupedProduct\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/GroupedProduct" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/README.md deleted file mode 100644 index b762f5fb7351c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_ImportExport** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/composer.json deleted file mode 100644 index 4632adb4f904f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ImportExport/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-import-export", - "description": "Magento 2 Functional Test Module Import Export", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\ImportExport\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/ImportExport" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Indexer/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Indexer/README.md deleted file mode 100644 index 21212a0fed31e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Indexer/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Indexer** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Indexer/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Indexer/composer.json deleted file mode 100644 index 35b8219186bd2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Indexer/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-indexer", - "description": "Magento 2 Functional Test Module Indexer", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Indexer\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Indexer" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/README.md deleted file mode 100644 index 9975174d27ee7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_InstantPurchase** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/composer.json deleted file mode 100644 index 84c595020968c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/InstantPurchase/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-instant-purchase", - "description": "Magento 2 Functional Test Module Instant Purchase", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-vault": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\InstantPurchase\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/InstantPurchase" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/README.md deleted file mode 100644 index 2f024c81e5141..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Integration** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/composer.json deleted file mode 100644 index 9f0ccb76c1cd3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Integration/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-integration", - "description": "Magento 2 Functional Test Module Integration", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-authorization": "100.0.0-dev", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-security": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-user": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Integration\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Integration" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/README.md deleted file mode 100644 index 6c864b9f5eedd..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_LayeredNavigation** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/composer.json deleted file mode 100644 index 447f3ba38a06c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/LayeredNavigation/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-layered-navigation", - "description": "Magento 2 Functional Test Module Layered Navigation", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\LayeredNavigation\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/LayeredNavigation" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/README.md deleted file mode 100644 index 5c744ec36f1be..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Marketplace** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/composer.json deleted file mode 100644 index d4079dfefc9ba..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Marketplace/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-marketplace", - "description": "Magento 2 Functional Test Module Marketplace", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Marketplace\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Marketplace" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/README.md deleted file mode 100644 index ee885969bb127..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_MediaStorage** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/composer.json deleted file mode 100644 index 29657d03014bf..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MediaStorage/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-media-storage", - "description": "Magento 2 Functional Test Module Media Storage", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\MediaStorage\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/MediaStorage" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/README.md deleted file mode 100644 index 900e136684513..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_MessageQueue** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/composer.json deleted file mode 100644 index 10ae24c3b5448..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-message-queue", - "description": "Magento 2 Functional Test Module Message Queue", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "proprietary" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\MessageQueue\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MessageQueue" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/README.md deleted file mode 100644 index 1a97c33f497a5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_Msrp** Module. \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/composer.json deleted file mode 100644 index b91aaddcba3f2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Msrp/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-msrp", - "description": "Magento 2 Functional Test Module Msrp", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-downloadable": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-grouped-product": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Msrp\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Msrp" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Multishipping/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Multishipping/README.md deleted file mode 100644 index b6e1b54d6ac6e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Multishipping/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Multishipping** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Multishipping/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Multishipping/composer.json deleted file mode 100644 index ffd80908ed522..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Multishipping/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-multishipping", - "description": "Magento 2 Functional Test Module Multishipping", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Multishipping\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Multishipping" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/README.md deleted file mode 100644 index a20eb0010356d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_MysqlMq** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/composer.json deleted file mode 100644 index a647b1d6249a3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-mysql-mq", - "description": "Magento 2 Functional Test Module Mysql Mq", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "proprietary" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\MysqlMq\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "dev/tests/acceptance/tests/functional/Magento/FunctionalTest/MysqlMq" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/README.md deleted file mode 100644 index c6d4c6906be90..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_NewRelicReporting** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/composer.json deleted file mode 100644 index c6b60c43b6de0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/NewRelicReporting/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-new-relic-reporting", - "description": "Magento 2 Functional Test Module New Relic Reporting", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-configurable-product": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\NewRelicReporting\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/NewRelicReporting" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Data/NewsletterTemplateData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Data/NewsletterTemplateData.xml deleted file mode 100644 index 5b889728d9d1b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Data/NewsletterTemplateData.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="_defaultNewsletter" type="cms_page"> - <data key="name" unique="suffix">Test Newsletter Template</data> - <data key="subject">Test Newsletter Subject</data> - <data key="senderName">Admin</data> - <data key="senderEmail">admin@magento.com</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/README.md deleted file mode 100644 index 95a365b8b8f79..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Newsletter** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Section/StorefrontNewsletterSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Section/StorefrontNewsletterSection.xml deleted file mode 100644 index 324b49997129b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/Section/StorefrontNewsletterSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontNewsletterSection"> - <element name="mediaDescription" type="text" selector="body>p>img" /> - <element name="imageSource" type="text" selector="//img[contains(@src,'{{var1}}')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/composer.json deleted file mode 100644 index eff14e85b04a0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Newsletter/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-newsletter", - "description": "Magento 2 Functional Test Module Newsletter", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-email": "100.0.0-dev", - "magento/magento2-functional-test-module-require-js": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-widget": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Newsletter\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Newsletter" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/README.md deleted file mode 100644 index ba6e5c9680dbd..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_OfflinePayments** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/composer.json deleted file mode 100644 index f645c45abfdd0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflinePayments/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-offline-payments", - "description": "Magento 2 Functional Test Module Offline Payments", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\OfflinePayments\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/OfflinePayments" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/README.md deleted file mode 100644 index 42a12e4398e4f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_OfflineShipping** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/composer.json deleted file mode 100644 index 2fc319facc683..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/OfflineShipping/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-offline-shipping", - "description": "Magento 2 Functional Test Module Offline Shipping", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-sales-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\OfflineShipping\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/OfflineShipping" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/README.md deleted file mode 100644 index 8db3000b9408a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_PageCache** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/composer.json deleted file mode 100644 index 2c4612b71a126..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageCache/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-page-cache", - "description": "Magento 2 Functional Test Module Page Cache", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\PageCache\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/PageCache" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/Data/PaymentMethodData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/Data/PaymentMethodData.xml deleted file mode 100644 index 5b14d8b5e3f58..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/Data/PaymentMethodData.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="PaymentMethodCheckMoneyOrder" type="payment_method"> - <data key="method">checkmo</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/Metadata/payment_method-meta.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/Metadata/payment_method-meta.xml deleted file mode 100644 index a091800bac070..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/Metadata/payment_method-meta.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> - <operation name="CreatePaymentMethod" dataType="payment_method" type="create"> - <field key="method">string</field> - </operation> -</operations> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/README.md deleted file mode 100644 index 7a8fcc6210c9e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Payment** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/composer.json deleted file mode 100644 index ea5f918171c8f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Payment/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-payment", - "description": "Magento 2 Functional Test Module Payment", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Payment\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Payment" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Page/AdminConfigPaymentMethodsPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Page/AdminConfigPaymentMethodsPage.xml deleted file mode 100644 index 9fa1a71e3441b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Page/AdminConfigPaymentMethodsPage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminConfigPaymentMethodsPage" url="admin/system_config/edit/section/payment/" area="admin" module="Magento_Config"> - <section name="OtherPaymentsConfigSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/README.md deleted file mode 100644 index 820d3acc2e101..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Paypal** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Section/OtherPaymentsConfigSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Section/OtherPaymentsConfigSection.xml deleted file mode 100644 index 024c1317dba2f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/Section/OtherPaymentsConfigSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="OtherPaymentsConfigSection"> - <element name="expandedTab" type="button" selector="#payment_us_other_payment_methods-head.open"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/composer.json deleted file mode 100644 index 94c3af772673e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Paypal/composer.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-paypal", - "description": "Magento 2 Functional Test Module Paypal", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-instant-purchase": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-vault": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Paypal\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Paypal" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/README.md deleted file mode 100644 index 690db182dcb4f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Persistent** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/composer.json deleted file mode 100644 index e12542a65d2be..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Persistent/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-persistent", - "description": "Magento 2 Functional Test Module Persistent", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-cron": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-page-cache": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Persistent\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Persistent" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/README.md deleted file mode 100644 index 1a78d82877b01..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_ProductAlert** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/composer.json deleted file mode 100644 index 1dc3837e4b1fb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductAlert/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-product-alert", - "description": "Magento 2 Functional Test Module Product Alert", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\ProductAlert\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/ProductAlert" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Data/ProductVideoData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Data/ProductVideoData.xml deleted file mode 100644 index 05ecb1a69444a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Data/ProductVideoData.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="mftfTestProductVideo" type="product_video"> - <data key="videoUrl">https://youtu.be/bpOSxM0rNPM</data> - <data key="videoTitle">Arctic Monkeys - Do I Wanna Know? (Official Video)</data> - <data key="videoShortTitle">Arctic Monkeys</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/README.md deleted file mode 100644 index 0a19d3a9d1e60..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_ProductVideo** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Section/AdminProductImagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Section/AdminProductImagesSection.xml deleted file mode 100644 index 66a93a6ec4b36..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Section/AdminProductImagesSection.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminProductImagesSection"> - <element name="addVideoButton" type="button" selector="#add_video_button" timeout="60"/> - <element name="removeVideoButton" type="button" selector="//*[@id='media_gallery_content']//button[@class='action-remove']" timeout="60"/> - <element name="videoUrlHiddenField" type="text" selector="//*[@id='media_gallery_content']//input[@value='{{url}}']" parameterized="true"/> - <element name="videoTitleText" type="text" selector="//*[@id='media_gallery_content']//div[contains(text(), '{{title}}')]" parameterized="true"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Section/StorefrontProductInfoMainSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Section/StorefrontProductInfoMainSection.xml deleted file mode 100644 index 33d9cc8d0a03f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Section/StorefrontProductInfoMainSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductInfoMainSection"> - <element name="productVideo" type="text" selector="//*[@class='product-video' and @data-type='{{videoType}}']" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/composer.json deleted file mode 100644 index 40d03272a3292..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-product-video", - "description": "Magento 2 Functional Test Module Product Video", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\ProductVideo\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/ProductVideo" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Data/CartItemData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Data/CartItemData.xml deleted file mode 100644 index c1ffe00468abe..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/Data/CartItemData.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="SimpleCartItem" type="CartItem"> - <data key="qty">1</data> - <var key="quote_id" entityKey="return" entityType="GuestCart"/> - <var key="sku" entityKey="sku" entityType="product"/> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/README.md deleted file mode 100644 index 17b0bf4c60516..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Quote** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/composer.json deleted file mode 100644 index 7d3a16063745f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Quote/composer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-quote", - "description": "Magento 2 Functional Test Module Quote", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-authorization": "100.0.0-dev", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-sales-sequence": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Quote\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Quote" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/README.md deleted file mode 100644 index 7460ca6a7dffb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_QuoteAnalytics** Module. \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/composer.json deleted file mode 100644 index 0d249b0c40921..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/QuoteAnalytics/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-quote-analytics", - "description": "Magento 2 Acceptance Test Module Quote Analytics", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-quote": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\QuoteAnalytics\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/QuoteAnalytics" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/README.md deleted file mode 100644 index d2bcbe81339ad..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Reports** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/composer.json deleted file mode 100644 index 53d7e7b1c9c0e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Reports/composer.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-reports", - "description": "Magento 2 Functional Test Module Reports", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-downloadable": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-review": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-sales-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev", - "magento/magento2-functional-test-module-widget": "100.0.0-dev", - "magento/magento2-functional-test-module-wishlist": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Reports\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Reports" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/README.md deleted file mode 100644 index 64e6b0ef6e139..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_RequireJs** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/composer.json deleted file mode 100644 index 2fcf3dc4c6103..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/RequireJs/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-require-js", - "description": "Magento 2 Functional Test Module Require Js", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\RequireJs\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/RequireJs" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/README.md deleted file mode 100644 index 71b1cdc87d9d6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Review** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/composer.json deleted file mode 100644 index 4445be9e856cf..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Review/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-review", - "description": "Magento 2 Functional Test Module Review", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-newsletter": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Review\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Review" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/README.md deleted file mode 100644 index 3f50f5341cfd4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_ReviewAnalytics** Module. \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/composer.json deleted file mode 100644 index d58c62a68dac5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ReviewAnalytics/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-review-analytics", - "description": "Magento 2 Acceptance Test Module Review Analytics", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-review": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\ReviewAnalytics\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/ReviewAnalytics" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/README.md deleted file mode 100644 index 87ea94e0f1d23..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Robots** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/composer.json deleted file mode 100644 index 70cf4ba3203e4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Robots/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-robots", - "description": "Magento 2 Functional Test Module Robots", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Robots\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Robots" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/README.md deleted file mode 100644 index 5002c878c2e54..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Rss** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/composer.json deleted file mode 100644 index 9fa6d370cd610..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rss/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-rss", - "description": "Magento 2 Functional Test Module Rss", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Rss\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Rss" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/README.md deleted file mode 100644 index a797fd63dc668..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Rule** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/composer.json deleted file mode 100644 index 73dd74c5fa576..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Rule/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-rule", - "description": "Magento 2 Functional Test Module Rule", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Rule\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Rule" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderActionGroup.xml deleted file mode 100644 index a4d9f99799e86..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderActionGroup.xml +++ /dev/null @@ -1,147 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <!--Navigate to create order page (New Order -> Create New Customer)--> - <actionGroup name="navigateToNewOrderPageNewCustomer"> - <arguments> - <argument name="storeView" defaultValue="_defaultStore"/> - </arguments> - <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/> - <waitForPageLoad stepKey="waitForIndexPageLoad"/> - <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/> - <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/> - <click selector="{{AdminOrderFormActionSection.CreateNewCustomer}}" stepKey="clickCreateCustomer"/> - <click selector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" stepKey="selectDefaultStoreView"/> - <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/> - </actionGroup> - - <!--Check the required fields are actually required--> - <actionGroup name="checkRequiredFieldsNewOrderForm"> - <seeElement selector="{{AdminOrderFormAccountSection.requiredGroup}}" stepKey="seeCustomerGroupRequired"/> - <clearField selector="{{AdminOrderFormBillingAddressSection.FirstName}}" stepKey="clearFirstNameField"/> - <clearField selector="{{AdminOrderFormBillingAddressSection.LastName}}" stepKey="clearLastNameField"/> - <clearField selector="{{AdminOrderFormBillingAddressSection.StreetLine1}}" stepKey="clearStreetField"/> - <clearField selector="{{AdminOrderFormBillingAddressSection.City}}" stepKey="clearCityField"/> - <selectOption selector="{{AdminOrderFormBillingAddressSection.Country}}" userInput="United States" stepKey="selectUSCountry"/> - <selectOption selector="{{AdminOrderFormBillingAddressSection.State}}" userInput="Please select" stepKey="selectNoState"/> - <clearField selector="{{AdminOrderFormBillingAddressSection.PostalCode}}" stepKey="clearPostalCodeField"/> - <clearField selector="{{AdminOrderFormBillingAddressSection.Phone}}" stepKey="clearPhoneField"/> - <seeElement selector="{{AdminOrderFormPaymentSection.getShippingMethods}}" stepKey="seeShippingMethodNotSelected"/> - <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="trySubmitOrder"/> - <see selector="{{AdminOrderFormBillingAddressSection.firstNameError}}" userInput="This is a required field." stepKey="seeFirstNameRequired"/> - <see selector="{{AdminOrderFormBillingAddressSection.lastNameError}}" userInput="This is a required field." stepKey="seeLastNameRequired"/> - <see selector="{{AdminOrderFormBillingAddressSection.streetAddressError}}" userInput="This is a required field." stepKey="seeStreetRequired"/> - <see selector="{{AdminOrderFormBillingAddressSection.cityError}}" userInput="This is a required field." stepKey="seeCityRequired"/> - <see selector="{{AdminOrderFormBillingAddressSection.stateError}}" userInput="This is a required field." stepKey="seeStateRequired"/> - <see selector="{{AdminOrderFormBillingAddressSection.postalCodeError}}" userInput="This is a required field." stepKey="seePostalCodeRequired"/> - <see selector="{{AdminOrderFormBillingAddressSection.phoneError}}" userInput="This is a required field." stepKey="seePhoneRequired"/> - <see selector="{{AdminOrderFormPaymentSection.shippingError}}" userInput="This is a required field." stepKey="seeShippingMethodRequired"/> - </actionGroup> - - <!--Add a simple product to order--> - <actionGroup name="addSimpleProductToOrder"> - <arguments> - <argument name="product" defaultValue="_defaultProduct"/> - </arguments> - <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> - <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilter"/> - <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearch"/> - <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> - <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectProduct"/> - <fillField selector="{{AdminOrderFormItemsSection.rowQty('1')}}" userInput="1" stepKey="fillProductQty"/> - <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> - <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> - </actionGroup> - - <!--Add configurable product to order --> - <actionGroup name="addConfigurableProductToOrder"> - <arguments> - <argument name="product"/> - <argument name="attribute"/> - <argument name="option"/> - </arguments> - <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> - <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterConfigurable"/> - <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchConfigurable"/> - <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> - <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectConfigurableProduct"/> - <waitForElementVisible selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_label)}}" stepKey="waitForConfigurablePopover"/> - <wait time="2" stepKey="waitForOptionsToLoad"/> - <selectOption selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_label)}}" - userInput="{{option.name}}" stepKey="selectionConfigurableOption"/> - <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover"/> - <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> - <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> - </actionGroup> - - <!--Fill customer billing address--> - <actionGroup name="fillOrderCustomerInformation"> - <arguments> - <argument name="customer"/> - <argument name="address"/> - </arguments> - <fillField selector="{{AdminOrderFormBillingAddressSection.FirstName}}" userInput="{{customer.firstname}}" stepKey="fillFirstName"/> - <fillField selector="{{AdminOrderFormBillingAddressSection.LastName}}" userInput="{{customer.lastname}}" stepKey="fillLastName"/> - <fillField selector="{{AdminOrderFormBillingAddressSection.StreetLine1}}" userInput="{{address.street[0]}}" stepKey="fillStreetLine1"/> - <fillField selector="{{AdminOrderFormBillingAddressSection.City}}" userInput="{{address.city}}" stepKey="fillCity"/> - <selectOption selector="{{AdminOrderFormBillingAddressSection.Country}}" userInput="{{address.country_id}}" stepKey="fillCountry"/> - <selectOption selector="{{AdminOrderFormBillingAddressSection.State}}" userInput="{{address.state}}" stepKey="fillState"/> - <fillField selector="{{AdminOrderFormBillingAddressSection.PostalCode}}" userInput="{{address.postcode}}" stepKey="fillPostalCode"/> - <fillField selector="{{AdminOrderFormBillingAddressSection.Phone}}" userInput="{{address.telephone}}" stepKey="fillPhone"/> - </actionGroup> - - <!--Select flat rate shipping method--> - <actionGroup name="orderSelectFlatRateShipping"> - <click selector="{{AdminOrderFormPaymentSection.header}}" stepKey="unfocus"/> - <waitForPageLoad stepKey="waitForJavascriptToFinish"/> - <click selector="{{AdminOrderFormPaymentSection.getShippingMethods}}" stepKey="clickShippingMethods"/> - <waitForElementVisible selector="{{AdminOrderFormPaymentSection.flatRateOption}}" stepKey="waitForShippingOptions"/> - <selectOption selector="{{AdminOrderFormPaymentSection.flatRateOption}}" userInput="flatrate_flatrate" stepKey="checkFlatRate"/> - </actionGroup> - - <!--Check that customer information is correct in order--> - <actionGroup name="verifyBasicOrderInformation"> - <arguments> - <argument name="customer"/> - <argument name="shippingAddress"/> - <argument name="billingAddress"/> - <argument name="customerGroup" defaultValue="GeneralCustomerGroup"/> - </arguments> - <see selector="{{AdminOrderDetailsInformationSection.customerName}}" userInput="{{customer.firstname}}" stepKey="seeCustomerName"/> - <see selector="{{AdminOrderDetailsInformationSection.customerEmail}}" userInput="{{customer.email}}" stepKey="seeCustomerEmail"/> - <see selector="{{AdminOrderDetailsInformationSection.customerGroup}}" userInput="{{customerGroup.code}}" stepKey="seeCustomerGroup"/> - <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.street[0]}}" stepKey="seeBillingAddressStreet"/> - <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.city}}" stepKey="seeBillingAddressCity"/> - <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.country_id}}" stepKey="seeBillingAddressCountry"/> - <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.postcode}}" stepKey="seeBillingAddressPostcode"/> - <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.street[0]}}" stepKey="seeShippingAddressStreet"/> - <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.city}}" stepKey="seeShippingAddressCity"/> - <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.country_id}}" stepKey="seeShippingAddressCountry"/> - <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.postcode}}" stepKey="seeShippingAddressPostcode"/> - </actionGroup> - - <!--Check for product in order items list--> - <actionGroup name="seeProductInItemsOrdered"> - <arguments> - <argument name="product"/> - </arguments> - <see selector="{{AdminOrderItemsOrderedSection.productSkuColumn}}" userInput="{{product.sku}}" stepKey="seeSkuInItemsOrdered"/> - </actionGroup> - - <!--Cancel order that is in pending status--> - <actionGroup name="cancelPendingOrder"> - <click selector="{{AdminOrderDetailsMainActionsSection.cancel}}" stepKey="clickCancelOrder"/> - <waitForElement selector="{{AdminConfirmationModalSection.message}}" stepKey="waitForCancelConfirmation"/> - <see selector="{{AdminConfirmationModalSection.message}}" userInput="Are you sure you want to cancel this order?" stepKey="seeConfirmationMessage"/> - <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmOrderCancel"/> - <see selector="{{AdminMessagesSection.success}}" userInput="You canceled the order." stepKey="seeCancelSuccessMessage"/> - <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Canceled" stepKey="seeOrderStatusCanceled"/> - </actionGroup> -</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Data/AddressData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Data/AddressData.xml deleted file mode 100644 index 4c3bd6d7f7ed8..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Data/AddressData.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="ShippingAddressTX" type="shipping_address"> - <data key="firstname">Joe</data> - <data key="lastname">Buyer</data> - <data key="fullname">Joe Buyer</data> - <array key="street"> - <item>11501 Domain Dr</item> - <item>#150</item> - </array> - <data key="city">Austin</data> - <data key="region">Texas</data> - <data key="region_code">TX</data> - <data key="region_id">1</data> - <data key="country_id">US</data> - <data key="postcode">78758</data> - <data key="email" unique="prefix">joe.buyer@email.com</data> - <data key="telephone">512-345-6789</data> - </entity> - <entity name="BillingAddressTX" type="billing_address"> - <data key="firstname">Joe</data> - <data key="lastname">Buyer</data> - <data key="fullname">Joe Buyer</data> - <array key="street"> - <item>11501 Domain Dr</item> - <item>#150</item> - </array> - <data key="city">Austin</data> - <data key="region">Texas</data> - <data key="region_code">TX</data> - <data key="region_id">1</data> - <data key="country_id">US</data> - <data key="postcode">78758</data> - <data key="email" unique="prefix">joe.buyer@email.com</data> - <data key="telephone">512-345-6789</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Data/ConstData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Data/ConstData.xml deleted file mode 100644 index a91f31a88c235..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Data/ConstData.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="Const" type="constant"> - <data key="one">1</data> - <data key="two">2</data> - <data key="fifty">50</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminInvoiceDetailsPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminInvoiceDetailsPage.xml deleted file mode 100644 index 9322a5779d232..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminInvoiceDetailsPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminInvoiceDetailsPage" url="sales/invoice/view/invoice_id/" area="admin" module="Magento_Sales"> - <section name="AdminInvoiceDetailsInformationSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminInvoicesPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminInvoicesPage.xml deleted file mode 100644 index d29844da5a8c1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminInvoicesPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminInvoicesPage" url="sales/invoice/" area="admin" module="Magento_Sales"> - <section name="AdminInvoicesGridSection"/> - <section name="AdminInvoicesFiltersSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrdersPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrdersPage.xml deleted file mode 100644 index b3620c1935a32..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Page/AdminOrdersPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminOrdersPage" url="sales/order/" area="admin" module="Magento_Sales"> - <section name="AdminOrdersGridSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/README.md deleted file mode 100644 index dbaf12404d157..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Sales** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceDetailsInformationSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceDetailsInformationSection.xml deleted file mode 100644 index d45a0245c00b9..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceDetailsInformationSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminInvoiceDetailsInformationSection"> - <element name="orderStatus" type="text" selector="#order_status"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceMainActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceMainActionsSection.xml deleted file mode 100644 index dff6a0d84cafc..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoiceMainActionsSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminInvoiceMainActionsSection"> - <element name="submitInvoice" type="button" selector=".action-default.scalable.save.submit-button.primary"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoicesFiltersSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoicesFiltersSection.xml deleted file mode 100644 index 1fad379d23176..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminInvoicesFiltersSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminInvoicesFiltersSection"> - <element name="orderNum" type="input" selector="input[name='order_increment_id']"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderAddressInformationSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderAddressInformationSection.xml deleted file mode 100644 index 90887c13f526c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderAddressInformationSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminOrderAddressInformationSection"> - <element name="billingAddress" type="text" selector=".order-billing-address address"/> - <element name="shippingAddress" type="text" selector=".order-shipping-address address"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderCommentsTabSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderCommentsTabSection.xml deleted file mode 100644 index 18f10f5c8ba31..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderCommentsTabSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminOrderCommentsTabSection"> - <element name="orderNotesList" type="text" selector="#Order_History .edit-order-comments .note-list"/> - <element name="orderComments" type="text" selector="#Order_History .edit-order-comments-block"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderCreditMemosTabSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderCreditMemosTabSection.xml deleted file mode 100644 index 98b34bda914a0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderCreditMemosTabSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminOrderCreditMemosTabSection"> - <element name="spinner" type="text" selector="[data-role='spinner'][data-component*='sales_order_view_creditmemo']"/> - <element name="gridRow" type="text" selector="#sales_order_view_tabs_order_creditmemos_content .data-grid tbody > tr:nth-of-type({{row}})" parameterized="true"/> - <element name="viewGridRow" type="button" selector="#sales_order_view_tabs_order_creditmemos_content .data-grid tbody > tr:nth-of-type({{row}}) a[href*='order_creditmemo/view']" parameterized="true"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsInvoicesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsInvoicesSection.xml deleted file mode 100644 index 5831e07f41e6d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsInvoicesSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminOrderDetailsInvoicesSection"> - <element name="spinner" type="button" selector=".spinner"/> - <element name="content" type="text" selector="#sales_order_view_tabs_order_invoices_content"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsMessagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsMessagesSection.xml deleted file mode 100644 index 0311d5cf75c6d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderDetailsMessagesSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminOrderDetailsMessagesSection"> - <element name="successMessage" type="text" selector="div.message-success"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormAccountSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormAccountSection.xml deleted file mode 100644 index df3efc481a48f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderFormAccountSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminOrderFormAccountSection"> - <element name="group" type="select" selector="#group_id"/> - <element name="email" type="input" selector="#email"/> - <element name="requiredGroup" type="text" selector=".admin__field.required[data-ui-id='billing-address-fieldset-element-form-field-group-id']"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderShippingInformationSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderShippingInformationSection.xml deleted file mode 100644 index 0c1bd47595931..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderShippingInformationSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminOrderShippingInformationSection"> - <element name="shippingMethod" type="text" selector=".order-shipping-method .admin__page-section-item-content"/> - <element name="shippingPrice" type="text" selector=".order-shipping-method .admin__page-section-item-content .price"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderStoreScopeTreeSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderStoreScopeTreeSection.xml deleted file mode 100644 index 31617e2ff9dde..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderStoreScopeTreeSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminOrderStoreScopeTreeSection"> - <element name="storeTree" type="text" selector="div.tree-store-scope"/> - <element name="storeOption" type="radio" selector="//div[contains(@class, 'tree-store-scope')]//label[contains(text(), '{{name}}')]/preceding-sibling::input" parameterized="true" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Test/EndToEndB2CAdminTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Test/EndToEndB2CAdminTest.xml deleted file mode 100644 index 2dbf2bdbe6e01..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Test/EndToEndB2CAdminTest.xml +++ /dev/null @@ -1,281 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CAdminTest"> - <before> - <!--Create order via API--> - <createData entity="_defaultCategory" stepKey="createCategory"/> - <createData entity="_defaultProduct" stepKey="createSimpleProductApi"> - <requiredEntity createDataKey="createCategory"/> - </createData> - <createData entity="GuestCart" stepKey="createGuestCart"/> - <createData entity="SimpleCartItem" stepKey="addCartItem"> - <requiredEntity createDataKey="createGuestCart"/> - <requiredEntity createDataKey="createSimpleProductApi"/> - </createData> - <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddress"> - <requiredEntity createDataKey="createGuestCart"/> - </createData> - <updateData createDataKey="createGuestCart" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformation"> - <requiredEntity createDataKey="createGuestCart"/> - </updateData> - <!--END Create order via API--> - </before> - - <!--Prerequisites--> - <!--Create store view to ensure multiple store views--> - <comment userInput="Create prerequisite store view" stepKey="createStoreViewComment" before="createStoreView"/> - <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView" before="navigateToNewOrderPage"/> - - <!--Admin creates order--> - <comment userInput="Admin creates order" stepKey="adminCreateOrderComment" before="navigateToNewOrderPage"/> - <actionGroup ref="navigateToNewOrderPageNewCustomer" stepKey="navigateToNewOrderPage" after="deleteCategory"/> - - <actionGroup ref="checkRequiredFieldsNewOrderForm" stepKey="checkRequiredFieldsNewOrder" after="navigateToNewOrderPage"/> - <scrollToTopOfPage stepKey="scrollToTopOfOrderFormPage" after="checkRequiredFieldsNewOrder"/> - <actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToOrder" after="scrollToTopOfOrderFormPage"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <actionGroup ref="addConfigurableProductToOrder" stepKey="addConfigurableProductToOrder" after="addSimpleProductToOrder"> - <argument name="product" value="BaseConfigurableProduct"/> - <argument name="attribute" value="colorProductAttribute"/> - <argument name="option" value="colorProductAttribute1"/> - </actionGroup> - - <!--Fill customer group information--> - <selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectGroup" after="addConfigurableProductToOrder"/> - <fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillEmail" after="selectGroup"/> - - <!--Fill customer address information--> - <actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress" after="fillEmail"> - <argument name="customer" value="Simple_US_Customer"/> - <argument name="address" value="US_Address_TX"/> - </actionGroup> - - <actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping" after="fillCustomerAddress"/> - - <!--Verify totals on Order page--> - <see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleConfigurableProduct.subtotal}}" stepKey="seeOrderSubTotal" after="selectFlatRateShipping"/> - <see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="${{AdminOrderSimpleConfigurableProduct.shipping}}" stepKey="seeOrderShipping" after="seeOrderSubTotal"/> - <see selector="{{AdminOrderFormTotalSection.grandTotal}}" userInput="${{AdminOrderSimpleConfigurableProduct.grandTotal}}" stepKey="seeCorrectGrandTotal" after="seeOrderShipping"/> - - <!--Submit Order and verify information--> - <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="clickSubmitOrder" after="seeCorrectGrandTotal"/> - <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPage" after="clickSubmitOrder"/> - - <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the order." stepKey="seeSuccessMessage" after="seeViewOrderPage"/> - <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="seeOrderPendingStatus" after="seeSuccessMessage"/> - <grabTextFrom selector="|Order # (\d+)|" stepKey="getOrderId" after="seeOrderPendingStatus"/> - <assertNotEmpty actual="$getOrderId" stepKey="assertOrderIdIsNotEmpty" after="getOrderId"/> - <actionGroup ref="verifyBasicOrderInformation" stepKey="verifyOrderInformation" after="assertOrderIdIsNotEmpty"> - <argument name="customer" value="Simple_US_Customer"/> - <argument name="shippingAddress" value="US_Address_TX"/> - <argument name="billingAddress" value="US_Address_TX"/> - </actionGroup> - <actionGroup ref="seeProductInItemsOrdered" stepKey="seeSimpleProductInItemsOrdered" after="verifyOrderInformation"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <actionGroup ref="seeProductInItemsOrdered" stepKey="seeConfigurableProductInItemsOrdered" after="seeSimpleProductInItemsOrdered"> - <argument name="product" value="BaseConfigurableProduct"/> - </actionGroup> - - <!--Create order invoice--> - <comment userInput="Admin creates invoice for order" stepKey="adminCreateInvoiceComment" before="closeAdminNotificationInvoice"/> - <closeAdminNotification stepKey="closeAdminNotificationInvoice" after="seeConfigurableProductInItemsOrdered"/> - <click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceAction" after="closeAdminNotificationInvoice"/> - <seeInCurrentUrl url="{{AdminInvoiceNewPage.url}}" stepKey="seeOrderInvoiceUrl" after="clickInvoiceAction"/> - <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seePageNameNewInvoicePage" after="seeOrderInvoiceUrl"/> - - <!--Check Invoice Data--> - <see selector="{{AdminInvoiceOrderInformationSection.orderStatus}}" userInput="Pending" stepKey="seeOrderPendingInvoice" after="seePageNameNewInvoicePage"/> - <actionGroup ref="verifyBasicInvoiceInformation" stepKey="verifyOrderInvoiceInformation" after="seeOrderPendingInvoice"> - <argument name="customer" value="Simple_US_Customer"/> - <argument name="shippingAddress" value="US_Address_TX"/> - <argument name="billingAddress" value="US_Address_TX"/> - </actionGroup> - <see selector="{{AdminInvoicePaymentShippingSection.ShippingMethod}}" userInput="{{DefaultFlatRateMethod.title}}" stepKey="seeShippingMethod" after="verifyOrderInvoiceInformation"/> - <see selector="{{AdminInvoicePaymentShippingSection.ShippingPrice}}" userInput="${{AdminOrderSimpleConfigurableProduct.shipping}}" stepKey="seeShippingCost" after="seeShippingMethod"/> - <!--Submit Invoice--> - <click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice" after="seeShippingCost"/> - <!--Invoice created successfully--> - <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPageInvoice" after="clickSubmitInvoice"/> - <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeInvoiceCreateSuccess" after="seeViewOrderPageInvoice"/> - <see selector="{{AdminHeaderSection.pageTitle}}" userInput="$getOrderId" stepKey="seePageNameMatchesOrderIdAfterInvoice" after="seeInvoiceCreateSuccess"/> - - <click selector="{{AdminOrderDetailsOrderViewSection.invoices}}" stepKey="clickOrderInvoicesTab" after="seePageNameMatchesOrderIdAfterInvoice"/> - <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask" after="clickOrderInvoicesTab"/> - <see selector="{{AdminOrderInvoicesTabSection.gridRow('1')}}" userInput="{{Simple_US_Customer.firstname}}" stepKey="seeOrderInvoiceInTabGrid" after="waitForInvoiceGridLoadingMask"/> - <click selector="{{AdminOrderInvoicesTabSection.viewGridRow('1')}}" stepKey="clickToViewInvoiceRow" after="seeOrderInvoiceInTabGrid"/> - <see selector="{{AdminInvoiceOrderInformationSection.orderId}}" userInput="$getOrderId" stepKey="seeOrderIdOnInvoice" after="clickToViewInvoiceRow"/> - <actionGroup ref="verifyBasicInvoiceInformation" stepKey="verifyBasicInvoiceInformation" after="seeOrderIdOnInvoice"> - <argument name="customer" value="Simple_US_Customer"/> - <argument name="shippingAddress" value="US_Address_TX"/> - <argument name="billingAddress" value="US_Address_TX"/> - </actionGroup> - <actionGroup ref="seeProductInInvoiceItems" stepKey="seeSimpleProductInInvoice" after="verifyBasicInvoiceInformation"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <actionGroup ref="seeProductInInvoiceItems" stepKey="seeConfigurableProductInInvoice" after="seeSimpleProductInInvoice"> - <argument name="product" value="BaseConfigurableProduct"/> - </actionGroup> - <click selector="{{AdminInvoiceOrderInformationSection.orderId}}" stepKey="clickOrderIdLinkOnInvoice" after="seeConfigurableProductInInvoice"/> - - <!--Create Credit Memo--> - <comment userInput="Admin creates credit memo" stepKey="createCreditMemoComment" after="clickOrderIdOnShipment"/> - <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreateCreditMemo" after="createCreditMemoComment"/> - <seeInCurrentUrl url="{{AdminCreditMemoNewPage.url}}" stepKey="seeNewCreditMemoPage" after="clickCreateCreditMemo"/> - <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoInPageTitle" after="seeNewCreditMemoPage"/> - <!--Check Credit Memo Order Data--> - <actionGroup ref="verifyBasicCreditMemoInformation" stepKey="verifyOrderCreditMemoInformation" after="seeNewMemoInPageTitle"> - <argument name="customer" value="Simple_US_Customer"/> - <argument name="shippingAddress" value="US_Address_TX"/> - <argument name="billingAddress" value="US_Address_TX"/> - </actionGroup> - <!--Submit credit memo--> - <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline" after="verifyOrderCreditMemoInformation"/> - <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the credit memo." stepKey="seeCreditMemoSuccess" after="clickRefundOffline"/> - <click selector="{{AdminOrderDetailsOrderViewSection.creditMemos}}" stepKey="clickOrderCreditMemosTab" after="seeCreditMemoSuccess"/> - <waitForLoadingMaskToDisappear stepKey="waitForCreditMemoTabLoadingMask" after="clickOrderCreditMemosTab"/> - <see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" userInput="{{Simple_US_Customer.firstname}}" stepKey="seeOrderCreditMemoInTabGrid" after="waitForCreditMemoTabLoadingMask"/> - <click selector="{{AdminOrderCreditMemosTabSection.viewGridRow('1')}}" stepKey="clickToViewCreditMemoRow" after="seeOrderCreditMemoInTabGrid"/> - <waitForPageLoad stepKey="waitForCreditMemoPageLoad" after="clickToViewCreditMemoRow"/> - <see selector="{{AdminCreditMemoOrderInformationSection.orderId}}" userInput="$getOrderId" stepKey="seeOrderIdOnCreditMemo" after="waitForCreditMemoPageLoad"/> - <actionGroup ref="verifyBasicCreditMemoInformation" stepKey="verifyBasicCreditMemoInformation" after="seeOrderIdOnCreditMemo"> - <argument name="customer" value="Simple_US_Customer"/> - <argument name="shippingAddress" value="US_Address_TX"/> - <argument name="billingAddress" value="US_Address_TX"/> - </actionGroup> - <actionGroup ref="seeProductInItemsRefunded" stepKey="seeSimpleProductInItemsRefunded" after="verifyBasicCreditMemoInformation"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <actionGroup ref="seeProductInItemsRefunded" stepKey="seeConfigurableProductInItemsRefunded" after="seeSimpleProductInItemsRefunded"> - <argument name="product" value="BaseConfigurableProduct"/> - </actionGroup> - <scrollToTopOfPage stepKey="scrollToTopOfCreditMemo" after="seeConfigurableProductInItemsRefunded"/> - <click selector="{{AdminCreditMemoOrderInformationSection.orderId}}" stepKey="clickOrderIdLinkOnCreditMemo" after="scrollToTopOfCreditMemo"/> - - <!--Admin uses order grid--> - <comment userInput="Admin uses order grid" stepKey="adminUseOrderGridComment" before="navigateToOrderGridPage"/> - <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderGridPage" after="clickOrderIdLinkOnCreditMemo"/> - <waitForPageLoad time="60" stepKey="waitForLoadUseOrderGrid" after="navigateToOrderGridPage"/> - <waitForLoadingMaskToDisappear stepKey="waitForOrderGridPageLoad" after="waitForLoadUseOrderGrid"/> - - <!--Search order grid by name--> - <comment userInput="Admin searches order grid by name" stepKey="searchOrderGridComment" after="waitForOrderGridPageLoad"/> - <actionGroup ref="resetAdminDataGridToDefaultView" stepKey="setOrderGridToDefaultViewForSearch" after="searchOrderGridComment"/> - <!--@TODO use "Ship-to Name" when MQE-794 is fixed--> - <see selector="{{AdminDataGridTableSection.column('Ship')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="seeNonFilterNameInShipNameColumn" after="setOrderGridToDefaultViewForSearch"/> - <actionGroup ref="searchAdminDataGridByKeyword" stepKey="searchOrderGridByNameKeyword" after="seeNonFilterNameInShipNameColumn"> - <argument name="keyword" value="BillingAddressTX.fullname"/> - </actionGroup> - <dontSee selector="{{AdminDataGridTableSection.column('Ship')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="dontSeeNonFilterNameInShipNameColumn" after="searchOrderGridByNameKeyword"/> - <see selector="{{AdminDataGridTableSection.column('Ship')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="seeFilterNameInShipNameColumn" after="dontSeeNonFilterNameInShipNameColumn"/> - - <!--Filter order grid--> - <comment userInput="Admin filters order grid by 'Bill-to Name'" stepKey="filterOrderGridByNameComment" after="seeFilterNameInShipNameColumn"/> - <!--Filter order grid by "Bill-to Name"--> - <actionGroup ref="resetAdminDataGridToDefaultView" stepKey="resetOrderGridForNameFilter" after="filterOrderGridByNameComment"/> - <!--@TODO use "Bill-to Name" when MQE-794 is fixed--> - <see selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="seeNonFilterNameInColumn" after="resetOrderGridForNameFilter"/> - <actionGroup ref="filterOrderGridByBillingName" stepKey="filterOrderGridByBillingName" after="seeNonFilterNameInColumn"> - <argument name="customer" value="Simple_US_Customer"/> - </actionGroup> - <dontSee selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="dontSeeNonFilterNameInColumn" after="filterOrderGridByBillingName"/> - <see selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="seeFilterNameInColumn" after="dontSeeNonFilterNameInColumn"/> - <!--Filter order grid by Grand Total (Base)--> - <comment userInput="Admin filters order grid by 'Grand Total'" stepKey="filterOrderGridByTotalComment" after="seeFilterNameInColumn"/> - <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilterBeforeTotalFilter" after="filterOrderGridByTotalComment"/> - <see selector="{{AdminDataGridTableSection.column('Grand Total')}}" userInput="{{AdminOrderSimpleProduct.grandTotal}}" stepKey="seeLowerTotalInGrid" after="clearFilterBeforeTotalFilter"/> - <actionGroup ref="filterOrderGridByBaseTotalRange" stepKey="filterOrderGridByTotal" after="seeLowerTotalInGrid"> - <argument name="from" value="OrderGrandTotalFilterRange.from"/> - <argument name="to" value="OrderGrandTotalFilterRange.to"/> - </actionGroup> - <dontSee selector="{{AdminDataGridTableSection.column('Grand Total')}}" userInput="{{AdminOrderSimpleProduct.grandTotal}}" stepKey="dontSeeLowerTotalInGrid" after="filterOrderGridByTotal"/> - <see selector="{{AdminDataGridTableSection.column('Grand Total')}}" userInput="{{AdminOrderSimpleConfigurableProduct.grandTotal}}" stepKey="seeExpectedTotalInGrid" after="dontSeeLowerTotalInGrid"/> - <!--Filter order grid by purchase date--> - <comment userInput="Admin filters order grid by 'Purchase Date'" stepKey="filterOrderGridByDateComment" after="seeExpectedTotalInGrid"/> - <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilterBeforeOrderDateFilter" after="filterOrderGridByDateComment"/> - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openOrderFilterForOrderDateFrom" after="clearFilterBeforeOrderDateFilter"/> - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[from]')}}" userInput="01/01/2018" stepKey="fillOrderDateFromFilter" after="openOrderFilterForOrderDateFrom"/> - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="applyFilterOrderDateFrom" after="fillOrderDateFromFilter"/> - <!--Both of our orders should be in grid--> - <see selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="seeFirstOrderInGrid" after="applyFilterOrderDateFrom"/> - <see selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="seeSecondOrderInGrid" after="seeFirstOrderInGrid"/> - <!--Add end date to date range filter (past date)--> - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openOrderFilterForOrderDateTo" after="seeSecondOrderInGrid"/> - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[to]')}}" userInput="01/10/2018" stepKey="fillOrderDateToFilter" after="openOrderFilterForOrderDateTo"/> - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="applyFilterOrderDateTo" after="fillOrderDateToFilter"/> - <!--Dont see our orders in the grid--> - <dontSee selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{Simple_US_Customer.fullname}}" stepKey="dontSeeFirstOrderInGrid" after="applyFilterOrderDateTo"/> - <dontSee selector="{{AdminDataGridTableSection.column('Bill')}}" userInput="{{BillingAddressTX.fullname}}" stepKey="dontSeeSecondOrderInGrid" after="dontSeeFirstOrderInGrid"/> - <!--Filter order grid by status--> - <comment userInput="Admin filters order grid by 'Status'" stepKey="filterOrderGridByStatusComment" after="dontSeeSecondOrderInGrid"/> - <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilterBeforeStatusFilter" after="filterOrderGridByStatusComment"/> - <actionGroup ref="filterOrderGridByStatus" stepKey="filterOrderGridByPendingStatus" after="clearFilterBeforeStatusFilter"> - <argument name="status" value="OrderStatus.pending"/> - </actionGroup> - <dontSee selector="{{AdminDataGridTableSection.column('Status')}}" userInput="{{OrderStatus.closed}}" stepKey="dontSeeClosedStatusInOrderGrid" after="filterOrderGridByPendingStatus"/> - <see selector="{{AdminDataGridTableSection.column('Status')}}" userInput="{{OrderStatus.pending}}" stepKey="seePendingStatusInOrderGrid" after="dontSeeClosedStatusInOrderGrid"/> - <actionGroup ref="filterOrderGridByStatus" stepKey="filterOrderGridByClosedStatus" after="seePendingStatusInOrderGrid"> - <argument name="status" value="OrderStatus.closed"/> - </actionGroup> - <see selector="{{AdminDataGridTableSection.column('Status')}}" userInput="{{OrderStatus.closed}}" stepKey="seeClosedStatusInOrderGrid" after="filterOrderGridByClosedStatus"/> - <dontSee selector="{{AdminDataGridTableSection.column('Status')}}" userInput="{{OrderStatus.pending}}" stepKey="dontSeePendingStatusInOrderGrid" after="seeClosedStatusInOrderGrid"/> - - <!--Sort order grid--> - <actionGroup ref="resetAdminDataGridToDefaultView" stepKey="resetOrderGridForSorting" after="dontSeePendingStatusInOrderGrid"/> - <!--Sort order grid by status--> - <comment userInput="Admin sorts order grid by status" stepKey="sortOrderGridByStatusComment" after="resetOrderGridForSorting"/> - <click selector="{{AdminDataGridTableSection.columnHeader('Status')}}" stepKey="clickStatusToSortAsc" after="sortOrderGridByStatusComment"/> - <grabTextFrom selector="{{AdminDataGridTableSection.gridCell('1', 'Status')}}" stepKey="getOrderStatusFirstRow" after="clickStatusToSortAsc"/> - <grabTextFrom selector="{{AdminDataGridTableSection.gridCell('2', 'Status')}}" stepKey="getOrderStatusSecondRow" after="getOrderStatusFirstRow"/> - <assertGreaterThanOrEqual expected="$getOrderStatusFirstRow" actual="$getOrderStatusSecondRow" stepKey="checkStatusSortOrderAsc" after="getOrderStatusSecondRow"/> - <!--@TODO improve sort assertion and check price and date column when MQE-690 is resolved--> - - <!--Use paging on order grid--> - <actionGroup ref="resetAdminDataGridToDefaultView" stepKey="resetAdminGridBeforePaging" after="checkStatusSortOrderAsc"/> - <comment userInput="Admin uses paging on order grid" stepKey="usePagingOrderGridComment" after="resetAdminGridBeforePaging"/> - <actionGroup ref="adminDataGridSelectCustomPerPage" stepKey="select1OrderPerPage" after="usePagingOrderGridComment"> - <!--@TODO Change this to scalar when MQE-498 is implemented--> - <argument name="perPage" value="Const.one"/> - </actionGroup> - <seeNumberOfElements selector="{{AdminDataGridTableSection.rows}}" userInput="1" stepKey="see1RowOnFirstPage" after="select1OrderPerPage"/> - <seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="1" stepKey="seeOnFirstPageOrderGrid" after="see1RowOnFirstPage"/> - <click selector="{{AdminDataGridPaginationSection.nextPage}}" stepKey="clickNextPageOrderGrid" after="seeOnFirstPageOrderGrid"/> - <seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="2" stepKey="seeOnSecondPageOrderGrid" after="clickNextPageOrderGrid"/> - <seeNumberOfElements selector="{{AdminDataGridTableSection.rows}}" userInput="1" stepKey="see1RowOnSecondPage" after="seeOnSecondPageOrderGrid"/> - <actionGroup ref="adminDataGridSelectPerPage" stepKey="select50OrdersPerPage" after="see1RowOnSecondPage"> - <!--@TODO Change this to scalar when MQE-498 is implemented--> - <argument name="perPage" value="Const.fifty"/> - </actionGroup> - <seeNumberOfElements selector="{{AdminDataGridTableSection.rows}}" parameterArray="[2,50]" stepKey="seeCorrectNumberOfRowsPerPage" after="select50OrdersPerPage"/> - - <!--Add column to order grid--> - <!--@TODO Change to action group when MQE-498 is implemented--> - <comment userInput="Admin adds column to order grid" stepKey="adminAddsColumnOrderGrid" after="seeCorrectNumberOfRowsPerPage"/> - <dontSeeElement selector="{{AdminDataGridTableSection.columnHeader('Customer Email')}}" stepKey="dontSeeCustomerEmailColumnInGrid" after="adminAddsColumnOrderGrid"/> - <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="openOrderGridColumnOptions" after="dontSeeCustomerEmailColumnInGrid"/> - <checkOption selector="{{AdminDataGridHeaderSection.columnCheckbox('Customer Email')}}" stepKey="addCustomerEmailColumnToOrderGrid" after="openOrderGridColumnOptions"/> - <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="closeOrderGridColumnOptions" after="addCustomerEmailColumnToOrderGrid"/> - <seeElement selector="{{AdminDataGridTableSection.columnHeader('Customer Email')}}" stepKey="seeCustomerEmailColumnInGrid" after="closeOrderGridColumnOptions"/> - <!--Remove column from order grid--> - <!--@TODO Change to action group when MQE-498 is implemented--> - <comment userInput="Admin removes column from order grid" stepKey="adminRemovesColumnOrderGrid" after="seeCustomerEmailColumnInGrid"/> - <seeElement selector="{{AdminDataGridTableSection.columnHeader('Purchase Point')}}" stepKey="seePurchasePointColumnInGrid" after="adminRemovesColumnOrderGrid"/> - <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="openOrderGridColumnOptionsPurchasePoint" after="seePurchasePointColumnInGrid"/> - <uncheckOption selector="{{AdminDataGridHeaderSection.columnCheckbox('Purchase Point')}}" stepKey="removePurchasePointColumnFromGrid" after="openOrderGridColumnOptionsPurchasePoint"/> - <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="closeOrderGridColumnOptionsPurchasePoint" after="removePurchasePointColumnFromGrid"/> - <dontSeeElement selector="{{AdminDataGridTableSection.columnHeader('Purchase Point')}}" stepKey="dontSeePurchasePointColumnInGrid" after="closeOrderGridColumnOptionsPurchasePoint"/> - <!--END admin uses order grid--> - - <!--Delete store view created as prerequisites--> - <comment userInput="Clean up store view" stepKey="cleanUpStoreView" before="deleteStoreView"/> - <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"/> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/composer.json deleted file mode 100644 index c339cb1cea0c1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/composer.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-sales", - "description": "Magento 2 Functional Test Module Sales", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-authorization": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-gift-message": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-reports": "100.0.0-dev", - "magento/magento2-functional-test-module-sales-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-sales-sequence": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-widget": "100.0.0-dev", - "magento/magento2-functional-test-module-wishlist": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Sales\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Sales" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/README.md deleted file mode 100644 index 856eb7057f031..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_SalesAnalytics** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/composer.json deleted file mode 100644 index 3f96160f374d0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesAnalytics/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-sales-analytics", - "description": "Magento 2 Acceptance Test Module Sales Analytics", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-sales": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\SalesAnalytics\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/SalesAnalytics" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/README.md deleted file mode 100644 index beeef87b6e7fd..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_SalesInventory** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/composer.json deleted file mode 100644 index 6547bff428193..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesInventory/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-sales-inventory", - "description": "Magento 2 Functional Test Module Sales Inventory", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\SalesInventory\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/SalesInventory" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/AdminCartPriceRuleActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/AdminCartPriceRuleActionGroup.xml deleted file mode 100644 index 24d881ee6081d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/ActionGroup/AdminCartPriceRuleActionGroup.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <actionGroup name="selectNotLoggedInCustomerGroup"> - <!-- This actionGroup was created to be merged from B2B because B2B has a very different form control here --> - <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="NOT LOGGED IN" stepKey="selectCustomerGroup"/> - </actionGroup> -</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/QuoteData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/QuoteData.xml deleted file mode 100644 index 389cda03235bc..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/QuoteData.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <!-- @TODO: Get rid off this workaround and its usages after MQE-498 is implemented --> - <entity name="E2EB2CQuoteWith10PercentDiscount" type="Quote"> - <data key="subtotal">480.00</data> - <data key="shipping">15.00</data> - <data key="discount">48.00</data> - <data key="total">447.00</data> - <data key="shippingMethod">Flat Rate - Fixed</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleCouponData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleCouponData.xml deleted file mode 100644 index b2e9f3d61abff..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleCouponData.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="SimpleSalesRuleCoupon" type="SalesRuleCoupon"> - <var key="rule_id" entityKey="rule_id" entityType="SalesRule"/> - <data key="code" unique="suffix">Code</data> - <data key="is_primary">1</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleLabelData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleLabelData.xml deleted file mode 100644 index 6798b34a7557a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Data/SalesRuleLabelData.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="SalesRuleLabelDefault" type="SalesRuleLabel"> - <data key="store_id">0</data> - <data key="store_label" unique="suffix">Sales Rule (Default) </data> - </entity> - <entity name="SalesRuleLabelStore1" type="SalesRuleLabel"> - <data key="store_id">1</data> - <data key="store_label" unique="suffix">Sales Rule (Store 1) </data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Page/AdminCartPriceRulesPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Page/AdminCartPriceRulesPage.xml deleted file mode 100644 index 66172f4ac146d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Page/AdminCartPriceRulesPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminCartPriceRulesPage" url="sales_rule/promo_quote/" area="admin" module="SalesRule"> - <section name="AdminCartPriceRulesSection"/> - <section name="AdminCartPriceRulesFormSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Page/PriceRuleNewPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Page/PriceRuleNewPage.xml deleted file mode 100644 index c8475de4c61f7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Page/PriceRuleNewPage.xml +++ /dev/null @@ -1,11 +0,0 @@ -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <page name="PriceRuleNewPage" url="sales_rule/promo_quote/new/" area="admin" module="Magento_SalesRule"> - <section name="PriceRuleConditionsSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/README.md deleted file mode 100644 index 2180f41bb7e31..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_SalesRule** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/CheckoutCartSummarySection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/CheckoutCartSummarySection.xml deleted file mode 100644 index 68dee0de52390..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/CheckoutCartSummarySection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="CheckoutCartSummarySection"> - <element name="discountLabel" type="text" selector="//*[@id='cart-totals']//tr[.//th//span[contains(@class, 'discount coupon')]]"/> - <element name="discountTotal" type="text" selector="//*[@id='cart-totals']//tr[.//th//span[contains(@class, 'discount coupon')]]//td//span//span[@class='price']"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml deleted file mode 100644 index 853e8f75a217b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Section/DiscountSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="DiscountSection"> - <element name="DiscountTab" type="button" selector="//strong[text()='Apply Discount Code']"/> - <element name="CouponInput" type="input" selector="#coupon_code"/> - <element name="ApplyCodeBtn" type="button" selector="//span[text()='Apply Discount']"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/EndToEndB2CGuestUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/EndToEndB2CGuestUserTest.xml deleted file mode 100644 index 6e1ba5ad1649b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/EndToEndB2CGuestUserTest.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CGuestUserTest"> - <before> - <createData entity="ApiSalesRule" stepKey="createSalesRule"/> - <createData entity="ApiSalesRuleCoupon" stepKey="createSalesRuleCoupon"> - <requiredEntity createDataKey="createSalesRule"/> - </createData> - </before> - <after> - <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> - </after> - - <!-- Step 5: User uses coupon codes --> - <comment userInput="Start of using coupon code" stepKey="startOfUsingCouponCode" after="endOfComparingProducts" /> - <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="couponOpenCart" after="startOfUsingCouponCode"/> - - <actionGroup ref="StorefrontApplyCouponActionGroup" stepKey="couponApplyCoupon" after="couponOpenCart"> - <argument name="coupon" value="$$createSalesRuleCoupon$$"/> - </actionGroup> - - <actionGroup ref="StorefrontCheckCouponAppliedActionGroup" stepKey="couponCheckAppliedDiscount" after="couponApplyCoupon"> - <argument name="rule" value="$$createSalesRule$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="discount" value="E2EB2CQuoteWith10PercentDiscount.discount"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="couponCheckCartWithDiscount" after="couponCheckAppliedDiscount"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="subtotal" value="E2EB2CQuoteWith10PercentDiscount.subtotal"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shipping" value="E2EB2CQuoteWith10PercentDiscount.shipping"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingMethod" value="E2EB2CQuoteWith10PercentDiscount.shippingMethod"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="total" value="E2EB2CQuoteWith10PercentDiscount.total"/> - </actionGroup> - - <actionGroup ref="StorefrontCancelCouponActionGroup" stepKey="couponCancelCoupon" after="couponCheckCartWithDiscount"/> - <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCartAfterCancelCoupon" after="couponCancelCoupon"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="subtotal" value="E2EB2CQuote.subtotal"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shipping" value="E2EB2CQuote.shipping"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="total" value="E2EB2CQuote.total"/> - </actionGroup> - <comment userInput="End of using coupon code" stepKey="endOfUsingCouponCode" after="cartAssertCartAfterCancelCoupon" /> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/EndToEndB2CLoggedInUserTest.xml deleted file mode 100644 index fcb8028220cb1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/Test/EndToEndB2CLoggedInUserTest.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CLoggedInUserTest"> - <before> - <createData entity="ApiSalesRule" stepKey="createSalesRule"/> - <createData entity="ApiSalesRuleCoupon" stepKey="createSalesRuleCoupon"> - <requiredEntity createDataKey="createSalesRule"/> - </createData> - </before> - <after> - <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> - </after> - - <!-- Step 6: User uses coupon codes --> - <comment userInput="Start of using coupon code" stepKey="startOfUsingCouponCode" after="endOfComparingProducts" /> - <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="couponOpenCart" after="startOfUsingCouponCode"/> - - <actionGroup ref="StorefrontApplyCouponActionGroup" stepKey="couponApplyCoupon" after="couponOpenCart"> - <argument name="coupon" value="$$createSalesRuleCoupon$$"/> - </actionGroup> - - <actionGroup ref="StorefrontCheckCouponAppliedActionGroup" stepKey="couponCheckAppliedDiscount" after="couponApplyCoupon"> - <argument name="rule" value="$$createSalesRule$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="discount" value="E2EB2CQuoteWith10PercentDiscount.discount"/> - </actionGroup> - <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="couponCheckCartWithDiscount" after="couponCheckAppliedDiscount"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="subtotal" value="E2EB2CQuoteWith10PercentDiscount.subtotal"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shipping" value="E2EB2CQuoteWith10PercentDiscount.shipping"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingMethod" value="E2EB2CQuoteWith10PercentDiscount.shippingMethod"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="total" value="E2EB2CQuoteWith10PercentDiscount.total"/> - </actionGroup> - - <actionGroup ref="StorefrontCancelCouponActionGroup" stepKey="couponCancelCoupon" after="couponCheckCartWithDiscount"/> - <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCartAfterCancelCoupon" after="couponCancelCoupon"> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="subtotal" value="E2EB2CQuote.subtotal"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shipping" value="E2EB2CQuote.shipping"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="total" value="E2EB2CQuote.total"/> - </actionGroup> - <comment userInput="End of using coupon code" stepKey="endOfUsingCouponCode" after="cartAssertCartAfterCancelCoupon"/> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/composer.json deleted file mode 100644 index 990fdc0201930..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesRule/composer.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-sales-rule", - "description": "Magento 2 Functional Test Module Sales Rule", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "~2.0.0", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-reports": "100.0.0-dev", - "magento/magento2-functional-test-module-rule": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-widget": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\SalesRule\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/SalesRule" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/README.md deleted file mode 100644 index 8b3e36c3fda04..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_SalesSequence** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/composer.json deleted file mode 100644 index 808f1394d6173..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SalesSequence/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-sales-sequence", - "description": "Magento 2 Functional Test Module Sales Sequence", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\SalesSequence\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/SalesSequence" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/README.md deleted file mode 100644 index 1dcde417aed6f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_SampleData** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/composer.json deleted file mode 100644 index ed12f8bda3beb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleData/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-sample-data", - "description": "Magento 2 Functional Test Module Sample Data", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\SampleData\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/SampleData" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/README.md deleted file mode 100644 index bb6c6d52df27d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Search** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/Section/StorefrontQuickSearchSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/Section/StorefrontQuickSearchSection.xml deleted file mode 100644 index 5770b43901e23..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/Section/StorefrontQuickSearchSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontQuickSearchSection"> - <element name="searchPhrase" type="input" selector="#search"/> - <element name="searchButton" type="button" selector="button.action.search"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/composer.json deleted file mode 100644 index 436bc7d1c4e3f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Search/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-search", - "description": "Magento 2 Functional Test Module Search", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "~2.0.0", - "magento/magento2-functional-test-module-catalog-search": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-reports": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Search\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Search" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/README.md deleted file mode 100644 index 26f535867d4bc..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Security** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/composer.json deleted file mode 100644 index 69f18fcfbc40f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Security/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-security", - "description": "Magento 2 Functional Test Module Security", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Security\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Security" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/README.md deleted file mode 100644 index 8759f1b780d3b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_SendFriend** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/composer.json deleted file mode 100644 index 0b7d03fa71fa7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SendFriend/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-send-friend", - "description": "Magento 2 Functional Test Module Send Friend", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\SendFriend\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/SendFriend" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/README.md deleted file mode 100644 index 2e2ca0df9eaa6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Shipping** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentItemsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentItemsSection.xml deleted file mode 100644 index 562ad729fe7f3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentItemsSection.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminShipmentItemsSection"> - <element name="itemName" type="text" selector=".order-shipment-table tbody:nth-of-type({{row}}) .col-product .product-title" parameterized="true"/> - <element name="itemSku" type="text" selector=".order-shipment-table tbody:nth-of-type({{row}}) .col-product .product-sku-block" parameterized="true"/> - <element name="itemQty" type="text" selector=".order-shipment-table tbody:nth-of-type({{row}}) .col-ordered-qty .qty-table" parameterized="true"/> - <element name="itemQtyToShip" type="input" selector=".order-shipment-table tbody:nth-of-type({{row}}) .col-qty input.qty-item"/> - <element name="nameColumn" type="text" selector=".order-shipment-table .col-product .product-title"/> - <element name="skuColumn" type="text" selector=".order-shipment-table .col-product .product-sku-block"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentMainActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentMainActionsSection.xml deleted file mode 100644 index 5cd843e0ad8c4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentMainActionsSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminShipmentMainActionsSection"> - <element name="submitShipment" type="button" selector="button.action-default.save.submit-button"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentTotalSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentTotalSection.xml deleted file mode 100644 index 7496bfbdf228d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Section/AdminShipmentTotalSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminShipmentTotalSection"> - <element name="CommentText" type="textarea" selector="#shipment_comment_text"/> - <element name="AppendComments" type="checkbox" selector=".order-totals input#notify_customer"/> - <element name="EmailCopy" type="checkbox" selector=".order-totals input#send_email"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Test/EndToEndB2CAdminTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Test/EndToEndB2CAdminTest.xml deleted file mode 100644 index 2bd17fdb4a3ba..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/Test/EndToEndB2CAdminTest.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CAdminTest"> - <!--Ship Order--> - <comment userInput="Admin creates shipment" stepKey="adminCreatesShipmentComment" before="clickShipAction"/> - <click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction" after="clickOrderIdLinkOnInvoice"/> - <seeInCurrentUrl url="{{AdminShipmentNewPage.url}}" stepKey="seeOrderShipmentUrl" after="clickShipAction"/> - - <see selector="{{AdminShipmentOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="seeShipmentOrderStatus" after="seeOrderShipmentUrl"/> - <actionGroup ref="verifyBasicShipmentInformation" stepKey="checkBasicShipmentOrderInfo" after="seeShipmentOrderStatus"> - <argument name="customer" value="Simple_US_Customer"/> - <argument name="shippingAddress" value="US_Address_TX"/> - <argument name="billingAddress" value="US_Address_TX"/> - </actionGroup> - - <!--Submit Shipment--> - <click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment" after="checkBasicShipmentOrderInfo"/> - <!--Shipment created successfully--> - <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPageShipping" after="clickSubmitShipment"/> - <see selector="{{AdminHeaderSection.pageTitle}}" userInput="$getOrderId" stepKey="seeOrderIdInPageNameAfterShip" after="seeViewOrderPageShipping"/> - <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The shipment has been created." stepKey="seeShipmentCreateSuccess" after="seeOrderIdInPageNameAfterShip"/> - <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Complete" stepKey="seeOrderComplete" after="seeShipmentCreateSuccess"/> - <see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Shipped 1" stepKey="seeShippedQuantity" after="seeOrderComplete"/> - - <click selector="{{AdminOrderDetailsOrderViewSection.shipments}}" stepKey="clickOrderShipmentsTab" after="seeShippedQuantity"/> - <waitForLoadingMaskToDisappear stepKey="waitForShipmentTabLoad" after="clickOrderShipmentsTab"/> - <see selector="{{AdminOrderShipmentsTabSection.gridRow('1')}}" userInput="{{Simple_US_Customer.firstname}}" stepKey="seeOrderShipmentInTabGrid" after="waitForShipmentTabLoad"/> - <click selector="{{AdminOrderShipmentsTabSection.viewGridRow('1')}}" stepKey="clickRowToViewShipment" after="seeOrderShipmentInTabGrid"/> - <see selector="{{AdminShipmentOrderInformationSection.orderId}}" userInput="$getOrderId" stepKey="seeOrderIdOnShipment" after="clickRowToViewShipment"/> - <actionGroup ref="verifyBasicShipmentInformation" stepKey="checkShipmentOrderInformation" after="seeOrderIdOnShipment"> - <argument name="customer" value="Simple_US_Customer"/> - <argument name="shippingAddress" value="US_Address_TX"/> - <argument name="billingAddress" value="US_Address_TX"/> - </actionGroup> - <actionGroup ref="seeProductInShipmentItems" stepKey="seeSimpleProductInShipmentItems" after="checkShipmentOrderInformation"> - <argument name="product" value="SimpleProduct"/> - </actionGroup> - <actionGroup ref="seeProductInShipmentItems" stepKey="seeConfigurableProductInShipmentItems" after="seeSimpleProductInShipmentItems"> - <argument name="product" value="BaseConfigurableProduct"/> - </actionGroup> - <click selector="{{AdminShipmentOrderInformationSection.orderId}}" stepKey="clickOrderIdOnShipment" after="seeConfigurableProductInShipmentItems"/> - </test> -</tests> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/composer.json deleted file mode 100644 index fbe922ddc2d5c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Shipping/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-shipping", - "description": "Magento 2 Functional Test Module Shipping", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-contact": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-user": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Shipping\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Shipping" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/README.md deleted file mode 100644 index 9770ead78032c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Sitemap** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/composer.json deleted file mode 100644 index 6d1c9eb72dab4..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sitemap/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-sitemap", - "description": "Magento 2 Functional Test Module Sitemap", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-url-rewrite": "100.0.0-dev", - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-robots": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Sitemap\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Sitemap" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreGroupData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreGroupData.xml deleted file mode 100644 index 891d307808760..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreGroupData.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="_defaultStoreGroup" type="group"> - <data key="name">Main Website Store</data> - <data key="code">main_website_store</data> - <data key="root_category_id">2</data> - <data key="website_id">1</data> - </entity> - <entity name="customStoreGroup" type="group"> - <data key="group_id">null</data> - <data key="name" unique="suffix">store</data> - <data key="code" unique="suffix">store</data> - <data key="root_category_id">2</data> - <data key="website_id">1</data> - <data key="store_action">add</data> - <data key="store_type">group</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreDeletePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreDeletePage.xml deleted file mode 100644 index 2d9e114f0fd60..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreDeletePage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminSystemStoreDeletePage" url="system_store/deleteStore" module="Magento_Store" area="admin"> - <section name="AdminStoreBackupOptionsSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreEditPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreEditPage.xml deleted file mode 100644 index 6bcc6ea1596c6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreEditPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminSystemStoreEditPage" url="system_store/editStore" module="Magento_Store" area="admin"> - <section name="AdminNewStoreViewMainActionsSection"/> - <section name="AdminNewStoreSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreGroupEditPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreGroupEditPage.xml deleted file mode 100644 index 186ab9fdc8131..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreGroupEditPage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminSystemStoreGroupEditPage" url="admin/system_store/editGroup" area="admin" module="Magento_Store"> - <section name="AdminStoreGroupActionsSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreGroupPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreGroupPage.xml deleted file mode 100644 index 9c203241283dc..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreGroupPage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminSystemStoreGroupPage" url="admin/system_store/newGroup" module="Magento_Store" area="admin"> - <section name="AdminNewStoreGroupSection"/> - </page> -</pages> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStorePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStorePage.xml deleted file mode 100644 index d9ba01a88fa40..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStorePage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminSystemStorePage" url="/admin/system_store/" area="admin" module="Magento_Store"> - <section name="AdminStoresMainActionsSection"/> - <section name="AdminStoresGridSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml deleted file mode 100644 index b4dbfcc494a3b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreViewPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminSystemStoreViewPage" url="admin/system_store/newStore" module="Magento_Store" area="admin"> - <section name="AdminNewStoreViewMainActionsSection"/> - <section name="AdminNewStoreSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreWebsitePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreWebsitePage.xml deleted file mode 100644 index 6b28b2f04ea09..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Page/AdminSystemStoreWebsitePage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminSystemStoreWebsitePage" url="admin/system_store/newWebsite" module="Magento_Store" area="admin"> - <section name="AdminNewWebsiteSection"/> - </page> -</pages> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/README.md deleted file mode 100644 index 409824ff7bfc3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Store** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminMainActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminMainActionsSection.xml deleted file mode 100644 index 14429c298b5e5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminMainActionsSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminMainActionsSection"> - <element name="storeSwitcher" type="text" selector=".store-switcher"/> - <element name="storeViewDropdown" type="button" selector="#store-change-button"/> - <element name="storeViewByName" type="button" selector="//*[@class='store-switcher-store-view ']/a[contains(text(), '{{storeViewName}}')]" timeout="30" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewWebsiteActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewWebsiteActionsSection.xml deleted file mode 100644 index 18d1ef2642ef8..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewWebsiteActionsSection.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminNewWebsiteActionsSection"> - <element name="saveWebsite" type="button" selector="#save" timeout="30"/> - </section> -</sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewWebsiteSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewWebsiteSection.xml deleted file mode 100644 index 1195d1c76b0cd..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewWebsiteSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminNewWebsiteSection"> - <element name="name" type="input" selector="#website_name"/> - <element name="code" type="input" selector="#website_code"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoreBackupOptionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoreBackupOptionsSection.xml deleted file mode 100644 index 3767311d76fe7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoreBackupOptionsSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminStoreBackupOptionsSection"> - <element name="createBackupSelect" type="select" selector="select#store_create_backup"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoreGroupActionsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoreGroupActionsSection.xml deleted file mode 100644 index 0490b4c52a074..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoreGroupActionsSection.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminStoreGroupActionsSection"> - <element name="saveButton" type="button" selector="#save" timeout="30" /> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresDeleteStoreGroupSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresDeleteStoreGroupSection.xml deleted file mode 100644 index dd1bd6bbb099b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresDeleteStoreGroupSection.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminStoresDeleteStoreGroupSection"> - <element name="createDbBackup" type="select" selector="#store_create_backup"/> - <element name="deleteStoreGroupButton" type="button" selector="#delete" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/StorefrontHeaderSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/StorefrontHeaderSection.xml deleted file mode 100644 index 0af16b806d392..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/StorefrontHeaderSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontHeaderSection"> - <element name="storeViewSwitcher" type="button" selector="#switcher-language-trigger"/> - <element name="storeViewDropdown" type="button" selector="ul.switcher-dropdown"/> - <element name="storeViewOption" type="button" selector="li.view-{{var1}}>a" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/composer.json deleted file mode 100644 index 718efc04391ca..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-store", - "description": "Magento 2 Functional Test Module Store", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Store\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Store" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swagger/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swagger/README.md deleted file mode 100644 index b9ad9db966882..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swagger/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Swagger** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swagger/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swagger/composer.json deleted file mode 100644 index b9460ce939e86..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swagger/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-swagger", - "description": "Magento 2 Functional Test Module Swagger", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Swagger\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Swagger" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/README.md deleted file mode 100644 index c117f0005c6b1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Swatches** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/composer.json deleted file mode 100644 index 9632be9c9f172..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Swatches/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-swatches", - "description": "Magento 2 Functional Test Module Swatches", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-configurable-product": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Swatches\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Swatches" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/README.md deleted file mode 100644 index 5f25de111faa6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_SwatchesLayeredNavigation** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/composer.json deleted file mode 100644 index 0931a3c286d0a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-swatches-layered-navigation", - "description": "Magento 2 Functional Test Module Swatches Layered Navigation", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\SwatchesLayeredNavigation\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/SwatchesLayeredNavigation" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminNewTaxRulePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminNewTaxRulePage.xml deleted file mode 100644 index 74a0347b33c7c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminNewTaxRulePage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminNewTaxRulePage" url="tax/rule/new/" module="Magento_Tax" area="admin"> - <section name="AdminTaxRulesSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminTaxConfigurationPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminTaxConfigurationPage.xml deleted file mode 100644 index b91344000ff50..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminTaxConfigurationPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminTaxConfigurationPage" url="admin/system_config/edit/section/tax/" area="admin" module="Magento_Tax"> - <section name="AdminConfigureTaxSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminTaxRateGridPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminTaxRateGridPage.xml deleted file mode 100644 index a6624f6588d97..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminTaxRateGridPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminTaxRateGridPage" url="tax/rate/" area="admin" module="Magento_Tax"> - <section name="AdminSecondaryGridSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminTaxRuleGridPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminTaxRuleGridPage.xml deleted file mode 100644 index e673da4a761f0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/Page/AdminTaxRuleGridPage.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminTaxRuleGridPage" url="tax/rule" area="admin" module="Magento_Tax"> - <section name="AdminSecondaryGridSection"/> - <section name="AdminGridMainControls"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/README.md deleted file mode 100644 index 0b2f50e217b0b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Tax** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/composer.json deleted file mode 100644 index 9a39b2518fe43..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tax/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-tax", - "description": "Magento 2 Functional Test Module Tax", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-page-cache": "100.0.0-dev", - "magento/magento2-functional-test-module-reports": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Tax\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Tax" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/README.md deleted file mode 100644 index dbbed298fe61c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_TaxImportExport** Module. \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/composer.json deleted file mode 100644 index 364981ffd1e95..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/TaxImportExport/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-tax-import-export", - "description": "Magento 2 Functional Test Module Tax Import Export", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\TaxImportExport\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/TaxImportExport" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Page/ThemesPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Page/ThemesPage.xml deleted file mode 100644 index 358d88875d02f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Page/ThemesPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="ThemesPageIndex" url="admin/system_design_theme/" area="admin" module="Magento_Theme"> - <section name="AdminThemeSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/README.md deleted file mode 100644 index d52ba3a230431..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Theme** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Section/StorefrontFooterSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Section/StorefrontFooterSection.xml deleted file mode 100644 index 8fd7d03283df1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Section/StorefrontFooterSection.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontFooterSection"> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Section/StorefrontMessagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Section/StorefrontMessagesSection.xml deleted file mode 100644 index 981d12d0921a0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/Section/StorefrontMessagesSection.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontMessagesSection"> - <element name="message" type="text" - selector="//main//div[contains(@class, 'messages')]//div[contains(@class, 'message')]/div[contains(text(), '{{var1}}')]" - parameterized="true" - /> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/composer.json deleted file mode 100644 index 568b31e090ca2..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Theme/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-theme", - "description": "Magento 2 Functional Test Module Theme", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "~2.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-media-storage": "100.0.0-dev", - "magento/magento2-functional-test-module-require-js": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-widget": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Theme\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Theme" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/README.md deleted file mode 100644 index a9412ea9d26b8..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Tinemce3** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/composer.json deleted file mode 100644 index 7bccbdd2b1b3d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Tinymce3/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-tinymce-3", - "description": "Magento 2 Functional Test Module Theme", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "~2.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-ui": "100.0.0-dev", - "magento/magento2-functional-test-module-variable": "100.0.0-dev", - "magento/magento2-functional-test-module-widget": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Theme\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Theme" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/README.md deleted file mode 100644 index 4f3da0b95f39d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Translation** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/composer.json deleted file mode 100644 index 3a0fb712810ad..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Translation/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-translation", - "description": "Magento 2 Functional Test Module Translation", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-developer": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Translation\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Translation" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml deleted file mode 100644 index 459ad5070da01..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - <actionGroup name="AdminGridFilterSearchResultsByInput"> - <arguments> - <argument name="selector"/> - <argument name="value"/> - </arguments> - - <conditionalClick selector="{{AdminGridFilterControls.clearAll}}" dependentSelector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .admin__data-grid-filters-current._show" visible="true" stepKey="clearTheFiltersIfPresent"/> - <waitForPageLoad stepKey="waitForPageLoad" time="5"/> - - <click selector="{{AdminGridFilterControls.filters}}" stepKey="clickOnFilters1"/> - <fillField userInput="{{value}}" selector="{{selector}}" stepKey="fillCodeField2"/> - <click selector="{{AdminGridFilterControls.applyFilters}}" stepKey="clickOnApplyFilters1"/> - </actionGroup> -</actionGroups> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/README.md deleted file mode 100644 index 0e654f6aa5e8f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Ui** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminDataGridHeaderSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminDataGridHeaderSection.xml deleted file mode 100644 index 067756c4d4fb0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminDataGridHeaderSection.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminDataGridHeaderSection"> - <!--Search by keyword element--> - <element name="search" type="input" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] input[placeholder='Search by keyword']"/> - <element name="submitSearch" type="button" selector=".data-grid-search-control-wrap > button.action-submit" timeout="30"/> - <!--Filters--> - <element name="filters" type="button" selector="button[data-action='grid-filter-expand']" timeout="30"/> - <element name="filterFieldInput" type="input" selector=".admin__data-grid-filters input[name='{{name}}']" parameterized="true"/> - <element name="filterFieldSelect" type="select" selector=".admin__data-grid-filters select[name='{{name}}']" parameterized="true"/> - <element name="cancelFilters" type="button" selector="button[data-action='grid-filter-cancel']" timeout="30"/> - <element name="applyFilters" type="button" selector="button[data-action='grid-filter-apply']" timeout="30"/> - <element name="clearFilters" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" timeout="30"/> - <!--Grid view bookmarks--> - <element name="bookmarkToggle" type="button" selector="div.admin__data-grid-action-bookmarks button[data-bind='toggleCollapsible']" timeout="30"/> - <element name="bookmarkOption" type="button" selector="//div[contains(@class, 'admin__data-grid-action-bookmarks')]/ul/li/div/a[text() = '{{label}}']" parameterized="true" timeout="30"/> - <!--Visible columns management--> - <element name="columnsToggle" type="button" selector="div.admin__data-grid-action-columns button[data-bind='toggleCollapsible']" timeout="30"/> - <element name="columnCheckbox" type="checkbox" selector="//div[contains(@class,'admin__data-grid-action-columns')]//div[contains(@class, 'admin__field-option')]//label[text() = '{{column}}']/preceding-sibling::input" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminGridControlsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminGridControlsSection.xml deleted file mode 100644 index 91bf1001a40c1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminGridControlsSection.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <!-- TODO: Search, Notifications, Admin Menu --> - <section name="AdminGridMainControls"> - <element name="add" type="button" selector="#add" timeout="30"/> - <element name="back" type="button" selector="#back" timeout="30"/> - <element name="reset" type="button" selector="#reset" timeout="30"/> - <element name="save" type="button" selector="#save-button" timeout="30"/> - <element name="saveAndContinue" type="button" selector="#save-button" timeout="30"/> - <element name="saveArrow" type="button" selector="button[data-ui-id='save-button-dropdown']" timeout="5"/> - <element name="saveAndClose" type="button" selector="span[title='Save & Close']" timeout="30"/> - <element name="saveAndNew" type="button" selector="span[title='Save & New']" timeout="30"/> - </section> - <section name="AdminGridSearchBox"> - <element name="searchByKeyword" type="input" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] input[placeholder='Search by keyword']"/> - <element name="search" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] input[placeholder='Search by keyword'] + .action-submit" timeout="30"/> - </section> - <section name="AdminGridFilterControls"> - <element name="filters" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] button[data-action='grid-filter-expand']" timeout="5"/> - <element name="applyFilters" type="button" selector="button[data-action='grid-filter-apply']" timeout="30"/> - <element name="cancel" type="button" selector="button[data-action='grid-filter-cancel']" timeout="30"/> - <element name="clearAll" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] button[data-action='grid-filter-reset']" timeout="5"/> - </section> - <section name="AdminGridDefaultViewControls"> - <element name="defaultView" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .admin__data-grid-action-bookmarks" timeout="5"/> - <element name="viewByName" type="button" selector="//a[@class='action-dropdown-menu-link'][contains(text(), '{{var1}}')]" parameterized="true" timeout="5"/> - <element name="saveViewAs" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .action-dropdown-menu-item-last a" timeout="5"/> - <element name="viewName" type="input" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] ._edit input"/> - <element name="save" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] ._edit button" timeout="30"/> - </section> - <section name="AdminGridColumnsControls"> - <element name="columns" type="button" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .admin__data-grid-action-columns" timeout="5"/> - - <element name="columnName" type="button" selector="//label[contains(text(), '{{var1}}')]" parameterized="true" timeout="5"/> - - <element name="reset" type="button" selector="//div[@class='admin__action-dropdown-menu-footer']/div/button[contains(text(), 'Reset')]" timeout="5"/> - <element name="cancel" type="button" selector="//div[@class='admin__action-dropdown-menu-footer']/div/button[contains(text(), 'Cancel')]" timeout="5"/> - </section> - <section name="AdminGridActionsMenu"> - <element name="dropDown" type="select" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .action-select" timeout="30"/> - <element name="delete" type="select" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .action-menu-items li" timeout="5"/> - </section> - <section name="AdminGridRowsPerPage"> - <element name="count" type="select" selector=".admin__data-grid-header[data-bind='afterRender: \$data.setToolbarNode'] .selectmenu-value input" timeout="30"/> - </section> - <!-- TODO: Pagination controls --> - <section name="AdminGridHeaders"> - <element name="title" type="text" selector=".page-title-wrapper h1"/> - <element name="headerByName" type="text" selector="//span[@class='data-grid-cell-content' and contains(text(), '{{var1}}')]/parent::*" parameterized="true"/> - </section> - <section name="AdminGridRow"> - <element name="rowOne" type="text" selector="tr[data-repeat-index='0']"/> - <element name="rowByIndex" type="text" selector="tr[data-repeat-index='{{var1}}']" parameterized="true"/> - - <element name="editByValue" type="button" selector="//a[ancestor::tr[contains(., '{{var1}}')]]" parameterized="true"/> - - <element name="checkboxByValue" type="checkbox" selector="//input[ancestor::tr[contains(., '{{var1}}')]]" parameterized="true"/> - <element name="checkboxByIndex" type="checkbox" selector=".data-row[data-repeat-index='{{var1}}'] .admin__control-checkbox" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/ModalConfirmationSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/ModalConfirmationSection.xml deleted file mode 100644 index 146aea30f4633..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/ModalConfirmationSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="ModalConfirmationSection"> - <element name="CancelButton" type="button" selector="//footer[@class='modal-footer']/button[contains(@class, 'action-dismiss')]"/> - <element name="OkButton" type="button" selector="//footer[@class='modal-footer']/button[contains(@class, 'action-accept')]"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/composer.json deleted file mode 100644 index 219f938fed196..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-ui", - "description": "Magento 2 Functional Test Module Ui", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-authorization": "100.0.0-dev", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-user": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Ui\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Ui" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/README.md deleted file mode 100644 index 3a7f99729cad3..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Ups** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/composer.json deleted file mode 100644 index 11aea7bbc68b7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ups/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-ups", - "description": "Magento 2 Functional Test Module Ups", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Ups\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Ups" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/README.md deleted file mode 100644 index 645ff970002a1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_UrlRewrite** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/composer.json deleted file mode 100644 index d88d9a54264ee..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/UrlRewrite/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-url-rewrite", - "description": "Magento 2 Functional Test Module Url Rewrite", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-url-rewrite": "100.0.0-dev", - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-cms-url-rewrite": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\UrlRewrite\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/UrlRewrite" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserData.xml deleted file mode 100644 index d738e86a529c8..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserData.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="admin" type="user"> - <data key="email">admin@magento.com</data> - <data key="password">admin123</data> - </entity> - <entity name="admin2" type="user"> - <data key="username" unique="suffix">admin</data> - <data key="firstName">John</data> - <data key="lastName">Smith</data> - <data key="password">admin123</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserRoleData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserRoleData.xml deleted file mode 100644 index 26df4b7afec65..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Data/UserRoleData.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="adminRole" type="role"> - <data key="name" unique="suffix">adminRole</data> - <data key="scope">1</data> - <data key="access">1</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditRolePage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditRolePage.xml deleted file mode 100644 index 58dfad7f34263..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditRolePage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminEditRolePage" url="admin/user_role/editrole" module="Magento_User" area="admin"> - <section name="AdminEditRoleInfoSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditUserPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditUserPage.xml deleted file mode 100644 index 893b59503a891..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminEditUserPage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminEditUserPage" url="admin/user/new" area="admin" module="Magento_User"> - <section name="AdminEditUserSection"/> - <section name="AdminEditUserRoleSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminRolesPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminRolesPage.xml deleted file mode 100644 index c056261ccbc4e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminRolesPage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminRolesPage" url="admin/user_role/" module="Magento_User" area="admin"> - <section name="AdminRoleGridSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminUsersPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminUsersPage.xml deleted file mode 100644 index d9e12d82f920f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/Page/AdminUsersPage.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="AdminUsersPage" url="admin/user/" area="admin" module="Magento_User"> - <section name="AdminUserGridSection"/> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/README.md deleted file mode 100644 index 77e18cd31e81b..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_User** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/composer.json deleted file mode 100644 index 07c2ed3745de5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/User/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-user", - "description": "Magento 2 Functional Test Module User", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-authorization": "100.0.0-dev", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-email": "100.0.0-dev", - "magento/magento2-functional-test-module-integration": "100.0.0-dev", - "magento/magento2-functional-test-module-security": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\User\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/User" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/README.md deleted file mode 100644 index 0f87c957487ef..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Usps** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/composer.json deleted file mode 100644 index 5896bff636205..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Usps/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-usps", - "description": "Magento 2 Functional Test Module Usps", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-config": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-shipping": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Usps\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Usps" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/Data/VariableData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/Data/VariableData.xml deleted file mode 100644 index 8a1d60839c155..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/Data/VariableData.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="_defaultVariable" type="cms_page"> - <data key="city"> Austin </data> - </entity> - <entity name="customVariable" type="cms_page"> - <data key="code" unique="suffix">variale-code</data> - <data key="name">Test Variable</data> - <data key="html"> Sample Variable </data> - <data key="plain">variable-plain-</data> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/README.md deleted file mode 100644 index 9c847f4db2bdb..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Variable** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/composer.json deleted file mode 100644 index d70e75da77a03..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Variable/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-variable", - "description": "Magento 2 Functional Test Module Variable", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-email": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Variable\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Variable" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/README.md deleted file mode 100644 index 9edda871be550..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Vault** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/composer.json deleted file mode 100644 index 88ce9046df10c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Vault/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-vault", - "description": "Magento 2 Functional Test Module Vault", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-payment": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Vault\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Vault" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/README.md deleted file mode 100644 index ba933541be888..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Version** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/composer.json deleted file mode 100644 index 8a256bc40d42a..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Version/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-version", - "description": "Magento 2 Functional Test Module Version", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Version\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Version" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/README.md deleted file mode 100644 index bb843ce718556..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Webapi** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/composer.json deleted file mode 100644 index a00dbd244615f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Webapi/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-webapi", - "description": "Magento 2 Functional Test Module Webapi", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-authorization": "100.0.0-dev", - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-integration": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Webapi\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Webapi" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WebapiSecurity/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WebapiSecurity/README.md deleted file mode 100644 index 25f93d6962924..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WebapiSecurity/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_WebapiSecurity** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WebapiSecurity/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WebapiSecurity/composer.json deleted file mode 100644 index 3c26635fc3f6e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WebapiSecurity/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-webapi-security", - "description": "Magento 2 Functional Test Module Webapi Security", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-webapi": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\WebapiSecurity\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/WebapiSecurity" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/README.md deleted file mode 100644 index 4f199873079e5..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Weee** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/composer.json deleted file mode 100644 index b226f2b1697fa..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Weee/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-weee", - "description": "Magento 2 Functional Test Module Weee", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "magento/magento2-functional-test-module-directory": "100.0.0-dev", - "magento/magento2-functional-test-module-eav": "100.0.0-dev", - "magento/magento2-functional-test-module-page-cache": "100.0.0-dev", - "magento/magento2-functional-test-module-quote": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-tax": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Weee\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Weee" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/README.md deleted file mode 100644 index 2a8996c2f3322..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Widget** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/composer.json deleted file mode 100644 index 85c1d19bd696c..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Widget/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-widget", - "description": "Magento 2 Functional Test Module Widget", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-cms": "100.0.0-dev", - "magento/magento2-functional-test-module-email": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-theme": "100.0.0-dev", - "magento/magento2-functional-test-module-variable": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Widget\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Widget" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Data/WishlistData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Data/WishlistData.xml deleted file mode 100644 index daa700e27298d..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Data/WishlistData.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="Wishlist" type="wishlist"> - <data key="id">null</data> - <var key="product" entityType="product" entityKey="id"/> - <var key="customer_email" entityType="customer" entityKey="email"/> - <var key="customer_password" entityType="customer" entityKey="password"/> - </entity> -</entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Page/StorefrontCustomerWishlistPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Page/StorefrontCustomerWishlistPage.xml deleted file mode 100644 index 256f9458f89d6..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Page/StorefrontCustomerWishlistPage.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> - <page name="StorefrontCustomerWishlistPage" url="/wishlist/" area="storefront" module="Magento_Wishlist"> - <section name="StorefrontCustomerWishlistSection" /> - </page> -</pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/README.md deleted file mode 100644 index d5b0902bd9cb0..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Functional Tests - -The Functional Tests Module for **Magento_Wishlist** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCategoryProductSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCategoryProductSection.xml deleted file mode 100644 index 7229b596ddb19..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCategoryProductSection.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontCategoryProductSection"> - <element name="ProductAddToWishlistByNumber" type="text" selector="//main//li[{{var1}}]//a[contains(@class, 'towishlist')]" parameterized="true"/> - <element name="ProductAddToWishlistByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'towishlist')]" parameterized="true"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontProductInfoMainSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontProductInfoMainSection.xml deleted file mode 100644 index d8e16ce9a4481..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontProductInfoMainSection.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="StorefrontProductInfoMainSection"> - <element name="productAddToWishlist" type="button" selector="a.action.towishlist"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/EndToEndB2CLoggedInUserTest.xml deleted file mode 100644 index b5a43fc471127..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/EndToEndB2CLoggedInUserTest.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> - <test name="EndToEndB2CLoggedInUserTest"> - <!-- Step 5: Add products to wishlist --> - <comment userInput="Start of adding products to wishlist" stepKey="startOfAddingProductsToWishlist" after="endOfComparingProducts" /> - <!-- Add Simple Product 1 to wishlist --> - <comment userInput="Add Simple Product 1 to wishlist" stepKey="commentAddSimpleProduct1ToWishlist" after="startOfAddingProductsToWishlist" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" after="commentAddSimpleProduct1ToWishlist" stepKey="wishlistGotoCategory1"/> - <actionGroup ref="StorefrontCustomerAddCategoryProductToWishlistActionGroup" after="wishlistGotoCategory1" stepKey="wishlistAddSimpleProduct1ToWishlist"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - <actionGroup ref="StorefrontCustomerCheckProductInWishlist" after="wishlistAddSimpleProduct1ToWishlist" stepKey="wishlistCheckSimpleProduct1InWishlist"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - <actionGroup ref="StorefrontCustomerCheckProductInWishlistSidebar" after="wishlistCheckSimpleProduct1InWishlist" stepKey="wishlistCheckSimpleProduct1InWishlistSidebar"> - <argument name="productVar" value="$$createSimpleProduct1$$"/> - </actionGroup> - - <!-- Add Simple Product 2 to wishlist --> - <comment userInput="Add Simple Product 2 to wishlist" stepKey="commentAddSimpleProduct2ToWishlist" after="wishlistCheckSimpleProduct1InWishlistSidebar" /> - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" after="commentAddSimpleProduct2ToWishlist" stepKey="wishlistGotoCategory2"/> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" after="wishlistGotoCategory2" stepKey="wishlistClickSimpleProduct2"/> - <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" after="wishlistClickSimpleProduct2" stepKey="wishlistAddSimpleProduct2ToWishlist"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - <actionGroup ref="StorefrontCustomerCheckProductInWishlist" after="wishlistAddSimpleProduct2ToWishlist" stepKey="wishlistCheckSimpleProduct2InWishlist"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - <actionGroup ref="StorefrontCustomerCheckProductInWishlistSidebar" after="wishlistCheckSimpleProduct2InWishlist" stepKey="wishlistCheckSimpleProduct2InWishlistSidebar"> - <argument name="productVar" value="$$createSimpleProduct2$$"/> - </actionGroup> - <comment userInput="End of adding products to wishlist" after="wishlistCheckSimpleProduct2InWishlistSidebar" stepKey="endOfAddingProductsToWishlist" /> - </test> -</tests> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/composer.json deleted file mode 100644 index 9f1358b3ec8b7..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-wishlist", - "description": "Magento 2 Functional Test Module Wishlist", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "magento/magento2-functional-test-module-catalog": "100.0.0-dev", - "magento/magento2-functional-test-module-checkout": "100.0.0-dev", - "magento/magento2-functional-test-module-customer": "100.0.0-dev", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-backend": "100.0.0-dev", - "magento/magento2-functional-test-module-catalog-inventory": "100.0.0-dev", - "magento/magento2-functional-test-module-configurable-product": "100.0.0-dev", - "magento/magento2-functional-test-module-rss": "100.0.0-dev", - "magento/magento2-functional-test-module-sales": "100.0.0-dev", - "magento/magento2-functional-test-module-store": "100.0.0-dev", - "magento/magento2-functional-test-module-ui": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\Wishlist\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/Wishlist" - ] - ] - } -} diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/README.md b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/README.md deleted file mode 100644 index a9826ff12fbd1..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Magento 2 Acceptance Tests - -The Acceptance Tests Module for **Magento_WishlistAnalytics** Module. diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/composer.json b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/composer.json deleted file mode 100644 index 1f25efea7f90f..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/WishlistAnalytics/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "magento/magento2-functional-test-module-wishlist-analytics", - "description": "Magento 2 Acceptance Test Module WishlistAnalytics", - "type": "magento2-test-module", - "version": "100.0.0-dev", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "require": { - "magento/magento2-functional-testing-framework": "1.0.0", - "php": "~7.1.3||~7.2.0" - }, - "suggest": { - "magento/magento2-functional-test-module-wishlist": "100.0.0-dev" - }, - "autoload": { - "psr-4": { - "Magento\\FunctionalTest\\WishlistAnalytics\\": "" - } - }, - "extra": { - "map": [ - [ - "*", - "tests/functional/Magento/FunctionalTest/WishlistAnalytics" - ] - ] - } -} diff --git a/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQuery/etc/schema.graphqls b/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQuery/etc/schema.graphqls index 3466db5c71f6a..7eb175a88e322 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQuery/etc/schema.graphqls +++ b/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQuery/etc/schema.graphqls @@ -5,7 +5,16 @@ type Query { testItem(id: Int!) : Item @resolver(class: "Magento\\TestModuleGraphQlQuery\\Model\\Resolver\\Item") } +type Mutation { + testItem(id: Int!) : MutationItem @resolver(class: "Magento\\TestModuleGraphQlQuery\\Model\\Resolver\\Item") +} + type Item { item_id: Int name: String } + +type MutationItem { + item_id: Int + name: String +} diff --git a/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQueryExtension/etc/schema.graphqls b/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQueryExtension/etc/schema.graphqls index dc01d993c3818..b970ad8376349 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQueryExtension/etc/schema.graphqls +++ b/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQueryExtension/etc/schema.graphqls @@ -4,3 +4,7 @@ type Item { integer_list: [Int] @resolver(class: "Magento\\TestModuleGraphQlQueryExtension\\Model\\Resolver\\IntegerList") } + +type MutationItem { + integer_list: [Int] @resolver(class: "Magento\\TestModuleGraphQlQueryExtension\\Model\\Resolver\\IntegerList") +} diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeOptionManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeOptionManagementInterfaceTest.php index 6c1e351ccd1ee..f9442d8b6499a 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeOptionManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeOptionManagementInterfaceTest.php @@ -74,7 +74,7 @@ public function testAdd($optionData) ] ); - $this->assertTrue($response); + $this->assertNotNull($response); $updatedData = $this->getAttributeOptions($testAttributeCode); $lastOption = array_pop($updatedData); $this->assertEquals( diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductSwatchAttributeOptionManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductSwatchAttributeOptionManagementInterfaceTest.php index 63e5282c22104..6b8388e2f4345 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductSwatchAttributeOptionManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductSwatchAttributeOptionManagementInterfaceTest.php @@ -42,7 +42,7 @@ public function testAdd($optionData) ] ); - $this->assertTrue($response); + $this->assertNotNull($response); $updatedData = $this->getAttributeOptions($testAttributeCode); $lastOption = array_pop($updatedData); $this->assertEquals( diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryProductsVariantsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryProductsVariantsTest.php new file mode 100644 index 0000000000000..d9a46a4451212 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryProductsVariantsTest.php @@ -0,0 +1,101 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\Catalog; + +use Magento\Catalog\Api\Data\ProductInterface; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\TestFramework\ObjectManager; +use Magento\TestFramework\TestCase\GraphQlAbstract; + +/** + * Test of getting child products info of configurable product on category request + */ +class CategoryProductsVariantsTest extends GraphQlAbstract +{ + /** + * + * @magentoApiDataFixture Magento/ConfigurableProduct/_files/product_configurable.php + * @throws \Magento\Framework\Exception\NoSuchEntityException + */ + public function testGetSimpleProductsFromCategory() + { + + $query + = <<<QUERY +{ + category(id: 2) { + id + name + products { + items { + sku + ... on ConfigurableProduct { + variants { + product { + sku + } + } + } + } + } + } +} +QUERY; + + $response = $this->graphQlQuery($query); + + /** @var ProductRepositoryInterface $productRepository */ + $productRepository = ObjectManager::getInstance()->get(ProductRepositoryInterface::class); + $product = $productRepository->get('simple_10', false, null, true); + + $this->assertArrayHasKey('variants', $response['category']['products']['items'][0]); + $this->assertCount(2, $response['category']['products']['items'][0]['variants']); + $this->assertSimpleProductFields($product, $response['category']['products']['items'][0]['variants'][0]); + } + + /** + * @param ProductInterface $product + * @param array $actualResponse + */ + private function assertSimpleProductFields($product, $actualResponse) + { + $assertionMap = [ + [ + 'response_field' => 'product', 'expected_value' => [ + "sku" => $product->getSku() + ] + ], + ]; + + $this->assertResponseFields($actualResponse, $assertionMap); + } + + /** + * @param array $actualResponse + * @param array $assertionMap + */ + private function assertResponseFields($actualResponse, $assertionMap) + { + foreach ($assertionMap as $key => $assertionData) { + $expectedValue = isset($assertionData['expected_value']) + ? $assertionData['expected_value'] + : $assertionData; + $responseField = isset($assertionData['response_field']) ? $assertionData['response_field'] : $key; + self::assertNotNull( + $expectedValue, + "Value of '{$responseField}' field must not be NULL" + ); + self::assertEquals( + $expectedValue, + $actualResponse[$responseField], + "Value of '{$responseField}' field in response does not match expected value: " + . var_export($expectedValue, true) + ); + } + } +} diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php index 0133b87e757bd..4f68090657a10 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php @@ -63,9 +63,6 @@ public function testCategoriesTree() children { level id - children { - id - } } } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlMutationTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlMutationTest.php new file mode 100644 index 0000000000000..b6e1a61f0357c --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlMutationTest.php @@ -0,0 +1,37 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\TestModule; + +use Magento\TestFramework\TestCase\GraphQlAbstract; + +/** + * Make sure that it is possible to use GraphQL mutations in Magento + */ +class GraphQlMutationTest extends GraphQlAbstract +{ + public function testMutation() + { + $id = 3; + + $query = <<<MUTATION +mutation { + testItem(id: {$id}) { + item_id, + name, + integer_list + } +} +MUTATION; + + $response = $this->graphQlQuery($query); + $this->assertArrayHasKey('testItem', $response); + $testItem = $response['testItem']; + $this->assertArrayHasKey('integer_list', $testItem); + $this->assertEquals([4, 5, 6], $testItem['integer_list']); + } +} diff --git a/dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli/Queue.php b/dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli/Queue.php index dc671f9b90d71..c7bbb2eae426f 100644 --- a/dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli/Queue.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli/Queue.php @@ -18,6 +18,6 @@ class Queue extends \Magento\Mtf\Util\Command\Cli */ public function run($consumer) { - parent::execute('queue:consumers:start ' . $consumer . ' > /dev/null &'); + parent::execute('queue:consumers:start ' . $consumer . ' --max-messages=100'); } } diff --git a/dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli/Setup.php b/dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli/Setup.php index aabe948cd5d15..e67f4cf1a1aa2 100644 --- a/dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli/Setup.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli/Setup.php @@ -23,13 +23,6 @@ class Setup extends Cli */ const PARAM_SETUP_DI_COMPILE = 'setup:di:compile'; - /** - * Options for uninstall Magento command. - * - * @var array - */ - private $options = ['-n']; - /** * Uninstall Magento. * @@ -37,7 +30,7 @@ class Setup extends Cli */ public function uninstall() { - parent::execute(Setup::PARAM_SETUP_UNINSTALL, $this->options); + parent::execute(Setup::PARAM_SETUP_UNINSTALL); } /** diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Group/CustomerGroupGrid.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Group/CustomerGroupGrid.php index dcdf041761559..7722645b3fde3 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Group/CustomerGroupGrid.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Group/CustomerGroupGrid.php @@ -6,14 +6,22 @@ namespace Magento\Customer\Test\Block\Adminhtml\Group; -use Magento\Backend\Test\Block\Widget\Grid; +use \Magento\Ui\Test\Block\Adminhtml\DataGrid; +use Magento\Mtf\Client\Element\SimpleElement; /** * Class CustomerGroupGrid * Adminhtml customer group grid */ -class CustomerGroupGrid extends Grid +class CustomerGroupGrid extends DataGrid { + /** + * Select action toggle. + * + * @var string + */ + protected $selectAction = '.action-select'; + /** * Initialize block elements * @@ -21,14 +29,25 @@ class CustomerGroupGrid extends Grid */ protected $filters = [ 'code' => [ - 'selector' => '#customerGroupGrid_filter_type', + 'selector' => '.admin__data-grid-filters input[name*=customer_group_code]', + ], + 'tax_class_id' => [ + 'selector' => '.admin__data-grid-filters select[name*=tax_class_id]', + 'input' => 'select' ], ]; /** - * Locator value for grid to click + * Click on "Edit" link. * - * @var string + * @param SimpleElement $rowItem + * @return void */ - protected $editLink = 'td[data-column="time"]'; + protected function clickEditLink(SimpleElement $rowItem) + { + if ($rowItem->find($this->selectAction)->isVisible()) { + $rowItem->find($this->selectAction)->click(); + } + $rowItem->find($this->editLink)->click(); + } } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php index b5e1e5b5e98d7..3768bab85a33a 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php @@ -24,7 +24,7 @@ class AssertCustomerDefaultAddresses extends AbstractConstraint */ public function processAssert(CustomerAccountIndex $customerAccountIndex, Address $address) { - $customerAccountIndex->getAccountMenuBlock()->openMenuItem('Account Dashboard'); + $customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Account'); sleep(6); $defaultBillingAddress = explode( "\n", diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php index da8f49485d634..61e42e3dd60c5 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerRedirectToDashboard.php @@ -17,7 +17,7 @@ class AssertCustomerRedirectToDashboard extends AbstractConstraint /** * Dashboard Message on account index page. */ - const DASHBOARD_MESSAGE = 'My Dashboard'; + const DASHBOARD_MESSAGE = 'My Account'; /** * Constraint severeness diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroup/Curl.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroup/Curl.php index 0c1b4b7600605..e7a66139df02e 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroup/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroup/Curl.php @@ -9,6 +9,7 @@ use Magento\Backend\Test\Handler\Extractor; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; +use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -59,11 +60,22 @@ public function persist(FixtureInterface $fixture = null) */ public function getCustomerGroupId(array $data) { - $url = 'customer/group/index/sort/time/dir/desc'; - $regExp = '/.*id\/(\d+)\/.*' . $data['code'] . '/siu'; - $extractor = new Extractor($url, $regExp); - $match = $extractor->getData(); + $url = $_ENV['app_backend_url'] . 'mui/index/render/'; + $data = [ + 'namespace' => 'customer_group_listing', + 'filters' => [ + 'placeholder' => true, + 'customer_group_code' => $data['code'] + ], + 'isAjax' => true + ]; + $curl = new BackendDecorator(new CurlTransport(), $this->_configuration); + + $curl->write($url, $data, CurlInterface::POST); + $response = $curl->read(); + $curl->close(); + preg_match('/customer_group_listing_data_source.+items.+"customer_group_id":"(\d+)"/', $response, $match); return empty($match[1]) ? null : $match[1]; } } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Adminhtml/CustomerGroupIndex.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Adminhtml/CustomerGroupIndex.xml index 42ae87766c81f..7f5de5a2f6ddf 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Adminhtml/CustomerGroupIndex.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Adminhtml/CustomerGroupIndex.xml @@ -9,6 +9,6 @@ <page name="CustomerGroupIndex" area="Adminhtml" mca="customer/group/index" module="Magento_Customer"> <block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator="#messages .messages" strategy="css selector"/> <block name="gridPageActions" class="Magento\Backend\Test\Block\GridPageActions" locator=".page-main-actions" strategy="css selector"/> - <block name="customerGroupGrid" class="Magento\Customer\Test\Block\Adminhtml\Group\CustomerGroupGrid" locator="#customerGroupGrid" strategy="css selector"/> + <block name="customerGroupGrid" class="Magento\Customer\Test\Block\Adminhtml\Group\CustomerGroupGrid" locator="//div[contains(@data-bind, 'customer_group_listing')]" strategy="xpath"/> </page> </config> diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php index 02a439deb856b..22cd5bd13e94c 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php @@ -49,7 +49,7 @@ public function run() { $this->customerAccount->open(); $this->cmsIndex->getCmsPageBlock()->waitPageInit(); - if ($this->cmsIndex->getTitleBlock()->getTitle() === 'My Dashboard') { + if ($this->cmsIndex->getTitleBlock()->getTitle() === 'My Account') { $this->cmsIndex->getLinksBlock()->openLink('Sign Out'); $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page'); $this->cmsIndex->getCmsPageBlock()->waitPageInit(); diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/CreateOnlineCreditMemoPayflowLinkTest.xml b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/CreateOnlineCreditMemoPayflowLinkTest.xml index f3922aa474735..f212f48237ecb 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/CreateOnlineCreditMemoPayflowLinkTest.xml +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/CreateOnlineCreditMemoPayflowLinkTest.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd"> - <testCase name="Magento\Paypal\Test\TestCase\CreateOnlineCreditMemoPayflowLinkTest" summary="Create online credit memo for order placed with with PayPal Payflow Link"> + <testCase name="Magento\Paypal\Test\TestCase\CreateOnlineCreditMemoPayflowLinkTest" summary="Create online credit memo for order placed with PayPal Payflow Link"> <variation name="CreateOnlineCreditMemoPayflowLinkVariation1" summary="Create Refund for Order Paid with PayPal Payflow Link" ticketId="MAGETWO-13061"> <data name="tag" xsi:type="string">test_type:3rd_party_test, severity:S0</data> <data name="products/0" xsi:type="string">catalogProductSimple::product_100_dollar</data> diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml index 10b9d3e80d0c2..521d7d68ac4a6 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml @@ -96,8 +96,8 @@ <field name="stop_rules_processing" xsi:type="string">Yes</field> </dataset> <dataset name="active_sales_rule_with_complex_conditions"> - <field name="name" xsi:type="string">Cart Price Rule with with complex conditions %isolation%</field> - <field name="description" xsi:type="string">Cart Price Rule with with complex conditions</field> + <field name="name" xsi:type="string">Cart Price Rule with complex conditions %isolation%</field> + <field name="description" xsi:type="string">Cart Price Rule with complex conditions</field> <field name="is_active" xsi:type="string">Yes</field> <field name="website_ids" xsi:type="array"> <item name="0" xsi:type="string">Main Website</item> @@ -129,8 +129,8 @@ <field name="stop_rules_processing" xsi:type="string">Yes</field> <field name="simple_free_shipping" xsi:type="string">For matching items only</field> <field name="store_labels" xsi:type="array"> - <item name="0" xsi:type="string">Cart Price Rule with with complex conditions</item> - <item name="1" xsi:type="string">Cart Price Rule with with complex conditions</item> + <item name="0" xsi:type="string">Cart Price Rule with complex conditions</item> + <item name="1" xsi:type="string">Cart Price Rule with complex conditions</item> </field> </dataset> diff --git a/dev/tests/functional/tests/app/Magento/Search/Test/Fixture/SynonymGroup.xml b/dev/tests/functional/tests/app/Magento/Search/Test/Fixture/SynonymGroup.xml index fc30822ab8bed..2cebaf93ff2a9 100644 --- a/dev/tests/functional/tests/app/Magento/Search/Test/Fixture/SynonymGroup.xml +++ b/dev/tests/functional/tests/app/Magento/Search/Test/Fixture/SynonymGroup.xml @@ -13,7 +13,7 @@ collection="Magento\Search\Model\ResourceModel\Block\Grid\Collection" handler_interface="Magento\Search\Test\Handler\SynonymGroup\SynonymGroupInterface" repository_class="Magento\Search\Test\Repository\SynonymGroup" class="Magento\Search\Test\Fixture\SynonymGroup"> - <field name="group_id" is_required="1 "/> + <field name="group_id" is_required="1"/> <field name="synonyms" is_required="0" /> <field name="scope_id" is_required="0" source="Magento\Search\Test\Fixture\SynonymGroup\ScopeId" /> <field name="mergeOnConflict" is_required="0" /> diff --git a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.xml b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.xml index 7f7741d2f1c13..25acb75ee134f 100644 --- a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.xml +++ b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.xml @@ -97,7 +97,7 @@ </variation> <variation name="CreateTaxWithFptTestVariation5" firstConstraint="Magento\Weee\Test\Constraint\AssertFptApplied" method="test"> <data name="tag" xsi:type="string">to_maintain:yes</data> - <data name="description" xsi:type="string">Check taxed FPT display set to Excluding, Description and Including FPT on product with with custom option catalog price Excluding Tax</data> + <data name="description" xsi:type="string">Check taxed FPT display set to Excluding, Description and Including FPT on product with custom option catalog price Excluding Tax</data> <data name="configData" xsi:type="string">shipping_tax_class_taxable_goods,tax_with_fpt_taxed_cat_excl_disc_on_excl</data> <data name="productData" xsi:type="string">with_custom_option_and_fpt</data> <data name="prices/category_price" xsi:type="string">70.00</data> @@ -117,7 +117,7 @@ <constraint name="Magento\Weee\Test\Constraint\AssertFptApplied" /> </variation> <variation name="CreateTaxWithFptTestVariation6" firstConstraint="Magento\Weee\Test\Constraint\AssertFptApplied" method="test"> - <data name="description" xsi:type="string">Check taxed FPT display set to Including FPT and Description on product with with custom option catalog price Excluding Tax</data> + <data name="description" xsi:type="string">Check taxed FPT display set to Including FPT and Description on product with custom option catalog price Excluding Tax</data> <data name="configData" xsi:type="string">shipping_tax_class_taxable_goods,tax_with_fpt_taxed_cat_excl_disc_on_incl, display_including_tax</data> <data name="productData" xsi:type="string">with_custom_option_and_fpt</data> <data name="prices/category_price" xsi:type="string">86.60</data> @@ -173,7 +173,7 @@ <constraint name="Magento\Weee\Test\Constraint\AssertFptApplied" /> </variation> <variation name="CreateTaxWithFptTestVariation9" firstConstraint="Magento\Weee\Test\Constraint\AssertFptApplied" method="test"> - <data name="description" xsi:type="string">Check taxed FPT display set to Excluding, Description and Including FPT on product with with special price and catalog price Including Tax</data> + <data name="description" xsi:type="string">Check taxed FPT display set to Excluding, Description and Including FPT on product with special price and catalog price Including Tax</data> <data name="configData" xsi:type="string">shipping_tax_class_taxable_goods,tax_with_fpt_taxed_cat_incl_disc_on_excl</data> <data name="productData" xsi:type="string">with_special_price_and_fpt</data> <data name="prices/category_price" xsi:type="string">92.38</data> @@ -193,7 +193,7 @@ <constraint name="Magento\Weee\Test\Constraint\AssertFptApplied" /> </variation> <variation name="CreateTaxWithFptTestVariation10" firstConstraint="Magento\Weee\Test\Constraint\AssertFptApplied" method="test"> - <data name="description" xsi:type="string">Check taxed FPT display set to Including FPT and Description on product with with special price and catalog price Including Tax</data> + <data name="description" xsi:type="string">Check taxed FPT display set to Including FPT and Description on product with special price and catalog price Including Tax</data> <data name="configData" xsi:type="string">shipping_tax_class_taxable_goods,tax_with_fpt_taxed_cat_incl_disc_on_incl</data> <data name="productData" xsi:type="string">with_special_price_and_fpt</data> <data name="prices/category_price" xsi:type="string">101.62</data> @@ -210,7 +210,7 @@ </variation> <variation name="CreateTaxWithFptTestVariation11" firstConstraint="Magento\Weee\Test\Constraint\AssertFptApplied" method="test"> <data name="issue" xsi:type="string">MAGETWO-44968: FPT Final price includes tax on custom option, when display is set to excluding tax</data> - <data name="description" xsi:type="string">Check taxed FPT display set to Excluding, Description and Including FPT on product with with custom option and catalog price Including Tax</data> + <data name="description" xsi:type="string">Check taxed FPT display set to Excluding, Description and Including FPT on product with custom option and catalog price Including Tax</data> <data name="configData" xsi:type="string">shipping_tax_class_taxable_goods,tax_with_fpt_taxed_cat_incl_disc_on_excl</data> <data name="productData" xsi:type="string">with_custom_option_and_fpt</data> <data name="prices/category_price" xsi:type="string">64.67</data> diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/Handler/Widget/Curl.php b/dev/tests/functional/tests/app/Magento/Widget/Test/Handler/Widget/Curl.php index 7077def5a4a25..1a024eefe162d 100644 --- a/dev/tests/functional/tests/app/Magento/Widget/Test/Handler/Widget/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Widget/Test/Handler/Widget/Curl.php @@ -244,14 +244,22 @@ protected function preparePagesGroup(array $widgetInstancePageGroup) */ protected function getThemeId($title) { - $filter = base64_encode('theme_title=' . $title); - $url = $_ENV['app_backend_url'] . 'admin/system_design_theme/grid/filter/' . $filter; + $url = $_ENV['app_backend_url'] . 'mui/index/render/'; + $data = [ + 'namespace' => 'design_theme_listing', + 'filters' => [ + 'placeholder' => true, + 'theme_title' => $title + ], + 'isAjax' => true + ]; $curl = new BackendDecorator(new CurlTransport(), $this->_configuration); - $curl->write($url, [], CurlInterface::GET); + + $curl->write($url, $data, CurlInterface::POST); $response = $curl->read(); $curl->close(); - preg_match('/<tr data-role="row" title="[^"]+system_design_theme\/edit\/id\/([\d]+)\/"/', $response, $match); + preg_match('/design_theme_listing_data_source.+items.+"theme_id":"(\d+)"/', $response, $match); return empty($match[1]) ? null : $match[1]; } } diff --git a/dev/tests/functional/utils/command.php b/dev/tests/functional/utils/command.php index cf19790aa8fed..8eaf82475a4e4 100644 --- a/dev/tests/functional/utils/command.php +++ b/dev/tests/functional/utils/command.php @@ -4,29 +4,20 @@ * See COPYING.txt for license details. */ +require_once __DIR__ . '/../../../../app/bootstrap.php'; + +use Symfony\Component\Console\Input\StringInput; +use Symfony\Component\Console\Output\NullOutput; + if (isset($_GET['command'])) { - $php = PHP_BINARY ?: (PHP_BINDIR ? PHP_BINDIR . '/php' : 'php'); $command = urldecode($_GET['command']); - exec(escapeCommand($php . ' -f ../../../../bin/magento ' . $command)); + $magentoObjectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, $_SERVER); + $magentoObjectManager = $magentoObjectManagerFactory->create($_SERVER); + $cli = $magentoObjectManager->create(\Magento\Framework\Console\Cli::class); + $input = new StringInput($command); + $input->setInteractive(false); + $output = new NullOutput(); + $cli->doRun($input, $output); } else { throw new \InvalidArgumentException("Command GET parameter is not set."); } - -/** - * Returns escaped command. - * - * @param string $command - * @return string - */ -function escapeCommand($command) -{ - $escapeExceptions = [ - '> /dev/null &' => '--dev-null-amp--' - ]; - - $command = escapeshellcmd( - str_replace(array_keys($escapeExceptions), array_values($escapeExceptions), $command) - ); - - return str_replace(array_values($escapeExceptions), array_keys($escapeExceptions), $command); -} diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Event/TransactionTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Event/TransactionTest.php index 5bb273b4e2781..feb1c0bf61c16 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Event/TransactionTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Event/TransactionTest.php @@ -30,7 +30,7 @@ protected function setUp() { $this->_eventManager = $this->getMockBuilder(\Magento\TestFramework\EventManager::class) ->setMethods(['fireEvent']) - ->setConstructorArgs([[]]) + ->disableOriginalConstructor() ->getMock(); $this->_adapter = @@ -69,9 +69,9 @@ protected function _imitateTransactionStartRequest($eventName) /** * Setup expectations for "transaction start" use case * - * @param \PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher + * @param \PHPUnit\Framework\MockObject\Matcher\Invocation $invocationMatcher */ - protected function _expectTransactionStart(\PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher) + protected function _expectTransactionStart(\PHPUnit\Framework\MockObject\Matcher\Invocation $invocationMatcher) { $this->_eventManager->expects($invocationMatcher)->method('fireEvent')->with('startTransaction'); $this->_adapter->expects($this->once())->method('beginTransaction'); @@ -103,9 +103,9 @@ protected function _imitateTransactionRollbackRequest($eventName) /** * Setup expectations for "transaction rollback" use case * - * @param \PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher + * @param \PHPUnit\Framework\MockObject\Matcher\Invocation $invocationMatcher */ - protected function _expectTransactionRollback(\PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher) + protected function _expectTransactionRollback(\PHPUnit\Framework\MockObject\Matcher\Invocation $invocationMatcher) { $this->_eventManager->expects($invocationMatcher)->method('fireEvent')->with('rollbackTransaction'); $this->_adapter->expects($this->once())->method('rollback'); diff --git a/dev/tests/integration/testsuite/Magento/Captcha/Observer/ResetAttemptForFrontendAccountEditObserverTest.php b/dev/tests/integration/testsuite/Magento/Captcha/Observer/ResetAttemptForFrontendAccountEditObserverTest.php new file mode 100644 index 0000000000000..c09211b020b30 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Captcha/Observer/ResetAttemptForFrontendAccountEditObserverTest.php @@ -0,0 +1,53 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Captcha\Observer; + +use Magento\Captcha\Model\ResourceModel\Log as CaptchaLog; +use Magento\Captcha\Model\ResourceModel\LogFactory; +use Magento\Framework\Event\ManagerInterface; +use Magento\Framework\ObjectManagerInterface; + +/** + * Class ResetAttemptForFrontendAccountEditObserverTest + * + * Test for checking that the customer login attempts are removed after account details edit + */ +class ResetAttemptForFrontendAccountEditObserverTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + public function setUp() + { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + } + + /** + * @magentoDataFixture Magento/Captcha/_files/failed_logins_frontend.php + */ + public function testAccountEditRemovesFailedAttempts() + { + $customerEmail = 'mageuser@dummy.com'; + $captchaLogFactory = $this->objectManager->get(LogFactory::class); + $eventManager = $this->objectManager->get(ManagerInterface::class); + + $eventManager->dispatch( + 'customer_account_edited', + ['email' => $customerEmail] + ); + + /** + * @var CaptchaLog $captchaLog + */ + $captchaLog = $captchaLogFactory->create(); + + self::assertEquals(0, $captchaLog->countAttemptsByUserLogin($customerEmail)); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Captcha/Observer/ResetAttemptForFrontendObserverTest.php b/dev/tests/integration/testsuite/Magento/Captcha/Observer/ResetAttemptForFrontendObserverTest.php new file mode 100644 index 0000000000000..f8dd80595f936 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Captcha/Observer/ResetAttemptForFrontendObserverTest.php @@ -0,0 +1,60 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Captcha\Observer; + +use Magento\Captcha\Model\ResourceModel\Log as CaptchaLog; +use Magento\Captcha\Model\ResourceModel\LogFactory; +use Magento\Customer\Model\Customer; +use Magento\Customer\Model\CustomerFactory; +use Magento\Framework\Event\ManagerInterface; +use Magento\Framework\ObjectManagerInterface; + +/** + * Class ResetAttemptForFrontendObserverTest + * + * Test for checking that the customer login attempts are removed after a successful login + */ +class ResetAttemptForFrontendObserverTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + public function setUp() + { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + } + + /** + * @magentoDataFixture Magento/Captcha/_files/failed_logins_frontend.php + */ + public function testSuccesfulLoginRemovesFailedAttempts() + { + $customerEmail = 'mageuser@dummy.com'; + $customerFactory = $this->objectManager->get(CustomerFactory::class); + $captchaLogFactory = $this->objectManager->get(LogFactory::class); + $eventManager = $this->objectManager->get(ManagerInterface::class); + + /** @var Customer $customer */ + $customer = $customerFactory->create(); + $customer->setEmail($customerEmail); + + $eventManager->dispatch( + 'customer_customer_authenticated', + ['model' => $customer, 'password' => 'some_password'] + ); + + /** + * @var CaptchaLog $captchaLog + */ + $captchaLog = $captchaLogFactory->create(); + + self::assertEquals(0, $captchaLog->countAttemptsByUserLogin($customerEmail)); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Captcha/_files/failed_logins_frontend.php b/dev/tests/integration/testsuite/Magento/Captcha/_files/failed_logins_frontend.php new file mode 100644 index 0000000000000..4e0db30fa82c1 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Captcha/_files/failed_logins_frontend.php @@ -0,0 +1,17 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\TestFramework\Helper\Bootstrap; +use Magento\Captcha\Model\ResourceModel\LogFactory; +use Magento\Captcha\Model\ResourceModel\Log; + +$objectManager = Bootstrap::getObjectManager(); +$logFactory = $objectManager->get(LogFactory::class); + +/** @var Log $captchaLog */ +$captchaLog = $logFactory->create(); +$captchaLog->logAttempt('mageuser@dummy.com'); diff --git a/dev/tests/integration/testsuite/Magento/Captcha/_files/failed_logins_frontend_rollback.php b/dev/tests/integration/testsuite/Magento/Captcha/_files/failed_logins_frontend_rollback.php new file mode 100644 index 0000000000000..a01edb6d0a219 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Captcha/_files/failed_logins_frontend_rollback.php @@ -0,0 +1,17 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\TestFramework\Helper\Bootstrap; +use Magento\Captcha\Model\ResourceModel\LogFactory; +use Magento\Captcha\Model\ResourceModel\Log; + +$objectManager = Bootstrap::getObjectManager(); +$logFactory = $objectManager->get(LogFactory::class); + +/** @var Log $captchaLog */ +$captchaLog = $logFactory->create(); +$captchaLog->deleteUserAttempts('mageuser@dummy.com'); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ImageUploaderTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ImageUploaderTest.php new file mode 100644 index 0000000000000..50b40cf4f2efb --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ImageUploaderTest.php @@ -0,0 +1,146 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Model; + +use Magento\Framework\App\Filesystem\DirectoryList; + +/** + * Tests for the \Magento\Catalog\Model\ImageUploader class + */ +class ImageUploaderTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + + /** + * @var \Magento\Catalog\Model\ImageUploader + */ + private $imageUploader; + + /** + * @var \Magento\Framework\Filesystem + */ + private $filesystem; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface + */ + private $mediaDirectory; + + /** + * @inheritdoc + */ + protected function setUp() + { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + /** @var \Magento\Framework\Filesystem $filesystem */ + $this->filesystem = $this->objectManager->get(\Magento\Framework\Filesystem::class); + $this->mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA); + /** @var $uploader \Magento\MediaStorage\Model\File\Uploader */ + $this->imageUploader = $this->objectManager->create( + \Magento\Catalog\Model\ImageUploader::class, + [ + 'baseTmpPath' => $this->mediaDirectory->getRelativePath('tmp'), + 'basePath' => __DIR__, + 'allowedExtensions' => ['jpg', 'jpeg', 'gif', 'png'], + ] + ); + } + + /** + * @return void + */ + public function testSaveFileToTmpDir(): void + { + $fileName = 'magento_small_image.jpg'; + $tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP); + $fixtureDir = realpath(__DIR__ . '/../_files'); + $filePath = $tmpDirectory->getAbsolutePath($fileName); + copy($fixtureDir . DIRECTORY_SEPARATOR . $fileName, $filePath); + + $_FILES['image'] = [ + 'name' => $fileName, + 'type' => 'image/jpeg', + 'tmp_name' => $filePath, + 'error' => 0, + 'size' => 12500, + ]; + + $this->imageUploader->saveFileToTmpDir('image'); + $filePath = $this->imageUploader->getBaseTmpPath() . DIRECTORY_SEPARATOR. $fileName; + $this->assertTrue(is_file($this->mediaDirectory->getAbsolutePath($filePath))); + } + + /** + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage File validation failed. + * @return void + */ + public function testSaveFileToTmpDirWithWrongExtension(): void + { + $fileName = 'text.txt'; + $tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP); + $filePath = $tmpDirectory->getAbsolutePath($fileName); + $file = fopen($filePath, "wb"); + fwrite($file, 'just a text'); + + $_FILES['image'] = [ + 'name' => $fileName, + 'type' => 'text/plain', + 'tmp_name' => $filePath, + 'error' => 0, + 'size' => 12500, + ]; + + $this->imageUploader->saveFileToTmpDir('image'); + $filePath = $this->imageUploader->getBaseTmpPath() . DIRECTORY_SEPARATOR. $fileName; + $this->assertFalse(is_file($this->mediaDirectory->getAbsolutePath($filePath))); + } + + /** + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage File validation failed. + * @return void + */ + public function testSaveFileToTmpDirWithWrongFile(): void + { + $fileName = 'file.gif'; + $tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP); + $filePath = $tmpDirectory->getAbsolutePath($fileName); + $file = fopen($filePath, "wb"); + fwrite($file, 'just a text'); + + $_FILES['image'] = [ + 'name' => $fileName, + 'type' => 'image/gif', + 'tmp_name' => $filePath, + 'error' => 0, + 'size' => 12500, + ]; + + $this->imageUploader->saveFileToTmpDir('image'); + $filePath = $this->imageUploader->getBaseTmpPath() . DIRECTORY_SEPARATOR. $fileName; + $this->assertFalse(is_file($this->mediaDirectory->getAbsolutePath($filePath))); + } + + /** + * @inheritdoc + */ + public static function tearDownAfterClass() + { + parent::tearDownAfterClass(); + $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + \Magento\Framework\Filesystem::class + ); + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ + $mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA); + $mediaDirectory->delete('tmp'); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery/UpdateHandlerTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery/UpdateHandlerTest.php new file mode 100644 index 0000000000000..559dd6d1b747d --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery/UpdateHandlerTest.php @@ -0,0 +1,100 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Catalog\Model\Product\Gallery; + +use Magento\Catalog\Model\Product; +use Magento\Framework\Filesystem; +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\ObjectManagerInterface; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\Framework\Filesystem\Directory\WriteInterface; + +/** + * Test for \Magento\Catalog\Model\Product\Gallery\UpdateHandler. + * + * @magentoDataFixture Magento/Catalog/_files/product_simple.php + * @magentoDataFixture Magento/Catalog/_files/product_image.php + */ +class UpdateHandlerTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + /** + * @var UpdateHandler + */ + private $updateHandler; + + /** + * @var WriteInterface + */ + private $mediaDirectory; + + /** + * @var Filesystem + */ + private $filesystem; + + /** + * @var string + */ + private $fileName; + + /** + * @inheritdoc + */ + protected function setUp() + { + $this->fileName = 'image.txt'; + + $this->objectManager = Bootstrap::getObjectManager(); + $this->updateHandler = $this->objectManager->create(UpdateHandler::class); + $this->filesystem = $this->objectManager->get(Filesystem::class); + $this->mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA); + $this->mediaDirectory->writeFile($this->fileName, 'Test'); + } + + /** + * @return void + */ + public function testExecuteWithIllegalFilename(): void + { + $filePath = str_repeat('/..', 2) . DIRECTORY_SEPARATOR . $this->fileName; + + /** @var $product Product */ + $product = Bootstrap::getObjectManager()->create(Product::class); + $product->load(1); + $product->setData( + 'media_gallery', + [ + 'images' => [ + 'image' => [ + 'value_id' => '100', + 'file' => $filePath, + 'label' => 'New image', + 'removed' => 1, + ], + ], + ] + ); + + $this->updateHandler->execute($product); + $this->assertFileExists($this->mediaDirectory->getAbsolutePath($this->fileName)); + } + + /** + * @return void + */ + protected function tearDown(): void + { + $this->mediaDirectory->getDriver()->deleteFile($this->mediaDirectory->getAbsolutePath($this->fileName)); + } +} diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/UploaderTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/UploaderTest.php new file mode 100644 index 0000000000000..cf5cb69ebdc27 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/UploaderTest.php @@ -0,0 +1,82 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\CatalogImportExport\Model\Import; + +use Magento\Framework\App\Bootstrap; +use Magento\Framework\App\Filesystem\DirectoryList; + +/** + * Tests for the \Magento\CatalogImportExport\Model\Import\Uploader class. + */ +class UploaderTest extends \Magento\TestFramework\Indexer\TestCase +{ + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface + */ + private $directory; + + /** + * @var \Magento\CatalogImportExport\Model\Import\Uploader + */ + private $uploader; + + /** + * @inheritdoc + */ + protected function setUp() + { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->uploader = $this->objectManager->create(\Magento\CatalogImportExport\Model\Import\Uploader::class); + + $filesystem = $this->objectManager->create(\Magento\Framework\Filesystem::class); + + $appParams = \Magento\TestFramework\Helper\Bootstrap::getInstance() + ->getBootstrap() + ->getApplication() + ->getInitParams()[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS]; + $mediaPath = $appParams[DirectoryList::MEDIA][DirectoryList::PATH]; + $this->directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT); + $tmpDir = $this->directory->getRelativePath($mediaPath . '/import'); + $this->uploader->setTmpDir($tmpDir); + + parent::setUp(); + } + + /** + * @magentoAppIsolation enabled + * @return void + */ + public function testMoveWithValidFile(): void + { + $fileName = 'magento_additional_image_one.jpg'; + $filePath = $this->directory->getAbsolutePath($this->uploader->getTmpDir() . '/' . $fileName); + copy(__DIR__ . '/_files/' . $fileName, $filePath); + $this->uploader->move($fileName); + $this->assertTrue($this->directory->isExist($this->uploader->getTmpDir() . '/' . $fileName)); + } + + /** + * @magentoAppIsolation enabled + * @return void + * @expectedException \Exception + */ + public function testMoveWithInvalidFile(): void + { + $fileName = 'media_import_image.php'; + $filePath = $this->directory->getAbsolutePath($this->uploader->getTmpDir() . '/' . $fileName); + copy(__DIR__ . '/_files/' . $fileName, $filePath); + $this->uploader->move($fileName); + $this->assertFalse($this->directory->isExist($this->uploader->getTmpDir() . '/' . $fileName)); + } +} diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_import_with_two_stores.csv b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_import_with_two_stores.csv index f343cd20ecc78..eda9f3a01bf55 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_import_with_two_stores.csv +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/products_to_import_with_two_stores.csv @@ -1,4 +1,4 @@ product_websites,store_view_code,attribute_set_code,product_type,categories,sku,price,name,url_key -base,,Default,simple,Default Category/category-defaultstore,product,123,product,product +base,,Default,simple,Default Category/category-admin,product,123,product,product ,default,Default,simple,,product,,product-default,product-default ,fixturestore,Default,simple,,product,,product-fixture,product-fixture diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php index 13a381008b2be..e25934fb25ee1 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php @@ -20,6 +20,24 @@ class StorageTest extends \PHPUnit\Framework\TestCase */ protected static $_baseDir; + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + + /** + * @var \Magento\Framework\Filesystem + */ + private $filesystem; + + /** + * @var \Magento\Cms\Model\Wysiwyg\Images\Storage + */ + private $storage; + + /** + * @inheritdoc + */ public static function setUpBeforeClass() { self::$_baseDir = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( @@ -31,6 +49,9 @@ public static function setUpBeforeClass() touch(self::$_baseDir . '/1.swf'); } + /** + * @inheritdoc + */ public static function tearDownAfterClass() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( @@ -40,19 +61,25 @@ public static function tearDownAfterClass() ); } + /** + * @inheritdoc + */ + public function setUp() + { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->filesystem = $this->objectManager->get(\Magento\Framework\Filesystem::class); + $this->storage = $this->objectManager->create(\Magento\Cms\Model\Wysiwyg\Images\Storage::class); + } + /** * @magentoAppIsolation enabled + * @return void */ - public function testGetFilesCollection() + public function testGetFilesCollection(): void { \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get(\Magento\Framework\View\DesignInterface::class) - ->setDesignTheme('Magento/backend'); - /** @var $model \Magento\Cms\Model\Wysiwyg\Images\Storage */ - $model = $objectManager->create(\Magento\Cms\Model\Wysiwyg\Images\Storage::class); - $collection = $model->getFilesCollection(self::$_baseDir, 'media'); + $collection = $this->storage->getFilesCollection(self::$_baseDir, 'media'); $this->assertInstanceOf(\Magento\Cms\Model\Wysiwyg\Images\Storage\Collection::class, $collection); foreach ($collection as $item) { $this->assertInstanceOf(\Magento\Framework\DataObject::class, $item); @@ -67,45 +94,86 @@ public function testGetFilesCollection() /** * @magentoAppArea adminhtml + * @return void */ - public function testGetThumbsPath() + public function testGetThumbsPath(): void { - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\Framework\Filesystem $filesystem */ - $filesystem = $objectManager->get(\Magento\Framework\Filesystem::class); - $session = $objectManager->get(\Magento\Backend\Model\Session::class); - $backendUrl = $objectManager->get(\Magento\Backend\Model\UrlInterface::class); - $imageFactory = $objectManager->get(\Magento\Framework\Image\AdapterFactory::class); - $assetRepo = $objectManager->get(\Magento\Framework\View\Asset\Repository::class); - $imageHelper = $objectManager->get(\Magento\Cms\Helper\Wysiwyg\Images::class); - $coreFileStorageDb = $objectManager->get(\Magento\MediaStorage\Helper\File\Storage\Database::class); - $storageCollectionFactory = $objectManager->get( - \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory::class - ); - $storageFileFactory = $objectManager->get(\Magento\MediaStorage\Model\File\Storage\FileFactory::class); - $storageDatabaseFactory = $objectManager->get(\Magento\MediaStorage\Model\File\Storage\DatabaseFactory::class); - $directoryDatabaseFactory = $objectManager->get( - \Magento\MediaStorage\Model\File\Storage\Directory\DatabaseFactory::class - ); - $uploaderFactory = $objectManager->get(\Magento\MediaStorage\Model\File\UploaderFactory::class); - - $model = new \Magento\Cms\Model\Wysiwyg\Images\Storage( - $session, - $backendUrl, - $imageHelper, - $coreFileStorageDb, - $filesystem, - $imageFactory, - $assetRepo, - $storageCollectionFactory, - $storageFileFactory, - $storageDatabaseFactory, - $directoryDatabaseFactory, - $uploaderFactory - ); $this->assertStringStartsWith( - $filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath(), - $model->getThumbsPath() + $this->filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath(), + $this->storage->getThumbsPath() ); } + + /** + * @return void + */ + public function testUploadFile(): void + { + $fileName = 'magento_small_image.jpg'; + $tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP); + $filePath = $tmpDirectory->getAbsolutePath($fileName); + $fixtureDir = realpath(__DIR__ . '/../../../../Catalog/_files'); + copy($fixtureDir . DIRECTORY_SEPARATOR . $fileName, $filePath); + + $_FILES['image'] = [ + 'name' => $fileName, + 'type' => 'image/jpeg', + 'tmp_name' => $filePath, + 'error' => 0, + 'size' => 12500, + ]; + + $this->storage->uploadFile(self::$_baseDir); + $this->assertTrue(is_file(self::$_baseDir . DIRECTORY_SEPARATOR . $fileName)); + } + + /** + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage File validation failed. + * @return void + */ + public function testUploadFileWithWrongExtension(): void + { + $fileName = 'text.txt'; + $tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP); + $filePath = $tmpDirectory->getAbsolutePath($fileName); + $file = fopen($filePath, "wb"); + fwrite($file, 'just a text'); + + $_FILES['image'] = [ + 'name' => $fileName, + 'type' => 'text/plain', + 'tmp_name' => $filePath, + 'error' => 0, + 'size' => 12500, + ]; + + $this->storage->uploadFile(self::$_baseDir); + $this->assertFalse(is_file(self::$_baseDir . DIRECTORY_SEPARATOR . $fileName)); + } + + /** + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage File validation failed. + * @return void + */ + public function testUploadFileWithWrongFile(): void + { + $fileName = 'file.gif'; + $tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP); + $filePath = $tmpDirectory->getAbsolutePath($fileName); + $file = fopen($filePath, "wb"); + fwrite($file, 'just a text'); + + $_FILES['image'] = [ + 'name' => $fileName, + 'type' => 'image/gif', + 'tmp_name' => $filePath, + 'error' => 0, + 'size' => 12500, + ]; + + $this->storage->uploadFile(self::$_baseDir); + $this->assertFalse(is_file(self::$_baseDir . DIRECTORY_SEPARATOR . $fileName)); + } } diff --git a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php index cdeb67afca471..99be1bcbae379 100644 --- a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php @@ -27,7 +27,7 @@ protected function setUp() } /** - * @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr 8 * * * * + * @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr * * * * * */ public function testDispatchScheduled() { @@ -35,6 +35,7 @@ public function testDispatchScheduled() \Magento\Cron\Model\ResourceModel\Schedule\Collection::class ); $collection->addFieldToFilter('status', \Magento\Cron\Model\Schedule::STATUS_PENDING); + $collection->addFieldToFilter('job_code', 'catalog_product_alert'); $this->assertGreaterThan(0, $collection->count(), 'Cron has failed to schedule tasks for itself for future.'); } diff --git a/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php b/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php index b65aa7734f2da..45d84336337c5 100644 --- a/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php +++ b/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php @@ -130,7 +130,7 @@ public function getPostcodesDataProvider() ['countryId' => 'IS', 'postcode' => '123'], ['countryId' => 'IN', 'postcode' => '123456'], ['countryId' => 'ID', 'postcode' => '12345'], - ['countryId' => 'IL', 'postcode' => '12345'], + ['countryId' => 'IL', 'postcode' => '1234567'], ['countryId' => 'IT', 'postcode' => '12345'], ['countryId' => 'JP', 'postcode' => '123-4567'], ['countryId' => 'JP', 'postcode' => '1234567'], diff --git a/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php index d74a83c339326..a43013860c79c 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php @@ -5,12 +5,13 @@ */ namespace Magento\Framework\Code; -use Magento\Framework\Code\Generator; +use Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceFactoryGenerator; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\Filesystem; use Magento\Framework\Interception\Code\Generator as InterceptionGenerator; use Magento\Framework\ObjectManager\Code\Generator as DIGenerator; -use Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceFactoryGenerator; use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; require_once __DIR__ . '/GeneratorTest/SourceClassWithNamespace.php'; require_once __DIR__ . '/GeneratorTest/ParentClassWithNamespace.php'; @@ -18,60 +19,77 @@ /** * @magentoAppIsolation enabled + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class GeneratorTest extends \PHPUnit\Framework\TestCase +class GeneratorTest extends TestCase { - const CLASS_NAME_WITH_NAMESPACE = \Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace::class; + const CLASS_NAME_WITH_NAMESPACE = GeneratorTest\SourceClassWithNamespace::class; /** - * @var \Magento\Framework\Code\Generator + * @var Generator */ protected $_generator; /** - * @var \Magento\Framework\Code\Generator\Io + * @var Generator/Io */ protected $_ioObject; /** - * @var \Magento\Framework\Filesystem\Directory\Write + * @var Filesystem\Directory\Write + */ + private $generatedDirectory; + + /** + * @var Filesystem\Directory\Read + */ + private $logDirectory; + + /** + * @var string */ - protected $varDirectory; + private $testRelativePath = './Magento/Framework/Code/GeneratorTest/'; + /** + * @inheritdoc + */ protected function setUp() { - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->varDirectory = $objectManager->get( - \Magento\Framework\Filesystem::class - )->getDirectoryWrite( - DirectoryList::VAR_DIR - ); - $generationDirectory = $this->varDirectory->getAbsolutePath('generation'); - $this->_ioObject = new \Magento\Framework\Code\Generator\Io( - new \Magento\Framework\Filesystem\Driver\File(), - $generationDirectory - ); + $objectManager = Bootstrap::getObjectManager(); + /** @var Filesystem $filesystem */ + $filesystem = $objectManager->get(Filesystem::class); + $this->generatedDirectory = $filesystem->getDirectoryWrite(DirectoryList::GENERATED_CODE); + $this->logDirectory = $filesystem->getDirectoryRead(DirectoryList::LOG); + $generatedDirectoryAbsolutePath = $this->generatedDirectory->getAbsolutePath(); + $this->_ioObject = new Generator\Io(new Filesystem\Driver\File(), $generatedDirectoryAbsolutePath); $this->_generator = $objectManager->create( - \Magento\Framework\Code\Generator::class, + Generator::class, [ 'ioObject' => $this->_ioObject, 'generatedEntities' => [ ExtensionAttributesInterfaceFactoryGenerator::ENTITY_TYPE => ExtensionAttributesInterfaceFactoryGenerator::class, - DIGenerator\Factory::ENTITY_TYPE => \Magento\Framework\ObjectManager\Code\Generator\Factory::class, - DIGenerator\Proxy::ENTITY_TYPE => \Magento\Framework\ObjectManager\Code\Generator\Proxy::class, - InterceptionGenerator\Interceptor::ENTITY_TYPE => - \Magento\Framework\Interception\Code\Generator\Interceptor::class, + DIGenerator\Factory::ENTITY_TYPE => DIGenerator\Factory::class, + DIGenerator\Proxy::ENTITY_TYPE => DIGenerator\Proxy::class, + InterceptionGenerator\Interceptor::ENTITY_TYPE => InterceptionGenerator\Interceptor::class, ] ] ); $this->_generator->setObjectManager($objectManager); } + /** + * @inheritdoc + */ protected function tearDown() { - $this->varDirectory->delete('generation'); $this->_generator = null; + if ($this->generatedDirectory->isExist($this->testRelativePath)) { + if (!$this->generatedDirectory->isWritable($this->testRelativePath)) { + $this->generatedDirectory->changePermissionsRecursively($this->testRelativePath, 0775, 0664); + } + $this->generatedDirectory->delete($this->testRelativePath); + } } protected function _clearDocBlock($classBody) @@ -79,81 +97,59 @@ protected function _clearDocBlock($classBody) return preg_replace('/(\/\*[\w\W]*)\nclass/', 'class', $classBody); } + /** + * Generates a new file with Factory class and compares with the sample from the + * SourceClassWithNamespaceFactory.php.sample file. + */ public function testGenerateClassFactoryWithNamespace() { $factoryClassName = self::CLASS_NAME_WITH_NAMESPACE . 'Factory'; - $result = false; - $generatorResult = $this->_generator->generateClass($factoryClassName); - if (\Magento\Framework\Code\Generator::GENERATION_ERROR !== $generatorResult) { - $result = true; - } - $this->assertTrue($result, 'Failed asserting that \'' . (string)$generatorResult . '\' equals \'success\'.'); - - $factory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($factoryClassName); - - $object = $factory->create(); - $this->assertInstanceOf(self::CLASS_NAME_WITH_NAMESPACE, $object); - - // This test is only valid if the factory created the object if Autoloader did not pick it up automatically - if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS == $generatorResult) { - $content = $this->_clearDocBlock( - file_get_contents( - $this->_ioObject->generateResultFileName(self::CLASS_NAME_WITH_NAMESPACE . 'Factory') - ) - ); - $expectedContent = $this->_clearDocBlock( - file_get_contents(__DIR__ . '/_expected/SourceClassWithNamespaceFactory.php.sample') - ); - $this->assertEquals($expectedContent, $content); - } + $this->assertEquals(Generator::GENERATION_SUCCESS, $this->_generator->generateClass($factoryClassName)); + $factory = Bootstrap::getObjectManager()->create($factoryClassName); + $this->assertInstanceOf(self::CLASS_NAME_WITH_NAMESPACE, $factory->create()); + $content = $this->_clearDocBlock( + file_get_contents($this->_ioObject->generateResultFileName($factoryClassName)) + ); + $expectedContent = $this->_clearDocBlock( + file_get_contents(__DIR__ . '/_expected/SourceClassWithNamespaceFactory.php.sample') + ); + $this->assertEquals($expectedContent, $content); } + /** + * Generates a new file with Proxy class and compares with the sample from the + * SourceClassWithNamespaceProxy.php.sample file. + */ public function testGenerateClassProxyWithNamespace() { $proxyClassName = self::CLASS_NAME_WITH_NAMESPACE . '\Proxy'; - $result = false; - $generatorResult = $this->_generator->generateClass($proxyClassName); - if (\Magento\Framework\Code\Generator::GENERATION_ERROR !== $generatorResult) { - $result = true; - } - $this->assertTrue($result, 'Failed asserting that \'' . (string)$generatorResult . '\' equals \'success\'.'); - - $proxy = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($proxyClassName); + $this->assertEquals(Generator::GENERATION_SUCCESS, $this->_generator->generateClass($proxyClassName)); + $proxy = Bootstrap::getObjectManager()->create($proxyClassName); $this->assertInstanceOf(self::CLASS_NAME_WITH_NAMESPACE, $proxy); - - // This test is only valid if the factory created the object if Autoloader did not pick it up automatically - if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS == $generatorResult) { - $content = $this->_clearDocBlock( - file_get_contents($this->_ioObject->generateResultFileName(self::CLASS_NAME_WITH_NAMESPACE . '\Proxy')) - ); - $expectedContent = $this->_clearDocBlock( - file_get_contents(__DIR__ . '/_expected/SourceClassWithNamespaceProxy.php.sample') - ); - $this->assertEquals($expectedContent, $content); - } + $content = $this->_clearDocBlock( + file_get_contents($this->_ioObject->generateResultFileName($proxyClassName)) + ); + $expectedContent = $this->_clearDocBlock( + file_get_contents(__DIR__ . '/_expected/SourceClassWithNamespaceProxy.php.sample') + ); + $this->assertEquals($expectedContent, $content); } + /** + * Generates a new file with Interceptor class and compares with the sample from the + * SourceClassWithNamespaceInterceptor.php.sample file. + */ public function testGenerateClassInterceptorWithNamespace() { $interceptorClassName = self::CLASS_NAME_WITH_NAMESPACE . '\Interceptor'; - $result = false; - $generatorResult = $this->_generator->generateClass($interceptorClassName); - if (\Magento\Framework\Code\Generator::GENERATION_ERROR !== $generatorResult) { - $result = true; - } - $this->assertTrue($result, 'Failed asserting that \'' . (string)$generatorResult . '\' equals \'success\'.'); - - if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS == $generatorResult) { - $content = $this->_clearDocBlock( - file_get_contents( - $this->_ioObject->generateResultFileName(self::CLASS_NAME_WITH_NAMESPACE . '\Interceptor') - ) - ); - $expectedContent = $this->_clearDocBlock( - file_get_contents(__DIR__ . '/_expected/SourceClassWithNamespaceInterceptor.php.sample') - ); - $this->assertEquals($expectedContent, $content); - } + $this->assertEquals(Generator::GENERATION_SUCCESS, $this->_generator->generateClass($interceptorClassName)); + $content = $this->_clearDocBlock( + file_get_contents($this->_ioObject->generateResultFileName($interceptorClassName)) + ); + $expectedContent = $this->_clearDocBlock( + file_get_contents(__DIR__ . '/_expected/SourceClassWithNamespaceInterceptor.php.sample') + ); + $this->assertEquals($expectedContent, $content); } /** @@ -163,26 +159,35 @@ public function testGenerateClassInterceptorWithNamespace() public function testGenerateClassExtensionAttributesInterfaceFactoryWithNamespace() { $factoryClassName = self::CLASS_NAME_WITH_NAMESPACE . 'ExtensionInterfaceFactory'; - $this->varDirectory->create( - $this->varDirectory->getAbsolutePath('generation') . '/Magento/Framework/Code/GeneratorTest/' - ); - - $generatorResult = $this->_generator->generateClass($factoryClassName); - + $this->generatedDirectory->create($this->testRelativePath); + $this->assertEquals(Generator::GENERATION_SUCCESS, $this->_generator->generateClass($factoryClassName)); $factory = Bootstrap::getObjectManager()->create($factoryClassName); - $object = $factory->create(); - - $this->assertEquals($generatorResult, Generator::GENERATION_SUCCESS); - $this->assertInstanceOf(self::CLASS_NAME_WITH_NAMESPACE . 'Extension', $object); - + $this->assertInstanceOf(self::CLASS_NAME_WITH_NAMESPACE . 'Extension', $factory->create()); $content = $this->_clearDocBlock( - file_get_contents( - $this->_ioObject->generateResultFileName(self::CLASS_NAME_WITH_NAMESPACE . 'ExtensionInterfaceFactory') - ) + file_get_contents($this->_ioObject->generateResultFileName($factoryClassName)) ); $expectedContent = $this->_clearDocBlock( file_get_contents(__DIR__ . '/_expected/SourceClassWithNamespaceExtensionInterfaceFactory.php.sample') ); $this->assertEquals($expectedContent, $content); } + + /** + * It tries to generate a new class file when the generated directory is read-only + */ + public function testGeneratorClassWithErrorSaveClassFile() + { + $factoryClassName = self::CLASS_NAME_WITH_NAMESPACE . 'Factory'; + $msgPart = 'Class ' . $factoryClassName . ' generation error: The requested class did not generate properly, ' + . 'because the \'generated\' directory permission is read-only.'; + $regexpMsgPart = preg_quote($msgPart); + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessageRegExp("/.*$regexpMsgPart.*/"); + $this->generatedDirectory->create($this->testRelativePath); + $this->generatedDirectory->changePermissionsRecursively($this->testRelativePath, 0555, 0444); + $generatorResult = $this->_generator->generateClass($factoryClassName); + $this->assertFalse($generatorResult); + $pathToSystemLog = $this->logDirectory->getAbsolutePath('system.log'); + $this->assertContains($msgPart, file_get_contents($pathToSystemLog)); + } } diff --git a/dev/tests/integration/testsuite/Magento/Framework/GraphQl/_files/schemaA.graphqls b/dev/tests/integration/testsuite/Magento/Framework/GraphQl/_files/schemaA.graphqls index d736bb4fa26f1..6c832e5f122a6 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/GraphQl/_files/schemaA.graphqls +++ b/dev/tests/integration/testsuite/Magento/Framework/GraphQl/_files/schemaA.graphqls @@ -2,6 +2,10 @@ type Query { placeholder: String @doc(description: "comment for placeholder.") } +type Mutation { + placeholder: String @doc(description: "comment for placeholder.") +} + input FilterTypeInput @doc(description:"Comment for FilterTypeInput") { eq: String @doc(description:"Equal") finset: [String] diff --git a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php index 2f798deecd9d5..6d5da7243ffbe 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php @@ -7,6 +7,11 @@ class ObjectManagerTest extends \PHPUnit\Framework\TestCase { + /**#@+ + * Test class with type error + */ + const TEST_CLASS_WITH_TYPE_ERROR = \Magento\Framework\ObjectManager\TestAsset\ConstructorWithTypeError::class; + /**#@+ * Test classes for basic instantiation */ @@ -138,4 +143,17 @@ public function testNewInstance($actualClassName, array $properties = [], $expec } } } + + /** + * Test creating an object and passing incorrect type of arguments to the constructor. + * + * @expectedException \Magento\Framework\Exception\RuntimeException + * @expectedExceptionMessage Error occurred when creating object + */ + public function testNewInstanceWithTypeError() + { + self::$_objectManager->create(self::TEST_CLASS_WITH_TYPE_ERROR, [ + 'testArgument' => new \stdClass() + ]); + } } diff --git a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorWithTypeError.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorWithTypeError.php new file mode 100644 index 0000000000000..92d16e4df3511 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorWithTypeError.php @@ -0,0 +1,27 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\ObjectManager\TestAsset; + +/** + * Test asset used to test invalid argument types on the constructor invocation. + */ +class ConstructorWithTypeError +{ + /** + * @var Basic + */ + private $testArgument; + + /** + * @param Basic $testArgument + */ + public function __construct(Basic $testArgument) + { + $this->testArgument = $testArgument; + } +} diff --git a/dev/tests/integration/testsuite/Magento/MediaStorage/Model/File/Storage/ResponseTest.php b/dev/tests/integration/testsuite/Magento/MediaStorage/Model/File/Storage/ResponseTest.php new file mode 100644 index 0000000000000..ffc1005c61150 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/MediaStorage/Model/File/Storage/ResponseTest.php @@ -0,0 +1,60 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\MediaStorage\Model\File\Storage; + +/** + * Tests for \Magento\MediaStorage\Model\File\Storage\Response class + */ +class ResponseTest extends \PHPUnit\Framework\TestCase +{ + /** + * test for \Magento\MediaStorage\Model\File\Storage\Response::sendResponse() + * + * @return void + */ + public function testSendResponse(): void + { + $expectedHeaders = [ + [ + 'field_name' => 'X-Content-Type-Options', + 'field_value' => 'nosniff', + ], + [ + 'field_name' => 'X-XSS-Protection', + 'field_value' => '1; mode=block', + ], + [ + 'field_name' => 'X-Frame-Options', + 'field_value' => 'SAMEORIGIN', + ], + ]; + $filePath = realpath(__DIR__ . '/../../../_files/test_file.html'); + /** @var \Magento\MediaStorage\Model\File\Storage\Response $response */ + $mediaStorageResponse = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + \Magento\MediaStorage\Model\File\Storage\Response::class + ); + $mediaStorageResponse->setFilePath($filePath); + ob_start(); + $mediaStorageResponse->sendResponse(); + ob_end_clean(); + /** @var \Magento\Framework\App\Response\Http $frameworkResponse */ + $frameworkResponse = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + \Magento\Framework\HTTP\PhpEnvironment\Response::class + ); + $actualHeaders = []; + foreach ($frameworkResponse->getHeaders() as $responseHeader) { + $actualHeaders[] = [ + 'field_name' => $responseHeader->getFieldName(), + 'field_value' => $responseHeader->getFieldValue(), + ]; + } + foreach ($expectedHeaders as $expected) { + $this->assertTrue(in_array($expected, $actualHeaders)); + } + } +} diff --git a/dev/tests/integration/testsuite/Magento/MediaStorage/_files/test_file.html b/dev/tests/integration/testsuite/Magento/MediaStorage/_files/test_file.html new file mode 100644 index 0000000000000..082b3465b6ac4 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/MediaStorage/_files/test_file.html @@ -0,0 +1 @@ +test data diff --git a/dev/tests/integration/testsuite/Magento/MessageQueue/Model/Cron/ConsumersRunnerTest.php b/dev/tests/integration/testsuite/Magento/MessageQueue/Model/Cron/ConsumersRunnerTest.php index f362e75ea790e..4acba63d98e66 100644 --- a/dev/tests/integration/testsuite/Magento/MessageQueue/Model/Cron/ConsumersRunnerTest.php +++ b/dev/tests/integration/testsuite/Magento/MessageQueue/Model/Cron/ConsumersRunnerTest.php @@ -130,7 +130,7 @@ public function testCheckThatPidFilesWasCreated() public function testSpecificConsumerAndRerun() { $specificConsumer = 'quoteItemCleaner'; - $pidFilePath = $specificConsumer . ConsumersRunner::PID_FILE_EXT; + $pidFilePath = $this->getPidFileName($specificConsumer); $config = $this->config; $config['cron_consumers_runner'] = ['consumers' => [$specificConsumer], 'max_messages' => 0]; @@ -228,7 +228,7 @@ private function writeConfig(array $config) private function getPidFileFullPath($consumerName) { $directoryList = $this->objectManager->get(DirectoryList::class); - return $directoryList->getPath(DirectoryList::VAR_DIR) . '/' . $consumerName . ConsumersRunner::PID_FILE_EXT; + return $directoryList->getPath(DirectoryList::VAR_DIR) . '/' . $this->getPidFileName($consumerName); } /** @@ -239,7 +239,7 @@ protected function tearDown() foreach ($this->consumerConfig->getConsumers() as $consumer) { $consumerName = $consumer->getName(); $pidFileFullPath = $this->getPidFileFullPath($consumerName); - $pidFilePath = $consumerName . ConsumersRunner::PID_FILE_EXT; + $pidFilePath = $this->getPidFileName($consumerName); $pid = $this->pid->getPid($pidFilePath); if ($pid && $this->pid->isRun($pidFilePath)) { @@ -258,4 +258,15 @@ protected function tearDown() $this->writeConfig($this->config); $this->appConfig->reinit(); } + + /** + * @param string $consumerName The consumers name + * @return string The name to file with PID + */ + private function getPidFileName($consumerName) + { + $sanitizedHostname = preg_replace('/[^a-z0-9]/i', '', gethostname()); + + return $consumerName . '-' . $sanitizedHostname . ConsumersRunner::PID_FILE_EXT; + } } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Api/OrderCustomerDelegateInterfaceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Api/OrderCustomerDelegateInterfaceTest.php index 459e8fdbf5087..cb6f4aaac07d3 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Api/OrderCustomerDelegateInterfaceTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Api/OrderCustomerDelegateInterfaceTest.php @@ -159,6 +159,61 @@ public function testDelegateNew(): void '12345abcD' ); + //Testing that addresses from order and the order itself are assigned + //to customer. + $order = $this->orderRepository->get($orderId); + $this->assertCount(1, $createdCustomer->getAddresses()); + $this->assertNotNull($createdCustomer->getDefaultBilling()); + $this->assertNotNull($createdCustomer->getDefaultShipping()); + foreach ($createdCustomer->getAddresses() as $address) { + $this->assertTrue( + $address->isDefaultBilling() || $address->isDefaultShipping() + ); + if ($address->isDefaultBilling()) { + $this->compareAddresses($order->getBillingAddress(), $address); + } elseif ($address->isDefaultShipping()) { + $this->compareAddresses($order->getShippingAddress(), $address); + } + } + $this->assertEquals($order->getCustomerId(), $createdCustomer->getId()); + } + + /** + * @magentoDbIsolation enabled + * @magentoAppIsolation enabled + * @magentoDataFixture Magento/Sales/_files/order_different_addresses.php + * @return void + */ + public function testDelegateNewDifferentAddresses(): void + { + $orderAutoincrementId = '100000001'; + /** @var Order $orderModel */ + $orderModel = $this->orderFactory->create(); + $orderModel->loadByIncrementId($orderAutoincrementId); + $orderId = (int)$orderModel->getId(); + unset($orderModel); + + $this->delegate->delegateNew($orderId); + + //Saving new customer with prepared data from order. + /** @var CustomerInterface $customer */ + $customer = $this->customerFactory->create(); + $customer->setWebsiteId(1) + ->setEmail('customer_order_delegate@example.com') + ->setGroupId(1) + ->setStoreId(1) + ->setPrefix('Mr.') + ->setFirstname('John') + ->setMiddlename('A') + ->setLastname('Smith') + ->setSuffix('Esq.') + ->setTaxvat('12') + ->setGender(0); + $createdCustomer = $this->accountManagement->createAccount( + $customer, + '12345abcD' + ); + //Testing that addresses from order and the order itself are assigned //to customer. $order = $this->orderRepository->get($orderId); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php index c54c80bb6f6c7..b1a8d8e685226 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php @@ -519,20 +519,14 @@ public function testCreateOrderNewCustomerWithFailedFirstPlaceOrderAction( * Email before and after failed first place order action. * * @case #1 Is the same. - * @case #2 Is empty. - * @case #3 Filled after failed first place order action. - * @case #4 Empty after failed first place order action. - * @case #5 Changed after failed first place order action. + * @case #2 Changed after failed first place order action. * @return array */ public function createOrderNewCustomerWithFailedFirstPlaceOrderActionDataProvider() { return [ 1 => ['customer@email.com', 'customer@email.com'], - 2 => ['', ''], - 3 => ['', 'customer@email.com'], - 4 => ['customer@email.com', ''], - 5 => ['customer@email.com', 'changed_customer@email.com'], + 2 => ['customer@email.com', 'changed_customer@email.com'], ]; } diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_different_addresses.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_different_addresses.php new file mode 100644 index 0000000000000..d2be07b1e097f --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_different_addresses.php @@ -0,0 +1,63 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +// @codingStandardsIgnoreFile + +require 'default_rollback.php'; +require __DIR__ . '/../../../Magento/Catalog/_files/product_simple.php'; +/** @var \Magento\Catalog\Model\Product $product */ + +$addressData = include __DIR__ . '/address_data.php'; + +$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + +/** @var \Magento\Sales\Model\Order\Address $billingAddress */ +$billingAddress = $objectManager->create(\Magento\Sales\Model\Order\Address::class, ['data' => $addressData]); +$billingAddress->setAddressType('billing'); + +/** @var \Magento\Sales\Model\Order\Address $shippingAddress */ +$shippingAddress = clone $billingAddress; +$shippingAddress + ->setId(null) + ->setAddressType('shipping') + ->setCity('San Francisco'); + +/** @var \Magento\Sales\Model\Order\Payment $payment */ +$payment = $objectManager->create(\Magento\Sales\Model\Order\Payment::class); +$payment->setMethod('checkmo'); +$payment->setAdditionalInformation('last_trans_id', '11122'); +$payment->setAdditionalInformation('metadata', [ + 'type' => 'free', + 'fraudulent' => false, +]); + +/** @var \Magento\Sales\Model\Order\Item $orderItem */ +$orderItem = $objectManager->create(\Magento\Sales\Model\Order\Item::class); +$orderItem->setProductId($product->getId())->setQtyOrdered(2); +$orderItem->setBasePrice($product->getPrice()); +$orderItem->setPrice($product->getPrice()); +$orderItem->setRowTotal($product->getPrice()); +$orderItem->setProductType('simple'); + +/** @var \Magento\Sales\Model\Order $order */ +$order = $objectManager->create(\Magento\Sales\Model\Order::class); +$order->setIncrementId('100000001') + ->setState(\Magento\Sales\Model\Order::STATE_PROCESSING) + ->setStatus($order->getConfig()->getStateDefaultStatus(\Magento\Sales\Model\Order::STATE_PROCESSING)) + ->setSubtotal(100) + ->setGrandTotal(100) + ->setBaseSubtotal(100) + ->setBaseGrandTotal(100) + ->setCustomerIsGuest(true) + ->setCustomerEmail('customer@null.com') + ->setBillingAddress($billingAddress) + ->setShippingAddress($shippingAddress) + ->setStoreId($objectManager->get(\Magento\Store\Model\StoreManagerInterface::class)->getStore()->getId()) + ->addItem($orderItem) + ->setPayment($payment); + +$order->save(); diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php index 91369da7aa842..a2176364178dc 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php @@ -21,7 +21,7 @@ $coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class); $coupon->setRuleId($items[1]->getId())->setCode('autogenerated_2_2')->setType(1)->save(); -// type SPECIFIC with generated coupons +// type SPECIFIC with generated coupons $coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class); $coupon->setRuleId($items[2]->getId())->setCode('autogenerated_3_1')->setType(1)->save(); $coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class); diff --git a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/Config/SaveTest.php b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/Config/SaveTest.php index 1ea2b28986d8a..95fcf24894c87 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/Config/SaveTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/Config/SaveTest.php @@ -14,6 +14,11 @@ */ class SaveTest extends AbstractBackendController { + /** + * @var FormKey + */ + private $formKey; + /** * @inheritdoc */ @@ -24,6 +29,15 @@ class SaveTest extends AbstractBackendController */ protected $uri = 'backend/theme/design_config/save'; + protected function setUp() + { + parent::setUp(); + + $this->formKey = $this->_objectManager->get( + FormKey::class + ); + } + /** * Test design configuration save valid values. * @@ -89,7 +103,22 @@ private function getRequestParams() 'watermark_swatch_image_imageOpacity' => '', 'watermark_swatch_image_position' => 'stretch', 'scope' => 'default', - 'form_key' => $this->_objectManager->get(FormKey::class)->getFormKey(), + 'form_key' => $this->formKey->getFormKey(), ]; } + + public function testAclHasAccess() + { + $this->getRequest()->setMethod( + \Zend\Http\Request::METHOD_POST + ); + + $this->getRequest()->setParams( + [ + 'form_key' => $this->formKey->getFormKey() + ] + ); + + parent::testAclHasAccess(); + } } diff --git a/dev/tests/static/framework/Magento/CodeMessDetector/Test/Unit/Rule/Design/FinalImplementationTest.php b/dev/tests/static/framework/Magento/CodeMessDetector/Test/Unit/Rule/Design/FinalImplementationTest.php index 23875f543a419..ca944b5c60e11 100644 --- a/dev/tests/static/framework/Magento/CodeMessDetector/Test/Unit/Rule/Design/FinalImplementationTest.php +++ b/dev/tests/static/framework/Magento/CodeMessDetector/Test/Unit/Rule/Design/FinalImplementationTest.php @@ -8,8 +8,8 @@ use PHPUnit\Framework\TestCase as TestCase; use PHPUnit_Framework_MockObject_MockObject as MockObject; -use PHPUnit_Framework_MockObject_Matcher_InvokedRecorder as InvokedRecorder; -use PHPUnit\Framework\MockObject_Builder_InvocationMocker as InvocationMocker; +use PHPUnit\Framework\MockObject\Matcher\InvokedRecorder as InvokedRecorder; +use PHPUnit\Framework\MockObject\Builder\InvocationMocker as InvocationMocker; use Magento\CodeMessDetector\Rule\Design\FinalImplementation; use PHPMD\Report; use PHPMD\AbstractNode; diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Xml/SchemaTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Xml/SchemaTest.php index 5877ee5cbcc48..69443544febfd 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Xml/SchemaTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Xml/SchemaTest.php @@ -108,7 +108,8 @@ private function _filterSpecialCases(&$files) '#layout/swagger_index_index.xml$#', '#Doc/etc/doc/vars.xml$#', '#phpunit.xml$#', - '#etc/db_schema.xml$#' + '#etc/db_schema.xml$#', + '#Test/Mftf#', ]; foreach ($list as $pattern) { foreach ($files as $key => $value) { diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt index cf0ea458483e8..fd8c09907e0ed 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt @@ -201,3 +201,4 @@ IntegrationConfig.php setup/performance-toolkit/aggregate-report Magento/MessageQueue/Setup Magento/Elasticsearch/Elasticsearch5 +Test/_files diff --git a/dev/travis/before_script.sh b/dev/travis/before_script.sh index 7cf55ca8083f1..f2ba20dc412b6 100755 --- a/dev/travis/before_script.sh +++ b/dev/travis/before_script.sh @@ -13,8 +13,8 @@ case $TEST_SUITE in test_set_list=$(find testsuite/* -maxdepth 1 -mindepth 1 -type d | sort) test_set_count=$(printf "$test_set_list" | wc -l) - test_set_size[1]=$(printf "%.0f" $(echo "$test_set_count*0.12" | bc)) #12% - test_set_size[2]=$(printf "%.0f" $(echo "$test_set_count*0.32" | bc)) #32% + test_set_size[1]=$(printf "%.0f" $(echo "$test_set_count*0.17" | bc)) #17% + test_set_size[2]=$(printf "%.0f" $(echo "$test_set_count*0.27" | bc)) #27% test_set_size[3]=$((test_set_count-test_set_size[1]-test_set_size[2])) #56% echo "Total = ${test_set_count}; Batch #1 = ${test_set_size[1]}; Batch #2 = ${test_set_size[2]}; Batch #3 = ${test_set_size[3]};"; diff --git a/lib/internal/Magento/Framework/Acl/Test/Unit/Role/RegistryTest.php b/lib/internal/Magento/Framework/Acl/Test/Unit/Role/RegistryTest.php index 9f7269455555c..260d8a5ca70e5 100644 --- a/lib/internal/Magento/Framework/Acl/Test/Unit/Role/RegistryTest.php +++ b/lib/internal/Magento/Framework/Acl/Test/Unit/Role/RegistryTest.php @@ -20,6 +20,12 @@ protected function setUp() $this->model = new Registry(); } + /** + * @param $roleId + * @param $parentRoleId + * @return array + * @throws \Zend_Acl_Role_Registry_Exception + */ protected function initRoles($roleId, $parentRoleId) { $parentRole = $this->createMock(\Zend_Acl_Role_Interface::class); diff --git a/lib/internal/Magento/Framework/Api/Search/FilterGroup.php b/lib/internal/Magento/Framework/Api/Search/FilterGroup.php index f339214ca4dad..aef3df998a550 100644 --- a/lib/internal/Magento/Framework/Api/Search/FilterGroup.php +++ b/lib/internal/Magento/Framework/Api/Search/FilterGroup.php @@ -10,6 +10,8 @@ /** * Groups two or more filters together using a logical OR + * + * @api */ class FilterGroup extends AbstractSimpleObject { diff --git a/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php b/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php index 696a65fd710ca..cfde284524482 100644 --- a/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php +++ b/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php @@ -12,6 +12,8 @@ /** * Builder for FilterGroup Data. + * + * @api */ class FilterGroupBuilder extends AbstractSimpleObjectBuilder { diff --git a/lib/internal/Magento/Framework/Api/SortOrder.php b/lib/internal/Magento/Framework/Api/SortOrder.php index 7d0bfec3950b1..67897ea22570d 100644 --- a/lib/internal/Magento/Framework/Api/SortOrder.php +++ b/lib/internal/Magento/Framework/Api/SortOrder.php @@ -11,6 +11,8 @@ /** * Data object for sort order. + * + * @api */ class SortOrder extends AbstractSimpleObject { @@ -23,6 +25,7 @@ class SortOrder extends AbstractSimpleObject * Initialize object and validate sort direction * * @param array $data + * @throws InputException */ public function __construct(array $data = []) { @@ -30,6 +33,9 @@ public function __construct(array $data = []) if (null !== $this->getDirection()) { $this->validateDirection($this->getDirection()); } + if ($this->getField() !== null) { + $this->validateField($this->getField()); + } } /** @@ -46,10 +52,14 @@ public function getField() * Set sorting field. * * @param string $field + * @throws InputException + * * @return $this */ public function setField($field) { + $this->validateField($field); + return $this->setData(SortOrder::FIELD, $field); } @@ -67,6 +77,8 @@ public function getDirection() * Set sorting direction. * * @param string $direction + * @throws InputException + * * @return $this */ public function setDirection($direction) @@ -79,10 +91,10 @@ public function setDirection($direction) * Validate direction argument ASC or DESC * * @param mixed $direction - * @return null + * @return void * @throws InputException */ - private function validateDirection($direction) + private function validateDirection($direction): void { $this->validateDirectionIsString($direction); $this->validateDirectionIsAscOrDesc($direction); @@ -91,9 +103,9 @@ private function validateDirection($direction) /** * @param string $direction * @throws InputException - * @return null + * @return void */ - private function validateDirectionIsString($direction) + private function validateDirectionIsString($direction): void { if (!is_string($direction)) { throw new InputException(new Phrase( @@ -106,9 +118,9 @@ private function validateDirectionIsString($direction) /** * @param string $direction * @throws InputException - * @return null + * @return void */ - private function validateDirectionIsAscOrDesc($direction) + private function validateDirectionIsAscOrDesc($direction): void { $normalizedDirection = $this->normalizeDirectionInput($direction); if (!in_array($normalizedDirection, [SortOrder::SORT_ASC, SortOrder::SORT_DESC], true)) { @@ -127,4 +139,23 @@ private function normalizeDirectionInput($direction) { return strtoupper($direction); } + + /** + * Check if given value can be used as sorting field. + * + * @param string $field + * @return void + * @throws InputException + */ + private function validateField(string $field): void + { + if (preg_match('/[^a-z0-9\_]/i', $field)) { + throw new InputException( + new Phrase( + 'Sort order field %1 contains restricted symbols', + [$field] + ) + ); + } + } } diff --git a/lib/internal/Magento/Framework/Api/SortOrderBuilder.php b/lib/internal/Magento/Framework/Api/SortOrderBuilder.php index bb766aa6b951d..6960440d4d522 100644 --- a/lib/internal/Magento/Framework/Api/SortOrderBuilder.php +++ b/lib/internal/Magento/Framework/Api/SortOrderBuilder.php @@ -9,6 +9,8 @@ /** * Builder for sort order data object. * @method SortOrder create() + * + * @api */ class SortOrderBuilder extends AbstractSimpleObjectBuilder { diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/EntityChildTestAbstract.php b/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/EntityChildTestAbstract.php index 47f520d4ee28a..c1ab91e3ccaa6 100644 --- a/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/EntityChildTestAbstract.php +++ b/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/EntityChildTestAbstract.php @@ -31,12 +31,24 @@ abstract class EntityChildTestAbstract extends \PHPUnit\Framework\TestCase /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Code\Generator\DefinedClasses */ protected $definedClassesMock; + /** + * @return mixed + */ abstract protected function getSourceClassName(); + /** + * @return mixed + */ abstract protected function getResultClassName(); + /** + * @return mixed + */ abstract protected function getGeneratorClassName(); + /** + * @return mixed + */ abstract protected function getOutputFileName(); protected function setUp() diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/DataObjectHelperTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/DataObjectHelperTest.php index 4946f083004ba..f4855a6f69066 100644 --- a/lib/internal/Magento/Framework/Api/Test/Unit/DataObjectHelperTest.php +++ b/lib/internal/Magento/Framework/Api/Test/Unit/DataObjectHelperTest.php @@ -367,6 +367,9 @@ public function testMergeDataObjects($data1, $data2) $this->assertSame($firstAddressDataObject->getRegion(), $secondAddressDataObject->getRegion()); } + /** + * @return array + */ public function dataProviderForTestMergeDataObjects() { return [ diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/SortOrderTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/SortOrderTest.php index 05ecc0bdbcc61..31a07c97d782d 100644 --- a/lib/internal/Magento/Framework/Api/Test/Unit/SortOrderTest.php +++ b/lib/internal/Magento/Framework/Api/Test/Unit/SortOrderTest.php @@ -37,6 +37,9 @@ public function testItReturnsTheCorrectValuesIfSortOrderIsSet($sortOrder) $this->assertSame($sortOrder, $this->sortOrder->getDirection()); } + /** + * @return array + */ public function sortOrderDirectionProvider() { return [[SortOrder::SORT_ASC], [SortOrder::SORT_DESC]]; @@ -52,6 +55,9 @@ public function testItThrowsAnExceptionIfAnInvalidSortOrderIsSet($invalidDirecti $this->sortOrder->setDirection($invalidDirection); } + /** + * @return array + */ public function invalidSortDirectionProvider() { return [ @@ -86,4 +92,14 @@ public function testItValidatesADirectionAssignedDuringInstantiation() SortOrder::DIRECTION => 'not-asc-or-desc' ]); } + + /** + * @expectedException \Magento\Framework\Exception\InputException + */ + public function testValidateField() + { + $this->sortOrder = new SortOrder([ + SortOrder::FIELD => 'invalid field (value);' + ]); + } } diff --git a/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php b/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php index e8eca51aad976..f2bc4eceb507d 100644 --- a/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php +++ b/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php @@ -147,15 +147,17 @@ public function create(array $options) $result = $this->_objectManager->create( \Magento\Framework\Cache\Frontend\Adapter\Zend::class, [ - 'frontend' => \Zend_Cache::factory( - $frontend['type'], - $backend['type'], - $frontend, - $backend['options'], - true, - true, - true - ) + 'frontendFactory' => function () use ($frontend, $backend) { + return \Zend_Cache::factory( + $frontend['type'], + $backend['type'], + $frontend, + $backend['options'], + true, + true, + true + ); + } ] ); $result = $this->_applyDecorators($result); diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Action/Stub/ActionStub.php b/lib/internal/Magento/Framework/App/Test/Unit/Action/Stub/ActionStub.php index ee45842013f64..c157f818242ef 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Action/Stub/ActionStub.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Action/Stub/ActionStub.php @@ -8,6 +8,9 @@ class ActionStub extends \Magento\Framework\App\Action\Action { + /** + * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void + */ public function execute() { // Empty method stub for test diff --git a/lib/internal/Magento/Framework/App/Test/Unit/AreaTest.php b/lib/internal/Magento/Framework/App/Test/Unit/AreaTest.php index 678bb7a85272f..1813ff147190c 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/AreaTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/AreaTest.php @@ -276,6 +276,9 @@ public function testDetectDesignByRequest($value, $callNum, $callNum2) $this->object->detectDesign($requestMock); } + /** + * @return array + */ public function detectDesignByRequestDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php b/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php index 1e2947084ee6b..32e495ed00a82 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php @@ -135,7 +135,7 @@ public function testCreateFilesystemDriverPool() ); /** @var \Magento\Framework\Filesystem\DriverPool $result */ $this->assertInstanceOf(\Magento\Framework\Filesystem\DriverPool::class, $result); - $this->assertInstanceof($driverClass, $result->getDriver('custom')); + $this->assertInstanceOf($driverClass, $result->getDriver('custom')); } public function testGetParams() @@ -189,6 +189,9 @@ public function testIsDeveloperMode($modeFromEnvironment, $modeFromDeployment, $ $this->assertEquals($isDeveloper, $bootstrap->isDeveloperMode()); } + /** + * @return array + */ public function testIsDeveloperModeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/FactoryTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/FactoryTest.php index e87eca57c058d..48a8420cfda60 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/FactoryTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/FactoryTest.php @@ -128,7 +128,7 @@ protected function _buildModelForCreate($enforcedOptions = [], $decorators = []) $processFrontendFunc = function ($class, $params) { switch ($class) { case \Magento\Framework\Cache\Frontend\Adapter\Zend::class: - return new $class($params['frontend']); + return new $class($params['frontendFactory']); case \Magento\Framework\App\Test\Unit\Cache\Frontend\FactoryTest\CacheDecoratorDummy::class: $frontend = $params['frontend']; unset($params['frontend']); diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php index fdb962d7d295e..bfa37311884ba 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php @@ -105,6 +105,9 @@ public function testInitializationParams( $model->current(); } + /** + * @return array + */ public function initializationParamsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/ConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/ConfigTest.php index 74a92d54f1934..380c45e383128 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/ConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/ConfigTest.php @@ -157,6 +157,9 @@ public function testCleanModeMatchingAnyTag($fixtureResultOne, $fixtureResultTwo $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function cleanModeMatchingAnyTagDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/FrontendPoolTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/FrontendPoolTest.php index e8c0217b40b2c..bcae099815c98 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/FrontendPoolTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Type/FrontendPoolTest.php @@ -89,6 +89,9 @@ public function testGet($fixtureConfigData, $inputCacheType, $expectedFrontendId $this->assertSame($accessProxy, $this->_model->get($inputCacheType)); } + /** + * @return array + */ public function getDataProvider() { $configData1 = [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/CacheTest.php b/lib/internal/Magento/Framework/App/Test/Unit/CacheTest.php index 236a65611422d..bb5748e0759a0 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/CacheTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/CacheTest.php @@ -147,6 +147,9 @@ public function testSave($inputData, $inputId, $inputTags, $expectedData, $expec $this->_model->save($inputData, $inputId, $inputTags); } + /** + * @return array + */ public function saveDataProvider() { $configTag = \Magento\Framework\App\Config::CACHE_TAG; @@ -190,6 +193,9 @@ public function testRemove($result) $this->assertEquals($result, $this->_model->remove('test_id')); } + /** + * @return array + */ public function successFailureDataProvider() { return ['success' => [true], 'failure' => [false]]; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Config/ConfigPathResolverTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Config/ConfigPathResolverTest.php index 3cf552ae115a5..3adc4bada0665 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Config/ConfigPathResolverTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Config/ConfigPathResolverTest.php @@ -55,6 +55,9 @@ public function testResolve($path, $scope, $scopeCode, $type, $expected) $this->assertSame($expected, $this->model->resolve($path, $scope, $scopeCode, $type)); } + /** + * @return array + */ public function resolveDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Config/DataTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Config/DataTest.php index f106ba6e151fd..6f137ede742ff 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Config/DataTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Config/DataTest.php @@ -35,6 +35,9 @@ public function testSetValue($path, $value) $this->assertEquals($value, $this->_model->getValue($path)); } + /** + * @return array + */ public function setValueDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Config/InitialTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Config/InitialTest.php index 3d1cdf0023cc9..29ccd33d73d3b 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Config/InitialTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Config/InitialTest.php @@ -65,6 +65,9 @@ public function testGetData($scope, $expected) $this->assertEquals($expected, $this->config->getData($scope)); } + /** + * @return array + */ public function getDataDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Config/ValueTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Config/ValueTest.php index ef2b342936cd9..6159e5cac45e8 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Config/ValueTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Config/ValueTest.php @@ -184,6 +184,9 @@ public function testAfterSave($callNumber, $oldValue) $this->assertInstanceOf(get_class($this->model), $this->model->afterSave()); } + /** + * @return array + */ public function afterSaveDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php index f94c30b4fa3c8..da9826bfe8c95 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php @@ -73,6 +73,9 @@ public function testGetValue($scope, $scopeCode = null) $this->assertTrue($this->appConfig->getValue($path, $scope, $scopeCode ?: $this->scope)); } + /** + * @return array + */ public function getValueDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Console/MaintenanceModeEnablerTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Console/MaintenanceModeEnablerTest.php index 942a6ed3ec6fc..b0891fca62f45 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Console/MaintenanceModeEnablerTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Console/MaintenanceModeEnablerTest.php @@ -88,6 +88,9 @@ public function testFailedTaskWithRestoredModeOnFailure(bool $maintenanceModeEna } } + /** + * @return array + */ public function initialAppStateProvider() { return [ @@ -96,6 +99,10 @@ public function initialAppStateProvider() ]; } + /** + * @param bool $isOn + * @return MaintenanceMode + */ private function createMaintenanceMode(bool $isOn): MaintenanceMode { $maintenanceMode = $this->getMockBuilder(MaintenanceMode::class) @@ -113,6 +120,9 @@ private function createMaintenanceMode(bool $isOn): MaintenanceMode return $maintenanceMode; } + /** + * @return OutputInterface + */ private function createOutput(): OutputInterface { $output = $this->getMockBuilder(OutputInterface::class) diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Console/ResponseTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Console/ResponseTest.php index ec678d21a581b..18de140af8428 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Console/ResponseTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Console/ResponseTest.php @@ -34,6 +34,9 @@ public function testSetCode($code, $expectedCode) $this->assertEquals($expectedCode, $result); } + /** + * @return array + */ public static function setCodeProvider() { $largeCode = 256; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/CronTest.php b/lib/internal/Magento/Framework/App/Test/Unit/CronTest.php index e2c77864d8e82..ce1f1661ad827 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/CronTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/CronTest.php @@ -56,6 +56,9 @@ protected function setUp() ); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function prepareAreaListMock() { $areaMock = $this->createMock(\Magento\Framework\App\Area::class); diff --git a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php index fa41d717cc521..80ab2302dc91c 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfigTest.php @@ -127,6 +127,9 @@ public function testKeyCollision(array $data) $object->get(); } + /** + * @return array + */ public function keyCollisionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/DocRootLocatorTest.php b/lib/internal/Magento/Framework/App/Test/Unit/DocRootLocatorTest.php index 7fda8de6d3216..23afbbc73d2b9 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/DocRootLocatorTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/DocRootLocatorTest.php @@ -29,6 +29,9 @@ public function testIsPub($path, $isExist, $result) $this->assertSame($result, $model->isPub()); } + /** + * @return array + */ public function isPubDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ErrorHandlerTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ErrorHandlerTest.php index daf3a4bdfab0c..4b904cc2b55bd 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ErrorHandlerTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ErrorHandlerTest.php @@ -32,6 +32,9 @@ public function testHandler($errorNo, $errorStr, $errorFile, $expectedResult) $this->assertEquals($expectedResult, $this->object->handler($errorNo, $errorStr, $errorFile, 11)); } + /** + * @return array + */ public function handlerProvider() { return [ @@ -60,6 +63,9 @@ public function testHandlerException($errorNo, $errorPhrase) $this->object->handler($errorNo, $errorStr, $errorFile, $errorLine); } + /** + * @return array + */ public function handlerProviderException() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/IdentifierTest.php b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/IdentifierTest.php index 15f6bed1ac0d3..23906486634ec 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/IdentifierTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/IdentifierTest.php @@ -144,6 +144,9 @@ public function testVaryStringSource($cookieExists) $this->model->getValue(); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php index 20ea5d1a3e86f..db200f962f5b5 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/PageCache/KernelTest.php @@ -241,6 +241,9 @@ function ($value) { $this->kernel->process($this->responseMock); } + /** + * @return array + */ public function testProcessSaveCacheDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ProductMetadataTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ProductMetadataTest.php index 74e673c8bfc26..8e1acc89437e2 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ProductMetadataTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ProductMetadataTest.php @@ -45,6 +45,9 @@ public function testGetVersion($packageList, $expectedVersion) $this->assertEquals($expectedVersion, $productVersion); } + /** + * @return array + */ public function testGetVersionGitInstallationDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Request/HttpTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Request/HttpTest.php index 66eee671e17d3..62445d4244fb7 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Request/HttpTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Request/HttpTest.php @@ -259,6 +259,9 @@ public function testGetDistroBaseUrlPath($scriptName, $expected) $this->assertEquals($expected, Http::getDistroBaseUrlPath(['SCRIPT_NAME' => $scriptName])); } + /** + * @return array + */ public function getDistroBaseUrlPathDataProvider() { return [ @@ -273,6 +276,9 @@ public function getDistroBaseUrlPathDataProvider() ]; } + /** + * @return array + */ public function serverVariablesProvider() { $returnValue = []; @@ -378,6 +384,9 @@ public function testIsSafeMethodFalse($httpMethod) $this->assertEquals(false, $this->_model->isSafeMethod()); } + /** + * @return array + */ public function httpSafeMethodProvider() { return [ @@ -388,6 +397,9 @@ public function httpSafeMethodProvider() ]; } + /** + * @return array + */ public function httpNotSafeMethodProvider() { return [ @@ -400,6 +412,9 @@ public function httpNotSafeMethodProvider() ]; } + /** + * @return array + */ public function isSecureDataProvider() { /** @@ -442,6 +457,9 @@ public function testSetPathInfo($requestUri, $basePath, $expected) $this->assertEquals($expected, $this->_model->getPathInfo()); } + /** + * @return array + */ public function setPathInfoDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Router/ActionListTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Router/ActionListTest.php index 0bdbcccc40b35..e1a2171d2111a 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Router/ActionListTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Router/ActionListTest.php @@ -93,6 +93,9 @@ public function testGet($module, $area, $namespace, $action, $data, $expected) $this->assertEquals($expected, $this->actionList->get($module, $area, $namespace, $action)); } + /** + * @return array + */ public function getDataProvider() { $mockClassName = 'Mock_Action_Class'; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ScopeResolverPoolTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ScopeResolverPoolTest.php index 7a54cf17a87e4..0b7e0e00a2df8 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ScopeResolverPoolTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ScopeResolverPoolTest.php @@ -49,6 +49,9 @@ public function testGetException($scope) $scopeResolver->get($scope); } + /** + * @return array + */ public function testGetExceptionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/SetupInfoTest.php b/lib/internal/Magento/Framework/App/Test/Unit/SetupInfoTest.php index 3db75f7ec7fb2..ae8a76f7bbc1f 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/SetupInfoTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/SetupInfoTest.php @@ -29,6 +29,9 @@ public function testConstructorExceptions($server, $expectedError) new SetupInfo($server); } + /** + * @return array + */ public function constructorExceptionsDataProvider() { $docRootErr = 'DOCUMENT_ROOT variable is unavailable.'; diff --git a/lib/internal/Magento/Framework/App/Test/Unit/StateTest.php b/lib/internal/Magento/Framework/App/Test/Unit/StateTest.php index 46eec1e692424..a87322b6e90d9 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/StateTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/StateTest.php @@ -87,6 +87,10 @@ public function testEmulateAreaCode() $this->assertEquals($this->model->getAreaCode(), $areaCode); } + /** + * @return string + * @throws \Magento\Framework\Exception\LocalizedException + */ public function emulateAreaCodeCallback() { return $this->model->getAreaCode(); diff --git a/lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php b/lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php index c8917a099689b..43d261c1ed078 100644 --- a/lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php +++ b/lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php @@ -16,11 +16,27 @@ class Zend implements \Magento\Framework\Cache\FrontendInterface protected $_frontend; /** - * @param \Zend_Cache_Core $frontend + * Factory that creates the \Zend_Cache_Cores + * + * @var \Closure + */ + private $frontendFactory; + + /** + * The pid that owns the $_frontend object + * + * @var int */ - public function __construct(\Zend_Cache_Core $frontend) + private $pid; + + /** + * @param \Closure $frontendFactory + */ + public function __construct(\Closure $frontendFactory) { - $this->_frontend = $frontend; + $this->frontendFactory = $frontendFactory; + $this->_frontend = $frontendFactory(); + $this->pid = getmypid(); } /** @@ -28,7 +44,7 @@ public function __construct(\Zend_Cache_Core $frontend) */ public function test($identifier) { - return $this->_frontend->test($this->_unifyId($identifier)); + return $this->getFrontEnd()->test($this->_unifyId($identifier)); } /** @@ -36,7 +52,7 @@ public function test($identifier) */ public function load($identifier) { - return $this->_frontend->load($this->_unifyId($identifier)); + return $this->getFrontEnd()->load($this->_unifyId($identifier)); } /** @@ -44,7 +60,7 @@ public function load($identifier) */ public function save($data, $identifier, array $tags = [], $lifeTime = null) { - return $this->_frontend->save($data, $this->_unifyId($identifier), $this->_unifyIds($tags), $lifeTime); + return $this->getFrontEnd()->save($data, $this->_unifyId($identifier), $this->_unifyIds($tags), $lifeTime); } /** @@ -52,13 +68,14 @@ public function save($data, $identifier, array $tags = [], $lifeTime = null) */ public function remove($identifier) { - return $this->_frontend->remove($this->_unifyId($identifier)); + return $this->getFrontEnd()->remove($this->_unifyId($identifier)); } /** * {@inheritdoc} * * @throws \InvalidArgumentException Exception is thrown when non-supported cleaning mode is specified + * @throws \Zend_Cache_Exception */ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = []) { @@ -76,7 +93,7 @@ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = []) "Magento cache frontend does not support the cleaning mode '{$mode}'." ); } - return $this->_frontend->clean($mode, $this->_unifyIds($tags)); + return $this->getFrontEnd()->clean($mode, $this->_unifyIds($tags)); } /** @@ -84,7 +101,7 @@ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = []) */ public function getBackend() { - return $this->_frontend->getBackend(); + return $this->getFrontEnd()->getBackend(); } /** @@ -92,7 +109,7 @@ public function getBackend() */ public function getLowLevelFrontend() { - return $this->_frontend; + return $this->getFrontEnd(); } /** @@ -119,4 +136,20 @@ protected function _unifyIds(array $ids) } return $ids; } + + /** + * Get frontEnd cache adapter for current pid + * + * @return \Zend_Cache_Core + */ + private function getFrontEnd() + { + if (getmypid() === $this->pid) { + return $this->_frontend; + } + $frontendFactory = $this->frontendFactory; + $this->_frontend = $frontendFactory(); + $this->pid = getmypid(); + return $this->_frontend; + } } diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/CompressionTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/CompressionTest.php index 172d0e486dc64..7e8347a9d2103 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/CompressionTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/CompressionTest.php @@ -129,12 +129,21 @@ public function testSaveLoad() $this->assertEquals($this->_testString, $loadedValue); } + /** + * @param $data + * @param $cacheId + * @return bool + */ public static function mockSave($data, $cacheId) { self::$_cacheStorage[$cacheId] = $data; return true; } + /** + * @param $cacheId + * @return bool|mixed + */ public static function mockLoad($cacheId) { return array_key_exists($cacheId, self::$_cacheStorage) ? self::$_cacheStorage[$cacheId] : false; diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/DecoratorAbstractTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/DecoratorAbstractTest.php index 7a3aec7b66488..ba75b7eed52ca 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/DecoratorAbstractTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/Decorator/DecoratorAbstractTest.php @@ -63,6 +63,9 @@ public function testConstructorException($options) $this->getMockForAbstractClass(\Magento\Framework\Cache\Backend\Decorator\AbstractDecorator::class, [$options]); } + /** + * @return array + */ public function constructorExceptionDataProvider() { return [ @@ -86,6 +89,9 @@ public function testAllMethods($methodName) call_user_func([$decorator, $methodName], null, null); } + /** + * @return array + */ public function allMethodsDataProvider() { $return = []; diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/MongoDbTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/MongoDbTest.php index daa3081a07c35..435fc6535c1a2 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/MongoDbTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/MongoDbTest.php @@ -45,6 +45,9 @@ public function testGetIds(array $ids, array $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function getIdsDataProvider() { return [ @@ -64,6 +67,9 @@ public function testGetTags(array $tags) $this->assertEquals($tags, $actual); } + /** + * @return array + */ public function getTagsDataProvider() { return ['no tags' => [[]], 'multiple tags' => [['tag1', 'tag2']]]; @@ -92,6 +98,9 @@ public function testGetIdsMatchingTags($method, $tags, $expectedInput) $this->assertEquals($expectedIds, $actualIds); } + /** + * @return array + */ public function getIdsMatchingTagsDataProvider() { return [ @@ -170,6 +179,9 @@ public function testGetMetadatas($cacheId, $expectedInput, $mongoOutput, $expect $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function getMetadatasDataProvider() { $time = time(); @@ -237,6 +249,9 @@ public function testLoad($doNotTestValidity) $this->assertSame($expected, $actual); } + /** + * @return array + */ public function loadDataProvider() { return ['test validity' => [false], 'do not test validity' => [true]]; @@ -322,6 +337,9 @@ public function testClean($mode, $tags, $expectedQuery) $this->_model->clean($mode, $tags); } + /** + * @return array + */ public function cleanDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/CoreTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/CoreTest.php index 616c55f600e9e..4b634ae18c7af 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/CoreTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/CoreTest.php @@ -61,6 +61,9 @@ public function testSetBackendException($decorators) $core->setBackend($this->_mockBackend); } + /** + * @return array + */ public function setBackendExceptionProvider() { return [ diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php index 129fade7b4a9c..fb646c7f87622 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php @@ -17,7 +17,10 @@ class ZendTest extends \PHPUnit\Framework\TestCase public function testProxyMethod($method, $params, $expectedParams, $expectedResult) { $frontendMock = $this->createMock(\Zend_Cache_Core::class); - $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendMock); + $frontendFactory = function () use ($frontendMock) { + return $frontendMock; + }; + $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendFactory); $helper = new \Magento\Framework\TestFramework\Unit\Helper\ProxyTesting(); $result = $helper->invokeWithExpectations( $object, @@ -82,10 +85,17 @@ public function testCleanException($cleaningMode, $expectedErrorMessage) { $this->expectException('InvalidArgumentException'); $this->expectExceptionMessage($expectedErrorMessage); - $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($this->createMock(\Zend_Cache_Core::class)); + $frontendMock = $this->createMock(\Zend_Cache_Core::class); + $frontendFactory = function () use ($frontendMock) { + return $frontendMock; + }; + $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendFactory); $object->clean($cleaningMode); } + /** + * @return array + */ public function cleanExceptionDataProvider() { return [ @@ -107,7 +117,10 @@ public function cleanExceptionDataProvider() public function testGetLowLevelFrontend() { $frontendMock = $this->createMock(\Zend_Cache_Core::class); - $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendMock); + $frontendFactory = function () use ($frontendMock) { + return $frontendMock; + }; + $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendFactory); $this->assertSame($frontendMock, $object->getLowLevelFrontend()); } } diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/ProfilerTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/ProfilerTest.php index bef4617add1b9..34e50900bc64e 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/ProfilerTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/ProfilerTest.php @@ -63,7 +63,10 @@ public function proxyMethodDataProvider() { $backend = new \Zend_Cache_Backend_BlackHole(); $adaptee = $this->createMock(\Zend_Cache_Core::class); - $lowLevelFrontend = new \Magento\Framework\Cache\Frontend\Adapter\Zend($adaptee); + $frontendFactory = function () use ($adaptee) { + return $adaptee; + }; + $lowLevelFrontend = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendFactory); return [ [ diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/TagScopeTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/TagScopeTest.php index 12774f182d6cd..33105ab52150c 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/TagScopeTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/TagScopeTest.php @@ -128,6 +128,9 @@ public function testCleanModeMatchingAnyTag($fixtureResultOne, $fixtureResultTwo $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function cleanModeMatchingAnyTagDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Generator.php b/lib/internal/Magento/Framework/Code/Generator.php index a845712b46598..4dec7d1a28146 100644 --- a/lib/internal/Magento/Framework/Code/Generator.php +++ b/lib/internal/Magento/Framework/Code/Generator.php @@ -7,6 +7,11 @@ use Magento\Framework\Code\Generator\DefinedClasses; use Magento\Framework\Code\Generator\EntityAbstract; +use Magento\Framework\Code\Generator\Io; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Phrase; +use Magento\Framework\Filesystem\Driver\File; +use Psr\Log\LoggerInterface; class Generator { @@ -17,7 +22,7 @@ class Generator const GENERATION_SKIP = 'skip'; /** - * @var \Magento\Framework\Code\Generator\Io + * @var Io */ protected $_ioObject; @@ -32,26 +37,33 @@ class Generator protected $definedClasses; /** - * @var \Magento\Framework\ObjectManagerInterface + * @var ObjectManagerInterface */ protected $objectManager; /** - * @param Generator\Io $ioObject - * @param array $generatedEntities + * Logger instance + * + * @var LoggerInterface + */ + private $logger; + + /** + * @param Generator\Io $ioObject + * @param array $generatedEntities * @param DefinedClasses $definedClasses + * @param LoggerInterface|null $logger */ public function __construct( - \Magento\Framework\Code\Generator\Io $ioObject = null, + Io $ioObject = null, array $generatedEntities = [], - DefinedClasses $definedClasses = null + DefinedClasses $definedClasses = null, + LoggerInterface $logger = null ) { - $this->_ioObject = $ioObject - ?: new \Magento\Framework\Code\Generator\Io( - new \Magento\Framework\Filesystem\Driver\File() - ); + $this->_ioObject = $ioObject ?: new Io(new File()); $this->definedClasses = $definedClasses ?: new DefinedClasses(); $this->_generatedEntities = $generatedEntities; + $this->logger = $logger; } /** @@ -111,8 +123,16 @@ public function generateClass($className) if ($generator !== null) { $this->tryToLoadSourceClass($className, $generator); if (!($file = $generator->generate())) { + /** @var $logger LoggerInterface */ $errors = $generator->getErrors(); - throw new \RuntimeException(implode(' ', $errors) . ' in [' . $className . ']'); + $errors[] = 'Class ' . $className . ' generation error: The requested class did not generate properly, ' + . 'because the \'generated\' directory permission is read-only. ' + . 'If --- after running the \'bin/magento setup:di:compile\' CLI command when the \'generated\' ' + . 'directory permission is set to write --- the requested class did not generate properly, then ' + . 'you must add the generated class object to the signature of the related construct method, only.'; + $message = implode(PHP_EOL, $errors); + $this->getLogger()->critical($message); + throw new \RuntimeException($message); } if (!$this->definedClasses->isClassLoadableFromMemory($className)) { $this->_ioObject->includeFile($file); @@ -121,13 +141,26 @@ public function generateClass($className) } } + /** + * Retrieve logger + * + * @return LoggerInterface + */ + private function getLogger() + { + if (!$this->logger) { + $this->logger = $this->getObjectManager()->get(LoggerInterface::class); + } + return $this->logger; + } + /** * Create entity generator * * @param string $generatorClass * @param string $entityName * @param string $className - * @return \Magento\Framework\Code\Generator\EntityAbstract + * @return EntityAbstract */ protected function createGeneratorInstance($generatorClass, $entityName, $className) { @@ -140,10 +173,10 @@ protected function createGeneratorInstance($generatorClass, $entityName, $classN /** * Set object manager instance. * - * @param \Magento\Framework\ObjectManagerInterface $objectManager + * @param ObjectManagerInterface $objectManager * @return $this */ - public function setObjectManager(\Magento\Framework\ObjectManagerInterface $objectManager) + public function setObjectManager(ObjectManagerInterface $objectManager) { $this->objectManager = $objectManager; return $this; @@ -152,11 +185,11 @@ public function setObjectManager(\Magento\Framework\ObjectManagerInterface $obje /** * Get object manager instance. * - * @return \Magento\Framework\ObjectManagerInterface + * @return ObjectManagerInterface */ public function getObjectManager() { - if (!($this->objectManager instanceof \Magento\Framework\ObjectManagerInterface)) { + if (!($this->objectManager instanceof ObjectManagerInterface)) { throw new \LogicException( "Object manager was expected to be set using setObjectManger() " . "before getObjectManager() invocation." @@ -169,7 +202,7 @@ public function getObjectManager() * Try to load/generate source class to check if it is valid or not. * * @param string $className - * @param \Magento\Framework\Code\Generator\EntityAbstract $generator + * @param EntityAbstract $generator * @return void * @throws \RuntimeException */ @@ -178,7 +211,7 @@ protected function tryToLoadSourceClass($className, $generator) $sourceClassName = $generator->getSourceClassName(); if (!$this->definedClasses->isClassLoadable($sourceClassName)) { if ($this->generateClass($sourceClassName) !== self::GENERATION_SUCCESS) { - $phrase = new \Magento\Framework\Phrase( + $phrase = new Phrase( 'Source class "%1" for "%2" generation does not exist.', [$sourceClassName, $className] ); diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/DefinedClassesTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/DefinedClassesTest.php index 658b42e4b972d..abd413832f206 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/DefinedClassesTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/DefinedClassesTest.php @@ -8,6 +8,10 @@ namespace Magento\Framework\Code\Generator { use Magento\Framework\Code\Test\Unit\Generator\DefinedClassesTest; + /** + * @param $className + * @return bool + */ function class_exists($className) { return DefinedClassesTest::$definedClassesTestActive diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php index 0f3daa46e1ec3..6462b3806647a 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php @@ -114,6 +114,9 @@ public function testGeneratePredefinedContentNotSet() $this->assertEquals($expectedContent, $generatedContent, "Generated content is invalid."); } + /** + * @return array + */ public function generateDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php index 9c63de1258d15..bc2ba24a2f9fe 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Generator/IoTest.php @@ -111,6 +111,9 @@ public function testWriteResultFileAlreadyExists($resultFileName, $fileExists, $ $this->assertSame($success, $this->_object->writeResultFile($resultFileName, self::FILE_CONTENT)); } + /** + * @return array + */ public function testWriteResultFileAlreadyExistsDataProvider() { return [ @@ -202,6 +205,9 @@ public function testFileExists($fileName, $exists) $this->assertSame($exists, $this->_object->fileExists($fileName)); } + /** + * @return array + */ public function fileExistsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php index dfb547ae3d53f..9cc93f7620b1f 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php @@ -3,14 +3,22 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - namespace Magento\Framework\Code\Test\Unit; use Magento\Framework\Code\Generator; use Magento\Framework\Code\Generator\DefinedClasses; use Magento\Framework\Code\Generator\Io; - -class GeneratorTest extends \PHPUnit\Framework\TestCase +use Psr\Log\LoggerInterface; +use Magento\Framework\ObjectManager\Code\Generator\Factory; +use Magento\Framework\ObjectManager\Code\Generator\Proxy; +use Magento\Framework\Interception\Code\Generator\Interceptor; +use PHPUnit_Framework_MockObject_MockObject as Mock; +use PHPUnit\Framework\TestCase; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Code\Generator\EntityAbstract; +use Magento\GeneratedClass\Factory as GeneratedClassFactory; + +class GeneratorTest extends TestCase { /** * Class name parameter value @@ -22,45 +30,57 @@ class GeneratorTest extends \PHPUnit\Framework\TestCase * * @var array */ - protected $expectedEntities = [ - 'factory' => \Magento\Framework\ObjectManager\Code\Generator\Factory::ENTITY_TYPE, - 'proxy' => \Magento\Framework\ObjectManager\Code\Generator\Proxy::ENTITY_TYPE, - 'interceptor' => \Magento\Framework\Interception\Code\Generator\Interceptor::ENTITY_TYPE, + private $expectedEntities = [ + 'factory' => Factory::ENTITY_TYPE, + 'proxy' => Proxy::ENTITY_TYPE, + 'interceptor' => Interceptor::ENTITY_TYPE, ]; /** * System under test * - * @var \Magento\Framework\Code\Generator + * @var Generator */ - protected $model; + private $model; - /** @var \PHPUnit_Framework_MockObject_MockObject|Io */ - protected $ioObjectMock; + /** + * @var Io|Mock + */ + private $ioObjectMock; - /** @var \Magento\Framework\Code\Generator\DefinedClasses | \PHPUnit_Framework_MockObject_MockObject */ - protected $definedClassesMock; + /** + * @var DefinedClasses|Mock + */ + private $definedClassesMock; + + /** + * @var LoggerInterface|Mock + */ + private $loggerMock; protected function setUp() { - $this->definedClassesMock = $this->createMock(\Magento\Framework\Code\Generator\DefinedClasses::class); - $this->ioObjectMock = $this->getMockBuilder(\Magento\Framework\Code\Generator\Io::class) + $this->definedClassesMock = $this->createMock(DefinedClasses::class); + $this->ioObjectMock = $this->getMockBuilder(Io::class) ->disableOriginalConstructor() ->getMock(); - $this->model = $this->buildModel( + $this->loggerMock = $this->getMockForAbstractClass(LoggerInterface::class); + + $this->model = new Generator( $this->ioObjectMock, [ - 'factory' => \Magento\Framework\ObjectManager\Code\Generator\Factory::class, - 'proxy' => \Magento\Framework\ObjectManager\Code\Generator\Proxy::class, - 'interceptor' => \Magento\Framework\Interception\Code\Generator\Interceptor::class + 'factory' => Factory::class, + 'proxy' => Proxy::class, + 'interceptor' => Interceptor::class, ], - $this->definedClassesMock + $this->definedClassesMock, + $this->loggerMock ); } public function testGetGeneratedEntities() { - $this->model = $this->buildModel( + $this->model = new Generator( $this->ioObjectMock, ['factory', 'proxy', 'interceptor'], $this->definedClassesMock @@ -69,14 +89,16 @@ public function testGetGeneratedEntities() } /** + * @param string $className + * @param string $entityType * @expectedException \RuntimeException * @dataProvider generateValidClassDataProvider */ public function testGenerateClass($className, $entityType) { - $objectManagerMock = $this->createMock(\Magento\Framework\ObjectManagerInterface::class); + $objectManagerMock = $this->createMock(ObjectManagerInterface::class); $fullClassName = $className . $entityType; - $entityGeneratorMock = $this->getMockBuilder(\Magento\Framework\Code\Generator\EntityAbstract::class) + $entityGeneratorMock = $this->getMockBuilder(EntityAbstract::class) ->disableOriginalConstructor() ->getMock(); $objectManagerMock->expects($this->once())->method('create')->willReturn($entityGeneratorMock); @@ -87,7 +109,7 @@ public function testGenerateClass($className, $entityType) public function testGenerateClassWithWrongName() { $this->assertEquals( - \Magento\Framework\Code\Generator::GENERATION_ERROR, + Generator::GENERATION_ERROR, $this->model->generateClass(self::SOURCE_CLASS) ); } @@ -95,12 +117,12 @@ public function testGenerateClassWithWrongName() /** * @expectedException \RuntimeException */ - public function testGenerateClassWithError() + public function testGenerateClassWhenClassIsNotGenerationSuccess() { $expectedEntities = array_values($this->expectedEntities); $resultClassName = self::SOURCE_CLASS . ucfirst(array_shift($expectedEntities)); - $objectManagerMock = $this->createMock(\Magento\Framework\ObjectManagerInterface::class); - $entityGeneratorMock = $this->getMockBuilder(\Magento\Framework\Code\Generator\EntityAbstract::class) + $objectManagerMock = $this->createMock(ObjectManagerInterface::class); + $entityGeneratorMock = $this->getMockBuilder(EntityAbstract::class) ->disableOriginalConstructor() ->getMock(); $objectManagerMock->expects($this->once())->method('create')->willReturn($entityGeneratorMock); @@ -108,6 +130,57 @@ public function testGenerateClassWithError() $this->model->generateClass($resultClassName); } + /** + * @inheritdoc + */ + public function testGenerateClassWithErrors() + { + $expectedEntities = array_values($this->expectedEntities); + $resultClassName = self::SOURCE_CLASS . ucfirst(array_shift($expectedEntities)); + $errorMessages = [ + 'Error message 0', + 'Error message 1', + 'Error message 2', + ]; + $mainErrorMessage = 'Class ' . $resultClassName . ' generation error: The requested class did not generate ' + . 'properly, because the \'generated\' directory permission is read-only. ' + . 'If --- after running the \'bin/magento setup:di:compile\' CLI command when the \'generated\' ' + . 'directory permission is set to write --- the requested class did not generate properly, then ' + . 'you must add the generated class object to the signature of the related construct method, only.'; + $FinalErrorMessage = implode(PHP_EOL, $errorMessages) . "\n" . $mainErrorMessage; + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage($FinalErrorMessage); + + /** @var ObjectManagerInterface|Mock $objectManagerMock */ + $objectManagerMock = $this->createMock(ObjectManagerInterface::class); + /** @var EntityAbstract|Mock $entityGeneratorMock */ + $entityGeneratorMock = $this->getMockBuilder(EntityAbstract::class) + ->disableOriginalConstructor() + ->getMock(); + + $objectManagerMock->expects($this->once()) + ->method('create') + ->willReturn($entityGeneratorMock); + $entityGeneratorMock->expects($this->once()) + ->method('getSourceClassName') + ->willReturn(self::SOURCE_CLASS); + $this->definedClassesMock->expects($this->once()) + ->method('isClassLoadable') + ->with(self::SOURCE_CLASS) + ->willReturn(true); + $entityGeneratorMock->expects($this->once()) + ->method('generate') + ->willReturn(false); + $entityGeneratorMock->expects($this->once()) + ->method('getErrors') + ->willReturn($errorMessages); + $this->loggerMock->expects($this->once()) + ->method('critical') + ->with($FinalErrorMessage); + $this->model->setObjectManager($objectManagerMock); + $this->model->generateClass($resultClassName); + } + /** * @dataProvider trueFalseDataProvider */ @@ -124,11 +197,14 @@ public function testGenerateClassWithExistName($fileExists) $this->ioObjectMock->expects($this->exactly($includeFileInvokeCount))->method('includeFile'); $this->assertEquals( - \Magento\Framework\Code\Generator::GENERATION_SKIP, - $this->model->generateClass(\Magento\GeneratedClass\Factory::class) + Generator::GENERATION_SKIP, + $this->model->generateClass(GeneratedClassFactory::class) ); } + /** + * @return array + */ public function trueFalseDataProvider() { return [[true], [false]]; @@ -151,17 +227,4 @@ public function generateValidClassDataProvider() } return $data; } - - /** - * Build SUT object - * - * @param Io $ioObject - * @param array $generatedEntities - * @param DefinedClasses $definedClasses - * @return Generator - */ - private function buildModel(Io $ioObject, array $generatedEntities, DefinedClasses $definedClasses) - { - return new Generator($ioObject, $generatedEntities, $definedClasses); - } } diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/NameBuilderTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/NameBuilderTest.php index 588cdfa1d4f7f..b8d49f64569f9 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/NameBuilderTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/NameBuilderTest.php @@ -29,6 +29,9 @@ public function testBuildClassName($parts, $expected) $this->assertEquals($expected, $this->nameBuilder->buildClassName($parts)); } + /** + * @return array + */ public function buildClassNameDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Reader/ArgumentsReaderTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Reader/ArgumentsReaderTest.php index 64bcb8970612e..e465e01916690 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Reader/ArgumentsReaderTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Reader/ArgumentsReaderTest.php @@ -263,6 +263,9 @@ public function testIsCompatibleType($requiredType, $actualType, $expectedResult $this->assertEquals($expectedResult, $actualResult); } + /** + * @return array + */ public function testIsCompatibleTypeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/TypeDuplicationTest.php b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/TypeDuplicationTest.php index a82c88e3e18b1..b17b10106f8a9 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/TypeDuplicationTest.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/TypeDuplicationTest.php @@ -34,6 +34,9 @@ public function testValidClasses($className) $this->assertTrue($this->_validator->validate($className)); } + /** + * @return array + */ public function validClassesDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForArgumentSequence.php b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForArgumentSequence.php index 90f422fb16777..1daa394bc7b2b 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForArgumentSequence.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForArgumentSequence.php @@ -40,6 +40,15 @@ class ParentClass protected $parentOptionalScalar; + /** + * ParentClass constructor. + * @param ContextObject $contextObject + * @param ParentRequiredObject $parentRequiredObject + * @param array $parentRequiredScalar + * @param ParentOptionalObject|null $parentOptionalObject + * @param array $data + * @param array $parentOptionalScalar + */ public function __construct( ContextObject $contextObject, ParentRequiredObject $parentRequiredObject, diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php index d61042c70e406..3078e7f4fc6d5 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php @@ -57,6 +57,14 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface */ protected $_implOfBInterface; + /** + * Context constructor. + * @param ClassA $exA + * @param ClassB $exB + * @param ClassC $exC + * @param FirstInterface $interfaceA + * @param ImplementationOfSecondInterface $implOfBInterface + */ public function __construct( \ClassA $exA, \ClassB $exB, diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php index 8a9d9866126bf..9e38bf2be7d49 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php @@ -14,6 +14,10 @@ class Test extends \Magento\SomeModule\Model\Three\Test */ protected $_proxy; + /** + * Test constructor. + * @param \Magento\SomeModule\Model\Proxy $proxy + */ public function __construct(\Magento\SomeModule\Model\Proxy $proxy) { parent::__construct($proxy); diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php index 4701e76f08c59..7368ff1e7e767 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php @@ -15,6 +15,11 @@ class Test extends \Magento\SomeModule\Model\One\Test */ protected $_factory; + /** + * Test constructor. + * @param \Magento\SomeModule\Model\Proxy $proxy + * @param \Magento\SomeModule\Model\ElementFactory $factory + */ public function __construct( \Magento\SomeModule\Model\Proxy $proxy, \Magento\SomeModule\Model\ElementFactory $factory diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/One/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/One/Test.php index 90f5d40ab726d..9bb858cc16751 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/One/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/One/Test.php @@ -13,6 +13,10 @@ class Test */ protected $_proxy; + /** + * Test constructor. + * @param \Magento\SomeModule\Model\Proxy $proxy + */ public function __construct(\Magento\SomeModule\Model\Proxy $proxy) { $this->_proxy = $proxy; diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php index 0c736710f5c4e..6fe98d08547b6 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php @@ -15,6 +15,11 @@ class Test extends \Magento\SomeModule\Model\One\Test */ protected $_factory; + /** + * Test constructor. + * @param \Magento\SomeModule\Model\Proxy $proxy + * @param \Magento\SomeModule\Model\ElementFactory $factory + */ public function __construct( \Magento\SomeModule\Model\Proxy $proxy, \Magento\SomeModule\Model\ElementFactory $factory diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Three/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Three/Test.php index d080034ef978e..90086f1b1d50e 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Three/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Three/Test.php @@ -20,6 +20,11 @@ class Test extends \Magento\SomeModule\Model\Two\Test */ protected $_proxy; + /** + * Test constructor. + * @param \Magento\SomeModule\Model\Proxy $proxy + * @param \Magento\SomeModule\Model\ElementFactory $factory + */ public function __construct( \Magento\SomeModule\Model\Proxy $proxy, \Magento\SomeModule\Model\ElementFactory $factory diff --git a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Two/Test.php b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Two/Test.php index dee0b216b7641..f4ba4ab8e6a3e 100644 --- a/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Two/Test.php +++ b/lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Two/Test.php @@ -14,6 +14,11 @@ class Test extends \Magento\SomeModule\Model\One\Test */ protected $_proxy; + /** + * Test constructor. + * @param \Magento\SomeModule\Model\Proxy $proxy + * @param array $data + */ public function __construct(\Magento\SomeModule\Model\Proxy $proxy, $data = []) { $this->_proxy = $proxy; diff --git a/lib/internal/Magento/Framework/Composer/Test/Unit/ComposerInformationTest.php b/lib/internal/Magento/Framework/Composer/Test/Unit/ComposerInformationTest.php index 4ca43591c96ff..27a222e6bceb9 100644 --- a/lib/internal/Magento/Framework/Composer/Test/Unit/ComposerInformationTest.php +++ b/lib/internal/Magento/Framework/Composer/Test/Unit/ComposerInformationTest.php @@ -28,12 +28,12 @@ class ComposerInformationTest extends \PHPUnit\Framework\TestCase private $lockerMock; /** - * @var \Composer\Repository\RepositoryInterface|\PHPUnit\Framework_MockObject_Builder_InvocationMocker: + * @var \Composer\Repository\RepositoryInterface|\PHPUnit\Framework\MockObject\Builder\InvocationMocker */ private $lockerRepositoryMock; /** - * @var \Composer\Package\CompletePackageInterface|\PHPUnit\Framework_MockObject_Builder_InvocationMocker: + * @var \Composer\Package\CompletePackageInterface|\PHPUnit\Framework\MockObject\Builder\InvocationMocker */ private $packageMock; @@ -92,6 +92,9 @@ public function testIsMagentoRoot($packageName, $expected) $this->assertEquals($expected, $this->composerInformation->isMagentoRoot()); } + /** + * @return array + */ public function isMagentoRootDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php b/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php index 801d99373bc50..15ceb0c6c2755 100644 --- a/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php +++ b/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php @@ -69,7 +69,7 @@ function ($input, $buffer) { $buffer->writeln($output); } ); - $composerApp->Expects($this->at(6))->method('run')->willReturnCallback( + $composerApp->expects($this->at(6))->method('run')->willReturnCallback( function ($input, $buffer) { $output = 'magento/package-d requires magento/package-c (1.0)' . PHP_EOL . 'magento/project-community-edition requires magento/package-a (1.0)' . PHP_EOL; diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Converter/DomTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Converter/DomTest.php index 09366c91a73a3..2ef915dc836df 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Converter/DomTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Converter/DomTest.php @@ -24,6 +24,9 @@ public function testConvert($sourceFile, $resultFile) $this->assertEquals($resultFile, $converterDom->convert($dom)); } + /** + * @return array + */ public function convertDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Data/ConfigDataTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Data/ConfigDataTest.php index 619135f9c7038..747560b29dfc1 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Data/ConfigDataTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Data/ConfigDataTest.php @@ -47,6 +47,9 @@ public function testSetWrongKey($key, $expectedException) $configData->set($key, 'value'); } + /** + * @return array + */ public function setWrongKeyDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Data/ScopedTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Data/ScopedTest.php index 380d095d85e64..f8c518d35add7 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Data/ScopedTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Data/ScopedTest.php @@ -81,6 +81,9 @@ public function testGetConfigByPath($path, $expectedValue, $default) $this->assertEquals($expectedValue, $this->_model->get($path, $default)); } + /** + * @return array + */ public function getConfigByPathDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/Dom/NodePathMatcherTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/Dom/NodePathMatcherTest.php index 94197fe737918..a2fbdce771f94 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/Dom/NodePathMatcherTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/Dom/NodePathMatcherTest.php @@ -32,6 +32,9 @@ public function testMatch($pathPattern, $xpathSubject, $expectedResult) $this->assertSame($expectedResult, $actualResult); } + /** + * @return array + */ public function getNodeInfoDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Config/Test/Unit/GenericSchemaLocatorTest.php b/lib/internal/Magento/Framework/Config/Test/Unit/GenericSchemaLocatorTest.php index 77a7f869fb941..dfb0992307ac8 100644 --- a/lib/internal/Magento/Framework/Config/Test/Unit/GenericSchemaLocatorTest.php +++ b/lib/internal/Magento/Framework/Config/Test/Unit/GenericSchemaLocatorTest.php @@ -30,6 +30,13 @@ class GenericSchemaLocatorTest extends \PHPUnit\Framework\TestCase */ private $moduleReaderMock; + /** + * @param ModuleDirReader $reader + * @param $moduleName + * @param $mergeSchema + * @param $perFileSchema + * @return GenericSchemaLocator + */ private function createNewSchemaLocatorInstance(ModuleDirReader $reader, $moduleName, $mergeSchema, $perFileSchema) { return new GenericSchemaLocator($reader, $moduleName, $mergeSchema, $perFileSchema); diff --git a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php index 65e7ee489e84c..881166b3e2218 100644 --- a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php +++ b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php @@ -75,6 +75,9 @@ public function testSetPath() ); } + /** + * @return array + */ public function httpRedirectResponseStatusCodes() { return [ diff --git a/lib/internal/Magento/Framework/Convert/Test/Unit/XmlTest.php b/lib/internal/Magento/Framework/Convert/Test/Unit/XmlTest.php index 5af254fcdd4dc..4102ece70a1ce 100644 --- a/lib/internal/Magento/Framework/Convert/Test/Unit/XmlTest.php +++ b/lib/internal/Magento/Framework/Convert/Test/Unit/XmlTest.php @@ -31,6 +31,9 @@ public function testXmlToAssoc() ); } + /** + * @return string + */ protected function getXml() { return <<<XML diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Adapter/Pdo/MysqlTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Adapter/Pdo/MysqlTest.php index 10a8fdb3a8361..0ca9f6846f77d 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/Adapter/Pdo/MysqlTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/Adapter/Pdo/MysqlTest.php @@ -533,6 +533,9 @@ public function testGetIndexName($name, $fields, $indexType, $expectedName) ); } + /** + * @return array + */ public function getIndexNameDataProvider() { // 65 characters long - will be compressed diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/SequenceTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/SequenceTest.php index 6410d4258491d..5309a3fd2a426 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/SequenceTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/SequenceTest.php @@ -38,6 +38,9 @@ public function testDropSequence() ); } + /** + * @return array + */ public function createSequenceDdlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/ExpressionConverterTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/ExpressionConverterTest.php index 0915abd98d495..19d6ddfb8e527 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/ExpressionConverterTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/ExpressionConverterTest.php @@ -22,6 +22,9 @@ public function testShortenEntityName($in, $prefix, $expectedOut) ); } + /** + * @return array + */ public function shortenEntityNameDataProvider() { $length64 = '________________________________________________________________'; diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Helper/Mysql/FulltextTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Helper/Mysql/FulltextTest.php index 713f6471ded3c..05ec032e76113 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/Helper/Mysql/FulltextTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/Helper/Mysql/FulltextTest.php @@ -64,6 +64,9 @@ public function testMatch($isCondition) $this->assertEquals($select, $result); } + /** + * @return array + */ public function matchProvider() { return [[true], [false]]; diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php index fd8bacaf6a940..722f274d14215 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/Select/ColumnsRendererTest.php @@ -82,6 +82,9 @@ public function testRender($columns, $sql, $expectedResult) $this->assertEquals($expectedResult, $this->model->render($this->selectMock, $sql)); } + /** + * @return array + */ public function renderDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php index 0dbc9c879462e..225ff1fd140a9 100644 --- a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php +++ b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php @@ -5,6 +5,8 @@ */ namespace Magento\Framework\Data\Form\FormKey; +use Magento\Framework\Encryption\Helper\Security; + /** * @api */ @@ -32,9 +34,7 @@ public function __construct(\Magento\Framework\Data\Form\FormKey $formKey) public function validate(\Magento\Framework\App\RequestInterface $request) { $formKey = $request->getParam('form_key', null); - if (!$formKey || $formKey !== $this->_formKey->getFormKey()) { - return false; - } - return true; + + return $formKey && Security::compareStrings($formKey, $this->_formKey->getFormKey()); } } diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php index 20a0b384bad7e..9387ffbfed7a6 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/ArrayTypeTest.php @@ -38,6 +38,9 @@ public function testEvaluateException($inputData) $this->_model->evaluate($inputData); } + /** + * @return array + */ public function evaluateExceptionDataProvider() { return [ @@ -62,6 +65,9 @@ public function testEvaluate(array $input, array $expected) $this->assertSame($expected, $actual); } + /** + * @return array + */ public function evaluateDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php index bca8bb0d9347f..37d840b40ca47 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/CompositeTest.php @@ -60,6 +60,9 @@ public function testEvaluateWrongDiscriminator($input, $expectedExceptionMessage $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateWrongDiscriminatorDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php index bec2a37545e65..8981f5adb2e1a 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Argument/Interpreter/NumberTest.php @@ -30,6 +30,9 @@ public function testEvaluateException($input) $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateExceptionDataProvider() { return ['no value' => [[]], 'non-numeric value' => [['value' => 'non-numeric']]]; @@ -47,6 +50,9 @@ public function testEvaluate($input, $expected) $this->assertSame($expected, $actual); } + /** + * @return array + */ public function evaluateDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php index 5eea3f8790711..63eccb098bf0d 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Collection/DbTest.php @@ -296,6 +296,9 @@ public function testPrintLogQueryPrinting($printQuery, $printFlag, $query, $expe $this->collection->printLogQuery($printQuery, false, $query); } + /** + * @return array + */ public function printLogQueryPrintingDataProvider() { return [ @@ -319,6 +322,9 @@ public function testPrintLogQueryLogging($logQuery, $logFlag, $expectedCalls) $this->collection->printLogQuery(false, $logQuery, 'some_query'); } + /** + * @return array + */ public function printLogQueryLoggingDataProvider() { return [ @@ -527,6 +533,9 @@ public function testDistinct($flag, $expectedFlag) $this->collection->distinct($flag); } + /** + * @return array + */ public function distinctDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php index b28b1fa167b60..baeeb4ff6f5e3 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/DateTest.php @@ -80,6 +80,9 @@ public function testGetElementHtmlDateFormat($fieldName) $this->model->getElementHtml(); } + /** + * @return array + */ public function providerGetElementHtmlDateFormat() { return [ @@ -88,6 +91,10 @@ public function providerGetElementHtmlDateFormat() ]; } + /** + * @param $exactly + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getFormMock($exactly) { $functions = ['getFieldNameSuffix', 'getHtmlIdPrefix', 'getHtmlIdSuffix']; diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php index 9e23610b97668..8b9de2c63953f 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKey/ValidatorTest.php @@ -50,6 +50,9 @@ public function testValidate($formKey, $expected) $this->assertEquals($expected, $this->_model->validate($this->_requestMock)); } + /** + * @return array + */ public function validateDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php b/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php index 562f01abeefd1..a37dc981518e5 100644 --- a/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php +++ b/lib/internal/Magento/Framework/Encryption/Test/Unit/CryptTest.php @@ -26,6 +26,10 @@ protected function setUp() $this->_key = substr(__CLASS__, -32, 32); } + /** + * @param $length + * @return bool|string + */ protected function _getRandomString($length) { $result = ''; @@ -44,18 +48,31 @@ protected function _requireCipherInfo() } } + /** + * @param $cipherName + * @param $modeName + * @return mixed + */ protected function _getKeySize($cipherName, $modeName) { $this->_requireCipherInfo(); return self::$_cipherInfo[$cipherName][$modeName]['key_size']; } + /** + * @param $cipherName + * @param $modeName + * @return mixed + */ protected function _getInitVectorSize($cipherName, $modeName) { $this->_requireCipherInfo(); return self::$_cipherInfo[$cipherName][$modeName]['iv_size']; } + /** + * @return array + */ public function getCipherModeCombinations(): array { $result = []; @@ -83,6 +100,9 @@ public function testConstructor($cipher, $mode) $this->assertEquals($initVector, $crypt->getInitVector()); } + /** + * @return array + */ public function getConstructorExceptionData() { $result = []; @@ -120,6 +140,9 @@ public function testConstructorDefaults() $this->assertEquals($cryptExpected->getInitVector(), $cryptActual->getInitVector()); } + /** + * @return mixed + */ public function getCryptData() { $fixturesFilename = __DIR__ . '/Crypt/_files/_crypt_fixtures.php'; diff --git a/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php b/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php index 52a7a98eac312..f4381a42775d7 100644 --- a/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php +++ b/lib/internal/Magento/Framework/Encryption/Test/Unit/EncryptorTest.php @@ -86,6 +86,9 @@ public function testValidateHash($password, $hash, $expected) $this->assertEquals($expected, $actual); } + /** + * @return array + */ public function validateHashDataProvider() { return [ @@ -112,6 +115,9 @@ public function testEncryptWithEmptyKey($key) $this->assertEquals($value, $model->encrypt($value)); } + /** + * @return array + */ public function encryptWithEmptyKeyDataProvider() { return [[null], [0], [''], ['0']]; @@ -134,6 +140,9 @@ public function testDecryptWithEmptyKey($key) $this->assertEquals('', $model->decrypt($value)); } + /** + * @return array + */ public function decryptWithEmptyKeyDataProvider() { return [[null], [0], [''], ['0']]; @@ -208,6 +217,9 @@ public function testValidateKey() $this->assertEquals($crypt->decrypt($expectedEncryptedData), $actual->decrypt($actualEncryptedData)); } + /** + * @return array + */ public function testUseSpecifiedHashingAlgoDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php b/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php index a0406cd0ec84b..fc241834c7ecf 100644 --- a/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php +++ b/lib/internal/Magento/Framework/Encryption/Test/Unit/Helper/SecurityTest.php @@ -31,6 +31,9 @@ public function testCompareStrings($expected, $actual, $result) $this->assertEquals($result, Security::compareStrings($expected, $actual)); } + /** + * @return array + */ public function dataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php index 91c8afaef5d07..136dd8cc80eef 100644 --- a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php +++ b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CollectionTest.php @@ -81,6 +81,9 @@ public function testGetObserverByName($name) $this->assertEquals($observer, $this->observerCollection->getObserverByName($name)); } + /** + * @return array + */ public function observerNameProvider() { return [ diff --git a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php index 511d547ebed44..1380cc0decf39 100644 --- a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php +++ b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/CronTest.php @@ -37,6 +37,9 @@ public function testGetNumeric($value, $expectedResult) $this->assertEquals($expectedResult, $this->cron->getNumeric($value)); } + /** + * @return array + */ public function numericValueProvider() { return [ @@ -78,6 +81,9 @@ public function testMatchCronExpression($expression, $number, $expectedResult) $this->assertEquals($expectedResult, $this->cron->matchCronExpression($expression, $number)); } + /** + * @return array + */ public function matchCronExpressionProvider() { return [ @@ -107,6 +113,9 @@ public function testIsValidFor($time, $expression, $expectedResult) $this->assertEquals($expectedResult, $this->cron->isValidFor($eventMock)); } + /** + * @return array + */ public function isValidForProvider() { return [ diff --git a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php index cfd3602fb030d..80d828930d118 100644 --- a/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php +++ b/lib/internal/Magento/Framework/Event/Test/Unit/Observer/RegexTest.php @@ -44,6 +44,9 @@ public function testIsValidFor($pattern, $name, $expectedResult) $this->assertEquals($expectedResult, $this->regex->isValidFor($eventMock)); } + /** + * @return array + */ public function isValidForProvider() { return [ diff --git a/lib/internal/Magento/Framework/File/Mime.php b/lib/internal/Magento/Framework/File/Mime.php index 7fbdab18d17ff..d42b536f450ce 100644 --- a/lib/internal/Magento/Framework/File/Mime.php +++ b/lib/internal/Magento/Framework/File/Mime.php @@ -58,6 +58,23 @@ class Mime 'ps' => 'application/postscript', ]; + /** + * List of mime types that can be defined by file extension. + * + * @var array $defineByExtensionList + */ + private $defineByExtensionList = [ + 'txt' => 'text/plain', + 'htm' => 'text/html', + 'html' => 'text/html', + 'php' => 'text/html', + 'css' => 'text/css', + 'js' => 'application/javascript', + 'json' => 'application/json', + 'xml' => 'application/xml', + 'svg' => 'image/svg+xml', + ]; + /** * Get mime type of a file * @@ -71,19 +88,50 @@ public function getMimeType($file) throw new \InvalidArgumentException("File '$file' doesn't exist"); } - $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION)); - if (isset($this->mimeTypes[$extension])) { - $result = $this->mimeTypes[$extension]; - } + $result = null; + $extension = $this->getFileExtension($file); - if (empty($result) && (function_exists('mime_content_type') && ini_get('mime_magic.magicfile'))) { - $result = mime_content_type($file); + if (function_exists('mime_content_type')) { + $result = $this->getNativeMimeType($file); } - if (empty($result)) { + if (null === $result && isset($this->mimeTypes[$extension])) { + $result = $this->mimeTypes[$extension]; + } elseif (null === $result) { $result = 'application/octet-stream'; } return $result; } + + /** + * Get mime type by the native mime_content_type function. + * Search for extended mime type if mime_content_type() returned 'application/octet-stream' or 'text/plain' + * + * @param string $file + * @return string + */ + private function getNativeMimeType(string $file): string + { + $extension = $this->getFileExtension($file); + $result = mime_content_type($file); + if (isset($this->mimeTypes[$extension], $this->defineByExtensionList[$extension]) + && (strpos($result, 'text/') === 0 || strpos($result, 'image/svg') === 0) + ) { + $result = $this->mimeTypes[$extension]; + } + + return $result; + } + + /** + * Get file extension by file name. + * + * @param string $file + * @return string + */ + private function getFileExtension(string $file): string + { + return strtolower(pathinfo($file, PATHINFO_EXTENSION)); + } } diff --git a/lib/internal/Magento/Framework/File/Size.php b/lib/internal/Magento/Framework/File/Size.php index 6f48024f71c16..c5a51ec1760e7 100644 --- a/lib/internal/Magento/Framework/File/Size.php +++ b/lib/internal/Magento/Framework/File/Size.php @@ -36,7 +36,7 @@ class Size */ public function getPostMaxSize() { - return $this->_iniget('post_max_size'); + return $this->_iniGet('post_max_size'); } /** @@ -46,7 +46,7 @@ public function getPostMaxSize() */ public function getUploadMaxSize() { - return $this->_iniget('upload_max_filesize'); + return $this->_iniGet('upload_max_filesize'); } /** @@ -56,7 +56,7 @@ public function getUploadMaxSize() * @param int $mode * @return float */ - public function getMaxFileSizeInMb($precision = 0, $mode = PHP_ROUND_HALF_DOWN) + public function getMaxFileSizeInMb($precision = 0, $mode = \PHP_ROUND_HALF_DOWN) { return $this->getFileSizeInMb($this->getMaxFileSize(), $precision, $mode); } @@ -69,7 +69,7 @@ public function getMaxFileSizeInMb($precision = 0, $mode = PHP_ROUND_HALF_DOWN) * @param int $mode * @return float */ - public function getFileSizeInMb($fileSize, $precision = 0, $mode = PHP_ROUND_HALF_DOWN) + public function getFileSizeInMb($fileSize, $precision = 0, $mode = \PHP_ROUND_HALF_DOWN) { return round($fileSize / (1024 * 1024), $precision, $mode); } diff --git a/lib/internal/Magento/Framework/File/Test/Unit/Transfer/Adapter/HttpTest.php b/lib/internal/Magento/Framework/File/Test/Unit/Transfer/Adapter/HttpTest.php index 5429c9e862188..d945791282a2d 100644 --- a/lib/internal/Magento/Framework/File/Test/Unit/Transfer/Adapter/HttpTest.php +++ b/lib/internal/Magento/Framework/File/Test/Unit/Transfer/Adapter/HttpTest.php @@ -24,17 +24,23 @@ class HttpTest extends \PHPUnit\Framework\TestCase */ private $mime; + /** + * @inheritdoc + */ protected function setUp() { $this->response = $this->createPartialMock( \Magento\Framework\HTTP\PhpEnvironment\Response::class, - ['setHeader', 'sendHeaders'] + ['setHeader', 'sendHeaders', 'setHeaders'] ); $this->mime = $this->createMock(\Magento\Framework\File\Mime::class); $this->object = new Http($this->response, $this->mime); } - public function testSend() + /** + * @return void + */ + public function testSend(): void { $file = __DIR__ . '/../../_files/javascript.js'; $contentType = 'content/type'; @@ -56,11 +62,37 @@ public function testSend() $this->object->send($file); } + /** + * @return void + */ + public function testSendWithOptions(): void + { + $file = __DIR__ . '/../../_files/javascript.js'; + $contentType = 'content/type'; + + $headers = $this->getMockBuilder(\Zend\Http\Headers::class)->getMock(); + $this->response->expects($this->atLeastOnce()) + ->method('setHeader') + ->withConsecutive(['Content-length', filesize($file)], ['Content-Type', $contentType]); + $this->response->expects($this->atLeastOnce()) + ->method('setHeaders') + ->with($headers); + $this->response->expects($this->once()) + ->method('sendHeaders'); + $this->mime->expects($this->once()) + ->method('getMimeType') + ->with($file) + ->will($this->returnValue($contentType)); + $this->expectOutputString(file_get_contents($file)); + + $this->object->send(['filepath' => $file, 'headers' => $headers]); + } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Filename is not set + * @return void */ - public function testSendNoFileSpecifiedException() + public function testSendNoFileSpecifiedException(): void { $this->object->send([]); } @@ -68,8 +100,9 @@ public function testSendNoFileSpecifiedException() /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage File 'nonexistent.file' does not exists + * @return void */ - public function testSendNoFileExistException() + public function testSendNoFileExistException(): void { $this->object->send('nonexistent.file'); } diff --git a/lib/internal/Magento/Framework/File/Test/Unit/_files/UPPERCASE.WEIRD b/lib/internal/Magento/Framework/File/Test/Unit/_files/UPPERCASE.WEIRD index e69de29bb2d1d..b361f47e9c25d 100644 --- a/lib/internal/Magento/Framework/File/Test/Unit/_files/UPPERCASE.WEIRD +++ b/lib/internal/Magento/Framework/File/Test/Unit/_files/UPPERCASE.WEIRD @@ -0,0 +1 @@ +� diff --git a/lib/internal/Magento/Framework/File/Test/Unit/_files/file.weird b/lib/internal/Magento/Framework/File/Test/Unit/_files/file.weird index e69de29bb2d1d..b361f47e9c25d 100644 --- a/lib/internal/Magento/Framework/File/Test/Unit/_files/file.weird +++ b/lib/internal/Magento/Framework/File/Test/Unit/_files/file.weird @@ -0,0 +1 @@ +� diff --git a/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php b/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php index 1cd270329ed2c..aa527866eff55 100644 --- a/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php +++ b/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php @@ -40,20 +40,16 @@ public function __construct( */ public function send($options = null) { - if (is_string($options)) { - $filepath = $options; - } elseif (is_array($options) && isset($options['filepath'])) { - $filepath = $options['filepath']; - } else { - throw new \InvalidArgumentException("Filename is not set."); - } + $filepath = $this->getFilePath($options); if (!is_file($filepath) || !is_readable($filepath)) { throw new \InvalidArgumentException("File '{$filepath}' does not exists."); } $mimeType = $this->mime->getMimeType($filepath); - + if (is_array($options) && isset($options['headers']) && $options['headers'] instanceof \Zend\Http\Headers) { + $this->response->setHeaders($options['headers']); + } $this->response->setHeader('Content-length', filesize($filepath)); $this->response->setHeader('Content-Type', $mimeType); @@ -70,4 +66,26 @@ public function send($options = null) fclose($handle); } } + + /** + * Get filepath by provided parameter $optons. + * If the $options is a string it assumes it's a file path. If the option is an array method will look for the + * 'filepath' key and return it's value. + * + * @param string|array|null $options + * @return string + * @throws \InvalidArgumentException + */ + private function getFilePath($options): string + { + if (is_string($options)) { + $filePath = $options; + } elseif (is_array($options) && isset($options['filepath'])) { + $filePath = $options['filepath']; + } else { + throw new \InvalidArgumentException("Filename is not set."); + } + + return $filePath; + } } diff --git a/lib/internal/Magento/Framework/File/Uploader.php b/lib/internal/Magento/Framework/File/Uploader.php index 67d7d4bb558ae..c86f98c4e413a 100644 --- a/lib/internal/Magento/Framework/File/Uploader.php +++ b/lib/internal/Magento/Framework/File/Uploader.php @@ -118,6 +118,11 @@ class Uploader */ protected $_validateCallbacks = []; + /** + * @var \Magento\Framework\File\Mime + */ + private $fileMime; + /**#@+ * File upload type (multiple or single) */ @@ -154,10 +159,13 @@ class Uploader * Init upload * * @param string|array $fileId + * @param \Magento\Framework\File\Mime|null $fileMime * @throws \Exception */ - public function __construct($fileId) - { + public function __construct( + $fileId, + Mime $fileMime = null + ) { $this->_setUploadFileId($fileId); if (!file_exists($this->_file['tmp_name'])) { $code = empty($this->_file['tmp_name']) ? self::TMP_NAME_EMPTY : 0; @@ -165,6 +173,7 @@ public function __construct($fileId) } else { $this->_fileExists = true; } + $this->fileMime = $fileMime ?: \Magento\Framework\App\ObjectManager::getInstance()->get(Mime::class); } /** @@ -511,7 +520,7 @@ public function checkAllowedExtension($extension) */ private function _getMimeType() { - return $this->_file['type']; + return $this->fileMime->getMimeType($this->_file['tmp_name']); } /** diff --git a/lib/internal/Magento/Framework/Filesystem/File/Write.php b/lib/internal/Magento/Framework/Filesystem/File/Write.php index ea2f3a93d66c0..913421aa91ad2 100644 --- a/lib/internal/Magento/Framework/Filesystem/File/Write.php +++ b/lib/internal/Magento/Framework/Filesystem/File/Write.php @@ -103,7 +103,7 @@ public function flush() * @param int $lockMode * @return bool */ - public function lock($lockMode = LOCK_EX) + public function lock($lockMode = \LOCK_EX) { return $this->driver->fileLock($this->resource, $lockMode); } diff --git a/lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php b/lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php index 3592c34dae7f6..ecf554de808cc 100644 --- a/lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php +++ b/lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php @@ -44,7 +44,7 @@ public function flush(); * @param int $lockMode * @return bool */ - public function lock($lockMode = LOCK_EX); + public function lock($lockMode = \LOCK_EX); /** * File unlocking diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php index 97a3b8f498491..5d1f9664bde61 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php @@ -31,6 +31,9 @@ public function testGetAbsolutePath($basePath, $path, $expected) $this->assertEquals($expected, $file->getAbsolutePath($basePath, $path)); } + /** + * @return array + */ public function dataProviderForTestGetAbsolutePath() { return [ @@ -50,6 +53,9 @@ public function testGetRelativePath($basePath, $path, $expected) $this->assertEquals($expected, $file->getRelativePath($basePath, $path)); } + /** + * @return array + */ public function dataProviderForTestGetRelativePath() { return [ diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php index f5ad5b22bdd58..8fc57f458334e 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/HttpTest.php @@ -41,6 +41,9 @@ public function testIsExists($status, $result) $this->assertEquals($result, (new Http())->isExists('')); } + /** + * @return array + */ public function dataProviderForTestIsExists() { return [['200 OK', true], ['404 Not Found', false]]; @@ -55,6 +58,9 @@ public function testStat($headers, $result) $this->assertEquals($result, (new Http())->stat('')); } + /** + * @return array + */ public function dataProviderForTestStat() { $headers1 = [ diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php index 07524f9c3595f..8dcb4befa6cac 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/File/ExcludeFilterTest.php @@ -39,6 +39,9 @@ public function testExclusion() $this->assertTrue(!in_array(BP . '/var/session/', $result), 'Filtered path should not be in array'); } + /** + * @return \Generator + */ private function getFilesIterator() { $files = [ diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php index a8cf48eef433f..7c1ae92b10fc2 100644 --- a/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php +++ b/lib/internal/Magento/Framework/Filter/Test/Unit/Input/MaliciousCodeTest.php @@ -33,6 +33,9 @@ public function testFilter($input, $expectedOutput) ); } + /** + * @return array + */ public function filterDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php index 126d3f9f2f691..fdce369ba2946 100644 --- a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php +++ b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/ParameterTest.php @@ -41,6 +41,9 @@ public function testGetValue($string, $expectedValue) $this->assertEquals($expectedValue, $this->_filter->getValue()); } + /** + * @return array + */ public function sampleTokenizeStringProvider() { return [ @@ -51,6 +54,9 @@ public function sampleTokenizeStringProvider() ]; } + /** + * @return array + */ public function sampleGetValueStringProvider() { return [ diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php index 793637203bb0d..4dad75a6bcb5b 100644 --- a/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php +++ b/lib/internal/Magento/Framework/Filter/Test/Unit/Template/Tokenizer/VariableTest.php @@ -30,6 +30,9 @@ public function testTokenize($string, $expectedValue) $this->assertEquals($expectedValue, $this->_filter->tokenize()); } + /** + * @return array + */ public function sampleTokenizeStringProvider() { return [ diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php index d962f2265a01e..4883dc5fbe33b 100644 --- a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php +++ b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php @@ -138,6 +138,9 @@ public function testVarDirective($construction, $variables, $expectedResult) $this->assertEquals($expectedResult, $this->templateFilter->filter($construction)); } + /** + * @return array + */ public function varDirectiveDataProvider() { /* @var $dataObjectVariable \Magento\Framework\DataObject|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/SchemaGenerator.php b/lib/internal/Magento/Framework/GraphQl/Schema/SchemaGenerator.php index 668ec2bdc84e4..63fef73186b12 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/SchemaGenerator.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/SchemaGenerator.php @@ -56,6 +56,7 @@ public function generate() : Schema $schema = $this->schemaFactory->create( [ 'query' => $this->outputMapper->getOutputType('Query'), + 'mutation' => $this->outputMapper->getOutputType('Mutation'), 'typeLoader' => function ($name) { return $this->outputMapper->getOutputType($name); }, diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php index 3b2f79eecb370..dfe4b759e85be 100644 --- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php +++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php @@ -5,20 +5,22 @@ */ namespace Magento\Framework\HTTP\PhpEnvironment; +use Magento\Framework\App\RequestInterface; + /** - * Library for working with client ip address + * Library for working with client ip address. */ class RemoteAddress { /** - * Request object + * Request object. * - * @var \Magento\Framework\App\RequestInterface + * @var RequestInterface */ protected $request; /** - * Remote address cache + * Remote address cache. * * @var string */ @@ -30,46 +32,114 @@ class RemoteAddress protected $alternativeHeaders; /** - * @param \Magento\Framework\App\RequestInterface $httpRequest + * @var string[]|null + */ + private $trustedProxies; + + /** + * @param RequestInterface $httpRequest * @param array $alternativeHeaders + * @param string[]|null $trustedProxies */ - public function __construct(\Magento\Framework\App\RequestInterface $httpRequest, array $alternativeHeaders = []) - { + public function __construct( + RequestInterface $httpRequest, + array $alternativeHeaders = [], + array $trustedProxies = null + ) { $this->request = $httpRequest; $this->alternativeHeaders = $alternativeHeaders; + $this->trustedProxies = $trustedProxies; } /** - * Retrieve Client Remote Address + * Read address based on settings. * - * @param bool $ipToLong converting IP to long format - * @return string IPv4|long + * @return string|null */ - public function getRemoteAddress($ipToLong = false) + private function readAddress() { - if ($this->remoteAddress === null) { - foreach ($this->alternativeHeaders as $var) { - if ($this->request->getServer($var, false)) { - $this->remoteAddress = $this->request->getServer($var); - break; - } + $remoteAddress = null; + foreach ($this->alternativeHeaders as $var) { + if ($this->request->getServer($var, false)) { + $remoteAddress = $this->request->getServer($var); + break; } + } - if (!$this->remoteAddress) { - $this->remoteAddress = $this->request->getServer('REMOTE_ADDR'); + if (!$remoteAddress) { + $remoteAddress = $this->request->getServer('REMOTE_ADDR'); + } + + return $remoteAddress; + } + + /** + * Filter addresses by trusted proxies list. + * + * @param string $remoteAddress + * @return string|null + */ + private function filterAddress(string $remoteAddress) + { + if (strpos($remoteAddress, ',') !== false) { + $ipList = explode(',', $remoteAddress); + } else { + $ipList = [$remoteAddress]; + } + $ipList = array_filter( + $ipList, + function (string $ip) { + return filter_var(trim($ip), FILTER_VALIDATE_IP); } + ); + if ($this->trustedProxies !== null) { + $ipList = array_filter( + $ipList, + function (string $ip) { + return !in_array(trim($ip), $this->trustedProxies, true); + } + ); + $remoteAddress = trim(array_pop($ipList)); + } else { + $remoteAddress = trim(reset($ipList)); } - if (!$this->remoteAddress) { - return false; + return $remoteAddress ?: null; + } + + /** + * Retrieve Client Remote Address. + * If alternative headers are used and said headers allow multiple IPs + * it is suggested that trusted proxies is also used + * for more accurate IP recognition. + * + * @param bool $ipToLong converting IP to long format + * + * @return string IPv4|long + */ + public function getRemoteAddress(bool $ipToLong = false) + { + if ($this->remoteAddress !== null) { + return $this->remoteAddress; } - if (strpos($this->remoteAddress, ',') !== false) { - $ipList = explode(',', $this->remoteAddress); - $this->remoteAddress = trim(reset($ipList)); + $remoteAddress = $this->readAddress(); + if (!$remoteAddress) { + $this->remoteAddress = false; + + return false; } + $remoteAddress = $this->filterAddress($remoteAddress); - return $ipToLong ? ip2long($this->remoteAddress) : $this->remoteAddress; + if (!$remoteAddress) { + $this->remoteAddress = false; + + return false; + } else { + $this->remoteAddress = $remoteAddress; + + return $ipToLong ? ip2long($this->remoteAddress) : $this->remoteAddress; + } } /** diff --git a/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php b/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php index 8fd28e8513d0b..852badb16d219 100644 --- a/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php +++ b/lib/internal/Magento/Framework/HTTP/Test/Unit/Adapter/CurlTest.php @@ -38,6 +38,9 @@ public function testRead($response) $this->assertEquals(file_get_contents(__DIR__ . '/_files/curl_response_expected.txt'), $this->model->read()); } + /** + * @return array + */ public function readDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RemoteAddressTest.php b/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RemoteAddressTest.php index 30b50d9360d81..538359edd4306 100644 --- a/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RemoteAddressTest.php +++ b/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RemoteAddressTest.php @@ -5,44 +5,70 @@ */ namespace Magento\Framework\HTTP\Test\Unit\PhpEnvironment; +use Magento\Framework\HTTP\PhpEnvironment\RemoteAddress; +use Magento\Framework\App\Request\Http as HttpRequest; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; + class RemoteAddressTest extends \PHPUnit\Framework\TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\App\Request\Http + * @var \PHPUnit_Framework_MockObject_MockObject|\HttpRequest */ protected $_request; /** - * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + * @var ObjectManager */ protected $_objectManager; + /** + * @inheritdoc + */ protected function setUp() { - $this->_request = $this->getMockBuilder( - \Magento\Framework\App\Request\Http::class - )->disableOriginalConstructor()->setMethods( - ['getServer'] - )->getMock(); + $this->_request = $this->getMockBuilder(HttpRequest::class) + ->disableOriginalConstructor() + ->setMethods(['getServer']) + ->getMock(); - $this->_objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $this->_objectManager = new ObjectManager($this); } /** + * @param string[] $alternativeHeaders + * @param array $serverValueMap + * @param string|bool $expected + * @param bool $ipToLong + * @param string[]|null $trustedProxies + * @return void * @dataProvider getRemoteAddressProvider */ - public function testGetRemoteAddress($alternativeHeaders, $serverValueMap, $expected, $ipToLong) - { + public function testGetRemoteAddress( + array $alternativeHeaders, + array $serverValueMap, + $expected, + bool $ipToLong, + array $trustedProxies = null + ): void { $remoteAddress = $this->_objectManager->getObject( - \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress::class, - ['httpRequest' => $this->_request, 'alternativeHeaders' => $alternativeHeaders] + RemoteAddress::class, + [ + 'httpRequest' => $this->_request, + 'alternativeHeaders' => $alternativeHeaders, + 'trustedProxies' => $trustedProxies, + ] ); - $this->_request->expects($this->any())->method('getServer')->will($this->returnValueMap($serverValueMap)); + $this->_request->expects($this->any()) + ->method('getServer') + ->will($this->returnValueMap($serverValueMap)); + $this->assertEquals($expected, $remoteAddress->getRemoteAddress($ipToLong)); } /** * @return array + * + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function getRemoteAddressProvider() { @@ -52,18 +78,21 @@ public function getRemoteAddressProvider() 'serverValueMap' => [['REMOTE_ADDR', null, null]], 'expected' => false, 'ipToLong' => false, + 'trustedProxies' => null, ], [ 'alternativeHeaders' => [], 'serverValueMap' => [['REMOTE_ADDR', null, '192.168.0.1']], 'expected' => '192.168.0.1', - 'ipToLong' => false + 'ipToLong' => false, + 'trustedProxies' => null, ], [ 'alternativeHeaders' => [], 'serverValueMap' => [['REMOTE_ADDR', null, '192.168.1.1']], 'expected' => ip2long('192.168.1.1'), - 'ipToLong' => true + 'ipToLong' => true, + 'trustedProxies' => null, ], [ 'alternativeHeaders' => ['TEST_HEADER'], @@ -73,7 +102,8 @@ public function getRemoteAddressProvider() ['TEST_HEADER', false, '192.168.0.1'], ], 'expected' => '192.168.0.1', - 'ipToLong' => false + 'ipToLong' => false, + 'trustedProxies' => null, ], [ 'alternativeHeaders' => ['TEST_HEADER'], @@ -83,8 +113,74 @@ public function getRemoteAddressProvider() ['TEST_HEADER', false, '192.168.0.1'], ], 'expected' => ip2long('192.168.0.1'), - 'ipToLong' => true - ] + 'ipToLong' => true, + 'trustedProxies' => null, + ], + [ + 'alternativeHeaders' => [], + 'serverValueMap' => [ + ['REMOTE_ADDR', null, 'NotValidIp'], + ], + 'expected' => false, + 'ipToLong' => false, + 'trustedProxies' => ['127.0.0.1'], + ], + [ + 'alternativeHeaders' => ['TEST_HEADER'], + 'serverValueMap' => [ + ['TEST_HEADER', null, 'NotValid, 192.168.0.1'], + ['TEST_HEADER', false, 'NotValid, 192.168.0.1'], + ], + 'expected' => '192.168.0.1', + 'ipToLong' => false, + 'trustedProxies' => ['127.0.0.1'], + ], + [ + 'alternativeHeaders' => ['TEST_HEADER'], + 'serverValueMap' => [ + ['TEST_HEADER', null, '192.168.0.2, 192.168.0.1'], + ['TEST_HEADER', false, '192.168.0.2, 192.168.0.1'], + ], + 'expected' => '192.168.0.2', + 'ipToLong' => false, + 'trustedProxies' => null, + ], + [ + 'alternativeHeaders' => [], + 'serverValueMap' => [ + [ + 'REMOTE_ADDR', + null, + '192.168.0.2, 192.168.0.1, 192.168.0.3', + ], + [ + 'REMOTE_ADDR', + false, + '192.168.0.2, 192.168.0.1, 192.168.0.3', + ], + ], + 'expected' => '192.168.0.1', + 'ipToLong' => false, + 'trustedProxies' => ['192.168.0.3'], + ], + [ + 'alternativeHeaders' => [], + 'serverValueMap' => [ + [ + 'REMOTE_ADDR', + null, + '192.168.0.2, 192.168.0.1, 192.168.0.3', + ], + [ + 'REMOTE_ADDR', + false, + '192.168.0.2, 192.168.0.1, 192.168.0.3', + ], + ], + 'expected' => '192.168.0.3', + 'ipToLong' => false, + 'trustedProxies' => [], + ], ]; } } diff --git a/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php b/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php index a746b61ad0038..6bd8a977f2a2c 100644 --- a/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php +++ b/lib/internal/Magento/Framework/HTTP/Test/Unit/PhpEnvironment/RequestTest.php @@ -50,6 +50,10 @@ public function tearDown() $_SERVER = $this->serverArray; } + /** + * @param null $uri + * @return Request + */ private function getModel($uri = null) { return new Request($this->cookieReader, $this->converter, $uri); diff --git a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php index 93274b1d063bf..ea21faf3f340d 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php +++ b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php @@ -106,7 +106,7 @@ protected function _getImageNeedMemorySize($file) } return round( - ($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + Pow(2, 16)) * 1.65 + ($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + pow(2, 16)) * 1.65 ); } @@ -426,7 +426,7 @@ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity = imagecolortransparent($newWatermark, $col); imagefilledrectangle($newWatermark, 0, 0, $this->getWatermarkWidth(), $this->getWatermarkHeight(), $col); imagealphablending($newWatermark, true); - imageSaveAlpha($newWatermark, true); + imagesavealpha($newWatermark, true); imagecopyresampled( $newWatermark, $watermark, @@ -451,7 +451,7 @@ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity = imagecolortransparent($newWatermark, $col); imagefilledrectangle($newWatermark, 0, 0, $this->_imageSrcWidth, $this->_imageSrcHeight, $col); imagealphablending($newWatermark, true); - imageSaveAlpha($newWatermark, true); + imagesavealpha($newWatermark, true); imagecopyresampled( $newWatermark, $watermark, @@ -669,7 +669,7 @@ private function imageDestroy() private function _saveAlpha($imageHandler) { $background = imagecolorallocate($imageHandler, 0, 0, 0); - ImageColorTransparent($imageHandler, $background); + imagecolortransparent($imageHandler, $background); imagealphablending($imageHandler, false); imagesavealpha($imageHandler, true); } diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php index d8e48f278f782..838d85c5fbf20 100644 --- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php +++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/AbstractTest.php @@ -109,6 +109,9 @@ public function testPrepareDestination($destination, $newName, $expectedResult) $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function prepareDestinationDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php index fe0847f7f69b4..41281c96e1bb4 100644 --- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php +++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php @@ -73,6 +73,9 @@ public function testOpen($fileData, $exception, $limit) $this->adapter->open('file'); } + /** + * @return array + */ public function filesProvider() { $smallFile = [ diff --git a/lib/internal/Magento/Framework/Indexer/Action/Base.php b/lib/internal/Magento/Framework/Indexer/Action/Base.php index 11cf1cec62636..636335192cbc5 100644 --- a/lib/internal/Magento/Framework/Indexer/Action/Base.php +++ b/lib/internal/Magento/Framework/Indexer/Action/Base.php @@ -221,7 +221,7 @@ protected function prepareDataSource(array $ids = []) { return !count($ids) ? $this->createResultCollection() - : $this->createResultCollection()->addFieldToFilter($this->getPrimaryResource()->getIdFieldname(), $ids); + : $this->createResultCollection()->addFieldToFilter($this->getPrimaryResource()->getIdFieldName(), $ids); } /** diff --git a/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php b/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php index c68af718473a4..514bd673f8525 100644 --- a/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php +++ b/lib/internal/Magento/Framework/Indexer/Test/Unit/IndexStructureTest.php @@ -186,6 +186,12 @@ private function createDimensionMock($name, $value) return $dimension; } + /** + * @param $callNumber + * @param $tableName + * @param $isTableExist + * @return mixed + */ private function mockDropTable($callNumber, $tableName, $isTableExist) { $this->connectionInterface->expects($this->at($callNumber++)) @@ -201,6 +207,11 @@ private function mockDropTable($callNumber, $tableName, $isTableExist) return $callNumber; } + /** + * @param $callNumber + * @param $tableName + * @return mixed + */ private function mockFlatTable($callNumber, $tableName) { $table = $this->getMockBuilder(\Magento\Framework\DB\Ddl\Table::class) @@ -223,6 +234,11 @@ private function mockFlatTable($callNumber, $tableName) return $callNumber; } + /** + * @param $callNumber + * @param $tableName + * @return mixed + */ private function mockFulltextTable($callNumber, $tableName) { $table = $this->getMockBuilder(\Magento\Framework\DB\Ddl\Table::class) diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php index a862228c07dfd..ea2ab9e55ac5e 100644 --- a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php @@ -15,6 +15,9 @@ public function getValue() return $this->attribute; } + /** + * @param $value + */ public function setValue($value) { $this->attribute = $value; @@ -24,17 +27,27 @@ public function & getReference() { } + /** + * @param mixed ...$variadicValue + */ public function firstVariadicParameter(...$variadicValue) { $this->variadicAttribute = $variadicValue; } + /** + * @param $value + * @param mixed ...$variadicValue + */ public function secondVariadicParameter($value, ...$variadicValue) { $this->attribute = $value; $this->variadicAttribute = $variadicValue; } + /** + * @param mixed ...$variadicValue + */ public function byRefVariadic(& ...$variadicValue) { $this->variadicAttribute = $variadicValue; diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php index b4cc37700f1d0..b51bc2026fc4d 100644 --- a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php @@ -15,32 +15,51 @@ public function returnVoid() : void // Nothing to do here } + /** + * @return null|string + */ public function getNullableValue() : ?string { return null; } + /** + * @return string + */ public function getValue() : string { return $this->value; } + /** + * @param string $value + */ public function setValue(string $value) { $this->value = $value; } + /** + * @param string ...$variadicValue + */ public function typeHintedFirstVariadicParameter(string ...$variadicValue) { $this->variadicValue = $variadicValue; } + /** + * @param string $value + * @param string ...$variadicValue + */ public function typeHintedSecondVariadicParameter(string $value, string ...$variadicValue) { $this->value = $value; $this->variadicValue = $variadicValue; } + /** + * @param string ...$variadicValue + */ public function byRefTypeHintedVariadic(string & ...$variadicValue) { $this->variadicValue = $variadicValue; diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php index 54dfa8a03b28c..fe8d29bd0d51d 100644 --- a/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php @@ -209,6 +209,9 @@ public function testHasPluginsWhenDataIsCached($expectedResult, $type) $this->assertEquals($expectedResult, $model->hasPlugins($type)); } + /** + * @return array + */ public function hasPluginsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Locale/Format.php b/lib/internal/Magento/Framework/Locale/Format.php index 00379c87daaf9..89f6957011876 100644 --- a/lib/internal/Magento/Framework/Locale/Format.php +++ b/lib/internal/Magento/Framework/Locale/Format.php @@ -131,7 +131,6 @@ public function getPriceFormat($localeCode = null, $currencyCode = null) } else { $group = strrpos($format, '.'); } - $integerRequired = strpos($format, '.') - strpos($format, '0'); $result = [ //TODO: change interface @@ -141,7 +140,7 @@ public function getPriceFormat($localeCode = null, $currencyCode = null) 'decimalSymbol' => $decimalSymbol, 'groupSymbol' => $groupSymbol, 'groupLength' => $group, - 'integerRequired' => $integerRequired, + 'integerRequired' => $totalPrecision == 0, ]; return $result; diff --git a/lib/internal/Magento/Framework/Math/FloatComparator.php b/lib/internal/Magento/Framework/Math/FloatComparator.php new file mode 100644 index 0000000000000..4053404369956 --- /dev/null +++ b/lib/internal/Magento/Framework/Math/FloatComparator.php @@ -0,0 +1,59 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Math; + +/** + * Contains methods to compare float digits. + * + * @api + */ +class FloatComparator +{ + /** + * Precision for floats comparing. + * + * @var float + */ + private static $epsilon = 0.00001; + + /** + * Compares two float digits. + * + * @param float $a + * @param float $b + * @return bool + */ + public function equal(float $a, float $b): bool + { + return abs($a - $b) <= self::$epsilon; + } + + /** + * Compares if the first argument greater than the second argument. + * + * @param float $a + * @param float $b + * @return bool + */ + public function greaterThan(float $a, float $b): bool + { + return ($a - $b) > self::$epsilon; + } + + /** + * Compares if the first argument greater or equal to the second. + * + * @param float $a + * @param float $b + * @return bool + */ + public function greaterThanOrEqual(float $a, float $b): bool + { + return $this->equal($a, $b) || $this->greaterThan($a, $b); + } +} diff --git a/lib/internal/Magento/Framework/Math/Test/Unit/FloatComparatorTest.php b/lib/internal/Magento/Framework/Math/Test/Unit/FloatComparatorTest.php new file mode 100644 index 0000000000000..c9e5143ee789e --- /dev/null +++ b/lib/internal/Magento/Framework/Math/Test/Unit/FloatComparatorTest.php @@ -0,0 +1,115 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Math\Test\Unit; + +use Magento\Framework\Math\FloatComparator; +use PHPUnit\Framework\TestCase; + +class FloatComparatorTest extends TestCase +{ + /** + * @var FloatComparator + */ + private $comparator; + + /** + * @inheritdoc + */ + protected function setUp() + { + $this->comparator = new FloatComparator(); + } + + /** + * Checks a case when `a` and `b` are equal. + * + * @param float $a + * @param float $b + * @param bool $expected + * @dataProvider eqDataProvider + */ + public function testEq(float $a, float $b, bool $expected) + { + self::assertEquals($expected, $this->comparator->equal($a, $b)); + } + + /** + * Gets list of variations to compare equal float. + * + * @return array + */ + public function eqDataProvider(): array + { + return [ + [10, 10.00001, true], + [10, 10.000001, true], + [10.0000099, 10.00001, true], + [1, 1.0001, false], + [1, -1.00001, false], + ]; + } + + /** + * Checks a case when `a` > `b`. + * + * @param float $a + * @param float $b + * @param bool $expected + * @dataProvider gtDataProvider + */ + public function testGt(float $a, float $b, bool $expected) + { + self::assertEquals($expected, $this->comparator->greaterThan($a, $b)); + } + + /** + * Gets list of variations to compare if `a` > `b`. + * + * @return array + */ + public function gtDataProvider(): array + { + return [ + [10, 10.00001, false], + [10, 10.000001, false], + [10.0000099, 10.00001, false], + [1.0001, 1, true], + [1, -1.00001, true], + ]; + } + + /** + * Checks a case when `a` >= `b`. + * + * @param float $a + * @param float $b + * @param bool $expected + * @dataProvider gteDataProvider + */ + public function testGte(float $a, float $b, bool $expected) + { + self::assertEquals($expected, $this->comparator->greaterThanOrEqual($a, $b)); + } + + /** + * Gets list of variations to compare if `a` >= `b`. + * + * @return array + */ + public function gteDataProvider(): array + { + return [ + [10, 10.00001, true], + [10, 10.000001, true], + [10.0000099, 10.00001, true], + [1.0001, 1, true], + [1, -1.00001, true], + [1.0001, 1.001, false], + ]; + } +} diff --git a/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php b/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php index cd7f52f95a850..1dcdb0e9ae65d 100644 --- a/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php +++ b/lib/internal/Magento/Framework/Math/Test/Unit/RandomTest.php @@ -26,6 +26,9 @@ public function testGetRandomString($length, $chars = null) } } + /** + * @return array + */ public function getRandomStringDataProvider() { return [ @@ -77,6 +80,9 @@ public function testGetRandomNumber($min, $max) $this->assertGreaterThanOrEqual($min, $number); } + /** + * @return array + */ public function testGetRandomNumberProvider() { return [ diff --git a/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php b/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php index f2b496b157c54..ea86985f057bf 100644 --- a/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php +++ b/lib/internal/Magento/Framework/Message/Test/Unit/ManagerTest.php @@ -308,6 +308,9 @@ public function testAddMessage($type, $methodName) $this->assertTrue($this->model->hasMessages()); } + /** + * @return array + */ public function addMessageDataProvider() { return [ @@ -338,6 +341,9 @@ public function testAddUniqueMessagesWhenMessagesImplementMessageInterface($mess $this->model->addUniqueMessages([$messages]); } + /** + * @return array + */ public function addUniqueMessagesWhenMessagesImplementMessageInterfaceDataProvider() { return [ @@ -371,6 +377,9 @@ public function testAddUniqueMessages($messages) $this->model->addUniqueMessages($messages); } + /** + * @return array + */ public function addUniqueMessagesDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/MessageQueue/Test/Unit/MessageValidatorTest.php b/lib/internal/Magento/Framework/MessageQueue/Test/Unit/MessageValidatorTest.php index c1aea7fce6f6f..bb21337dffcf8 100644 --- a/lib/internal/Magento/Framework/MessageQueue/Test/Unit/MessageValidatorTest.php +++ b/lib/internal/Magento/Framework/MessageQueue/Test/Unit/MessageValidatorTest.php @@ -150,6 +150,9 @@ public function testInvalidMessageType($requestType, $message, $expectedResult = $this->model->validate('topic', $message); } + /** + * @return array + */ public function getQueueConfigRequestType() { $customerMock = $this->getMockBuilder(\Magento\Customer\Api\Data\CustomerInterface::class) diff --git a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php index 36061b83cb9e6..b69f50cf4f341 100644 --- a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php +++ b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/AbstractDbTest.php @@ -163,6 +163,9 @@ public function testGetMainTable($tableName, $expectedResult) $this->assertEquals($expectedResult, $this->_model->getMainTable()); } + /** + * @return array + */ public function getTableDataProvider() { return [ @@ -217,6 +220,9 @@ public function testGetChecksum($checksum, $expected) $this->assertEquals($expected, $this->_model->getChecksum($checksum)); } + /** + * @return array + */ public function getChecksumProvider() { return [ @@ -400,6 +406,9 @@ public function testGetDataChanged($getOriginData, $expected) $this->assertEquals($expected, $this->_model->hasDataChanged($abstractModelMock)); } + /** + * @return array + */ public function hasDataChangedDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php index bfd9b5a63d21b..147cac47d3829 100644 --- a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php +++ b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php @@ -95,6 +95,9 @@ protected function tearDown() \Magento\Framework\App\ObjectManager::setInstance($objectManagerMock); } + /** + * @return object + */ protected function getUut() { return $this->objectManagerHelper->getObject( @@ -220,6 +223,9 @@ public function testGetSelect($idFieldNameRet, $getPartRet, $expected) $this->assertTrue($this->uut->getSelect() instanceof Select); } + /** + * @return array + */ public function getSelectDataProvider() { $columnMock = $this->createPartialMock(\Zend_Db_Expr::class, ['__toString']); @@ -246,6 +252,9 @@ public function testAddFieldToSelect($field, $alias, $expectedFieldsToSelect) $this->assertTrue($this->uut->wereFieldsToSelectChanged()); } + /** + * @return array + */ public function addFieldToSelectDataProvider() { return [ @@ -265,6 +274,9 @@ public function testAddExpressionFieldToSelect($alias, $expression, $fields, $ex $this->assertTrue($this->uut->addExpressionFieldToSelect($alias, $expression, $fields) instanceof Uut); } + /** + * @return array + */ public function addExpressionFieldToSelectDataProvider() { return [ @@ -289,6 +301,9 @@ public function testRemoveFieldFromSelect( $this->assertEquals($expectedWereFieldsToSelectChanged, $this->uut->wereFieldsToSelectChanged()); } + /** + * @return array + */ public function removeFieldFromSelectDataProvider() { return [ @@ -376,6 +391,9 @@ public function testJoin($table, $cond, $cols, $expected) $this->assertEquals($expected, $this->uut->getJoinedTables()); } + /** + * @return array + */ public function joinDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/Uut.php b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/Uut.php index e55dbb3c9c3da..b224dccc83d03 100644 --- a/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/Uut.php +++ b/lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/Uut.php @@ -13,26 +13,41 @@ */ class Uut extends AbstractCollection { + /** + * @return bool + */ public function wereFieldsToSelectChanged() { return $this->_fieldsToSelectChanged; } + /** + * @return array|null + */ public function getFieldsToSelect() { return $this->_fieldsToSelect; } + /** + * @param array $fields + */ public function setFieldsToSelect(array $fields) { $this->_fieldsToSelect = $fields; } + /** + * @param $resource + */ public function setResource($resource) { $this->_resource = $resource; } + /** + * @return array + */ public function getJoinedTables() { return $this->_joinedTables; diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php index bf878257c89de..b6be79464684f 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/Declaration/Converter/DomTest.php @@ -42,6 +42,9 @@ public function testConvertWithInvalidDom($xmlString) } } + /** + * @return array + */ public function convertWithInvalidDomDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php index f7a20252826ae..eb849fc457ddb 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/Dir/ReverseResolverTest.php @@ -54,6 +54,9 @@ public function testGetModuleName($path, $expectedResult) $this->assertSame($expectedResult, $this->_model->getModuleName($path)); } + /** + * @return array + */ public function getModuleNameDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php index 44185b52b19a4..12ddfea8c83d1 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/ManagerTest.php @@ -83,6 +83,9 @@ public function testIsOutputEnabledGenericConfigPath($configValue, $expectedResu $this->assertEquals($expectedResult, $this->_model->isOutputEnabled('Module_One')); } + /** + * @return array + */ public function isOutputEnabledGenericConfigPathDataProvider() { return ['output disabled' => [true, false], 'output enabled' => [false, true]]; @@ -103,6 +106,9 @@ public function testIsOutputEnabledCustomConfigPath($configValue, $expectedResul $this->assertEquals($expectedResult, $this->_model->isOutputEnabled('Module_Two')); } + /** + * @return array + */ public function isOutputEnabledCustomConfigPathDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php index 51e86fcf68bee..07dfbacd5d29c 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php @@ -251,7 +251,7 @@ protected function _getFilesystemMock() /** * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Serialize\Serializer\Json - * @throws \PHPUnit_Framework_Exception + * @throws \PHPUnit\Framework\Exception */ private function getSerializerMock() { diff --git a/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php b/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php index f0f42c5931ad3..b16b7c87e87ac 100644 --- a/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php +++ b/lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php @@ -258,6 +258,10 @@ protected function mockGetTableName() $this->resourceMock->expects($this->once())->method('getTableName')->will($this->returnArgument(0)); } + /** + * @param $changelogTableName + * @param $result + */ protected function mockIsTableExists($changelogTableName, $result) { $this->connectionMock->expects( diff --git a/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php b/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php index 3fd8ea93c9bbe..3f806b319ef48 100644 --- a/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php +++ b/lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php @@ -464,6 +464,9 @@ public function testResumeNotSuspended($status) $this->model->resume(); } + /** + * @return array + */ public function dataProviderResumeNotSuspended() { return [ @@ -520,6 +523,9 @@ public function testIsEnabled($mode, $result) $this->assertEquals($result, $this->model->isEnabled()); } + /** + * @return array + */ public function dataProviderIsEnabled() { return [ @@ -541,6 +547,9 @@ public function testIsIdle($status, $result) $this->assertEquals($result, $this->model->isIdle()); } + /** + * @return array + */ public function dataProviderIsIdle() { return [ @@ -563,6 +572,9 @@ public function testIsWorking($status, $result) $this->assertEquals($result, $this->model->isWorking()); } + /** + * @return array + */ public function dataProviderIsWorking() { return [ @@ -585,6 +597,9 @@ public function testIsSuspended($status, $result) $this->assertEquals($result, $this->model->isSuspended()); } + /** + * @return array + */ public function dataProviderIsSuspended() { return [ @@ -617,6 +632,9 @@ protected function loadView() $this->model->load($viewId); } + /** + * @return array + */ protected function getViewData() { return [ diff --git a/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php b/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php index 020159985105d..15c4cb098b84d 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php +++ b/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php @@ -5,7 +5,11 @@ */ namespace Magento\Framework\ObjectManager\Factory; +use Magento\Framework\Exception\RuntimeException; use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Phrase; +use Psr\Log\LoggerInterface; +use Magento\Framework\App\ObjectManager; abstract class AbstractFactory implements \Magento\Framework\ObjectManager\FactoryInterface { @@ -104,11 +108,23 @@ public function getDefinitions() * @param array $args * * @return object - * + * @throws RuntimeException */ protected function createObject($type, $args) { - return new $type(...array_values($args)); + try { + return new $type(...array_values($args)); + } catch (\TypeError $exception) { + /** @var LoggerInterface $logger */ + $logger = ObjectManager::getInstance()->get(LoggerInterface::class); + $logger->critical( + sprintf('Type Error occurred when creating object: %s, %s', $type, $exception->getMessage()) + ); + + throw new RuntimeException( + new Phrase('Type Error occurred when creating object: %type', ['type' => $type]) + ); + } } /** diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php index 1bba19cb16a5a..1ca755b1281ec 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/RepositoryTest.php @@ -13,21 +13,33 @@ */ class RepositoryTest extends EntityChildTestAbstract { + /** + * @return string + */ protected function getSourceClassName() { return '\\' . \Magento\Framework\ObjectManager\Code\Generator\Sample::class; } + /** + * @return string + */ protected function getResultClassName() { return '\\' . \Magento\Framework\ObjectManager\Code\Generator\Sample\Repository::class; } + /** + * @return string + */ protected function getGeneratorClassName() { return '\\' . \Magento\Framework\ObjectManager\Code\Generator\Repository::class; } + /** + * @return string + */ protected function getOutputFileName() { return 'SampleConverter.php'; diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php index 0bc899f580071..a91efe3ab8d45 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php @@ -7,11 +7,27 @@ interface SampleRepositoryInterface { + /** + * @param SampleInterface $entity + * @return mixed + */ public function save(\Magento\Framework\ObjectManager\Code\Generator\SampleInterface $entity); + /** + * @param $id + * @return mixed + */ public function get($id); + /** + * @param $id + * @return mixed + */ public function deleteById($id); + /** + * @param SampleInterface $entity + * @return mixed + */ public function delete(\Magento\Framework\ObjectManager\Code\Generator\SampleInterface $entity); } diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php index 99ab4ecadcd41..226054a17ff1c 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php @@ -7,10 +7,22 @@ interface TSampleRepositoryInterface { + /** + * @param int $id + * @return TSampleInterface + */ public function get(int $id) : \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface; + /** + * @param TSampleInterface $entity + * @return bool + */ public function delete(\Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity) : bool; + /** + * @param TSampleInterface $entity + * @return TSampleInterface + */ public function save(\Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity) : \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface; } diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php index 894befc31e53f..7dc748cc31f5b 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php @@ -33,6 +33,9 @@ public function validate($schemaFile, $errors) return true; } + /** + * @return string + */ public function getDom() { return 'reader dom result'; diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php index 1c88ab65021c4..0beeeb5e69738 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Relations/RuntimeTest.php @@ -30,6 +30,9 @@ public function testGetParents($type, $parents) $this->assertEquals($parents, $this->model->getParents($type)); } + /** + * @return array + */ public function getParentsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php index 3c494b6abbb94..826e94c6cb8df 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/AggregateParent.php @@ -17,6 +17,14 @@ class AggregateParent implements \Magento\Test\Di\Aggregate\AggregateInterface public $optionalScalar; + /** + * AggregateParent constructor. + * @param \Magento\Test\Di\DiInterface $interface + * @param \Magento\Test\Di\DiParent $parent + * @param \Magento\Test\Di\Child $child + * @param $scalar + * @param int $optionalScalar + */ public function __construct( \Magento\Test\Di\DiInterface $interface, \Magento\Test\Di\DiParent $parent, diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php index b84375e3b5436..2d24e640e90fa 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/Child.php @@ -11,6 +11,16 @@ class Child extends \Magento\Test\Di\Aggregate\AggregateParent public $secondOptionalScalar; + /** + * Child constructor. + * @param \Magento\Test\Di\DiInterface $interface + * @param \Magento\Test\Di\DiParent $parent + * @param \Magento\Test\Di\Child $child + * @param $scalar + * @param $secondScalar + * @param int $optionalScalar + * @param string $secondOptionalScalar + */ public function __construct( \Magento\Test\Di\DiInterface $interface, \Magento\Test\Di\DiParent $parent, diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php index 1c5ac56e2735c..58ee7c819490d 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/_files/Aggregate/WithOptional.php @@ -11,6 +11,11 @@ class WithOptional public $child; + /** + * WithOptional constructor. + * @param \Magento\Test\Di\DiParent|null $parent + * @param \Magento\Test\Di\Child|null $child + */ public function __construct(\Magento\Test\Di\DiParent $parent = null, \Magento\Test\Di\Child $child = null) { $this->parent = $parent; diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php index 9c23b38182f91..edcc4a7e56717 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/CollectionTest.php @@ -79,6 +79,9 @@ public function testGetItems($adjustments, $expectedResult) $this->assertEmpty(array_diff($expectedResult, array_keys($result))); } + /** + * @return array + */ public function getItemsDataProvider() { return [ @@ -104,6 +107,9 @@ public function testGetItemByCode($adjustments, $code, $expectedResult) $this->assertEquals($expectedResult, $item->getAdjustmentCode()); } + /** + * @return array + */ public function getItemByCodeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php index 6fca39b2082fb..adf9ffae16390 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Adjustment/PoolTest.php @@ -65,6 +65,9 @@ public function testGetAdjustmentByCode($code, $expectedResult) $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function getAdjustmentByCodeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php index 2abf26601fbea..42af3268e559b 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Helper/DataTest.php @@ -50,6 +50,9 @@ public function testCurrency($amount, $format, $includeContainer, $result) $this->assertEquals($result, $helper->currency($amount, $format, $includeContainer)); } + /** + * @return array + */ public function currencyDataProvider() { return [ @@ -84,6 +87,9 @@ public function testCurrencyByStore($amount, $store, $format, $includeContainer, $this->assertEquals($result, $helper->currencyByStore($amount, $store, $format, $includeContainer)); } + /** + * @return array + */ public function currencyByStoreDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php index 5d1ab67e09587..ebe2fb453ca83 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/PriceInfo/FactoryTest.php @@ -80,6 +80,9 @@ protected function setUp() $this->factory = new Factory($this->types, $this->objectManagerMock); } + /** + * @return array + */ public function createPriceInfoDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php index 009fb8236c4dc..dddcf0b47abf2 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/AmountTest.php @@ -277,6 +277,12 @@ public function testAdjustmentsHtml() $this->assertEquals($adjustmentHtml1 . $adjustmentHtml2, $this->model->getAdjustmentsHtml()); } + /** + * @param array $data + * @param string $html + * @param string $code + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function getAdjustmentRenderMock($data = [], $html = '', $code = 'adjustment_code') { $adjustmentRender = $this->getMockForAbstractClass( diff --git a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php index 905569936d036..f4588f7d25672 100644 --- a/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php +++ b/lib/internal/Magento/Framework/Pricing/Test/Unit/Render/PriceBoxTest.php @@ -122,6 +122,9 @@ public function testToHtml($data, $priceCode, $cssClasses) $this->assertEquals($cssClasses, $priceBox->getData('css_classes')); } + /** + * @return array + */ public function toHtmlDataProvider() { return [ @@ -225,6 +228,9 @@ public function testGetPriceId($prefix, $suffix, $defaultPrefix, $defaultSuffix) $this->assertEquals($expectedPriceId, $this->model->getPriceId($defaultPrefix, $defaultSuffix)); } + /** + * @return array + */ public function getPriceIdProvider() { return [ diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/DataObjectProcessorTest.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/DataObjectProcessorTest.php index ed26efb5bff64..1977ed3f46456 100644 --- a/lib/internal/Magento/Framework/Reflection/Test/Unit/DataObjectProcessorTest.php +++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/DataObjectProcessorTest.php @@ -86,6 +86,9 @@ public function testBuildOutputDataArray($extensionAttributes, $expectedOutputDa $this->assertEquals($expectedOutputDataArray, $outputData); } + /** + * @return array + */ public function buildOutputDataArrayDataProvider() { $expectedOutputDataArray = [ diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php index 130c285bd3b08..6aebd99deabb0 100644 --- a/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php +++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/ExtensionAttributesProcessorTest.php @@ -154,6 +154,9 @@ public function testBuildOutputDataArrayWithPermission($isPermissionAllowed, $ex ); } + /** + * @return array + */ public function buildOutputDataArrayWithPermissionProvider() { return [ diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/TestDataObject.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/TestDataObject.php index 4e40fe6860586..dede06153259a 100644 --- a/lib/internal/Magento/Framework/Reflection/Test/Unit/TestDataObject.php +++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/TestDataObject.php @@ -9,31 +9,50 @@ class TestDataObject implements TestDataInterface { private $extensionAttributes; + /** + * TestDataObject constructor. + * @param null $extensionAttributes + */ public function __construct($extensionAttributes = null) { $this->extensionAttributes = $extensionAttributes; } + /** + * @return string + */ public function getId() { return '1'; } + /** + * @return string + */ public function getAddress() { return 'someAddress'; } + /** + * @return string + */ public function isDefaultShipping() { return 'true'; } + /** + * @return string + */ public function isRequiredBilling() { return 'false'; } + /** + * @return \Magento\Framework\Api\ExtensionAttributesInterface|null + */ public function getExtensionAttributes() { return $this->extensionAttributes; diff --git a/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php b/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php index 4a61d003e32a8..86a4693d9e5b6 100644 --- a/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php +++ b/lib/internal/Magento/Framework/Reflection/Test/Unit/TypeProcessorTest.php @@ -220,6 +220,9 @@ public function testProcessSimpleTypeException($value, $type) $this->typeProcessor->processSimpleAndAnyType($value, $type); } + /** + * @return array + */ public static function processSimpleTypeExceptionProvider() { return [ diff --git a/lib/internal/Magento/Framework/RequireJs/Config.php b/lib/internal/Magento/Framework/RequireJs/Config.php index 08131b2cccea3..ae45e29f38911 100644 --- a/lib/internal/Magento/Framework/RequireJs/Config.php +++ b/lib/internal/Magento/Framework/RequireJs/Config.php @@ -157,7 +157,7 @@ public function getConfig() $customConfigFiles = $this->fileSource->getFiles($this->design->getDesignTheme(), self::CONFIG_FILE_NAME); foreach ($customConfigFiles as $file) { /** @var $fileReader \Magento\Framework\Filesystem\File\Read */ - $fileReader = $this->readFactory->create($file->getFileName(), DriverPool::FILE); + $fileReader = $this->readFactory->create($file->getFilename(), DriverPool::FILE); $config = $fileReader->readAll($file->getName()); $distributedConfig .= str_replace( ['%config%', '%context%'], diff --git a/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php b/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php index c5e18423eab07..2a3e46b8887a6 100644 --- a/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php +++ b/lib/internal/Magento/Framework/Search/Test/Unit/Request/MapperTest.php @@ -852,6 +852,9 @@ public function testGetFilterException() $this->assertEquals($this->queryBool, $mapper->getRootQuery()); } + /** + * @return array + */ public function getQueryMatchProvider() { return [ @@ -879,6 +882,9 @@ public function getQueryMatchProvider() ]; } + /** + * @return array + */ public function getQueryFilterQueryReferenceProvider() { return [ @@ -926,6 +932,9 @@ public function getQueryFilterQueryReferenceProvider() ]; } + /** + * @return array + */ public function getQueryBoolProvider() { return [ diff --git a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/Base64JsonTest.php b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/Base64JsonTest.php index 8cad058f88466..e93164537f927 100644 --- a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/Base64JsonTest.php +++ b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/Base64JsonTest.php @@ -30,6 +30,9 @@ public function testSerialize($value, $expected) $this->assertEquals($expected, $this->base64json->serialize($value)); } + /** + * @return array + */ public function serializeDataProvider() { $dataObject = new \Magento\Framework\DataObject(['something']); @@ -55,6 +58,9 @@ public function testUnserialize($value, $expected) $this->assertEquals($expected, $this->base64json->unserialize($value)); } + /** + * @return array + */ public function unserializeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php index d1fddbbdf2778..235567103edf7 100644 --- a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php +++ b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php @@ -34,6 +34,9 @@ public function testSerialize($value, $expected) ); } + /** + * @return array + */ public function serializeDataProvider() { $dataObject = new DataObject(['something']); @@ -62,6 +65,9 @@ public function testUnserialize($value, $expected) ); } + /** + * @return array + */ public function unserializeDataProvider() { return [ @@ -95,6 +101,9 @@ public function testUnserializeException($value) $this->json->unserialize($value); } + /** + * @return array + */ public function unserializeExceptionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/SerializeTest.php b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/SerializeTest.php index e74de735c1c1e..1f8e7cf9d0bc3 100644 --- a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/SerializeTest.php +++ b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/SerializeTest.php @@ -33,6 +33,9 @@ public function testSerialize($value, $serializedValue) $this->assertEquals($serializedValue, $this->serialize->serialize($value)); } + /** + * @return array + */ public function serializeDataProvider() { return [ @@ -56,6 +59,9 @@ public function testUnserialize($serializedValue, $value) $this->assertEquals($value, $this->serialize->unserialize($serializedValue)); } + /** + * @return array + */ public function unserializeDataProvider() { return [ @@ -88,6 +94,9 @@ public function testUnserializeException($value) $this->serialize->unserialize($value); } + /** + * @return array + */ public function unserializeExceptionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php b/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php index 19c21ff3529ce..7a3bb98838ff3 100644 --- a/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php +++ b/lib/internal/Magento/Framework/Session/Test/Unit/ConfigTest.php @@ -82,6 +82,9 @@ public function testSetOptions($option, $getter, $value) $this->assertSame($value, $this->config->{$getter}()); } + /** + * @return array + */ public function optionsProvider() { return [ @@ -341,6 +344,9 @@ public function testConstructor($isValidSame, $isValid, $expected) $this->assertEquals($expected, $this->config->getOptions()); } + /** + * @return array + */ public function constructorDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php b/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php index 18050da435c32..4594a471e008d 100644 --- a/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php +++ b/lib/internal/Magento/Framework/Session/Test/Unit/SaveHandler/Redis/LoggerTest.php @@ -70,6 +70,9 @@ public function testLog($logLevel, $method) $this->logger->log($message, $logLevel); } + /** + * @return array + */ public function logDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Columns/TimestampTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Columns/TimestampTest.php index 7d82fb889d308..b64d716368323 100644 --- a/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Columns/TimestampTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Columns/TimestampTest.php @@ -129,6 +129,9 @@ public function testToDefinition($default, $nullable, $onUpdate, $expectedStatem ); } + /** + * @return array + */ public function toDefinitionProvider() { return [ diff --git a/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Constraints/InternalTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Constraints/InternalTest.php index 62c76715b510c..07717611095e1 100644 --- a/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Constraints/InternalTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/Constraints/InternalTest.php @@ -89,6 +89,9 @@ function ($name) { ); } + /** + * @return array + */ public function toDefinitionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/IndexTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/IndexTest.php index 51ee068ef3063..987b8cac42e19 100644 --- a/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/IndexTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/Declaration/Schema/Db/MySQL/Definition/IndexTest.php @@ -82,6 +82,9 @@ function ($name) { ); } + /** + * @return array + */ public function toDefinitionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Setup/Test/Unit/Patch/PatchApplierTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/Patch/PatchApplierTest.php index 66aff8e779027..f89bdc9e137dd 100644 --- a/lib/internal/Magento/Framework/Setup/Test/Unit/Patch/PatchApplierTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/Patch/PatchApplierTest.php @@ -257,6 +257,9 @@ public function testApplyDataPatchForInstalledModule($moduleName, $dataPatches, $this->patchApllier->applyDataPatch($moduleName); } + /** + * @return array + */ public function applyDataPatchDataInstalledModuleProvider() { return [ diff --git a/app/code/Magento/Framework/Test/Unit/Setup/SchemaListenerTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php similarity index 91% rename from app/code/Magento/Framework/Test/Unit/Setup/SchemaListenerTest.php rename to lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php index 4a02cc3e0df55..4e34b3aebbf3e 100644 --- a/app/code/Magento/Framework/Test/Unit/Setup/SchemaListenerTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php @@ -3,8 +3,9 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -namespace Magento\Framework\Test\Unit\Setup; +namespace Magento\Framework\Setup\Test\Unit; use Magento\Framework\DB\Ddl\Table; use Magento\Framework\Setup\SchemaListenerDefinition\BooleanDefinition; @@ -16,7 +17,7 @@ /** * Unit test for schema listener. * - * @package Magento\Framework\Test\Unit\Setup + * @package Magento\Framework\Setup\Test\Unit */ class SchemaListenerTest extends \PHPUnit\Framework\TestCase { @@ -30,7 +31,7 @@ class SchemaListenerTest extends \PHPUnit\Framework\TestCase */ private $objectManagerHelper; - protected function setUp() + protected function setUp() : void { $this->objectManagerHelper = new ObjectManagerHelper($this); $this->model = $this->objectManagerHelper->getObject( @@ -51,7 +52,7 @@ protected function setUp() /** * @return Table */ - private function getCreateTableDDL($tableName) + private function getCreateTableDDL($tableName) : Table { $table = new Table(); $table->setName($tableName); @@ -91,7 +92,7 @@ private function getCreateTableDDL($tableName) ); } - public function testRenameTable() + public function testRenameTable() : void { $this->model->setModuleName('First_Module'); $this->model->createTable($this->getCreateTableDDL('old_table')); @@ -101,7 +102,7 @@ public function testRenameTable() self::assertArrayNotHasKey('old_table', $tables['First_Module']); } - public function testDropIndex() + public function testDropIndex() : void { $this->model->setModuleName('First_Module'); $this->model->createTable($this->getCreateTableDDL('index_table')); @@ -109,7 +110,7 @@ public function testDropIndex() self::assertTrue($this->model->getTables()['First_Module']['index_table']['indexes']['INDEX_KEY']['disabled']); } - public function testCreateTable() + public function testCreateTable() : void { $this->model->setModuleName('First_Module'); $this->model->createTable($this->getCreateTableDDL('new_table')); @@ -125,7 +126,7 @@ public function testCreateTable() 'nullable' => false, 'default' => 'CURRENT_TIMESTAMP', 'disabled' => false, - 'onCreate' => NULL, + 'onCreate' => null, ], 'integer' => [ @@ -135,9 +136,9 @@ public function testCreateTable() 'unsigned' => false, 'nullable' => false, 'identity' => true, - 'default' => NULL, + 'default' => null, 'disabled' => false, - 'onCreate' => NULL, + 'onCreate' => null, ], 'decimal' => [ @@ -147,9 +148,9 @@ public function testCreateTable() 'precision' => '25', 'unsigned' => false, 'nullable' => false, - 'default' => NULL, + 'default' => null, 'disabled' => false, - 'onCreate' => NULL, + 'onCreate' => null, ], ], $tables['First_Module']['new_table']['columns'] @@ -201,7 +202,7 @@ public function testCreateTable() ); } - public function testDropTable() + public function testDropTable() : void { $this->model->setModuleName('Old_Module'); $this->model->createTable($this->getCreateTableDDL('old_table')); @@ -210,7 +211,7 @@ public function testDropTable() self::assertTrue($this->model->getTables()['New_Module']['old_table']['disabled']); } - public function testDropTableInSameModule() + public function testDropTableInSameModule() : void { $this->model->setModuleName('Old_Module'); $this->model->createTable($this->getCreateTableDDL('old_table')); diff --git a/app/code/Magento/Framework/Test/Unit/Setup/SchemaPersistorTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php similarity index 94% rename from app/code/Magento/Framework/Test/Unit/Setup/SchemaPersistorTest.php rename to lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php index 56f04f4c7ba77..cc88af15a262b 100644 --- a/app/code/Magento/Framework/Test/Unit/Setup/SchemaPersistorTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php @@ -3,8 +3,9 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); -namespace Magento\Framework\Test\Unit\Setup; +namespace Magento\Framework\Setup\Test\Unit; use Magento\Framework\Component\ComponentRegistrar; use Magento\Framework\Setup\SchemaListener; @@ -14,7 +15,7 @@ /** * Unit test for schema persistor. * - * @package Magento\Framework\Test\Unit\Setup + * @package Magento\Framework\Setup\Test\Unit */ class SchemaPersistorTest extends \PHPUnit\Framework\TestCase { @@ -38,7 +39,7 @@ class SchemaPersistorTest extends \PHPUnit\Framework\TestCase */ private $xmlPersistor; - protected function setUp() + protected function setUp() : void { $this->componentRegistrarMock = $this->getMockBuilder(ComponentRegistrar::class) ->disableOriginalConstructor() @@ -60,7 +61,7 @@ protected function setUp() * @param array $tables * @param string $expectedXML */ - public function testPersist(array $tables, $expectedXML) + public function testPersist(array $tables, $expectedXML) : void { $moduleName = 'First_Module'; /** @var SchemaListener|\PHPUnit_Framework_MockObject_MockObject $schemaListenerMock */ @@ -88,7 +89,7 @@ public function testPersist(array $tables, $expectedXML) * * @return array */ - public function schemaListenerTablesDataProvider() + public function schemaListenerTablesDataProvider() : array { return [ [ @@ -143,6 +144,7 @@ public function schemaListenerTablesDataProvider() ] ] ], + // @codingStandardsIgnoreStart 'XMLResult' => '<?xml version="1.0"?> <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd"> @@ -161,6 +163,7 @@ public function schemaListenerTablesDataProvider() </index> </table> </schema>' + // @codingStandardsIgnoreEnd ] ]; } diff --git a/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php b/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php index 213e2afa2c655..01964bdced655 100644 --- a/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php +++ b/lib/internal/Magento/Framework/Shell/Test/Unit/CommandRendererTest.php @@ -24,6 +24,9 @@ public function testRender($expectedCommand, $actualCommand, $testArguments) ); } + /** + * @return array + */ public function commandsDataProvider() { $testArgument = 'argument'; diff --git a/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php b/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php index 2455b8f3cb500..ea2149e6f9e34 100644 --- a/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php +++ b/lib/internal/Magento/Framework/Simplexml/Test/Unit/ElementTest.php @@ -108,6 +108,9 @@ public function testSetAttribute($name, $value) $this->assertEquals($xml->getAttribute($name), $value); } + /** + * @return array + */ public function setAttributeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php index 26dcbc81262a2..64eb1e9c4bf39 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/BooleanUtilsTest.php @@ -38,6 +38,9 @@ public function testToBoolean($input, $expected) $this->assertSame($expected, $actual); } + /** + * @return array + */ public function toBooleanDataProvider() { return [ @@ -64,6 +67,9 @@ public function testToBooleanException($input) $this->object->toBoolean($input); } + /** + * @return array + */ public function toBooleanExceptionDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php index 1ea942f5e9013..5a29fad2b16ab 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php @@ -272,6 +272,9 @@ public function testSetSensitiveCookieNoMetadata($cookieName, $secure) $this->assertTrue(self::$isSetCookieInvoked); } + /** + * @return array + */ public function isCurrentlySecureDataProvider() { return [ @@ -840,6 +843,11 @@ private static function assertCookieSize( self::assertEquals('', $path); } + /** + * @param $get + * @param $default + * @param $return + */ protected function stubGetCookie($get, $default, $return) { $this->readerMock->expects($this->atLeastOnce()) diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php index 9015968cee85c..d409a89c2cc91 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/SensitiveCookieMetadataTest.php @@ -59,6 +59,9 @@ public function testConstructorAndGetHttpOnly($metadata, $httpOnly) $this->assertEquals('path', $object->getPath()); } + /** + * @return array + */ public function constructorAndGetHttpOnlyTestDataProvider() { return [ @@ -104,6 +107,9 @@ public function testGetSecure($isSecure, $metadata, $expected, $callNum = 1) $this->assertEquals($expected, $object->getSecure()); } + /** + * @return array + */ public function getSecureDataProvider() { return [ @@ -160,6 +166,9 @@ public function testToArray($isSecure, $metadata, $expected, $callNum = 1) $this->assertEquals($expected, $object->__toArray()); } + /** + * @return array + */ public function toArrayDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php b/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php index 68be50810d44f..d4a19428c61a0 100644 --- a/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/ArchiveTest.php @@ -64,6 +64,9 @@ public function testIsArchive($file, $isArchive) $this->assertEquals($isArchive, $this->archive->isArchive($file)); } + /** + * @return array + */ public function isArchiveProvider() { return [ @@ -98,6 +101,9 @@ public function testIsTar($file, $isArchive) $this->assertEquals($isArchive, $this->archive->isTar($file)); } + /** + * @return array + */ public function isTarProvider() { return [ @@ -143,6 +149,9 @@ public function testPackUnpackGzBz($destinationFile, $extensionRequired) $this->assertStringStartsWith($this->destinationDir, $this->unpacked); } + /** + * @return array + */ public function destinationProvider() { return [ @@ -200,6 +209,9 @@ public function testExtract($destinationFile, $extensionRequired) $this->assertStringStartsWith($this->destinationDir, $this->unpacked); } + /** + * @return array + */ public function tarProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/Data/Form/Element/HiddenTest.php b/lib/internal/Magento/Framework/Test/Unit/Data/Form/Element/HiddenTest.php index 023070d4d69d6..7d54337f377fa 100644 --- a/lib/internal/Magento/Framework/Test/Unit/Data/Form/Element/HiddenTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/Data/Form/Element/HiddenTest.php @@ -45,6 +45,9 @@ public function testGetElementHtml($value) $this->assertContains($value, $html); } + /** + * @return array + */ public function getElementHtmlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/DataObjectTest.php b/lib/internal/Magento/Framework/Test/Unit/DataObjectTest.php index a064535590f32..2c481e3606c85 100644 --- a/lib/internal/Magento/Framework/Test/Unit/DataObjectTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/DataObjectTest.php @@ -384,6 +384,9 @@ public function testUnderscore($input, $expectedOutput) $this->assertEquals($expectedOutput, $output); } + /** + * @return array + */ public function underscoreDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php b/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php index c728fdecfeaab..ec05478b90db9 100644 --- a/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php @@ -103,6 +103,9 @@ public function testEscapeJs($data, $expected) $this->assertEquals($expected, $this->escaper->escapeJs($data)); } + /** + * @return array + */ public function escapeJsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/FlagManagerTest.php b/lib/internal/Magento/Framework/Test/Unit/FlagManagerTest.php index 955f16d4241c2..ea6ddf56414ff 100644 --- a/lib/internal/Magento/Framework/Test/Unit/FlagManagerTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/FlagManagerTest.php @@ -112,6 +112,9 @@ public function testDeleteFlag($isFlagExist) ); } + /** + * @param $flagCode + */ private function setupFlagObject($flagCode) { $this->flagFactoryMock->expects($this->once()) diff --git a/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php b/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php index d5243cacb1616..805bd8fe4510a 100644 --- a/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/Message/PhraseFactoryTest.php @@ -33,6 +33,9 @@ public function testCreate($mainMessage, $subMessages, $separator, $expectedResu $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function dataProvider() { $subMessage1 = new Error('go jogging'); diff --git a/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php b/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php index 0ef37beb11aff..a52c49136d150 100644 --- a/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php @@ -119,6 +119,9 @@ public function testBeforeDispatchOutOfDateWithErrors(array $errors, string $exp $this->plugin->beforeDispatch($this->frontControllerMock, $this->requestMock); } + /** + * @return array + */ public static function beforeDispatchOutOfDateWithErrorsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Test/Unit/ShellTest.php b/lib/internal/Magento/Framework/Test/Unit/ShellTest.php index 913fd883eaad2..9f223f916b97a 100644 --- a/lib/internal/Magento/Framework/Test/Unit/ShellTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/ShellTest.php @@ -83,6 +83,9 @@ public function testExecuteLog($command, $commandArgs, $expectedResult, $expecte ); } + /** + * @return array + */ public function executeDataProvider() { // backtick symbol (`) has to be replaced with environment-dependent quote character diff --git a/lib/internal/Magento/Framework/Test/Unit/UrlTest.php b/lib/internal/Magento/Framework/Test/Unit/UrlTest.php index 5c5df5b462b70..3713978d0f74e 100644 --- a/lib/internal/Magento/Framework/Test/Unit/UrlTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/UrlTest.php @@ -163,6 +163,9 @@ public function testGetCurrentUrl($httpHost, $url) $this->assertEquals($url, $model->getCurrentUrl()); } + /** + * @return array + */ public function getCurrentUrlProvider() { return [ @@ -337,6 +340,9 @@ public function testGetUrlRouteUseRewrite() $this->assertEquals('/catalog/product/view/', $model->getUrl('catalog', ['_use_rewrite' => 1])); } + /** + * @return array + */ public function getUrlDataProvider() { return [ @@ -497,6 +503,9 @@ public function testGetRedirectUrlWithSessionId() $this->assertEquals('http://example.com/?foo=bar', $model->getRedirectUrl('http://example.com/')); } + /** + * @return array + */ public function getRebuiltUrlDataProvider() { return [ @@ -558,6 +567,9 @@ public function testIsOwnOriginUrl($result, $referrer) $this->assertEquals($result, $model->isOwnOriginUrl()); } + /** + * @return array + */ public function isOwnOriginUrlDataProvider() { return [ @@ -607,6 +619,9 @@ public function testGetConfigData($urlType, $configPath, $isSecure, $isSecureCal $this->assertEquals('http://localhost/', $model->getConfigData($key)); } + /** + * @return array + */ public function getConfigDataDataProvider() { return [ @@ -712,6 +727,9 @@ public function testSessionUrlVarWithoutMatchedHostsAndBaseUrl() ); } + /** + * @return array + */ public function sessionUrlVarWithMatchedHostsAndBaseUrlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/TestFramework/Test/Unit/Unit/Matcher/MethodInvokedAtIndexTest.php b/lib/internal/Magento/Framework/TestFramework/Test/Unit/Unit/Matcher/MethodInvokedAtIndexTest.php index 9721cdb8f9331..a232934e1c785 100644 --- a/lib/internal/Magento/Framework/TestFramework/Test/Unit/Unit/Matcher/MethodInvokedAtIndexTest.php +++ b/lib/internal/Magento/Framework/TestFramework/Test/Unit/Unit/Matcher/MethodInvokedAtIndexTest.php @@ -11,14 +11,14 @@ class MethodInvokedAtIndexTest extends \PHPUnit\Framework\TestCase { public function testMatches() { - $invocationObject = new \PHPUnit_Framework_MockObject_Invocation_Object( + $invocationObject = new \PHPUnit\Framework\MockObject\Invocation\ObjectInvocation( 'ClassName', 'ValidMethodName', [], 'void', new \StdClass() ); - $matcher = new \Magento\Framework\TestFramework\Unit\Matcher\MethodInvokedAtIndex(0); + $matcher = new MethodInvokedAtIndex(0); $this->assertTrue($matcher->matches($invocationObject)); $matcher = new MethodInvokedAtIndex(1); diff --git a/lib/internal/Magento/Framework/TestFramework/Unit/Block/Adminhtml.php b/lib/internal/Magento/Framework/TestFramework/Unit/Block/Adminhtml.php index 08d618637db69..f24500c788020 100644 --- a/lib/internal/Magento/Framework/TestFramework/Unit/Block/Adminhtml.php +++ b/lib/internal/Magento/Framework/TestFramework/Unit/Block/Adminhtml.php @@ -197,9 +197,9 @@ protected function _makeMock($className) * @param \PHPUnit_Framework_MockObject_MockObject $object * @param string $stubName * @param mixed $return - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount|null $expects + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount|null $expects * - * @return \PHPUnit_Framework_MockObject_Builder_InvocationMocker + * @return \PHPUnit\Framework\MockObject\Builder\InvocationMocker */ protected function _setStub( \PHPUnit_Framework_MockObject_MockObject $object, diff --git a/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ProxyTesting.php b/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ProxyTesting.php index 0dc4d490280ec..3085770980dd3 100644 --- a/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ProxyTesting.php +++ b/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ProxyTesting.php @@ -40,12 +40,12 @@ public function invokeWithExpectations( $expectedParams = $params; } $builder = $proxiedObject->expects( - new \PHPUnit_Framework_MockObject_Matcher_InvokedCount(1) + new \PHPUnit\Framework\MockObject\Matcher\InvokedCount(1) )->method( $expectedMethod ); $builder = call_user_func_array([$builder, 'with'], $expectedParams); - $builder->will(new \PHPUnit_Framework_MockObject_Stub_Return($proxiedResult)); + $builder->will(new \PHPUnit\Framework\MockObject\Stub\ReturnStub($proxiedResult)); return call_user_func_array([$object, $method], $params); } diff --git a/lib/internal/Magento/Framework/TestFramework/Unit/Matcher/MethodInvokedAtIndex.php b/lib/internal/Magento/Framework/TestFramework/Unit/Matcher/MethodInvokedAtIndex.php index cd116521dbea5..c7d62205dcaf9 100644 --- a/lib/internal/Magento/Framework/TestFramework/Unit/Matcher/MethodInvokedAtIndex.php +++ b/lib/internal/Magento/Framework/TestFramework/Unit/Matcher/MethodInvokedAtIndex.php @@ -6,6 +6,9 @@ namespace Magento\Framework\TestFramework\Unit\Matcher; +use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; + /** * Class MethodInvokedAtIndex * Matches invocations per 'method' at 'position' @@ -18,30 +21,83 @@ * * @package Magento\TestFramework\Matcher */ -class MethodInvokedAtIndex extends \PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex +class MethodInvokedAtIndex implements \PHPUnit\Framework\MockObject\Matcher\Invocation { + /** + * @var int + */ + private $sequenceIndex; + + /** + * @var int + */ + private $currentIndex = -1; + /** * @var array */ - protected $indexes = []; + private $indexes = []; + + /** + * @param int $sequenceIndex + */ + public function __construct($sequenceIndex) + { + $this->sequenceIndex = $sequenceIndex; + } + + /** + * @return string + */ + public function toString(): string + { + return 'invoked at sequence index ' . $this->sequenceIndex; + } /** - * @param \PHPUnit_Framework_MockObject_Invocation $invocation + * @param \PHPUnit\Framework\MockObject\Invocation $invocation * @return boolean */ - public function matches(\PHPUnit_Framework_MockObject_Invocation $invocation) + public function matches(BaseInvocation $invocation): bool { /** @noinspection PhpUndefinedFieldInspection */ - if (!isset($this->indexes[$invocation->methodName])) { + if (!isset($this->indexes[$invocation->getMethodName()])) { /** @noinspection PhpUndefinedFieldInspection */ - $this->indexes[$invocation->methodName] = 0; + $this->indexes[$invocation->getMethodName()] = 0; } else { /** @noinspection PhpUndefinedFieldInspection */ - $this->indexes[$invocation->methodName]++; + $this->indexes[$invocation->getMethodName()]++; } $this->currentIndex++; /** @noinspection PhpUndefinedFieldInspection */ - return $this->indexes[$invocation->methodName] == $this->sequenceIndex; + return $this->indexes[$invocation->getMethodName()] == $this->sequenceIndex; + } + + /** + * @param BaseInvocation $invocation + * @return mixed + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function invoked(BaseInvocation $invocation) + { + } + + /** + * Verifies that the current expectation is valid. If everything is OK the + * code should just return, if not it must throw an exception. + * + * @throws ExpectationFailedException + */ + public function verify(): void + { + if ($this->currentIndex < $this->sequenceIndex) { + throw new ExpectationFailedException( + \sprintf( + 'The expected invocation at index %s was never reached.', + $this->sequenceIndex + ) + ); + } } } diff --git a/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php b/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php index 6e222ba90da8e..b1ef51f010c5b 100644 --- a/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php +++ b/lib/internal/Magento/Framework/Translate/Test/Unit/InlineTest.php @@ -74,6 +74,9 @@ public function testIsAllowed($isEnabled, $isActive, $isDevAllowed, $result) $this->assertEquals($result, $model->isAllowed()); } + /** + * @return array + */ public function isAllowedDataProvider() { return [ @@ -126,6 +129,9 @@ public function testProcessResponseBodyStripInline($body, $expected) $this->assertEquals($body, $expected); } + /** + * @return array + */ public function processResponseBodyStripInlineDataProvider() { return [ @@ -192,6 +198,9 @@ public function testProcessResponseBody($scope, $body, $expected) $this->assertEquals($body, $expected); } + /** + * @return array + */ public function processResponseBodyDataProvider() { return [ @@ -254,6 +263,9 @@ public function testProcessResponseBodyGetInlineScript($scope, $body, $expected) $this->assertEquals($body, $expected); } + /** + * @return array + */ public function processResponseBodyGetInlineScriptDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php b/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php index 4888077104728..f053a9afff74d 100644 --- a/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php +++ b/lib/internal/Magento/Framework/Unserialize/Test/Unit/UnserializeTest.php @@ -55,6 +55,9 @@ public function testUnserializeObject($serialized) $this->assertFalse($this->unserialize->unserialize($serialized)); } + /** + * @return array + */ public function unserializeObjectDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php b/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php index 5bb4f54b84a5c..016208d0920aa 100644 --- a/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php +++ b/lib/internal/Magento/Framework/Url/Test/Unit/Helper/DataTest.php @@ -79,6 +79,9 @@ public function testGetEncodedUrl($url, $callNum) $this->assertEquals($encodedUrl, $helper->getEncodedUrl($url)); } + /** + * @return array + */ public function getEncodedUrlDataProvider() { return [ @@ -98,6 +101,9 @@ public function testAddRequestParam($param, $expected) $this->assertEquals($expected, $helper->addRequestParam('http://example.com', $param)); } + /** + * @return array + */ public function addRequestParamDataProvider() { return [ @@ -145,6 +151,9 @@ public function testRemoveRequestParam($paramKey, $expected) $this->assertEquals($expected, $helper->removeRequestParam($url, $paramKey)); } + /** + * @return array + */ public function removeRequestParamDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php b/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php index fbda5e36c9934..3fc332aa1af52 100644 --- a/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php +++ b/lib/internal/Magento/Framework/Url/Test/Unit/SecurityInfoTest.php @@ -32,6 +32,9 @@ public function testIsSecureChecksIfUrlIsInSecureList($url, $expected) $this->assertEquals($expected, $this->_model->isSecure($url)); } + /** + * @return array + */ public function secureUrlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php b/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php index a06297a382f57..0fd70b5bc5f1d 100644 --- a/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php +++ b/lib/internal/Magento/Framework/Validator/Test/Unit/ObjectTest.php @@ -92,6 +92,9 @@ public function testIsValid(array $inputEntityData, array $expectedErrors) } } + /** + * @return array + */ public function validateDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Asset/Merged.php b/lib/internal/Magento/Framework/View/Asset/Merged.php index 5b206b235eb11..302eb1226b8ef 100644 --- a/lib/internal/Magento/Framework/View/Asset/Merged.php +++ b/lib/internal/Magento/Framework/View/Asset/Merged.php @@ -5,6 +5,8 @@ */ namespace Magento\Framework\View\Asset; +use Magento\Framework\App\ObjectManager; + /** * \Iterator that aggregates one or more assets and provides a single public file with equivalent behavior */ @@ -40,27 +42,39 @@ class Merged implements \Iterator */ protected $contentType; + /** + * @var \Magento\Framework\App\View\Deployment\Version\StorageInterface + */ + private $versionStorage; + /** * @var bool */ protected $isInitialized = false; /** + * Merged constructor. + * * @param \Psr\Log\LoggerInterface $logger * @param MergeStrategyInterface $mergeStrategy * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param MergeableInterface[] $assets + * @param \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage * @throws \InvalidArgumentException */ public function __construct( \Psr\Log\LoggerInterface $logger, MergeStrategyInterface $mergeStrategy, \Magento\Framework\View\Asset\Repository $assetRepo, - array $assets + array $assets, + \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage = null ) { $this->logger = $logger; $this->mergeStrategy = $mergeStrategy; $this->assetRepo = $assetRepo; + $this->versionStorage = $versionStorage ?: ObjectManager::getInstance()->get( + \Magento\Framework\App\View\Deployment\Version\StorageInterface::class + ); if (!$assets) { throw new \InvalidArgumentException('At least one asset has to be passed for merging.'); @@ -116,6 +130,12 @@ private function createMergedAsset(array $assets) $paths[] = $asset->getPath(); } $paths = array_unique($paths); + + $version = $this->versionStorage->load(); + if ($version) { + $paths[] = $version; + } + $filePath = md5(implode('|', $paths)) . '.' . $this->contentType; return $this->assetRepo->createArbitrary($filePath, self::getRelativeDir()); } diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php index 17a320164dad3..9ba7833a355d7 100644 --- a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php +++ b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php @@ -75,7 +75,7 @@ public function collectFiles($searchPattern = null) } $files = $this->collectorAggregated->getFiles($this->design->getDesignTheme(), $searchPattern); foreach ($files as $file) { - $fullFileName = $file->getFileName(); + $fullFileName = $file->getFilename(); $fileDir = dirname($fullFileName); $fileName = basename($fullFileName); $dirRead = $this->readFactory->create($fileDir); diff --git a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php index fe5c94ed21b30..a0cdbfb7d8fe7 100644 --- a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php +++ b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php @@ -443,6 +443,9 @@ public function load($handles = []) if ($result) { $this->addUpdate($result); $this->pageLayout = $this->_loadCache($cacheIdPageLayout); + foreach ($this->getHandles() as $handle) { + $this->allHandles[$handle] = $this->handleProcessed; + } return $this; } @@ -672,7 +675,7 @@ public function getFileLayoutUpdatesXml() $result = $this->_loadXmlString($result); } else { $result = $this->_loadFileLayoutUpdatesXml(); - $this->_saveCache($result->asXml(), $cacheId); + $this->_saveCache($result->asXML(), $cacheId); } $this->layoutUpdatesCache = $result; return $result; diff --git a/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php b/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php index 8328f03fd6db5..71a2951b40420 100644 --- a/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php +++ b/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php @@ -138,6 +138,6 @@ private function setMetadata($pageConfigStructure, $node) $metadataName = $node->getAttribute('name'); } - $pageConfigStructure->setMetaData($metadataName, $node->getAttribute('content')); + $pageConfigStructure->setMetadata($metadataName, $node->getAttribute('content')); } } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php index 68b5f4bf3a20d..2d6ea2efe4958 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php @@ -53,6 +53,9 @@ public function testGetConfigPath( $this->assertEquals($expectedResult, $this->fallbackContext->getConfigPath()); } + /** + * @return array + */ public function getConfigPathDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php index b2953bc24e131..64d0419e070d0 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/FileTest.php @@ -134,6 +134,9 @@ public function testGetContent($content) $this->assertEquals($content, $this->object->getContent()); // no in-memory caching for content } + /** + * @return array + */ public function getContentDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php index c4b7cefcfa7c2..4c17a2c0b35f4 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergeServiceTest.php @@ -118,6 +118,9 @@ public function testGetMergedAssets(array $assets, $contentType, $appMode, $merg $this->assertSame($mergedAsset, $this->object->getMergedAssets($assets, $contentType)); } + /** + * @return array + */ public static function getMergedAssetsDataProvider() { $jsAssets = [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php index 164a2ca4d4d1b..52b45a510e722 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php @@ -12,6 +12,7 @@ use Magento\Framework\View\Asset\Repository as AssetRepository; use Magento\Framework\View\Asset\MergeableInterface; use Magento\Framework\View\Asset\MergeStrategyInterface; +use Magento\Framework\App\View\Deployment\Version\StorageInterface; /** * Class MergedTest @@ -43,6 +44,11 @@ class MergedTest extends \PHPUnit\Framework\TestCase */ private $assetRepo; + /** + * @var StorageInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $versionStorage; + protected function setUp() { $this->assetJsOne = $this->getMockForAbstractClass(MergeableInterface::class); @@ -66,6 +72,7 @@ protected function setUp() $this->assetRepo = $this->getMockBuilder(AssetRepository::class) ->disableOriginalConstructor() ->getMock(); + $this->versionStorage = $this->createMock(StorageInterface::class); } /** @@ -74,7 +81,13 @@ protected function setUp() */ public function testConstructorNothingToMerge() { - new \Magento\Framework\View\Asset\Merged($this->logger, $this->mergeStrategy, $this->assetRepo, []); + new \Magento\Framework\View\Asset\Merged( + $this->logger, + $this->mergeStrategy, + $this->assetRepo, + [], + $this->versionStorage + ); } /** @@ -90,6 +103,7 @@ public function testConstructorRequireMergeInterface() 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, 'assets' => [$this->assetJsOne, $assetUrl], + 'versionStorage' => $this->versionStorage, ]); } @@ -109,6 +123,7 @@ public function testConstructorIncompatibleContentTypes() 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, 'assets' => [$this->assetJsOne, $assetCss], + 'versionStorage' => $this->versionStorage, ]); } @@ -124,6 +139,7 @@ public function testIteratorInterfaceMerge() 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, 'assets' => $assets, + 'versionStorage' => $this->versionStorage, ]); $mergedAsset = $this->createMock(\Magento\Framework\View\Asset\File::class); @@ -158,6 +174,7 @@ public function testIteratorInterfaceMergeFailure() 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, 'assets' => [$this->assetJsOne, $this->assetJsTwo, $assetBroken], + 'versionStorage' => $this->versionStorage, ]); $this->logger->expects($this->once())->method('critical')->with($this->identicalTo($mergeError)); diff --git a/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php b/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php index 923ec2ff322b5..7e672d58d18e0 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/ContextTest.php @@ -234,6 +234,9 @@ public function testGetAcceptType($headerAccept, $acceptType) $this->assertEquals($acceptType, $this->context->getAcceptType()); } + /** + * @return array + */ public function getAcceptTypeDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php b/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php index 816087a906c2e..a1f20f2c79cc9 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/DataSourcePoolTest.php @@ -45,6 +45,10 @@ public function testAddWithException() $this->dataSourcePool->add('DataSourcePoolTestBlock', 'NotExistingBlockClass'); } + /** + * @param $blockClass + * @return \PHPUnit_Framework_MockObject_MockObject + */ protected function createBlock($blockClass) { $block = $this->createMock(\Magento\Framework\View\Element\BlockInterface::class); diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php index a3f34b732be82..70233c0196dc5 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php @@ -220,9 +220,9 @@ public function testToHtmlWhenModuleIsDisabled() * @param string|bool $cacheLifetime * @param string|bool $dataFromCache * @param string $dataForSaveCache - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsDispatchEvent - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsCacheLoad - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsCacheSave + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsDispatchEvent + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsCacheLoad + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsCacheSave * @param string $expectedResult * @return void * @dataProvider getCacheLifetimeDataProvider diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php index 4515a29c65e4f..909748722a081 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php @@ -57,7 +57,7 @@ public function testIsCurrentIfIsset() /** @var \Magento\Framework\View\Element\Html\Link\Current $link */ $link = $this->_objectManager->getObject(\Magento\Framework\View\Element\Html\Link\Current::class); $link->setCurrent(true); - $this->assertTrue($link->IsCurrent()); + $this->assertTrue($link->isCurrent()); } public function testIsCurrent() diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php index 692dcb54d1447..b911a38dbb488 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php @@ -35,6 +35,9 @@ public function testGetLinkAttributes($link, $expected) $this->assertEquals($expected, $link->getLinkAttributes()); } + /** + * @return array + */ public function getLinkAttributesDataProvider() { $objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php index 10e21763ba802..fefbdf0ed5111 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Js/CookieTest.php @@ -83,6 +83,9 @@ public function testGetDomain($domain, $isIp, $expectedResult) $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public static function domainDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php index b2b1db44d6a0b..6ac8355fe7371 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/ItemTest.php @@ -51,6 +51,9 @@ public function testToHtml($liParams, $innerText, $expectedHtml) $this->assertEquals($expectedHtml, $this->item->toHtml()); } + /** + * @return array + */ public function toHtmlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php index 785c41c1d6e2f..a16b1ca80c49e 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Text/TextList/LinkTest.php @@ -54,6 +54,9 @@ public function testToHtml($liParams, $aParams, $innerText, $afterText, $expecte $this->assertEquals($expectedHtml, $this->link->toHtml()); } + /** + * @return array + */ public function toHtmlDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php b/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php index d6918c142cee0..8960aa71d22bb 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/Decorator/ModuleDependencyTest.php @@ -53,6 +53,9 @@ public function testGetFiles(array $fixtureFiles, array $expectedFiles, $message $this->assertSame($expectedFiles, $this->_model->getFiles($theme, '*.xml'), $message); } + /** + * @return array + */ public function getFilesDataProvider() { $fileOne = new \Magento\Framework\View\File('b.xml', 'Fixture_ModuleB'); diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php index 458b23a4b15eb..887f3f1f63a9f 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/HelperMethodTest.php @@ -53,6 +53,10 @@ public function testEvaluate() $this->assertSame($expected, $actual); } + /** + * @param $input + * @return string + */ public function help($input) { $this->assertSame('some text (evaluated)', $input); @@ -73,6 +77,9 @@ public function testEvaluateException($helperMethod, $expectedExceptionMessage) $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateExceptionDataProvider() { $nonExistingHelper = __CLASS__ . '::non_existing'; diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php index 5ae0b0332f28a..c4fff297b4ec1 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/NamedParamsTest.php @@ -67,6 +67,9 @@ public function testEvaluateWrongParam($input, $expectedExceptionMessage) $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateWrongParamDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php index bf01355dcb491..d20af502084f5 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Argument/Interpreter/OptionsTest.php @@ -74,6 +74,9 @@ public function testEvaluateWrongModel($input, $expectedException, $expectedExce $this->_model->evaluate($input); } + /** + * @return array + */ public function evaluateWrongModelDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php index 45754d0618d05..427e15d901d6d 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/BuilderFactoryTest.php @@ -65,6 +65,9 @@ public function testCreate($type, $arguments, $layoutBuilderClass) $this->buildFactory->create($type, $arguments); } + /** + * @return array + */ public function createDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Data/StructureTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Data/StructureTest.php index 703334f896db5..ab623e59d3712 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Data/StructureTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Data/StructureTest.php @@ -49,7 +49,7 @@ protected function setUp() } /** - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $loggerExpects + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $loggerExpects * @param string $stateMode * @return void * @dataProvider reorderChildElementLogDataProvider diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php index ab5c908cb16af..a663b65561345 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/ElementTest.php @@ -20,6 +20,9 @@ public function testGetElementName($xml, $name) $this->assertEquals($name, $model->getElementName()); } + /** + * @return array + */ public function elementNameDataProvider() { return [ @@ -31,6 +34,9 @@ public function elementNameDataProvider() ]; } + /** + * @return array + */ public function cacheableDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Generator/BlockTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Generator/BlockTest.php index 4db2da1c1ece9..2a53dbe352cdd 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Generator/BlockTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Generator/BlockTest.php @@ -20,10 +20,10 @@ class BlockTest extends \PHPUnit\Framework\TestCase * @param array $testArgumentData * @param bool $testIsFlag * @param bool $isNeedEvaluate - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $addToParentGroupCount - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setTemplateCount - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setTtlCount - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setIsFlag + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $addToParentGroupCount + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setTemplateCount + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setTtlCount + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setIsFlag * @dataProvider provider * * @SuppressWarnings(PHPMD.ExcessiveMethodLength) diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/BlockTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/BlockTest.php index e69e778c85518..ac1dd43f4dd01 100755 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/BlockTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/BlockTest.php @@ -89,11 +89,11 @@ protected function setUp() /** * @param string $literal - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $scheduleStructureCount + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $scheduleStructureCount * @param string $ifconfigValue * @param array $expectedConditions - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getCondition - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setCondition + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $getCondition + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setCondition * @param string $aclKey * @param string $aclValue * @@ -238,9 +238,9 @@ public function processBlockDataProvider() /** * @param string $literal * @param string $remove - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getCondition - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setCondition - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setRemoveCondition + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $getCondition + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setCondition + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setRemoveCondition * @dataProvider processReferenceDataProvider */ public function testProcessReference( diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/ContainerTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/ContainerTest.php index e4834accbcc07..1a3b77f1e7899 100755 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/ContainerTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/ContainerTest.php @@ -56,9 +56,9 @@ protected function setUp() * @param string $containerName * @param array $structureElement * @param array $expectedData - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getStructureCondition - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setStructureCondition - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setRemoveCondition + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $getStructureCondition + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setStructureCondition + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setRemoveCondition * * @dataProvider processDataProvider */ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php index 1568c381226e2..158718587ad60 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/Reader/UiComponentTest.php @@ -158,6 +158,9 @@ public function testInterpret($element) $this->model->interpret($this->context, $element); } + /** + * @return array + */ public function interpretDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/ScheduledStructure/HelperTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/ScheduledStructure/HelperTest.php index 6421610c6dbcd..401492a774adc 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/ScheduledStructure/HelperTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/ScheduledStructure/HelperTest.php @@ -144,7 +144,7 @@ public function testScheduleNonExistentElement() } /** - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $loggerExpects + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $loggerExpects * @param string $stateMode * @return void * @dataProvider scheduleElementLogDataProvider diff --git a/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php b/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php index c0300164e26fe..f8a8939bbfe36 100755 --- a/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php @@ -273,7 +273,7 @@ public function testGenerateXml() ->with($this->equalTo([])) ->will($this->returnSelf()); $this->assertSame($this->model, $this->model->generateXml()); - $this->assertSame('<some_update>123</some_update>', $this->model->getNode('some_update')->asXml()); + $this->assertSame('<some_update>123</some_update>', $this->model->getNode('some_update')->asXML()); } public function testGetChildBlock() diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php index 0307821f92cce..44e6e878a18c1 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Page/ConfigTest.php @@ -288,6 +288,9 @@ public function testAddPageAsset($file, $properties, $name, $expectedName) ); } + /** + * @return array + */ public function pageAssetDataProvider() { return [ @@ -327,6 +330,9 @@ public function testAddRemotePageAsset($url, $contentType, $properties, $name, $ ); } + /** + * @return array + */ public function remotePageAssetDataProvider() { return [ @@ -383,6 +389,9 @@ public function testElementAttribute($elementType, $attribute, $value) $this->assertEquals($value, $this->model->getElementAttribute($elementType, $attribute)); } + /** + * @return array + */ public function elementAttributeDataProvider() { return [ @@ -418,6 +427,9 @@ public function testElementAttributeException($elementType, $attribute, $value) $this->model->setElementAttribute($elementType, $attribute, $value); } + /** + * @return array + */ public function elementAttributeExceptionDataProvider() { return [ @@ -453,6 +465,9 @@ public function testElementAttributes($elementType, $attributes) $this->assertEquals($attributes, $this->model->getElementAttributes($elementType)); } + /** + * @return array + */ public function elementAttributesDataProvider() { return [ @@ -477,6 +492,9 @@ public function testPageLayout($handle) $this->assertEquals($handle, $this->model->getPageLayout()); } + /** + * @return array + */ public function pageLayoutDataProvider() { return [ @@ -537,6 +555,9 @@ public function testGetIncludes($isAvailable, $result) $this->assertEquals($result, $model->getIncludes()); } + /** + * @return array + */ public function getIncludesDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Result/LayoutTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Result/LayoutTest.php index 8b6e8d41b5645..d40d65dd2de77 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Result/LayoutTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Result/LayoutTest.php @@ -98,8 +98,8 @@ public function testAddUpdate() * @param string $headerName * @param string $headerValue * @param bool $replaceHeader - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setHttpResponseCodeCount - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setHeaderCount + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setHttpResponseCodeCount + * @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $setHeaderCount * @dataProvider renderResultDataProvider */ public function testRenderResult( diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php index d30df5d76b75b..1fc6e92f87aa8 100644 --- a/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php +++ b/lib/internal/Magento/Framework/Webapi/Test/Unit/RequestTest.php @@ -38,6 +38,9 @@ public function testGetRequestedServicesSuccess($requestParamServices, $expected $this->assertEquals($expectedResult, $this->request->getRequestedServices()); } + /** + * @return array + */ public function providerTestGetRequestedServicesSuccess() { $testModuleA = 'testModule1AllSoapAndRestV1'; diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php index 3393b325a8f16..1297ffca19eaf 100644 --- a/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php +++ b/lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php @@ -561,6 +561,9 @@ public function testCustomAttributesExceptions($inputData) ); } + /** + * @return array + */ public function invalidCustomAttributesDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 598d4546006bd..c360d57be107f 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -22,13 +22,13 @@ "ext-xsl": "*", "ext-bcmath": "*", "lib-libxml": "*", - "colinmollenhour/php-redis-session-abstract": "~1.3.8", + "colinmollenhour/php-redis-session-abstract": "~1.4.0", "composer/composer": "^1.6", "magento/zendframework1": "~1.14.0", "monolog/monolog": "^1.17", "oyejorge/less.php": "~1.7.0", - "symfony/console": "~4.0.0", - "symfony/process": "~4.0.0", + "symfony/console": "~4.1.0", + "symfony/process": "~4.1.0", "tedivm/jshrink": "~1.3.0", "zendframework/zend-code": "~3.3.0", "zendframework/zend-crypt": "^2.6.0", diff --git a/lib/web/css/source/lib/_forms.less b/lib/web/css/source/lib/_forms.less index 800054e58c3dd..b1c7a49da4a7a 100644 --- a/lib/web/css/source/lib/_forms.less +++ b/lib/web/css/source/lib/_forms.less @@ -465,11 +465,9 @@ .lib-css(margin, @_margin); .lib-css(padding, @_padding); letter-spacing: -.31em; - //word-spacing: -.43em; > * { letter-spacing: normal; - //word-spacing: normal; } > .legend { diff --git a/lib/web/css/source/lib/_rating.less b/lib/web/css/source/lib/_rating.less index e585e4489d65e..535fa44616039 100644 --- a/lib/web/css/source/lib/_rating.less +++ b/lib/web/css/source/lib/_rating.less @@ -38,7 +38,7 @@ input[type="radio"] { .lib-visually-hidden(); - &:focus, + &:hover, &:checked { + label { &:before { diff --git a/lib/web/css/source/lib/_tables.less b/lib/web/css/source/lib/_tables.less index 9c37e17b4fe82..43b63152946f8 100644 --- a/lib/web/css/source/lib/_tables.less +++ b/lib/web/css/source/lib/_tables.less @@ -530,7 +530,7 @@ display: block; .lib-css(padding, @_table-responsive-cell-padding); - &:before { + &[data-th]:before { .lib-css(padding-right, @table-cell__padding-horizontal); content: attr(data-th)': '; display: inline-block; diff --git a/lib/web/css/source/lib/_utilities.less b/lib/web/css/source/lib/_utilities.less index 08a82494b3e5c..222eb4741e85e 100644 --- a/lib/web/css/source/lib/_utilities.less +++ b/lib/web/css/source/lib/_utilities.less @@ -260,9 +260,8 @@ @_line-height: normal ) { .lib-font-size(@_font-size); - font-size: @_font-size; + .lib-line-height(@_line-height); letter-spacing: normal; - line-height: @_line-height; } // diff --git a/lib/web/mage/collapsible.js b/lib/web/mage/collapsible.js index 5f3a654649487..97ee3af506f86 100644 --- a/lib/web/mage/collapsible.js +++ b/lib/web/mage/collapsible.js @@ -110,7 +110,7 @@ define([ _processState: function () { var anchor = window.location.hash, isValid = $.mage.isValidSelector(anchor), - urlPath = window.location.pathname.replace('.', ''), + urlPath = window.location.pathname.replace(/\./g, ''), state; this.stateKey = encodeURIComponent(urlPath + this.element.attr('id')); diff --git a/lib/web/mage/validation.js b/lib/web/mage/validation.js index 6258b3c627370..d08819ebe94aa 100644 --- a/lib/web/mage/validation.js +++ b/lib/web/mage/validation.js @@ -990,6 +990,12 @@ }, $.mage.__('Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.') //eslint-disable-line max-len ], + 'validate-not-number-first': [ + function (value) { + return $.mage.isEmptyNoTrim(value) || /^[^0-9-\.].*$/.test(value.trim()); + }, + $.mage.__('First character must be letter.') + ], 'validate-date': [ function (value, params, additionalParams) { var test = moment(value, additionalParams.dateFormat); diff --git a/setup/performance-toolkit/benchmark.jmx b/setup/performance-toolkit/benchmark.jmx index 0b46a4d5c9411..7ee0be37f6cfb 100644 --- a/setup/performance-toolkit/benchmark.jmx +++ b/setup/performance-toolkit/benchmark.jmx @@ -37918,9 +37918,9 @@ adminUserList.add(vars.get("admin_user")); <stringProp name="HTTPSampler.embedded_url_re"/> </HTTPSamplerProxy> <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert True" enabled="true"> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert Option Id" enabled="true"> <collectionProp name="Asserion.test_strings"> - <stringProp name="3569038">true</stringProp> + <stringProp name="89649215">^[a-z0-9_\"]+$</stringProp> </collectionProp> <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> <boolProp name="Assertion.assume_success">false</boolProp> @@ -37992,9 +37992,9 @@ adminUserList.add(vars.get("admin_user")); <stringProp name="HTTPSampler.embedded_url_re"/> </HTTPSamplerProxy> <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert True" enabled="true"> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert Option Id" enabled="true"> <collectionProp name="Asserion.test_strings"> - <stringProp name="3569038">true</stringProp> + <stringProp name="484395188">^[a-z0-9_\"]+$</stringProp> </collectionProp> <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> <boolProp name="Assertion.assume_success">false</boolProp> diff --git a/setup/src/Magento/Setup/Console/CompilerPreparation.php b/setup/src/Magento/Setup/Console/CompilerPreparation.php index 9ea938d51fb37..c39c721b61716 100644 --- a/setup/src/Magento/Setup/Console/CompilerPreparation.php +++ b/setup/src/Magento/Setup/Console/CompilerPreparation.php @@ -105,7 +105,6 @@ private function getCompilerInvalidationCommands() 'module:disable', 'module:enable', 'module:uninstall', - 'deploy:mode:set' ]; } diff --git a/setup/src/Magento/Setup/Model/PhpReadinessCheck.php b/setup/src/Magento/Setup/Model/PhpReadinessCheck.php index c2bdafa8df82e..2c4967c4c2ffd 100644 --- a/setup/src/Magento/Setup/Model/PhpReadinessCheck.php +++ b/setup/src/Magento/Setup/Model/PhpReadinessCheck.php @@ -286,7 +286,7 @@ private function checkPopulateRawPostSetting() $data = []; $error = false; - $iniSetting = intVal(ini_get('always_populate_raw_post_data')); + $iniSetting = intval(ini_get('always_populate_raw_post_data')); $checkVersionConstraint = $this->versionParser->parseConstraints('~5.6.0'); $normalizedPhpVersion = $this->getNormalizedCurrentPhpVersion(PHP_VERSION); @@ -302,7 +302,7 @@ private function checkPopulateRawPostSetting() Please open your php.ini file and set always_populate_raw_post_data to -1. If you need more help please call your hosting provider.', PHP_VERSION, - intVal(ini_get('always_populate_raw_post_data')) + intval(ini_get('always_populate_raw_post_data')) ); $data['always_populate_raw_post_data'] = [ diff --git a/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php index 7759eb51a52ad..d78e259ec06e0 100644 --- a/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php +++ b/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php @@ -117,7 +117,7 @@ private function extract(\RecursiveIteratorIterator $recursiveIterator) /** * @param array $classNames * @param string $fileItemPath - * @return bool Whether the clas is included or not + * @return bool Whether the class is included or not */ private function includeClasses(array $classNames, $fileItemPath) { diff --git a/setup/src/Magento/Setup/Module/Di/Code/Scanner/ConfigurationScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Scanner/ConfigurationScanner.php index fac5b1b4aec98..747865f7cfef9 100644 --- a/setup/src/Magento/Setup/Module/Di/Code/Scanner/ConfigurationScanner.php +++ b/setup/src/Magento/Setup/Module/Di/Code/Scanner/ConfigurationScanner.php @@ -28,7 +28,7 @@ public function __construct( * * @param string $fileName * - * @return array array of paths to the configuration files + * @return array of paths to the configuration files */ public function scan($fileName) { diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/DeployStaticContentCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/DeployStaticContentCommandTest.php index a5dc0d24feb7c..c3f79d92ec560 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/DeployStaticContentCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/DeployStaticContentCommandTest.php @@ -111,6 +111,9 @@ public function testExecute($input) $tester->execute($input); } + /** + * @return array + */ public function executeDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php index 8bcee84d049b3..1ef3830636657 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php @@ -51,6 +51,9 @@ public function testExecuteInteractionNo() $this->checkInteraction(false); } + /** + * @param $answer + */ public function checkInteraction($answer) { $question = $this->createMock(\Symfony\Component\Console\Helper\QuestionHelper::class); diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Style/TestOutput.php b/setup/src/Magento/Setup/Test/Unit/Console/Style/TestOutput.php index 1407e5ed183e4..183f659c42f23 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Style/TestOutput.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Style/TestOutput.php @@ -20,6 +20,10 @@ public function clear() $this->output = ''; } + /** + * @param string $message + * @param bool $newline + */ protected function doWrite($message, $newline) { $this->output .= $message . ($newline ? "\n" : ''); diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/SessionTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/SessionTest.php index 3b1d3e29e4e56..e4c7449f1f9b6 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/SessionTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/SessionTest.php @@ -270,6 +270,9 @@ public function testValidationWithInvalidOptions($option, $invalidInput, $errorM $this->assertSame($errorMessage, $errors[0]); } + /** + * @return array + */ public function redisOptionProvider() { return [ @@ -294,6 +297,9 @@ public function redisOptionProvider() ]; } + /** + * @return array + */ public function invalidOptionsProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php index 1bb60517d5e67..f342a11493498 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsListTest.php @@ -178,6 +178,9 @@ public function testValidateCacheHosts($hosts, $expectedError) } } + /** + * @return array + */ public function validateCacheHostsDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php index b3e88272d13e8..59210df4f7bcf 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobComponentUninstallTest.php @@ -264,6 +264,9 @@ public function testExecuteWrongFormat(array $params) $this->job->execute(); } + /** + * @return array + */ public function executeWrongFormatDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php index f96882c30136a..1f8a3fea16da2 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Cron/JobFactoryTest.php @@ -206,16 +206,25 @@ public function testMaintenanceModeDisable() // functions to override native php functions namespace Magento\Setup\Model\Cron; +/** + * @return string + */ function fopen() { return 'filestream'; } +/** + * @return bool + */ function is_resource() { return true; } +/** + * @return string + */ function get_resource_type() { return 'stream'; diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php index f8f1d8542c38c..4a4ff2cb81e8d 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Cron/ReadinessCheckTest.php @@ -201,6 +201,9 @@ public function testRunReadinessCheckLastTimestamp() namespace Magento\Setup\Model\Cron; +/** + * @return int + */ function time() { return 100; diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php index e6c7b420b661d..dfa001f44bc66 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/BrakeMixinTest.php @@ -25,6 +25,9 @@ public function testApply($subject, $expectedResult) $this->assertEquals($expectedResult, $this->mixin->apply($subject)); } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php index 48280e9c6f543..bf915fecf4701 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/HeaderMixinTest.php @@ -25,6 +25,9 @@ public function testApply($subject, $expectedResult) $this->assertEquals($expectedResult, $this->mixin->apply($subject)); } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php index b21c687a30960..c24fa49fcac24 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/RandomWordSelectorTest.php @@ -34,6 +34,9 @@ public function testRandomSelector($fixtureSource, $fixtureCount) } } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php index 58e07df7391fc..7d3cbcdd00c71 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/Helper/WordWrapperTest.php @@ -30,6 +30,9 @@ public function testWrapping($inputData, $expectedResult) ); } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php index a522963d212ef..4fdb3090992bb 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Description/Mixin/ParagraphMixinTest.php @@ -25,6 +25,9 @@ public function testApply($subject, $expectedResult) $this->assertEquals($expectedResult, $this->mixin->apply($subject)); } + /** + * @return array + */ public function getTestData() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php index 90c26b5632d21..11dca34763a05 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php @@ -39,6 +39,9 @@ public function testMap($packageType, $expected) ); } + /** + * @return array + */ public function mapDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php index 9f59479ef0f0d..9d40b053e394e 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/ObjectManagerProviderTest.php @@ -83,6 +83,9 @@ public function testGet() $this->assertInstanceOf(ObjectManagerInterface::class, $this->model->get()); } + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ private function getCommandListMock() { $commandMock = $this->getMockBuilder(Command::class)->disableOriginalConstructor()->getMock(); diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php index 192717e1d319b..2d7685c2021cc 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/PayloadValidatorTest.php @@ -38,6 +38,9 @@ public function testValidatePayLoad($type, $has, $moduleExists) $this->assertEquals('', $this->model->validatePayload($type)); } + /** + * @return array + */ public function validatePayLoadDataProvider() { return [ @@ -61,6 +64,9 @@ public function testValidatePayLoadNegativeCases($type, $has, $moduleExists, $er $this->assertStringStartsWith($errorMessage, $this->model->validatePayload($type)); } + /** + * @return array + */ public function validatePayLoadNegativeCasesDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php index f543e77787f9d..2334cb19a5b4f 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php @@ -411,6 +411,10 @@ protected function isPhp7OrHhvm() namespace Magento\Setup\Model; +/** + * @param $param + * @return int|string + */ function ini_get($param) { if ($param === 'xdebug.max_nesting_level') { diff --git a/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php b/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php index b3ac6ad286e44..a55c50eeaa736 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/WebLoggerTest.php @@ -184,6 +184,9 @@ public function testClearNotExist() $this->webLogger->clear(); } + /** + * @return string + */ public static function readLog() { return self::$log; @@ -202,6 +205,9 @@ public static function deleteLog() self::$log = ''; } + /** + * @return bool + */ public static function isExist() { return self::$log != ''; diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php index 7d8ce3ac564b3..ebb6560f9337d 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/ClassReaderDecoratorTest.php @@ -46,6 +46,9 @@ public function testGetConstructor($expectation, $className, $willReturn) ); } + /** + * @return array + */ public function getConstructorDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Scanner/PhpScannerTest.php b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Scanner/PhpScannerTest.php index ca3fe64f6d153..5f8cd7643e87c 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Scanner/PhpScannerTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Scanner/PhpScannerTest.php @@ -69,7 +69,7 @@ public function testCollectEntities() ); $this->assertEquals( - ['\Magento\Eav\Api\Data\AttributeExtensionInterface'], + ['\\' . \Magento\Eav\Api\Data\AttributeExtensionInterface::class], $this->_model->collectEntities($this->_testFiles) ); } diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php b/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php index 68d76980e1057..69f8fd224f7a8 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Helper/Test.php @@ -25,6 +25,12 @@ class Test */ protected $_newElementFactory; + /** + * Test constructor. + * @param \Magento\SomeModule\Module\Factory $factory + * @param \Magento\SomeModule\Element\Factory $elementFactory + * @param \Magento\SomeModule\ElementFactory $rightElementFactory + */ public function __construct( \Magento\SomeModule\Module\Factory $factory, \Magento\SomeModule\Element\Factory $elementFactory, diff --git a/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php b/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php index 3c744bb44d32a..c698d4c344df8 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/AbstractParserTest.php @@ -39,6 +39,9 @@ public function testValidateOptions($options, $message) $this->_parserMock->parse($options); } + /** + * @return array + */ public function dataProviderForValidateOptions() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php b/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php index 15a55bd23b164..573c8b132ca41 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/Setup/SetupCacheTest.php @@ -88,6 +88,9 @@ public function testHas($table, $parentId, $rowId, $field, $expected) $this->assertSame($expected, $this->object->has($table, $parentId, $rowId, $field)); } + /** + * @return array + */ public function hasDataProvider() { return [ diff --git a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php index a35007189a9ca..f0a9d5316b3a6 100644 --- a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php @@ -144,6 +144,9 @@ public function testCreateService($zfAppConfig, $env, $cliParam, $expectedArray) $this->assertEquals($expectedArray, $listener->createService($serviceLocator)); } + /** + * @return array + */ public function createServiceDataProvider() { return [