diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ed2920f3..1ad1ea299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ Magento Functional Testing Framework Changelog ================================================ +3.0.0 RC4 +--------- + +### Enhancements + +* Customizability + * `` no longer skips a test. Instead, the test is added to the `skip` group. +* Maintainability + * `mftf.log` no longer includes notices and warnings at test execution time. + * Added the Chrome option `--ignore-certificate-errors` to `functional.suite.dist.yml`. +* Traceability + * Changed the `bin/mftf static-checks` error file directory from the current working directory to `TESTS_BP/tests/_output/static-results/`. +* Readability + * Documented [3.0.0 Backward Incompatible Changes.](./docs/backward-incompatible-changes.md) + +### Fixes + +* Fixed issue where an extended data entity would not merge array items. Array items should merge properly now. + 3.0.0 RC3 --------- @@ -8,7 +27,7 @@ Magento Functional Testing Framework Changelog * Maintainability * Added support for Two-Factor Authentication (2FA). [See configure-2fa page for details](./docs/configure-2fa.md) * Added new static check `annotationsCheck` that checks and reports missing annotations in tests. - * Updated `mftf static-checks` command to allow executing static-checks defined in `staticRuleSet.json` by default. [See command page for details](./docs/commands/mftf.md#static-checks) + * Updated `bin/mftf static-checks` command to allow executing static-checks defined in `staticRuleSet.json` by default. [See command page for details](./docs/commands/mftf.md#static-checks) * Added new upgrade script to remove unused arguments from action groups. * Added unhandledPromptBehavior driver capability for Chrome 75+ support. * Removed redundant and unused classes. diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoActionProxies.php b/src/Magento/FunctionalTestingFramework/Module/MagentoActionProxies.php index 9bf5ebd38..5a3b2360b 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoActionProxies.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoActionProxies.php @@ -10,7 +10,6 @@ use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler; use Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore; use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException; -use Magento\FunctionalTestingFramework\Exceptions\TestReferenceException; /** * Class MagentoActionProxies @@ -21,112 +20,5 @@ */ class MagentoActionProxies extends CodeceptionModule { - /** - * Create an entity - * - * @param string $key StepKey of the createData action. - * @param string $scope - * @param string $entity Name of xml entity to create. - * @param array $dependentObjectKeys StepKeys of other createData actions that are required. - * @param array $overrideFields Array of FieldName => Value of override fields. - * @param string $storeCode - * @return void - * @throws TestReferenceException - */ - public function createEntity( - $key, - $scope, - $entity, - $dependentObjectKeys = [], - $overrideFields = [], - $storeCode = '' - ) { - PersistedObjectHandler::getInstance()->createEntity( - $key, - $scope, - $entity, - $dependentObjectKeys, - $overrideFields, - $storeCode - ); - } - - /** - * Retrieves and updates a previously created entity - * - * @param string $key StepKey of the createData action. - * @param string $scope - * @param string $updateEntity Name of the static XML data to update the entity with. - * @param array $dependentObjectKeys StepKeys of other createData actions that are required. - * @return void - */ - public function updateEntity($key, $scope, $updateEntity, $dependentObjectKeys = []) - { - PersistedObjectHandler::getInstance()->updateEntity( - $key, - $scope, - $updateEntity, - $dependentObjectKeys - ); - } - - /** - * Performs GET on given entity and stores entity for use - * - * @param string $key StepKey of getData action. - * @param string $scope - * @param string $entity Name of XML static data to use. - * @param array $dependentObjectKeys StepKeys of other createData actions that are required. - * @param string $storeCode - * @param integer $index - * @return void - */ - public function getEntity($key, $scope, $entity, $dependentObjectKeys = [], $storeCode = '', $index = null) - { - PersistedObjectHandler::getInstance()->getEntity( - $key, - $scope, - $entity, - $dependentObjectKeys, - $storeCode, - $index - ); - } - - /** - * Retrieves and deletes a previously created entity - * - * @param string $key StepKey of the createData action. - * @param string $scope - * @return void - */ - public function deleteEntity($key, $scope) - { - PersistedObjectHandler::getInstance()->deleteEntity($key, $scope); - } - - /** - * Retrieves a field from an entity, according to key and scope given - * - * @param string $stepKey - * @param string $field - * @param string $scope - * @return string - */ - public function retrieveEntityField($stepKey, $field, $scope) - { - return PersistedObjectHandler::getInstance()->retrieveEntityField($stepKey, $field, $scope); - } - - /** - * Get encrypted value by key - * - * @param string $key - * @return string|null - * @throws TestFrameworkException - */ - public function getSecret($key) - { - return CredentialStore::getInstance()->getSecret($key); - } + // TODO: placeholder for proxy functions currently in MagentoWebDriver (MQE-1904) } diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index 473e750b6..5ee26cf92 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -26,6 +26,7 @@ use Magento\FunctionalTestingFramework\DataTransport\Protocol\CurlTransport; use Yandex\Allure\Adapter\Support\AttachmentSupport; use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException; +use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler; /** * MagentoWebDriver module provides common Magento web actions through Selenium WebDriver. @@ -952,6 +953,120 @@ public function getOTP() return OTP::getOTP(); } + /** + * Create an entity + * TODO: move this function to MagentoActionProxies after MQE-1904 + * + * @param string $key StepKey of the createData action. + * @param string $scope + * @param string $entity Name of xml entity to create. + * @param array $dependentObjectKeys StepKeys of other createData actions that are required. + * @param array $overrideFields Array of FieldName => Value of override fields. + * @param string $storeCode + * @return void + */ + public function createEntity( + $key, + $scope, + $entity, + $dependentObjectKeys = [], + $overrideFields = [], + $storeCode = '' + ) { + PersistedObjectHandler::getInstance()->createEntity( + $key, + $scope, + $entity, + $dependentObjectKeys, + $overrideFields, + $storeCode + ); + } + + /** + * Retrieves and updates a previously created entity + * TODO: move this function to MagentoActionProxies after MQE-1904 + * + * @param string $key StepKey of the createData action. + * @param string $scope + * @param string $updateEntity Name of the static XML data to update the entity with. + * @param array $dependentObjectKeys StepKeys of other createData actions that are required. + * @return void + */ + public function updateEntity($key, $scope, $updateEntity, $dependentObjectKeys = []) + { + PersistedObjectHandler::getInstance()->updateEntity( + $key, + $scope, + $updateEntity, + $dependentObjectKeys + ); + } + + /** + * Performs GET on given entity and stores entity for use + * TODO: move this function to MagentoActionProxies after MQE-1904 + * + * @param string $key StepKey of getData action. + * @param string $scope + * @param string $entity Name of XML static data to use. + * @param array $dependentObjectKeys StepKeys of other createData actions that are required. + * @param string $storeCode + * @param integer $index + * @return void + */ + public function getEntity($key, $scope, $entity, $dependentObjectKeys = [], $storeCode = '', $index = null) + { + PersistedObjectHandler::getInstance()->getEntity( + $key, + $scope, + $entity, + $dependentObjectKeys, + $storeCode, + $index + ); + } + + /** + * Retrieves and deletes a previously created entity + * TODO: move this function to MagentoActionProxies after MQE-1904 + * + * @param string $key StepKey of the createData action. + * @param string $scope + * @return void + */ + public function deleteEntity($key, $scope) + { + PersistedObjectHandler::getInstance()->deleteEntity($key, $scope); + } + + /** + * Retrieves a field from an entity, according to key and scope given + * TODO: move this function to MagentoActionProxies after MQE-1904 + * + * @param string $stepKey + * @param string $field + * @param string $scope + * @return string + */ + public function retrieveEntityField($stepKey, $field, $scope) + { + return PersistedObjectHandler::getInstance()->retrieveEntityField($stepKey, $field, $scope); + } + + /** + * Get encrypted value by key + * TODO: move this function to MagentoActionProxies after MQE-1904 + * + * @param string $key + * @return string|null + * @throws TestFrameworkException + */ + public function getSecret($key) + { + return CredentialStore::getInstance()->getSecret($key); + } + /** * Waits proper amount of time to perform Cron execution *