Skip to content

Commit 10c74aa

Browse files
committed
MQE-1065: Persisted data are not resolved correctly when using with ParameterArray
- addressed static test failures
1 parent 8a1525c commit 10c74aa

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,12 @@ private function addUniquenessToParamArray($input)
16261626
return implode(", ", $result);
16271627
}
16281628

1629+
/**
1630+
* Process pressKey parameterArray attribute for uniqueness function call and necessary data resolutions
1631+
*
1632+
* @param string $input
1633+
* @return string
1634+
*/
16291635
private function processPressKey($input)
16301636
{
16311637
// validate the param array is in the correct format
@@ -1642,7 +1648,8 @@ private function processPressKey($input)
16421648
preg_match_all('/[\[][^\]]*?[\]]/', $input, $paramInput);
16431649
if (!empty($paramInput)) {
16441650
foreach ($paramInput[0] as $param) {
1645-
$arrayResult[static::PRESSKEY_ARRAY_ANCHOR_KEY . $count] = '[' . trim($this->addUniquenessToParamArray($param)) . ']';
1651+
$arrayResult[static::PRESSKEY_ARRAY_ANCHOR_KEY . $count] =
1652+
'[' . trim($this->addUniquenessToParamArray($param)) . ']';
16461653
$input = str_replace($param, static::PRESSKEY_ARRAY_ANCHOR_KEY . $count, $input);
16471654
$count++;
16481655
}
@@ -1662,7 +1669,7 @@ private function processPressKey($input)
16621669
continue;
16631670
}
16641671

1665-
// Matches numbers
1672+
// matches numbers
16661673
if (preg_match('/^[\s]*(\d+?)[\s]*$/', $param)) {
16671674
$result[] = $param;
16681675
continue;

0 commit comments

Comments
 (0)