diff --git a/dev/tests/verification/Resources/DataReplacementTest.txt b/dev/tests/verification/Resources/DataReplacementTest.txt
index 07b733ff4..57f94886d 100644
--- a/dev/tests/verification/Resources/DataReplacementTest.txt
+++ b/dev/tests/verification/Resources/DataReplacementTest.txt
@@ -51,5 +51,7 @@ class DataReplacementTestCest
$I->searchAndMultiSelectOption("#selector", [msq("uniqueData") . "John", "Doe" . msq("uniqueData")]);
$I->selectMultipleOptions("#Doe" . msq("uniqueData"), "#element", [msq("uniqueData") . "John", "Doe" . msq("uniqueData")]);
$I->fillField(".selector", "0");
+ $insertCommand = $I->magentoCLI("do something Doe" . msq("uniqueData") . " with uniqueness");
+ $I->comment($insertCommand);
}
}
diff --git a/dev/tests/verification/TestModule/Test/DataReplacementTest.xml b/dev/tests/verification/TestModule/Test/DataReplacementTest.xml
index f12c70b26..df2bb5789 100644
--- a/dev/tests/verification/TestModule/Test/DataReplacementTest.xml
+++ b/dev/tests/verification/TestModule/Test/DataReplacementTest.xml
@@ -37,5 +37,6 @@
+
\ No newline at end of file
diff --git a/src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php b/src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php
index a7e3117da..1fcff34db 100644
--- a/src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php
+++ b/src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php
@@ -31,7 +31,8 @@ class ActionObject
"x",
"y",
"expectedResult",
- "actualResult"
+ "actualResult",
+ "command"
];
const SELECTOR_ENABLED_ATTRIBUTES = [
'selector',
@@ -40,7 +41,8 @@ class ActionObject
"selector2",
"function",
'filterSelector',
- 'optionSelector'
+ 'optionSelector',
+ "command"
];
const OLD_ASSERTION_ATTRIBUTES = ["expected", "expectedType", "actual", "actualType"];
const ASSERTION_ATTRIBUTES = ["expectedResult" => "expected", "actualResult" => "actual"];
diff --git a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php
index c55cfa916..00203a7e7 100644
--- a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php
+++ b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php
@@ -500,7 +500,7 @@ public function generateStepsPhp($actionObjects, $hookObject = false, $actor = "
$this->validateXmlAttributesMutuallyExclusive($stepKey, $actionObject->getType(), $customActionAttributes);
if (isset($customActionAttributes['command'])) {
- $command = $customActionAttributes['command'];
+ $command = $this->addUniquenessFunctionCall($customActionAttributes['command']);
}
if (isset($customActionAttributes['attribute'])) {
@@ -1217,7 +1217,7 @@ public function generateStepsPhp($actionObjects, $hookObject = false, $actor = "
$stepKey,
$actor,
$actionObject,
- $this->wrapWithDoubleQuotes($command)
+ $command
);
$testSteps .= sprintf(
"\t\t$%s->comment(\$%s);\n",