@@ 19-64 (lines=46) @@ | ||
16 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
17 | use hipanel\tests\_support\Step\Acceptance\Admin; |
|
18 | ||
19 | class ServicesCest |
|
20 | { |
|
21 | /** |
|
22 | * @var IndexPage |
|
23 | */ |
|
24 | private $index; |
|
25 | ||
26 | public function _before(Admin $I) |
|
27 | { |
|
28 | $this->index = new IndexPage($I); |
|
29 | } |
|
30 | ||
31 | public function ensureIndexPageWorks(Admin $I) |
|
32 | { |
|
33 | $I->login(); |
|
34 | $I->needPage(Url::to('@service')); |
|
35 | $I->see('Services', 'h1'); |
|
36 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
37 | $this->ensureICanSeeBulkSearchBox(); |
|
38 | } |
|
39 | ||
40 | private function ensureICanSeeAdvancedSearchBox(Admin $I) |
|
41 | { |
|
42 | $this->index->containsFilters([ |
|
43 | Input::asAdvancedSearch($I, 'Name'), |
|
44 | Select2::asAdvancedSearch($I, 'Server'), |
|
45 | Select2::asAdvancedSearch($I, 'Client'), |
|
46 | Select2::asAdvancedSearch($I, 'Reseller'), |
|
47 | Select2::asAdvancedSearch($I, 'Soft'), |
|
48 | Select2::asAdvancedSearch($I, 'Status'), |
|
49 | ]); |
|
50 | } |
|
51 | ||
52 | private function ensureICanSeeBulkSearchBox() |
|
53 | { |
|
54 | $this->index->containsColumns([ |
|
55 | 'Reseller', |
|
56 | 'Client', |
|
57 | 'Server', |
|
58 | 'Object', |
|
59 | 'IP', |
|
60 | 'Soft', |
|
61 | 'Status', |
|
62 | ]); |
|
63 | } |
|
64 | } |
|
65 |
@@ 19-64 (lines=46) @@ | ||
16 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
17 | use hipanel\tests\_support\Step\Acceptance\Seller; |
|
18 | ||
19 | class ServicesCest |
|
20 | { |
|
21 | /** |
|
22 | * @var IndexPage |
|
23 | */ |
|
24 | private $index; |
|
25 | ||
26 | public function _before(Seller $I) |
|
27 | { |
|
28 | $this->index = new IndexPage($I); |
|
29 | } |
|
30 | ||
31 | public function ensureIndexPageWorks(Seller $I) |
|
32 | { |
|
33 | $I->login(); |
|
34 | $I->needPage(Url::to('@service')); |
|
35 | $I->see('Services', 'h1'); |
|
36 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
37 | $this->ensureICanSeeBulkSearchBox(); |
|
38 | } |
|
39 | ||
40 | private function ensureICanSeeAdvancedSearchBox(Seller $I) |
|
41 | { |
|
42 | $this->index->containsFilters([ |
|
43 | Input::asAdvancedSearch($I, 'Name'), |
|
44 | Select2::asAdvancedSearch($I, 'Server'), |
|
45 | Select2::asAdvancedSearch($I, 'Client'), |
|
46 | Select2::asAdvancedSearch($I, 'Reseller'), |
|
47 | Select2::asAdvancedSearch($I, 'Soft'), |
|
48 | Select2::asAdvancedSearch($I, 'Status'), |
|
49 | ]); |
|
50 | } |
|
51 | ||
52 | private function ensureICanSeeBulkSearchBox() |
|
53 | { |
|
54 | $this->index->containsColumns([ |
|
55 | 'Reseller', |
|
56 | 'Client', |
|
57 | 'Server', |
|
58 | 'Object', |
|
59 | 'IP', |
|
60 | 'Soft', |
|
61 | 'Status', |
|
62 | ]); |
|
63 | } |
|
64 | } |
|
65 |