File tree Expand file tree Collapse file tree 3 files changed +18
-17
lines changed
app/code/Magento/Catalog/view/adminhtml/web/js
testsuites/Magento/Mtf/TestSuite/InjectableTests
tests/app/Magento/Catalog/Test/Constraint Expand file tree Collapse file tree 3 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ define([
55
55
56
56
if ( render ) {
57
57
this . render ( ) ;
58
+ this . updateItemsCountField ( ) ;
58
59
}
59
60
} ,
60
61
remove : function ( event ) {
Original file line number Diff line number Diff line change @@ -58,31 +58,16 @@ public function processAssert(
58
58
$ productForm = $ catalogProductEdit ->getProductForm ();
59
59
$ productForm ->fill ($ simpleProduct );
60
60
$ catalogProductEdit ->getFormPageActions ()->save ();
61
- $ failedAttributes = $ productForm -> getRequireNoticeAttributes ( $ simpleProduct );
61
+ $ actualErrorMessage = $ catalogProductEdit -> getMessagesBlock ()-> getErrorMessage ( );
62
62
$ attributeLabel = $ attribute ->getFrontendLabel ();
63
- $ actualMessage = $ this ->getActualMessage ($ failedAttributes , $ attributeLabel );
64
63
65
64
\PHPUnit_Framework_Assert::assertEquals (
66
65
sprintf (self ::UNIQUE_MESSAGE , $ attributeLabel ),
67
- $ actualMessage ,
66
+ $ actualErrorMessage ,
68
67
'JS error notice on product edit page is not equal to expected. '
69
68
);
70
69
}
71
70
72
- /**
73
- * Get actual message.
74
- *
75
- * @param array $errors
76
- * @param string $attributeLabel
77
- * @return mixed
78
- */
79
- protected function getActualMessage (array $ errors , $ attributeLabel )
80
- {
81
- return isset ($ errors ['product-details ' ][$ attributeLabel ])
82
- ? $ errors ['product-details ' ][$ attributeLabel ]
83
- : null ;
84
- }
85
-
86
71
/**
87
72
* Create simple product fixture.
88
73
*
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © 2013-2017 Magento, Inc. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9
+ xsi : noNamespaceSchemaLocation =" ../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd" >
10
+ <rule scope =" testsuite" >
11
+ <allow >
12
+ <class value =" Magento\Catalog\Test\TestCase\ProductAttribute\CreateProductAttributeEntityTest" />
13
+ </allow >
14
+ </rule >
15
+ </config >
You can’t perform that action at this time.
0 commit comments