@@ -83,7 +83,7 @@ For our example, we have a test that creates a simple product. Note the hardcode
83
83
<waitForPageLoad stepKey =" waitForNewProductPageOpened" />
84
84
85
85
<!-- Fill field "Name" with "Simple Product %unique_value%" -->
86
- ---> <fillField selector =" input[name='product[name]']" userInput =" Simple Product 12412431" stepKey =" fillNameField" />
86
+ -----> <fillField selector =" input[name='product[name]']" userInput =" Simple Product 12412431" stepKey =" fillNameField" />
87
87
88
88
<!-- Fill field "SKU" with "simple_product_%unique_value%" -->
89
89
<fillField selector =" input[name='product[sku]']" userInput =" simple-product-12412431" stepKey =" fillSKUField" />
@@ -149,10 +149,7 @@ In this example `AdminProductFormSection` refers to the `<section>` in the XML f
149
149
<waitForPageLoad stepKey =" waitForNewProductPageOpened" />
150
150
151
151
<!-- Fill field "Name" with "Simple Product %unique_value%" -->
152
- ```diff
153
- -<fillField selector =" input[name='product[name]']" userInput =" Simple Product 12412431" stepKey =" fillNameField" />
154
- +<fillField selector =" {{AdminProductFormSection.productName}}" userInput =" Simple Product 12412431" stepKey =" fillNameField" />
155
- ```
152
+ -----><fillField selector =" {{AdminProductFormSection.productName}}" userInput =" Simple Product 12412431" stepKey =" fillNameField" />
156
153
<!-- Fill field "SKU" with "simple_product_%unique_value%" -->
157
154
<fillField selector =" {{AdminProductFormSection.productSku}}" userInput =" simple-product-12412431" stepKey =" fillSKUField" />
158
155
@@ -190,7 +187,7 @@ Here we are interested in `<section name="AdminProductFormSection">`, where we a
190
187
<element name =" attributeSetFilter" type =" input" selector =" div[data-index='attribute_set_id'] .admin__field-control input" timeout =" 30" />
191
188
<element name =" attributeSetFilterResult" type =" input" selector =" div[data-index='attribute_set_id'] .action-menu-item._last" timeout =" 30" />
192
189
<element name =" attributeSetFilterResultByName" type =" text" selector =" //label/span[text() = '{{var}}']" timeout =" 30" parameterized =" true" />
193
- ---> <element name =" productName" type =" input" selector =" input[name='product[name]']" />
190
+ -----> <element name =" productName" type =" input" selector =" input[name='product[name]']" />
194
191
<element name =" RequiredNameIndicator" type =" text" selector =" return window.getComputedStyle(document.querySelector('._required[data-index=name]> .admin__field-label span'), ':after').getPropertyValue('content');" />
195
192
<element name =" RequiredSkuIndicator" type =" text" selector =" return window.getComputedStyle(document.querySelector('._required[data-index=sku]> .admin__field-label span'), ':after').getPropertyValue('content');" />
196
193
<element name =" productSku" type =" input" selector =" input[name='product[sku]']" />
@@ -250,8 +247,7 @@ We replace the hardcoded values with variables and the MFTF will do the variable
250
247
<waitForPageLoad stepKey =" waitForNewProductPageOpened" />
251
248
252
249
<!-- Fill field "Name" with "Simple Product %unique_value%" -->
253
- -<fillField selector =" {{AdminProductFormSection.productName}}" userInput =" Simple Product 12412431" stepKey =" fillNameField" />
254
- +<fillField selector =" {{AdminProductFormSection.productName}}" userInput =" {{_defaultProduct.name}}" stepKey =" fillNameField" />
250
+ ----><fillField selector =" {{AdminProductFormSection.productName}}" userInput =" {{_defaultProduct.name}}" stepKey =" fillNameField" />
255
251
256
252
<!-- Fill field "SKU" with "simple_product_%unique_value%" -->
257
253
<fillField selector =" {{AdminProductFormSection.productSku}}" userInput =" {{_defaultProduct.sku}}" stepKey =" fillSKUField" />
@@ -331,8 +327,7 @@ To create an action group, take the steps and put them within an `<actionGroup>`
331
327
<arguments >
332
328
<argument name =" product" defaultValue =" _defaultProduct" />
333
329
</arguments >
334
- -<fillField selector =" {{AdminProductFormSection.productName}}" userInput =" {{_defaultProduct.name}}" stepKey =" fillNameField" />
335
- +<fillField selector =" {{AdminProductFormSection.productName}}" userInput =" {{product.name}}" stepKey =" fillProductName" />
330
+ -----><fillField selector =" {{AdminProductFormSection.productName}}" userInput =" {{product.name}}" stepKey =" fillProductName" />
336
331
<fillField selector =" {{AdminProductFormSection.productSku}}" userInput =" {{product.sku}}" stepKey =" fillProductSku" />
337
332
<fillField selector =" {{AdminProductFormSection.productPrice}}" userInput =" {{product.price}}" stepKey =" fillProductPrice" />
338
333
<fillField selector =" {{AdminProductFormSection.productQuantity}}" userInput =" {{product.quantity}}" stepKey =" fillProductQty" />
@@ -383,8 +378,8 @@ Now we can reference this action group within our test (and any other test).
383
378
384
379
<!-- Click "Add Product" button -->
385
380
<actionGroup ref =" goToCreateProductPage" stepKey =" goToCreateProductPage" />
386
- - <fillField selector =" {{AdminProductFormSection.productName}}" userInput =" {{product.name}}" stepKey =" fillProductName" />
387
- + <actionGroup ref =" fillMainProductForm" stepKey =" fillProductForm" >
381
+ -----> <fillField selector =" {{AdminProductFormSection.productName}}" userInput =" {{product.name}}" stepKey =" fillProductName" />
382
+ <actionGroup ref =" fillMainProductForm" stepKey =" fillProductForm" >
388
383
<argument name =" product" value =" _defaultProduct" />
389
384
</actionGroup >
390
385
0 commit comments