diff --git a/dev/tests/verification/Resources/ActionGroupWithSectionAndDataAsArguments.txt b/dev/tests/verification/Resources/ActionGroupWithSectionAndDataAsArguments.txt
new file mode 100644
index 000000000..18881c269
--- /dev/null
+++ b/dev/tests/verification/Resources/ActionGroupWithSectionAndDataAsArguments.txt
@@ -0,0 +1,32 @@
+waitForElementVisible("#element .John");
+ }
+}
diff --git a/dev/tests/verification/TestModule/ActionGroup/BasicActionGroup.xml b/dev/tests/verification/TestModule/ActionGroup/BasicActionGroup.xml
index 75ac71ef2..245447f7d 100644
--- a/dev/tests/verification/TestModule/ActionGroup/BasicActionGroup.xml
+++ b/dev/tests/verification/TestModule/ActionGroup/BasicActionGroup.xml
@@ -118,4 +118,12 @@
+
+
+
+
+
+
+
+
diff --git a/dev/tests/verification/TestModule/Test/ActionGroupTest.xml b/dev/tests/verification/TestModule/Test/ActionGroupTest.xml
index 1417de556..56be24441 100644
--- a/dev/tests/verification/TestModule/Test/ActionGroupTest.xml
+++ b/dev/tests/verification/TestModule/Test/ActionGroupTest.xml
@@ -158,6 +158,14 @@
+
+
+
+
+
+
+
+
diff --git a/dev/tests/verification/Tests/ActionGroupGenerationTest.php b/dev/tests/verification/Tests/ActionGroupGenerationTest.php
index d95e572ef..dec8c6d14 100644
--- a/dev/tests/verification/Tests/ActionGroupGenerationTest.php
+++ b/dev/tests/verification/Tests/ActionGroupGenerationTest.php
@@ -196,6 +196,17 @@ public function testActionGroupWithSkipReadiness()
$this->generateAndCompareTest('ActionGroupSkipReadiness');
}
+ /**
+ * Test an action group with an arg containing stepKey text
+ *
+ * @throws \Exception
+ * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
+ */
+ public function testActionGroupWithSectionAndDataArguments()
+ {
+ $this->generateAndCompareTest('ActionGroupWithSectionAndDataAsArguments');
+ }
+
/**
* Test an action group with an arg that resolves into section.element with a hyphen in the parameter
*
diff --git a/src/Magento/FunctionalTestingFramework/Test/Objects/ArgumentObject.php b/src/Magento/FunctionalTestingFramework/Test/Objects/ArgumentObject.php
index c829e66b3..d553993e0 100644
--- a/src/Magento/FunctionalTestingFramework/Test/Objects/ArgumentObject.php
+++ b/src/Magento/FunctionalTestingFramework/Test/Objects/ArgumentObject.php
@@ -104,8 +104,8 @@ public function getResolvedValue($isInnerArgument)
* Takes in boolean to determine if the replacement is being done with an inner argument (as in if it's a parameter)
*
* Example Type Non Inner Inner
- * {{XML.DATA}}: {{XML.DATA}} XML.DATA
- * $TEST.DATA$: $TEST.DATA$ $TEST.DATA$
+ * {{XML.DATA}} {{XML.DATA}} XML.DATA
+ * $TEST.DATA$ $TEST.DATA$ $TEST.DATA$
* stringLiteral stringLiteral 'stringLiteral'
*
* @param boolean $isInnerArgument
@@ -114,6 +114,11 @@ public function getResolvedValue($isInnerArgument)
private function resolveStringArgument($isInnerArgument)
{
if ($isInnerArgument) {
+ if (preg_match('/{{[\w.\[\]]+}}/', $this->value)) {
+ return ltrim(rtrim($this->value, "}"), "{");
+ } elseif (preg_match('/\${1,2}[\w.\[\]]+\${1,2}/', $this->value)) {
+ return $this->value;
+ }
return "'" . $this->value . "'";
} else {
return $this->value;