diff --git a/dev/tests/verification/Resources/ExecuteJsEscapingTest.txt b/dev/tests/verification/Resources/ExecuteJsEscapingTest.txt index 94dc2cbdb..371eb3d0d 100644 --- a/dev/tests/verification/Resources/ExecuteJsEscapingTest.txt +++ b/dev/tests/verification/Resources/ExecuteJsEscapingTest.txt @@ -31,5 +31,8 @@ class ExecuteJsEscapingTestCest { $javaVariableEscape = $I->executeJS("return \$javascriptVariable"); $mftfVariableNotEscaped = $I->executeJS("return {$doNotEscape}"); + $persistedDataNotEscaped = $I->executeJS("return " . $persisted->getCreatedDataByName('data')); + $hookPersistedDataNotEscaped = $I->executeJS("return " . $this->persisted->getCreatedDataByName('data')); + $addNewAttributeForRule = $I->executeJS("document.querySelector('entity option[value=" . $this->productAttribute->getCreatedDataByName('attribute_code') . "]').setAttribute('selected', 'selected')"); } } diff --git a/dev/tests/verification/TestModule/Test/ExecuteJsTest.xml b/dev/tests/verification/TestModule/Test/ExecuteJsTest.xml index 2429fa484..b361cdd28 100644 --- a/dev/tests/verification/TestModule/Test/ExecuteJsTest.xml +++ b/dev/tests/verification/TestModule/Test/ExecuteJsTest.xml @@ -11,5 +11,8 @@ + + + diff --git a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php index bcae12c9b..be9ad9996 100644 --- a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php +++ b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php @@ -624,7 +624,7 @@ public function generateStepsPhp($actionObjects, $hookObject = false, $actor = " } // turn $javaVariable => \$javaVariable but not {$mftfVariable} if ($actionObject->getType() == "executeJS") { - $function = preg_replace('/(?