Skip to content

Commit 84c2aec

Browse files
committed
MAGETWO-86243: Admin orders can result in a customer with an example email address
1 parent 6c58328 commit 84c2aec

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

app/code/Magento/Bundle/Test/Mftf/ActionGroup/BundleProductsOnAdminActionGroup.xml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<actionGroup name="CreateBundleProductForTwoSimpleProducts">
1212
<arguments>
1313
<argument name="bundleProduct"/>
14+
<argument name="simpleProductFirst"/>
15+
<argument name="simpleProductSecond"/>
1416
</arguments>
1517
<fillField userInput="{{bundleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillProductSku"/>
1618
<fillField userInput="{{bundleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillProductName"/>
@@ -19,7 +21,22 @@
1921
<click selector="{{AdminProductFormBundleSection.AddOption}}" stepKey="clickAddOptionButton"/>
2022
<fillField userInput="{{bundleProduct.option_title}}" selector="{{AdminProductFormBundleSection.OptionTitle}}" stepKey="fillOptionTitle"/>
2123
<click selector="{{AdminProductFormBundleSection.AddProductsToOption}}" stepKey="clickAddProductsToOption"/>
22-
<click selector="{{AdminProductFormBundleSection.selectAll}}" stepKey="tickSelectAllCheckbox"/>
24+
25+
<!-- Select First Simple -->
26+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="clickOnFiltersButton"/>
27+
<conditionalClick selector="{{AdminProductGridFilterSection.clearAll}}" dependentSelector="{{AdminProductGridFilterSection.clearAll}}" visible="true" stepKey="clearFilters"/>
28+
<fillField selector="{{AdminProductGridFilterSection.name}}" userInput="{{simpleProductFirst.name}}" stepKey="fillNameFilter"/>
29+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="applyFilters"/>
30+
<click selector="{{AdminProductFormBundleSection.firstRowCheckbox}}" stepKey="selectFirstSimple"/>
31+
32+
<!-- Select Second Simple -->
33+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="clickOnFiltersButton2"/>
34+
<conditionalClick selector="{{AdminProductGridFilterSection.clearAll}}" dependentSelector="{{AdminProductGridFilterSection.clearAll}}" visible="true" stepKey="clearFilters2"/>
35+
<fillField selector="{{AdminProductGridFilterSection.name}}" userInput="{{simpleProductSecond.name}}" stepKey="fillNameFilter2"/>
36+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="applyFilters2"/>
37+
<click selector="{{AdminProductFormBundleSection.firstRowCheckbox}}" stepKey="selectSecondSimple"/>
38+
39+
<!-- Add Selected Simples To Bundle -->
2340
<click selector="{{AdminProductFormBundleSection.AddSelectedProducts}}" stepKey="clickAddSelectedProductsButton"/>
2441
<fillField userInput="{{bundleProduct.default_quantity1}}" selector="{{AdminProductFormBundleSection.DefaultQuantity1}}" stepKey="fillDefaultQuantityForFirstProduct"/>
2542
<fillField userInput="{{bundleProduct.default_quantity2}}" selector="{{AdminProductFormBundleSection.DefaultQuantity2}}" stepKey="fillDefaultQuantityForSecondProduct"/>

app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
<!--Add Products to Option-->
2121
<element name="selectAll" type="input" selector="//label[@data-bind='attr: {for: ko.uid}']"/>
2222
<element name="AddSelectedProducts" type="button" selector="//span[contains(text(),'Add Selected Products')]/ancestor::button" timeout="30"/>
23+
<element name="firstRowCheckbox" type="checkbox" selector="tr.data-row:nth-of-type(1) input.admin__control-checkbox[data-action='select-row']"/>
2324
</section>
2425
</sections>

app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateBundleProductTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<!--Step4. Fill in all data according to data set-->
4646
<actionGroup ref="CreateBundleProductForTwoSimpleProducts" stepKey="CreateBundleProductForTwoSimpleProducts">
4747
<argument name="bundleProduct" value="BundleProduct"/>
48+
<argument name="simpleProductFirst" value="SimpleProduct"/>
49+
<argument name="simpleProductSecond" value="SimpleProduct2"/>
4850
</actionGroup>
4951

5052
<!--Step5. Save product-->

0 commit comments

Comments
 (0)