Skip to content

Commit 43891bd

Browse files
committed
MQE-881: Cannot Pass Arguments In Action Groups To X, Y Attributes On Actions
MQE-877: Passing Multiple Element References In Selector Parameters Does Not Generate Correctly When Element(s) Are Parameterized - added verification tests
1 parent 5003492 commit 43891bd

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

dev/tests/verification/Resources/BasicFunctionalTest.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ class BasicFunctionalTestCest
7070
$I->click(".functionalTestSelector");
7171
$I->clickWithLeftButton(".functionalTestSelector");
7272
$I->clickWithRightButton(".functionalTestSelector");
73+
$I->clickWithLeftButton("#element#element .200", 200, 300);
74+
$I->clickWithRightButton("#element .4123#element", 200, 300);
7375
$I->closeTab();
7476
$I->conditionalClick(".functionalTestSelector", ".functionalDependentTestSelector", true);
7577
$I->dontSee("someInput", ".functionalTestSelector");

dev/tests/verification/TestModule/Data/ReplacementData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@
2626
<data key="sampleField2">moreData</data>
2727
<requiredEntity type="test2">originalValue2</requiredEntity>
2828
</entity>
29+
<entity name="offset" type="simpleData">
30+
<data key="x">200</data>
31+
<data key="y">300</data>
32+
</entity>
2933
</entities>

dev/tests/verification/TestModule/Test/BasicFunctionalTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<click selector=".functionalTestSelector" stepKey="clickKey1"/>
3333
<clickWithLeftButton selector=".functionalTestSelector" stepKey="clickWithLeftButtonKey1"/>
3434
<clickWithRightButton selector=".functionalTestSelector" stepKey="clickWithRightButtonKey1"/>
35+
<clickWithLeftButton selector="{{SampleSection.simpleElement}}{{SampleSection.simpleElementOneParam(offset.x)}}" x="{{offset.x}}" y="{{offset.y}}" stepKey="clickWithLeftButtonKeyXY1" />
36+
<clickWithRightButton selector="{{SampleSection.simpleElementOneParam('4123')}}{{SampleSection.simpleElement}}" x="{{offset.x}}" y="{{offset.y}}" stepKey="clickWithRightButtonKeyXY1" />
3537
<closeTab stepKey="closeTabKey1"/>
3638
<conditionalClick selector=".functionalTestSelector" dependentSelector=".functionalDependentTestSelector" visible="true" stepKey="conditionalClickKey1"/>
3739
<dontSee userInput="someInput" selector=".functionalTestSelector" stepKey="dontSeeKey1" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ActionObject
4040
const ACTION_ATTRIBUTE_URL = 'url';
4141
const ACTION_ATTRIBUTE_SELECTOR = 'selector';
4242
const ACTION_ATTRIBUTE_VARIABLE_REGEX_PARAMETER = '/\(.+\)/';
43-
const ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN = '/({{[\w]+\.?[\w\[\]]+}})|({{[\w]+\.[\w]+\(.+\)}})/';
43+
const ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN = '/({{[\w]+\.[\w\[\]]+}})|({{[\w]+\.[\w]+\(.+\)}})/';
4444

4545
/**
4646
* The unique identifier for the action

src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ private function generateStepsPhp($actionObjects, $hookObject = false)
832832
break;
833833
case "switchToNextTab":
834834
case "switchToPreviousTab":
835-
$testSteps .= $this->wrapFunctionCall($actor, $actionObject, $this->stripWrappedQuotes($input));
835+
$testSteps .= $this->wrapFunctionCall($actor, $actionObject, $input);
836836
break;
837837
case "clickWithLeftButton":
838838
case "clickWithRightButton":

0 commit comments

Comments
 (0)