Skip to content

Commit 4edd003

Browse files
committed
Merge remote-tracking branch 'origin/develop' into php8-develop
2 parents 5d81521 + 67724cf commit 4edd003

File tree

4 files changed

+234
-44
lines changed

4 files changed

+234
-44
lines changed

Diff for: dev/tests/verification/Resources/AssertTest.txt

+8
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,13 @@ class AssertTestCest
151151
$I->assertNotEqualsCanonicalizing(["5", "8", "7", "9"], ["1", "2", "3", "4"], "pass"); // stepKey: a4
152152
$I->assertEqualsIgnoringCase("Cat", "cat", "pass"); // stepKey: a5
153153
$I->assertNotEqualsIgnoringCase("Cat", "Dog", "pass"); // stepKey: a6
154+
$I->comment("assertions.md examples");
155+
$I->assertElementContainsAttribute(".admin__menu-overlay", "style", "color: #333;"); // stepKey: assertElementContainsAttribute
156+
$I->assertStringContainsString("Buy 5 for $5.00 each and save 50%", $DropDownTierPriceTextProduct1); // stepKey: assertDropDownTierPriceTextProduct1
157+
$I->assertEmpty("$grabSearchButtonAttribute"); // stepKey: assertSearchButtonEnabled
158+
$I->assertGreaterThanOrEqual($getOrderStatusFirstRow, $getOrderStatusSecondRow); // stepKey: checkStatusSortOrderAsc
159+
$I->assertNotEquals($grabTotalBefore, $grabTotalAfter); // stepKey: assertNotEqualsExample
160+
$I->assertNotRegExp('/placeholder\/thumbnail\.jpg/', $getSimpleProductThumbnail); // stepKey: simpleThumbnailIsNotDefault
161+
$I->assertRegExp("#var\s+adminAnalyticsMetadata\s+=\s+{\s+(\"[\w_]+\":\s+\"[^\"]*?\",\s+)*?(\"[\w_]+\":\s+\"[^\"]*?\"\s+)};#s", $pageSource, "adminAnalyticsMetadata object is invalid"); // stepKey: validateadminAnalyticsMetadata
154162
}
155163
}

Diff for: dev/tests/verification/TestModule/Test/AssertTest.xml

+28
Original file line numberDiff line numberDiff line change
@@ -400,5 +400,33 @@
400400
<expectedResult type="string">Cat</expectedResult>
401401
<actualResult type="string">Dog</actualResult>
402402
</assertNotEqualsIgnoringCase>
403+
404+
<!-- assertions.md examples -->
405+
<assertElementContainsAttribute stepKey="assertElementContainsAttribute">
406+
<expectedResult selector=".admin__menu-overlay" attribute="style" type="string">color: #333;</expectedResult>
407+
</assertElementContainsAttribute>
408+
<assertStringContainsString stepKey="assertDropDownTierPriceTextProduct1">
409+
<expectedResult type="string">Buy 5 for $5.00 each and save 50%</expectedResult>
410+
<actualResult type="variable">DropDownTierPriceTextProduct1</actualResult>
411+
</assertStringContainsString>
412+
<assertEmpty stepKey="assertSearchButtonEnabled">
413+
<actualResult type="string">$grabSearchButtonAttribute</actualResult>
414+
</assertEmpty>
415+
<assertGreaterThanOrEqual stepKey="checkStatusSortOrderAsc">
416+
<actualResult type="const">$getOrderStatusSecondRow</actualResult>
417+
<expectedResult type="const">$getOrderStatusFirstRow</expectedResult>
418+
</assertGreaterThanOrEqual>
419+
<assertNotEquals stepKey="assertNotEqualsExample">
420+
<actualResult type="string">{$grabTotalAfter}</actualResult>
421+
<expectedResult type="string">{$grabTotalBefore}</expectedResult>
422+
</assertNotEquals>
423+
<assertNotRegExp stepKey="simpleThumbnailIsNotDefault">
424+
<actualResult type="const">$getSimpleProductThumbnail</actualResult>
425+
<expectedResult type="const">'/placeholder\/thumbnail\.jpg/'</expectedResult>
426+
</assertNotRegExp>
427+
<assertRegExp message="adminAnalyticsMetadata object is invalid" stepKey="validateadminAnalyticsMetadata">
428+
<expectedResult type="string">#var\s+adminAnalyticsMetadata\s+=\s+{\s+("[\w_]+":\s+"[^"]*?",\s+)*?("[\w_]+":\s+"[^"]*?"\s+)};#s</expectedResult>
429+
<actualResult type="variable">$pageSource</actualResult>
430+
</assertRegExp>
403431
</test>
404432
</tests>

Diff for: docs/test.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Allure annotations provide metadata for reporting.
8787
`<before>` may contain these child elements:
8888

8989
* Any [Action][actions]
90-
* [`<actionGroup>`]s
90+
* [`<actionGroup>`]
9191

9292
### after {#after-tag}
9393

0 commit comments

Comments
 (0)