Skip to content

Commit 1fa4693

Browse files
committed
MQE-846: New selectMultiOption action does not resolve entity/selector references
- fix missed selector attribute - fix missed array resolution
1 parent 89a8865 commit 1fa4693

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ class ActionObject
2121
{
2222
const __ENV = "_ENV";
2323
const DATA_ENABLED_ATTRIBUTES = ["userInput", "parameterArray", "expected", "actual"];
24-
const SELECTOR_ENABLED_ATTRIBUTES = ['selector', 'dependentSelector', "selector1", "selector2", "function"];
24+
const SELECTOR_ENABLED_ATTRIBUTES = [
25+
'selector',
26+
'dependentSelector',
27+
"selector1",
28+
"selector2",
29+
"function",
30+
'filterSelector',
31+
'optionSelector'
32+
];
2533
const OLD_ASSERTION_ATTRIBUTES = ["expected", "expectedType", "actual", "actualType"];
2634
const ASSERTION_ATTRIBUTES = ["expectedResult" => "expected", "actualResult" => "actual"];
2735
const ASSERTION_TYPE_ATTRIBUTE = "type";
@@ -215,11 +223,6 @@ public function trimAssertionAttributes()
215223
{
216224
$actionAttributeKeys = array_keys($this->actionAttributes);
217225

218-
// Flatten AssertSorted "array" element to parameterArray
219-
if (isset($this->actionAttributes["array"])) {
220-
$this->resolvedCustomAttributes['parameterArray'] = $this->actionAttributes['array']['value'];
221-
}
222-
223226
/** MQE-683 DEPRECATE OLD METHOD HERE
224227
* Checks if action has any of the old, single line attributes
225228
* Throws a warning and returns, assuming old syntax is used.

src/Magento/FunctionalTestingFramework/Test/Util/ActionObjectExtractor.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ public function extractActions($testActions)
6464
$linkedAction = null;
6565
$order = null;
6666

67+
// Flatten AssertSorted "array" element to parameterArray
68+
if (isset($actionData["array"])) {
69+
$actionAttributes['parameterArray'] = $actionData['array']['value'];
70+
}
71+
6772
if ($actionData[self::NODE_NAME] === self::ACTION_GROUP_TAG) {
6873
$actionAttributes = $this->processActionGroupArgs($actionAttributes);
6974
}

0 commit comments

Comments
 (0)