Skip to content

Commit 2f532fa

Browse files
authored
MQE-495: Unable to use action group parameters in parameterArray
- Changed Constant to variable. Constant is now merged actionObject Attributes.
1 parent c48607e commit 2f532fa

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Magento/FunctionalTestingFramework/Test/Objects/ActionGroupObject.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
*/
1414
class ActionGroupObject
1515
{
16-
const VAR_ATTRIBUTES = ['userInput', 'selector', 'page', 'url'];
16+
/**
17+
* Array of variable-enabled attributes.
18+
* @var array
19+
*/
20+
private $varAttributes;
1721

1822
/**
1923
* The name of the action group
@@ -45,6 +49,11 @@ class ActionGroupObject
4549
*/
4650
public function __construct($name, $arguments, $actions)
4751
{
52+
$this->varAttributes = array_merge(
53+
ActionObject::SELECTOR_ENABLED_ATTRIBUTES,
54+
ActionObject::DATA_ENABLED_ATTRIBUTES
55+
);
56+
$this->varAttributes[] = ActionObject::ACTION_ATTRIBUTE_URL;
4857
$this->name = $name;
4958
$this->arguments = $arguments;
5059
$this->parsedActions = $actions;
@@ -87,7 +96,7 @@ private function getResolvedActionsWithArgs($arguments, $actionReferenceKey)
8796
$regexPattern = '/{{([\w.\[\]]+)\(*([\w.$\']+)*\)*}}/';
8897

8998
foreach ($this->parsedActions as $action) {
90-
$varAttributes = array_intersect(self::VAR_ATTRIBUTES, array_keys($action->getCustomActionAttributes()));
99+
$varAttributes = array_intersect($this->varAttributes, array_keys($action->getCustomActionAttributes()));
91100
$newActionAttributes = [];
92101
if (!empty($varAttributes)) {
93102
// 1 check to see if we have pertinent var

0 commit comments

Comments
 (0)