Skip to content

Commit 45bd8d5

Browse files
committed
Merge remote-tracking branch 'origin/develop' into MQE-2140
2 parents 45b0354 + bb75353 commit 45bd8d5

File tree

3 files changed

+136
-110
lines changed

3 files changed

+136
-110
lines changed

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
Magento Functional Testing Framework Changelog
22
================================================
3+
3.0.0 RC4
4+
---------
5+
6+
### Enhancements
7+
8+
* Customizability
9+
* `<group value="skip"/>` no longer skips a test. Instead, the test is added to the `skip` group.
10+
* Maintainability
11+
* `mftf.log` no longer includes notices and warnings at test execution time.
12+
* Added the Chrome option `--ignore-certificate-errors` to `functional.suite.dist.yml`.
13+
* Traceability
14+
* Changed the `bin/mftf static-checks` error file directory from the current working directory to `TESTS_BP/tests/_output/static-results/`.
15+
* Readability
16+
* Documented [3.0.0 Backward Incompatible Changes.](./docs/backward-incompatible-changes.md)
17+
18+
### Fixes
19+
20+
* Fixed issue where an extended data entity would not merge array items. Array items should merge properly now.
21+
322
3.0.0 RC3
423
---------
524

@@ -8,7 +27,7 @@ Magento Functional Testing Framework Changelog
827
* Maintainability
928
* Added support for Two-Factor Authentication (2FA). [See configure-2fa page for details](./docs/configure-2fa.md)
1029
* Added new static check `annotationsCheck` that checks and reports missing annotations in tests.
11-
* 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)
30+
* 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)
1231
* Added new upgrade script to remove unused arguments from action groups.
1332
* Added unhandledPromptBehavior driver capability for Chrome 75+ support.
1433
* Removed redundant and unused classes.

src/Magento/FunctionalTestingFramework/Module/MagentoActionProxies.php

Lines changed: 1 addition & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler;
1111
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore;
1212
use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;
13-
use Magento\FunctionalTestingFramework\Exceptions\TestReferenceException;
1413

1514
/**
1615
* Class MagentoActionProxies
@@ -21,112 +20,5 @@
2120
*/
2221
class MagentoActionProxies extends CodeceptionModule
2322
{
24-
/**
25-
* Create an entity
26-
*
27-
* @param string $key StepKey of the createData action.
28-
* @param string $scope
29-
* @param string $entity Name of xml entity to create.
30-
* @param array $dependentObjectKeys StepKeys of other createData actions that are required.
31-
* @param array $overrideFields Array of FieldName => Value of override fields.
32-
* @param string $storeCode
33-
* @return void
34-
* @throws TestReferenceException
35-
*/
36-
public function createEntity(
37-
$key,
38-
$scope,
39-
$entity,
40-
$dependentObjectKeys = [],
41-
$overrideFields = [],
42-
$storeCode = ''
43-
) {
44-
PersistedObjectHandler::getInstance()->createEntity(
45-
$key,
46-
$scope,
47-
$entity,
48-
$dependentObjectKeys,
49-
$overrideFields,
50-
$storeCode
51-
);
52-
}
53-
54-
/**
55-
* Retrieves and updates a previously created entity
56-
*
57-
* @param string $key StepKey of the createData action.
58-
* @param string $scope
59-
* @param string $updateEntity Name of the static XML data to update the entity with.
60-
* @param array $dependentObjectKeys StepKeys of other createData actions that are required.
61-
* @return void
62-
*/
63-
public function updateEntity($key, $scope, $updateEntity, $dependentObjectKeys = [])
64-
{
65-
PersistedObjectHandler::getInstance()->updateEntity(
66-
$key,
67-
$scope,
68-
$updateEntity,
69-
$dependentObjectKeys
70-
);
71-
}
72-
73-
/**
74-
* Performs GET on given entity and stores entity for use
75-
*
76-
* @param string $key StepKey of getData action.
77-
* @param string $scope
78-
* @param string $entity Name of XML static data to use.
79-
* @param array $dependentObjectKeys StepKeys of other createData actions that are required.
80-
* @param string $storeCode
81-
* @param integer $index
82-
* @return void
83-
*/
84-
public function getEntity($key, $scope, $entity, $dependentObjectKeys = [], $storeCode = '', $index = null)
85-
{
86-
PersistedObjectHandler::getInstance()->getEntity(
87-
$key,
88-
$scope,
89-
$entity,
90-
$dependentObjectKeys,
91-
$storeCode,
92-
$index
93-
);
94-
}
95-
96-
/**
97-
* Retrieves and deletes a previously created entity
98-
*
99-
* @param string $key StepKey of the createData action.
100-
* @param string $scope
101-
* @return void
102-
*/
103-
public function deleteEntity($key, $scope)
104-
{
105-
PersistedObjectHandler::getInstance()->deleteEntity($key, $scope);
106-
}
107-
108-
/**
109-
* Retrieves a field from an entity, according to key and scope given
110-
*
111-
* @param string $stepKey
112-
* @param string $field
113-
* @param string $scope
114-
* @return string
115-
*/
116-
public function retrieveEntityField($stepKey, $field, $scope)
117-
{
118-
return PersistedObjectHandler::getInstance()->retrieveEntityField($stepKey, $field, $scope);
119-
}
120-
121-
/**
122-
* Get encrypted value by key
123-
*
124-
* @param string $key
125-
* @return string|null
126-
* @throws TestFrameworkException
127-
*/
128-
public function getSecret($key)
129-
{
130-
return CredentialStore::getInstance()->getSecret($key);
131-
}
23+
// TODO: placeholder for proxy functions currently in MagentoWebDriver (MQE-1904)
13224
}

src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use Magento\FunctionalTestingFramework\DataTransport\Protocol\CurlTransport;
2727
use Yandex\Allure\Adapter\Support\AttachmentSupport;
2828
use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;
29+
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler;
2930

3031
/**
3132
* MagentoWebDriver module provides common Magento web actions through Selenium WebDriver.
@@ -953,6 +954,120 @@ public function getOTP()
953954
return OTP::getOTP();
954955
}
955956

957+
/**
958+
* Create an entity
959+
* TODO: move this function to MagentoActionProxies after MQE-1904
960+
*
961+
* @param string $key StepKey of the createData action.
962+
* @param string $scope
963+
* @param string $entity Name of xml entity to create.
964+
* @param array $dependentObjectKeys StepKeys of other createData actions that are required.
965+
* @param array $overrideFields Array of FieldName => Value of override fields.
966+
* @param string $storeCode
967+
* @return void
968+
*/
969+
public function createEntity(
970+
$key,
971+
$scope,
972+
$entity,
973+
$dependentObjectKeys = [],
974+
$overrideFields = [],
975+
$storeCode = ''
976+
) {
977+
PersistedObjectHandler::getInstance()->createEntity(
978+
$key,
979+
$scope,
980+
$entity,
981+
$dependentObjectKeys,
982+
$overrideFields,
983+
$storeCode
984+
);
985+
}
986+
987+
/**
988+
* Retrieves and updates a previously created entity
989+
* TODO: move this function to MagentoActionProxies after MQE-1904
990+
*
991+
* @param string $key StepKey of the createData action.
992+
* @param string $scope
993+
* @param string $updateEntity Name of the static XML data to update the entity with.
994+
* @param array $dependentObjectKeys StepKeys of other createData actions that are required.
995+
* @return void
996+
*/
997+
public function updateEntity($key, $scope, $updateEntity, $dependentObjectKeys = [])
998+
{
999+
PersistedObjectHandler::getInstance()->updateEntity(
1000+
$key,
1001+
$scope,
1002+
$updateEntity,
1003+
$dependentObjectKeys
1004+
);
1005+
}
1006+
1007+
/**
1008+
* Performs GET on given entity and stores entity for use
1009+
* TODO: move this function to MagentoActionProxies after MQE-1904
1010+
*
1011+
* @param string $key StepKey of getData action.
1012+
* @param string $scope
1013+
* @param string $entity Name of XML static data to use.
1014+
* @param array $dependentObjectKeys StepKeys of other createData actions that are required.
1015+
* @param string $storeCode
1016+
* @param integer $index
1017+
* @return void
1018+
*/
1019+
public function getEntity($key, $scope, $entity, $dependentObjectKeys = [], $storeCode = '', $index = null)
1020+
{
1021+
PersistedObjectHandler::getInstance()->getEntity(
1022+
$key,
1023+
$scope,
1024+
$entity,
1025+
$dependentObjectKeys,
1026+
$storeCode,
1027+
$index
1028+
);
1029+
}
1030+
1031+
/**
1032+
* Retrieves and deletes a previously created entity
1033+
* TODO: move this function to MagentoActionProxies after MQE-1904
1034+
*
1035+
* @param string $key StepKey of the createData action.
1036+
* @param string $scope
1037+
* @return void
1038+
*/
1039+
public function deleteEntity($key, $scope)
1040+
{
1041+
PersistedObjectHandler::getInstance()->deleteEntity($key, $scope);
1042+
}
1043+
1044+
/**
1045+
* Retrieves a field from an entity, according to key and scope given
1046+
* TODO: move this function to MagentoActionProxies after MQE-1904
1047+
*
1048+
* @param string $stepKey
1049+
* @param string $field
1050+
* @param string $scope
1051+
* @return string
1052+
*/
1053+
public function retrieveEntityField($stepKey, $field, $scope)
1054+
{
1055+
return PersistedObjectHandler::getInstance()->retrieveEntityField($stepKey, $field, $scope);
1056+
}
1057+
1058+
/**
1059+
* Get encrypted value by key
1060+
* TODO: move this function to MagentoActionProxies after MQE-1904
1061+
*
1062+
* @param string $key
1063+
* @return string|null
1064+
* @throws TestFrameworkException
1065+
*/
1066+
public function getSecret($key)
1067+
{
1068+
return CredentialStore::getInstance()->getSecret($key);
1069+
}
1070+
9561071
/**
9571072
* Waits proper amount of time to perform Cron execution
9581073
*

0 commit comments

Comments
 (0)