Skip to content

Commit 1794af3

Browse files
committed
MAGETWO-86243: Admin orders can result in a customer with an example email address
1 parent 684d809 commit 1794af3

File tree

4 files changed

+74
-4
lines changed

4 files changed

+74
-4
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<!--Actions to delete category-->
12+
<actionGroup name="DeleteProductAttribute">
13+
<arguments>
14+
<argument name="productAttribute"/>
15+
</arguments>
16+
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="goToProductAttributesGridPage"/>
17+
<waitForPageLoad time="30" stepKey="waitForProductAttributesGridPageLoad"/>
18+
<click selector="{{AdminProductAttributeGridSection.resetFilter}}" stepKey="resetFilter"/>
19+
<fillField selector="{{AdminProductAttributeGridSection.gridFilterFrontEndLabel}}"
20+
userInput="{{productAttribute.default_label}}" stepKey="fillAttributeDefaultLabelInput"/>
21+
<click selector="{{AdminProductAttributeGridSection.search}}" stepKey="searchForAttribute"/>
22+
<click selector="{{AdminProductAttributeGridSection.firstRow}}" stepKey="clickFirstRow"/>
23+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
24+
<click selector="{{AdminProductAttributeEditMenuSection.deleteAttribute}}" stepKey="deleteProductAttribute"/>
25+
<waitForElementVisible selector="{{AdminConfirmationModalSection.message}}" stepKey="waitingForWarningModal"/>
26+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmStoreDelete"/>
27+
</actionGroup>
28+
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="AdminCategoryProductAttributeEditPage" url="catalog/product_attribute/edit/" area="admin" module="Catalog">
12+
<section name="AdminProductAttributeEditMenu"/>
13+
<section name="AdminConfirmationModalSection"/>
14+
</page>
15+
</pages>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminProductAttributeEditMenuSection">
12+
<element name="deleteAttribute" type="button" selector="#delete" timeout="30"/>
13+
</section>
14+
</sections>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductTest.xml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<!-- Login as admin -->
2424
<before>
25-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
25+
<createData entity="_defaultCategory" stepKey="createCategory"/>
2626
</before>
2727

2828
<!-- Delete Created Products And Category Then Logout -->
@@ -44,20 +44,33 @@
4444
<argument name="product" value="_defaultProduct"/>
4545
</actionGroup>
4646

47+
<!-- Tryna delete category via API -->
48+
<!--actionGroup ref="DeleteCategory" stepKey="deleteCreatedCategory">
49+
<argument name="categoryEntity" value="_defaultCategory"/>
50+
</actionGroup-->
51+
52+
<!-- Delete created product attribute -->
53+
<actionGroup ref="DeleteProductAttribute" stepKey="deleteCreatedProductAttribute">
54+
<argument name="productAttribute" value="colorProductAttribute"/>
55+
</actionGroup>
56+
4757
<actionGroup ref="logout" stepKey="logout"/>
58+
59+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
4860
</after>
4961

50-
<!-- Create category -->
51-
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="amOnCategoryGridPage"/>
62+
<!-- Tryna create category via API -->
63+
<!--amOnPage url="{{AdminCategoryPage.url}}" stepKey="amOnCategoryGridPage"/>
5264
<waitForPageLoad time="30" stepKey="waitForPageLoad1"/>
5365
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
5466
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="enterCategoryName"/>
5567
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="clickOnSeoSection"/>
5668
<fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{_defaultCategory.name_lwr}}" stepKey="enterUrlKey"/>
5769
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="clickOnSaveCategory"/>
58-
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/>
70+
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/-->
5971

6072
<!-- Create configurable product... -->
73+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
6174
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductGridPage"/>
6275
<waitForPageLoad time="30" stepKey="waitForPageLoad2"/>
6376
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickOnAddProductToggle"/>

0 commit comments

Comments
 (0)