Skip to content

Commit 8a5342d

Browse files
authored
Merge branch 'develop' into MQE-1354
2 parents 6b89d3a + d5265e9 commit 8a5342d

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

dev/tests/verification/Resources/SectionReplacementTest.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,7 @@ class SectionReplacementTestCest
6868
$I->click("#stringLiteral1-" . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . " .Doe" . msq("uniqueData"));
6969
$I->click("#element .1#element .2");
7070
$I->click("#element .1#element .{$data}");
71+
$I->click("(//div[@data-role='slide'])[1]/a[@data-element='link'][contains(@href,'')]");
72+
$I->click("(//div[@data-role='slide'])[1]/a[@data-element='link'][contains(@href,' ')]");
7173
}
7274
}

dev/tests/verification/TestModule/Section/SampleSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
<element name="threeOneDuplicateParamElement" type="button" selector="#{{var1}}-{{var2}} .{{var1}} [{{var3}}]" parameterized="true"/>
1919
<element name="timeoutElement" type="button" selector="#foo" timeout="30"/>
2020
<element name="mergeElement" type="button" selector="#unMerge"/>
21+
<element name="anotherTwoParamsElement" type="button" selector="(//div[@data-role='slide'])[{{arg1}}]/a[@data-element='link'][contains(@href,'{{arg2}}')]" parameterized="true"/>
2122
</section>
2223
</sections>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,8 @@
5050

5151
<click stepKey="selectorReplaceTwoParamElements" selector="{{SampleSection.oneParamElement('1')}}{{SampleSection.oneParamElement('2')}}"/>
5252
<click stepKey="selectorReplaceTwoParamMixedTypes" selector="{{SampleSection.oneParamElement('1')}}{{SampleSection.oneParamElement({$data})}}"/>
53+
54+
<click stepKey="selectorParamWithEmptyString" selector="{{SampleSection.anotherTwoParamsElement('1', '')}}"/>
55+
<click stepKey="selectorParamWithASpace" selector="{{SampleSection.anotherTwoParamsElement('1', ' ')}}"/>
5356
</test>
5457
</tests>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ private function matchParameterReferences($reference, $parameters)
691691
$resolvedParameters = [];
692692
foreach ($parameters as $parameter) {
693693
$parameter = trim($parameter);
694-
preg_match_all("/[$'][\w\D]+[$']/", $parameter, $stringOrPersistedMatch);
694+
preg_match_all("/[$'][\w\D]*[$']/", $parameter, $stringOrPersistedMatch);
695695
preg_match_all('/{\$[a-z][a-zA-Z\d]+}/', $parameter, $variableMatch);
696696
if (!empty($stringOrPersistedMatch[0])) {
697697
$resolvedParameters[] = ltrim(rtrim($parameter, "'"), "'");

0 commit comments

Comments
 (0)