Skip to content

Commit b225913

Browse files
authored
Merge pull request #7398 from magento-gl/gl_pr_jan13_2022_latest
GL PR raised on Jan13, 2022
2 parents b12f867 + b2dad9e commit b225913

File tree

2 files changed

+62
-3
lines changed

2 files changed

+62
-3
lines changed

app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ define([
230230
if (response.error) {
231231
this.blockMsg.show();
232232
this.blockMsgError.innerHTML = response.message;
233-
this.blockCancelBtn.hide();
233+
if(this.blockCancelBtn) {
234+
this.blockCancelBtn.hide();
235+
}
234236
this.setConfirmCallback(listType, null);
235237
this._showWindow();
236238
}
@@ -584,7 +586,9 @@ define([
584586
this.blockFormFields.update();
585587
this.blockMsg.hide();
586588
this.blockMsgError.update();
587-
this.blockCancelBtn.show();
589+
if(this.blockCancelBtn) {
590+
this.blockCancelBtn.show();
591+
}
588592
break;
589593
default:
590594
// search in list types for its cleaning
@@ -603,7 +607,9 @@ define([
603607
this.blockFormFields.update();
604608
this.blockMsg.hide();
605609
this.blockMsgError.update();
606-
this.blockCancelBtn.show();
610+
if(this.blockCancelBtn) {
611+
this.blockCancelBtn.show();
612+
}
607613
}
608614
break;
609615
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCreateOrderWithConfigurableProductTest">
12+
<annotations>
13+
<title value="Create Order in Admin with simple product"/>
14+
<stories value="AC-2040"/>
15+
<description value="Create order with configurable product."/>
16+
<features value="Sales"/>
17+
<testCaseId value="AC-2040"/>
18+
<severity value="MAJOR"/>
19+
<group value="Sales"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<createData entity="_defaultCategory" stepKey="createCategory"/>
24+
<actionGroup ref="CreateConfigurableProductActionGroup" stepKey="createConfigurableProduct">
25+
<argument name="product" value="_defaultProduct"/>
26+
<argument name="category" value="$$createCategory$$"/>
27+
</actionGroup>
28+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
29+
</before>
30+
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer">
31+
<argument name="customer" value="$$createCustomer$$"/>
32+
</actionGroup>
33+
<actionGroup ref="AddConfigurableProductToOrderActionGroup" stepKey="addFirstConfigurableProductToOrder">
34+
<argument name="product" value="_defaultProduct"/>
35+
<argument name="attribute" value="colorProductAttribute"/>
36+
<argument name="option" value="colorProductAttribute1"/>
37+
</actionGroup>
38+
<actionGroup ref="SelectCashOnDeliveryPaymentMethodActionGroup" stepKey="selectPaymentMethod"/>
39+
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
40+
<actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="verifyCreatedOrderInformation"/>
41+
<after>
42+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
43+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
44+
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteConfigurableProduct">
45+
<argument name="sku" value="{{_defaultProduct.sku}}"/>
46+
</actionGroup>
47+
<magentoCLI stepKey="reindex" command="indexer:reindex"/>
48+
<magentoCLI stepKey="flushCache" command="cache:flush"/>
49+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
50+
</after>
51+
52+
</test>
53+
</tests>

0 commit comments

Comments
 (0)