From 2353f1cbc5a7fc48e81f9e93c35481b5789b113b Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Fri, 5 Jun 2020 12:25:05 -0500 Subject: [PATCH 1/4] MQE-2153: CHANGELOG.md updated for 3.0.0-RC4 --- CHANGELOG.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ed2920f3..3793c8f63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ Magento Functional Testing Framework Changelog ================================================ +3.0.0 RC4 +--------- + +### Enhancements + +* Customizability + * Changed `` to no longer skip a test, instead test is added to `skip` group. +* Maintainability + * Trimmed `mftf.log` to not include notices and warnings at test execution time. + * Added chrome option `--ignore-certificate-errors` in `functional.suite.dist.yml`. +* Traceability + * Changed `bin/mftf static-checks` error file directory from 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 with Extended data entity won't merge array items. + 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. From b532751476477e1302e4e9c6f4cf160be4de86ec Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Fri, 5 Jun 2020 12:57:21 -0500 Subject: [PATCH 2/4] MQE-2153: CHANGELOG.md updated for 3.0.0-RC4 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3793c8f63..dce9f3641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ Magento Functional Testing Framework Changelog ### Fixes -* Fixed issue with Extended data entity won't merge array items. +* Fixed issue with extended data entity won't merge array items. 3.0.0 RC3 --------- From 2c1b8ab2882948ab1fe943521f7500e42e2685bd Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Fri, 5 Jun 2020 13:02:27 -0500 Subject: [PATCH 3/4] Editorial pass --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dce9f3641..1ad1ea299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,18 +6,18 @@ Magento Functional Testing Framework Changelog ### Enhancements * Customizability - * Changed `` to no longer skip a test, instead test is added to `skip` group. + * `` no longer skips a test. Instead, the test is added to the `skip` group. * Maintainability - * Trimmed `mftf.log` to not include notices and warnings at test execution time. - * Added chrome option `--ignore-certificate-errors` in `functional.suite.dist.yml`. + * `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 `bin/mftf static-checks` error file directory from current working directory to `TESTS_BP/tests/_output/static-results/`. + * 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 with extended data entity won't merge array items. +* Fixed issue where an extended data entity would not merge array items. Array items should merge properly now. 3.0.0 RC3 --------- From b4e676bd2c9448fb1d1af1d78f87b8995aac257b Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Fri, 5 Jun 2020 17:17:36 -0500 Subject: [PATCH 4/4] Revert "MQE-2158: move proxies function from MagentoWebDriver back into MagentoActionProxies" This reverts commit 5b461c5a --- .../Module/MagentoActionProxies.php | 110 +---------------- .../Module/MagentoWebDriver.php | 115 ++++++++++++++++++ 2 files changed, 116 insertions(+), 109 deletions(-) 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 *