Skip to content

Commit 47ba1f8

Browse files
authored
Merge pull request #401 from magento/MQE-1679
MQE-1679: dontSeeInPageSource BIC schema
2 parents 1977960 + c40aa54 commit 47ba1f8

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

dev/tests/verification/Resources/BasicFunctionalTest.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ class BasicFunctionalTestCest
9494
$I->dontSeeInField(".functionalTestSelector"); // stepKey: dontSeeInFieldKey1
9595
$I->dontSeeInPageSource("Cosmo Kramer"); // stepKey: dontSeeInPageSourceKey1
9696
$I->dontSeeInPageSource("<p>Jerry Seinfeld</p>"); // stepKey: dontSeeInPageSourceKey2
97+
$I->dontSeeInPageSource("Cosmo Kramer"); // stepKey: dontSeeInPageSourceKey3
98+
$I->dontSeeInPageSource("<p>Jerry Seinfeld</p>"); // stepKey: dontSeeInPageSourceKey4
99+
$I->dontSeeInPageSource("foo"); // stepKey: dontSeeInPageSourceKey5
100+
$I->dontSeeInPageSource("<p>foo</p>"); // stepKey: dontSeeInPageSourceKey6
97101
$I->dontSeeInSource("Cosmo Kramer"); // stepKey: dontSeeInSourceKey1
98102
$I->dontSeeInSource("<p>Jerry Seinfeld</p>"); // stepKey: dontSeeInSourceKey2
99103
$I->dontSeeInTitle("someInput"); // stepKey: dontSeeInTitleKey1

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
<dontSeeInField selector=".functionalTestSelector" stepKey="dontSeeInFieldKey1" />
5353
<dontSeeInPageSource html="Cosmo Kramer" stepKey="dontSeeInPageSourceKey1"/>
5454
<dontSeeInPageSource html="&#60;p&#62;Jerry Seinfeld&#60;&#47;p&#62;" stepKey="dontSeeInPageSourceKey2"/>
55+
<dontSeeInPageSource userInput="Cosmo Kramer" stepKey="dontSeeInPageSourceKey3"/>
56+
<dontSeeInPageSource userInput="&#60;p&#62;Jerry Seinfeld&#60;&#47;p&#62;" stepKey="dontSeeInPageSourceKey4"/>
57+
<dontSeeInPageSource userInput="bar" html="foo" stepKey="dontSeeInPageSourceKey5"/>
58+
<dontSeeInPageSource userInput="&#60;p&#62;bar&#60;&#47;p&#62;" html="&#60;p&#62;foo&#60;&#47;p&#62;" stepKey="dontSeeInPageSourceKey6"/>
5559
<dontSeeInSource html="Cosmo Kramer" stepKey="dontSeeInSourceKey1"/>
5660
<dontSeeInSource html="&#60;p&#62;Jerry Seinfeld&#60;&#47;p&#62;" stepKey="dontSeeInSourceKey2"/>
5761
<dontSeeInTitle userInput="someInput" stepKey="dontSeeInTitleKey1"/>

src/Magento/FunctionalTestingFramework/Test/etc/Actions/dontSeeActions.xsd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,12 @@
172172
</xs:annotation>
173173
<xs:simpleContent>
174174
<xs:extension base="xs:string">
175-
<xs:attribute ref="html" use="required"/>
175+
<!--
176+
For backwards compatibility we accept both html and userInput.
177+
If html is specified, then html is used. Otherwise userInput is used.
178+
-->
179+
<xs:attribute ref="html"/>
180+
<xs:attribute ref="userInput"/>
176181
<xs:attributeGroup ref="commonActionAttributes"/>
177182
</xs:extension>
178183
</xs:simpleContent>

src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,10 @@ public function generateStepsPhp($actionObjects, $generationScope = TestGenerato
11741174
case "dontSeeInPageSource":
11751175
case "seeInSource":
11761176
case "dontSeeInSource":
1177+
//TODO: Deprecate allowed usage of userInput in dontSeeInPageSource
1178+
if ($html === null && $input !== null) {
1179+
$html = $input;
1180+
}
11771181
$testSteps .= $this->wrapFunctionCall($actor, $actionObject, $html);
11781182
break;
11791183
case "conditionalClick":

0 commit comments

Comments
 (0)