File tree Expand file tree Collapse file tree 2 files changed +96
-0
lines changed
dev/tests/functional/tests/app/Magento/Backend/Test/TestCase Expand file tree Collapse file tree 2 files changed +96
-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 \Backend \Test \TestCase ;
8
+
9
+ use Magento \Backend \Test \Fixture \GlobalSearch ;
10
+ use Magento \Backend \Test \Page \Adminhtml \Dashboard ;
11
+ use Magento \Mtf \TestCase \Injectable ;
12
+
13
+ /**
14
+ * Preconditions:
15
+ * 1. Create customer
16
+ * 2. Create two simple products
17
+ * 3. Create order with one of created simple product
18
+ *
19
+ * Steps:
20
+ * 1. Login to backend
21
+ * 2. Click on Search button on the top of page
22
+ * 3. Fill in data according dataSet
23
+ * 4. Perform assertions
24
+ *
25
+ * @group Search_Core_(MX)
26
+ * @ZephyrId MAGETWO-28457
27
+ */
28
+ class GlobalSearchEntityTest extends Injectable
29
+ {
30
+ /* tags */
31
+ const MVP = 'no ' ;
32
+ const DOMAIN = 'MX ' ;
33
+ /* end tags */
34
+
35
+ /**
36
+ * Backend Dashboard page.
37
+ *
38
+ * @var Dashboard
39
+ */
40
+ protected $ dashboard ;
41
+
42
+ /**
43
+ * Preparing pages for test.
44
+ *
45
+ * @param Dashboard $dashboard
46
+ * @return void
47
+ */
48
+ public function __inject (Dashboard $ dashboard )
49
+ {
50
+ $ this ->dashboard = $ dashboard ;
51
+ }
52
+
53
+ /**
54
+ * Run Global Search Entity Test.
55
+ *
56
+ * @param GlobalSearch $search
57
+ * @return void
58
+ */
59
+ public function test (GlobalSearch $ search )
60
+ {
61
+ //Steps:
62
+ $ this ->dashboard ->open ();
63
+ $ this ->dashboard ->getAdminPanelHeader ()->search ($ search ->getQuery ());
64
+ }
65
+ }
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\Backend\Test\TestCase\GlobalSearchEntityTest" >
10
+ <variation name =" GlobalSearchEntityTestVariation2" >
11
+ <data name =" description" xsi : type =" string" >search with 2 sign return no results</data >
12
+ <data name =" search/data/query" xsi : type =" string" >:)</data >
13
+ <constraint name =" Magento\Backend\Test\Constraint\AssertGlobalSearchNoRecordsFound" />
14
+ </variation >
15
+ <variation name =" GlobalSearchEntityTestVariation3" >
16
+ <data name =" description" xsi : type =" string" >search product by sku</data >
17
+ <data name =" search/data/query" xsi : type =" string" >orderInjectable::default::product::sku</data >
18
+ <constraint name =" Magento\Backend\Test\Constraint\AssertGlobalSearchProductName" />
19
+ </variation >
20
+ <variation name =" GlobalSearchEntityTestVariation4" >
21
+ <data name =" description" xsi : type =" string" >search existed customer</data >
22
+ <data name =" search/data/query" xsi : type =" string" >customer::johndoe_unique::lastname</data >
23
+ <constraint name =" Magento\Backend\Test\Constraint\AssertGlobalSearchCustomerName" />
24
+ </variation >
25
+ <variation name =" GlobalSearchEntityTestVariation5" >
26
+ <data name =" description" xsi : type =" string" >search order (by order id)</data >
27
+ <data name =" search/data/query" xsi : type =" string" >orderInjectable::default::id</data >
28
+ <constraint name =" Magento\Backend\Test\Constraint\AssertGlobalSearchOrderId" />
29
+ </variation >
30
+ </testCase >
31
+ </config >
You can’t perform that action at this time.
0 commit comments