Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Merge 3.0.0 RC4 back to develop #732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
Magento Functional Testing Framework Changelog
================================================
3.0.0 RC4
---------

### Enhancements

* Customizability
* `<group value="skip"/>` 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
---------

Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
115 changes: 115 additions & 0 deletions src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
*
Expand Down