File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed
dev/tests/functional/tests/app/Magento/Catalog/Test Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © 2015 Magento. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ namespace Magento \Catalog \Test \Constraint ;
8
+
9
+ use Magento \Mtf \Constraint \AbstractConstraint ;
10
+ use Magento \Catalog \Test \Page \Adminhtml \CatalogProductIndex ;
11
+
12
+ /**
13
+ * Check mass update success message.
14
+ */
15
+ class AssertMassProductUpdateSuccessMessage extends AbstractConstraint
16
+ {
17
+ /**
18
+ * Text value to be checked.
19
+ */
20
+ const SUCCESS_MESSAGE = 'A total of 1 record(s) were updated. ' ;
21
+
22
+ /**
23
+ * Assert that after mass update successful message appears.
24
+ *
25
+ * @param CatalogProductIndex $productGrid
26
+ * @return void
27
+ */
28
+ public function processAssert (CatalogProductIndex $ productGrid )
29
+ {
30
+ $ actualMessage = $ productGrid ->getMessagesBlock ()->getSuccessMessages ();
31
+ \PHPUnit_Framework_Assert::assertEquals (
32
+ self ::SUCCESS_MESSAGE ,
33
+ $ actualMessage ,
34
+ 'Wrong success message is displayed. '
35
+ );
36
+ }
37
+
38
+ /**
39
+ * Returns a string representation of the object.
40
+ *
41
+ * @return string
42
+ */
43
+ public function toString ()
44
+ {
45
+ return 'Mass update success message is present. ' ;
46
+ }
47
+ }
Original file line number Diff line number Diff line change 11
11
<data name =" configData" xsi : type =" string" >product_flat</data >
12
12
<data name =" initialProduct/dataSet" xsi : type =" string" >simple_10_dollar</data >
13
13
<data name =" product/data/price/value" xsi : type =" string" >1.99</data >
14
+ <constraint name =" Magento\Catalog\Test\Constraint\AssertMassProductUpdateSuccessMessage" />
14
15
<constraint name =" Magento\Catalog\Test\Constraint\AssertProductInGrid" />
15
16
<constraint name =" Magento\Catalog\Test\Constraint\AssertProductInCategory" />
16
17
</variation >
Original file line number Diff line number Diff line change 146
146
<argument name =" severity" xsi : type =" string" >high</argument >
147
147
</arguments >
148
148
</type >
149
+ <type name =" Magento\Catalog\Test\Constraint\AssertMassProductUpdateSuccessMessage" >
150
+ <arguments >
151
+ <argument name =" severity" xsi : type =" string" >high</argument >
152
+ </arguments >
153
+ </type >
149
154
</config >
You can’t perform that action at this time.
0 commit comments