-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENGCOM-6818: Issue #24842: Unable to delete custom option file in adm…
…in order create #24843 - Merge Pull Request #24843 from adrian-martinez-interactiv4/magento2:FR23#FEATURE-UNABLE-DELETE-CUSTOM-OPTION-FILE - Merged commits: 1. 504dd91 2. 3eb4110 3. 6e4a041
- Loading branch information
Showing
6 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...les/Test/Mftf/ActionGroup/AdminAddSimpleProductWithCustomOptionFileToOrderActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminAddSimpleProductWithCustomOptionFileToOrderActionGroup" extends="AddSimpleProductToOrderActionGroup"> | ||
<annotations> | ||
<description>Add product to order with custom option type file. Start on create order page.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="file" type="string" defaultValue="{{TestImageNew.file}}" /> | ||
</arguments> | ||
|
||
<remove keyForRemoval="fillProductQty"/> | ||
<waitForAjaxLoad stepKey="waitForAjaxLoad" after="selectProduct"/> | ||
<fillField selector="{{AdminOrderFormCustomOptionsSection.quantity}}" userInput="{{productQty}}" stepKey="fillProductQty" after="waitForAjaxLoad"/> | ||
<attachFile selector="{{AdminOrderFormCustomOptionsSection.file}}" userInput="{{file}}" stepKey="attachImageForOptional" after="fillProductQty"/> | ||
<click selector="{{AdminOrderFormCustomOptionsSection.buttonOk}}" stepKey="clickButtonOK" after="attachImageForOptional"/> | ||
</actionGroup> | ||
</actionGroups> |
26 changes: 26 additions & 0 deletions
26
app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminChangeCustomerOptionFileActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminChangeCustomerOptionFileActionGroup"> | ||
<annotations> | ||
<description>Change custom option file on admin order page.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="file" type="string" defaultValue="{{TestImageNew.file}}" /> | ||
</arguments> | ||
|
||
<click selector="{{AdminOrderFormItemsSection.configure}}" stepKey="clickConfigure"/> | ||
<waitForAjaxLoad stepKey="waitForAjaxLoad"/> | ||
<click selector="{{AdminOrderFormCustomOptionsSection.linkChange}}" stepKey="clickLinkChange"/> | ||
<waitForPageLoad stepKey="waitForChangeLoad"/> | ||
<attachFile selector="{{AdminOrderFormCustomOptionsSection.file}}" userInput="{{file}}" stepKey="changeAttachImage"/> | ||
<click selector="{{AdminOrderFormCustomOptionsSection.buttonOk}}" stepKey="clickButtonOK"/> | ||
<waitForPageLoad stepKey="waitForCustomOptionApplied"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormCustomOptionsSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminOrderFormCustomOptionsSection"> | ||
<element name="quantity" type="input" selector="//input[@id='product_composite_configure_input_qty']"/> | ||
<element name="file" type="file" selector="//input[@type='file'][contains(@class, 'product-custom-option')]" /> | ||
<element name="buttonOk" type="button" selector="//button[contains(@class, 'action-primary')][@data-role='action']"/> | ||
<element name="linkChange" type="text" selector="//div[contains(@class, 'entry-edit')]//a[contains(text(),'Change')]"/> | ||
</section> | ||
</sections> |
52 changes: 52 additions & 0 deletions
52
...de/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductCustomOptionFileTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminCreateOrderWithSimpleProductCustomOptionFileTest"> | ||
<annotations> | ||
<title value="Create Order with simple product with custom option."/> | ||
<description value="Verify, admin able to change file for custom option during order creation."/> | ||
<features value="Sales"/> | ||
<severity value="MAJOR"/> | ||
<group value="Sales"/> | ||
</annotations> | ||
<before> | ||
<!--Create test data.--> | ||
<createData entity="_defaultCategory" stepKey="category"/> | ||
<createData entity="SimpleProduct" stepKey="simpleProduct"> | ||
<requiredEntity createDataKey="category"/> | ||
</createData> | ||
<createData entity="Simple_US_Customer_CA" stepKey="customer"/> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<!--Clean up created test data.--> | ||
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="customer" stepKey="deleteCustomer" /> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!--Add option to product.--> | ||
<amOnPage url="{{AdminProductEditPage.url($simpleProduct.id$)}}" stepKey="navigateToProductEditPage"/> | ||
<actionGroup ref="AddProductCustomOptionFileActionGroup" stepKey="addOption"> | ||
<argument name="option" value="ProductOptionFile"/> | ||
</actionGroup> | ||
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> | ||
<!--Create order.--> | ||
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer"> | ||
<argument name="customer" value="$customer$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminAddSimpleProductWithCustomOptionFileToOrderActionGroup" stepKey="addSimpleProductToOrder"> | ||
<argument name="product" value="$simpleProduct$"/> | ||
<argument name="productQty" value="$simpleProduct.quantity$"/> | ||
</actionGroup> | ||
<!--Verify, admin able to change file for custom option.--> | ||
<actionGroup ref="AdminChangeCustomerOptionFileActionGroup" stepKey="changeFile"/> | ||
</test> | ||
</tests> |