File tree Expand file tree Collapse file tree 8 files changed +152
-0
lines changed
dev/tests/functional/tests/app/Magento
ConfigurableProduct/Test/TestCase
Downloadable/Test/TestCase
GroupedProduct/Test/TestCase Expand file tree Collapse file tree 8 files changed +152
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © 2015 Magento. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../../../vendor/magento/mtf/etc/variations.xsd" >
9
+ <testCase name =" Magento\Catalog\Test\TestCase\Product\ValidateOrderOfProductTypeTest" >
10
+ <variation name =" ValidateOrderOfProductTypeTestVariation1" >
11
+ <data name =" menu/4" xsi : type =" string" >Bundle Product</data >
12
+ </variation >
13
+ </testCase >
14
+ </config >
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
+ * Assert that order and filling of types on product page equals to incoming data.
14
+ */
15
+ class AssertMenuProductType extends AbstractConstraint
16
+ {
17
+ /**
18
+ * Assert that order and filling of types on product page equals to incoming data.
19
+ *
20
+ * @param CatalogProductIndex $catalogProductIndex
21
+ * @param array $menu
22
+ * @return void
23
+ */
24
+ public function processAssert (CatalogProductIndex $ catalogProductIndex , $ menu = [])
25
+ {
26
+ $ catalogProductIndex ->open ();
27
+ ksort ($ menu );
28
+ \PHPUnit_Framework_Assert::assertEquals (
29
+ implode ("\n" , $ menu ),
30
+ $ catalogProductIndex ->getGridPageActionBlock ()->getTypeList (),
31
+ 'Order and filling of types on product page not equals to incoming data. '
32
+ );
33
+ }
34
+
35
+ /**
36
+ * Success message is displayed.
37
+ *
38
+ * @return string
39
+ */
40
+ public function toString ()
41
+ {
42
+ return 'Order and filling of types on product page equals to incoming data. ' ;
43
+ }
44
+ }
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 \TestCase \Product ;
8
+
9
+ use Magento \Mtf \TestCase \Injectable ;
10
+ use Magento \Catalog \Test \Page \Adminhtml \CatalogProductIndex ;
11
+
12
+ /**
13
+ * Steps:
14
+ * 1. Login to backend.
15
+ * 2. Navigate to PRODUCTS -> Catalog.
16
+ *
17
+ * @group Products_(MX)
18
+ */
19
+ class ValidateOrderOfProductTypeTest extends Injectable
20
+ {
21
+ /**
22
+ * Open catalog product index page.
23
+ *
24
+ * @param CatalogProductIndex $catalogProductIndex
25
+ * @return void
26
+ */
27
+ public function test (CatalogProductIndex $ catalogProductIndex )
28
+ {
29
+ $ catalogProductIndex ->open ();
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © 2015 Magento. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../../../vendor/magento/mtf/etc/variations.xsd" >
9
+ <testCase name =" Magento\Catalog\Test\TestCase\Product\ValidateOrderOfProductTypeTest" >
10
+ <variation name =" ValidateOrderOfProductTypeTestVariation1" >
11
+ <data name =" menu/0" xsi : type =" string" >Simple Product</data >
12
+ <data name =" menu/3" xsi : type =" string" >Virtual Product</data >
13
+ <constraint name =" Magento\Catalog\Test\Constraint\AssertMenuProductType" />
14
+ </variation >
15
+ </testCase >
16
+ </config >
Original file line number Diff line number Diff line change 141
141
<argument name =" severity" xsi : type =" string" >high</argument >
142
142
</arguments >
143
143
</type >
144
+ <type name =" Magento\Catalog\Test\Constraint\AssertMenuProductType" >
145
+ <arguments >
146
+ <argument name =" severity" xsi : type =" string" >high</argument >
147
+ </arguments >
148
+ </type >
144
149
</config >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © 2015 Magento. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../../../vendor/magento/mtf/etc/variations.xsd" >
9
+ <testCase name =" Magento\Catalog\Test\TestCase\Product\ValidateOrderOfProductTypeTest" >
10
+ <variation name =" ValidateOrderOfProductTypeTestVariation1" >
11
+ <data name =" menu/1" xsi : type =" string" >Configurable Product</data >
12
+ </variation >
13
+ </testCase >
14
+ </config >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © 2015 Magento. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../../../vendor/magento/mtf/etc/variations.xsd" >
9
+ <testCase name =" Magento\Catalog\Test\TestCase\Product\ValidateOrderOfProductTypeTest" >
10
+ <variation name =" ValidateOrderOfProductTypeTestVariation1" >
11
+ <data name =" menu/5" xsi : type =" string" >Downloadable Product</data >
12
+ </variation >
13
+ </testCase >
14
+ </config >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © 2015 Magento. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+ -->
8
+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../../../vendor/magento/mtf/etc/variations.xsd" >
9
+ <testCase name =" Magento\Catalog\Test\TestCase\Product\ValidateOrderOfProductTypeTest" >
10
+ <variation name =" ValidateOrderOfProductTypeTestVariation1" >
11
+ <data name =" menu/2" xsi : type =" string" >Grouped Product</data >
12
+ </variation >
13
+ </testCase >
14
+ </config >
You can’t perform that action at this time.
0 commit comments