Skip to content

Commit 3426237

Browse files
authored
Merge pull request #561 from ajithkumar-maragathavel/mftf-data-example
Example added for grapValueFrom element
2 parents 0c19ad4 + 0f305eb commit 3426237

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/data.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ The following example shows the usage of `grabValueFrom` in testing, where the r
8585
<fillField selector=".functionalTestSelector" userInput="{$grabStepKey}" stepKey="fillFieldKey1"/>
8686
```
8787

88+
The following is an example of the `Magento/Catalog/Test/Mftf/ActionGroup/AssertDiscountsPercentageOfProductsActionGroup.xml` test:
89+
90+
```xml
91+
<grabValueFrom selector="{{AdminProductFormAdvancedPricingSection.productTierPricePercentageValuePriceInput('0')}}" stepKey="grabProductTierPriceInput"/>
92+
<assertEquals stepKey="assertProductTierPriceInput">
93+
<expectedResult type="string">{{amount}}</expectedResult>
94+
<actualResult type="string">$grabProductTierPriceInput</actualResult>
95+
</assertEquals>
96+
```
97+
8898
## Hard-coded data input
8999

90100
The data to operate against can be included as literals in a test. Hard-coded data input can be useful in assertions.

0 commit comments

Comments
 (0)