Skip to content

Commit b641df8

Browse files
authored
MQE-455: trying to fill input with 0 does not generate properly
- changed if statement to is_null instead of empty, empty("0") = true
1 parent e5c1d4c commit b641df8

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

dev/tests/verification/Resources/BasicFunctionalCest.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class BasicFunctionalCest
7575
$I->dragAndDrop(".functionalTestSelector", ".functionalTestSelector2");
7676
$I->executeJS("someJSFunction");
7777
$I->fillField(".functionalTestSelector", "someInput");
78+
$I->fillField(".functionalTestSelector", "0");
7879
$grabAttributeVar = $I->grabAttributeFrom(".functionalTestSelector", "someInput");
7980
$grabCookieVar = $I->grabCookie("grabCookieInput", ['domain' => 'www.google.com']);
8081
$grabUrlVar = $I->grabFromCurrentUrl("/grabCurrentUrl");

dev/tests/verification/TestModule/Cest/basicFunctionalCest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<dragAndDrop selector1=".functionalTestSelector" selector2=".functionalTestSelector2" mergeKey="dragAndDropKey1" />
6161
<executeJS function="someJSFunction" mergeKey="executeJSKey1"/>
6262
<fillField selector=".functionalTestSelector" userInput="someInput" mergeKey="fillFieldKey1" />
63+
<fillField selector=".functionalTestSelector" userInput="0" mergeKey="fillFieldKey2" />
6364
<grabAttributeFrom returnVariable="grabAttributeVar" selector=".functionalTestSelector" userInput="someInput" mergeKey="grabAttributeFromKey1" />
6465
<grabCookie returnVariable="grabCookieVar" userInput="grabCookieInput" parameterArray="['domain' => 'www.google.com']" mergeKey="grabCookieKey1" />
6566
<grabFromCurrentUrl returnVariable="grabUrlVar" url="/grabCurrentUrl" mergeKey="grabFromCurrentUrlKey1" />

src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ private function addUniquenessFunctionCall($input)
12061206
*/
12071207
private function wrapWithDoubleQuotes($input)
12081208
{
1209-
if (empty($input)) {
1209+
if ($input == null) {
12101210
return '';
12111211
}
12121212
//Only replace &quot; with \" so that it doesn't break outer string.

0 commit comments

Comments
 (0)