@@ 11-75 (lines=65) @@ | ||
8 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
9 | use hipanel\tests\_support\Step\Acceptance\Admin; |
|
10 | ||
11 | class DomainsCest |
|
12 | { |
|
13 | /** |
|
14 | * @var IndexPage |
|
15 | */ |
|
16 | private $index; |
|
17 | ||
18 | public function _before(Admin $I) |
|
19 | { |
|
20 | $this->index = new IndexPage($I); |
|
21 | } |
|
22 | ||
23 | public function ensureIndexPageWorks(Admin $I) |
|
24 | { |
|
25 | $I->login(); |
|
26 | $I->needPage(Url::to('@hdomain')); |
|
27 | $I->see('Domains', 'h1'); |
|
28 | $I->see('Create domain', 'a'); |
|
29 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
30 | $this->ensureICanSeeLegendBox(); |
|
31 | $this->ensureICanSeeBulkSearchBox(); |
|
32 | } |
|
33 | ||
34 | private function ensureICanSeeAdvancedSearchBox(Admin $I) |
|
35 | { |
|
36 | $this->index->containsFilters([ |
|
37 | Input::asAdvancedSearch($I, 'Domain name'), |
|
38 | Input::asAdvancedSearch($I, 'Domain list (comma-separated)'), |
|
39 | Input::asAdvancedSearch($I, 'IP'), |
|
40 | Select2::asAdvancedSearch($I, 'Status'), |
|
41 | Select2::asAdvancedSearch($I, 'Show aliases only'), |
|
42 | Select2::asAdvancedSearch($I, 'Client'), |
|
43 | Select2::asAdvancedSearch($I, 'Reseller'), |
|
44 | Select2::asAdvancedSearch($I, 'Server'), |
|
45 | ]); |
|
46 | } |
|
47 | ||
48 | private function ensureICanSeeLegendBox() |
|
49 | { |
|
50 | $this->index->containsLegend([ |
|
51 | 'Domain', |
|
52 | 'DNS records', |
|
53 | 'Alias', |
|
54 | 'Name server', |
|
55 | 'Complex domain', |
|
56 | ]); |
|
57 | } |
|
58 | ||
59 | private function ensureICanSeeBulkSearchBox() |
|
60 | { |
|
61 | $this->index->containsBulkButtons([ |
|
62 | 'Delete', |
|
63 | ]); |
|
64 | $this->index->containsColumns([ |
|
65 | 'Domain name', |
|
66 | 'Client', |
|
67 | 'Reseller', |
|
68 | 'Account', |
|
69 | 'Server', |
|
70 | 'Status', |
|
71 | 'IP', |
|
72 | 'Service', |
|
73 | ]); |
|
74 | } |
|
75 | } |
|
76 |
@@ 11-75 (lines=65) @@ | ||
8 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
9 | use hipanel\tests\_support\Step\Acceptance\Seller; |
|
10 | ||
11 | class DomainsCest |
|
12 | { |
|
13 | /** |
|
14 | * @var IndexPage |
|
15 | */ |
|
16 | private $index; |
|
17 | ||
18 | public function _before(Seller $I) |
|
19 | { |
|
20 | $this->index = new IndexPage($I); |
|
21 | } |
|
22 | ||
23 | public function ensureIndexPageWorks(Seller $I) |
|
24 | { |
|
25 | $I->login(); |
|
26 | $I->needPage(Url::to('@hdomain')); |
|
27 | $I->see('Domains', 'h1'); |
|
28 | $I->see('Create domain', 'a'); |
|
29 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
30 | $this->ensureICanSeeLegendBox(); |
|
31 | $this->ensureICanSeeBulkSearchBox(); |
|
32 | } |
|
33 | ||
34 | private function ensureICanSeeAdvancedSearchBox(Seller $I) |
|
35 | { |
|
36 | $this->index->containsFilters([ |
|
37 | Input::asAdvancedSearch($I, 'Domain name'), |
|
38 | Input::asAdvancedSearch($I, 'Domain list (comma-separated)'), |
|
39 | Input::asAdvancedSearch($I, 'IP'), |
|
40 | Select2::asAdvancedSearch($I, 'Status'), |
|
41 | Select2::asAdvancedSearch($I, 'Show aliases only'), |
|
42 | Select2::asAdvancedSearch($I, 'Client'), |
|
43 | Select2::asAdvancedSearch($I, 'Reseller'), |
|
44 | Select2::asAdvancedSearch($I, 'Server'), |
|
45 | ]); |
|
46 | } |
|
47 | ||
48 | private function ensureICanSeeLegendBox() |
|
49 | { |
|
50 | $this->index->containsLegend([ |
|
51 | 'Domain', |
|
52 | 'DNS records', |
|
53 | 'Alias', |
|
54 | 'Name server', |
|
55 | 'Complex domain', |
|
56 | ]); |
|
57 | } |
|
58 | ||
59 | private function ensureICanSeeBulkSearchBox() |
|
60 | { |
|
61 | $this->index->containsBulkButtons([ |
|
62 | 'Delete', |
|
63 | ]); |
|
64 | $this->index->containsColumns([ |
|
65 | 'Domain name', |
|
66 | 'Client', |
|
67 | 'Reseller', |
|
68 | 'Account', |
|
69 | 'Server', |
|
70 | 'Status', |
|
71 | 'IP', |
|
72 | 'Service', |
|
73 | ]); |
|
74 | } |
|
75 | } |
|
76 |