@@ 11-63 (lines=53) @@ | ||
8 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
9 | use hipanel\tests\_support\Step\Acceptance\Admin; |
|
10 | ||
11 | class IPAddressesCest |
|
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('@ip')); |
|
27 | $I->see('IP addresses', 'h1'); |
|
28 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
29 | $this->ensureICanSeeLegendBox(); |
|
30 | $this->ensureICanSeeBulkSearchBox(); |
|
31 | } |
|
32 | ||
33 | private function ensureICanSeeAdvancedSearchBox(Admin $I) |
|
34 | { |
|
35 | $this->index->containsFilters([ |
|
36 | Input::asAdvancedSearch($I, 'IP'), |
|
37 | Select2::asAdvancedSearch($I, 'Servers'), |
|
38 | Select2::asAdvancedSearch($I, 'Tags'), |
|
39 | ]); |
|
40 | } |
|
41 | ||
42 | private function ensureICanSeeLegendBox() |
|
43 | { |
|
44 | $this->index->containsLegend([ |
|
45 | 'Shared', |
|
46 | 'Free', |
|
47 | 'Dedicated', |
|
48 | 'System', |
|
49 | 'Blocked', |
|
50 | ]); |
|
51 | } |
|
52 | ||
53 | private function ensureICanSeeBulkSearchBox() |
|
54 | { |
|
55 | $this->index->containsColumns([ |
|
56 | 'IP', |
|
57 | 'Note', |
|
58 | 'Tags', |
|
59 | 'Counters', |
|
60 | 'Links', |
|
61 | ]); |
|
62 | } |
|
63 | } |
|
64 |
@@ 10-58 (lines=49) @@ | ||
7 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
8 | use hipanel\tests\_support\Step\Acceptance\Client; |
|
9 | ||
10 | class BackupsCest |
|
11 | { |
|
12 | /** |
|
13 | * @var IndexPage |
|
14 | */ |
|
15 | private $index; |
|
16 | ||
17 | public function _before(Client $I) |
|
18 | { |
|
19 | $this->index = new IndexPage($I); |
|
20 | } |
|
21 | ||
22 | public function ensureIndexPageWorks(Client $I) |
|
23 | { |
|
24 | $I->login(); |
|
25 | $I->needPage(Url::to('@backuping')); |
|
26 | $I->see('Backups', 'h1'); |
|
27 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
28 | $this->ensureICanSeeBulkSearchBox(); |
|
29 | } |
|
30 | ||
31 | private function ensureICanSeeAdvancedSearchBox(Client $I) |
|
32 | { |
|
33 | $this->index->containsFilters([ |
|
34 | Select2::asAdvancedSearch($I, 'State'), |
|
35 | Select2::asAdvancedSearch($I, 'Account'), |
|
36 | Select2::asAdvancedSearch($I, 'Server'), |
|
37 | ]); |
|
38 | } |
|
39 | ||
40 | private function ensureICanSeeBulkSearchBox() |
|
41 | { |
|
42 | $this->index->containsBulkButtons([ |
|
43 | 'Enable', |
|
44 | 'Disable', |
|
45 | 'Delete', |
|
46 | ]); |
|
47 | $this->index->containsColumns([ |
|
48 | 'Name', |
|
49 | 'Account', |
|
50 | 'Server', |
|
51 | 'Count', |
|
52 | 'Periodicity', |
|
53 | 'State', |
|
54 | 'Last backup', |
|
55 | 'Disk usage', |
|
56 | ]); |
|
57 | } |
|
58 | } |
|
59 |
@@ 11-61 (lines=51) @@ | ||
8 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
9 | use hipanel\tests\_support\Step\Acceptance\Client; |
|
10 | ||
11 | class IPAddressesCest |
|
12 | { |
|
13 | /** |
|
14 | * @var IndexPage |
|
15 | */ |
|
16 | private $index; |
|
17 | ||
18 | public function _before(Client $I) |
|
19 | { |
|
20 | $this->index = new IndexPage($I); |
|
21 | } |
|
22 | ||
23 | public function ensureIndexPageWorks(Client $I) |
|
24 | { |
|
25 | $I->login(); |
|
26 | $I->needPage(Url::to('@ip')); |
|
27 | $I->see('IP addresses', 'h1'); |
|
28 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
29 | $this->ensureICanSeeLegendBox(); |
|
30 | $this->ensureICanSeeBulkSearchBox(); |
|
31 | } |
|
32 | ||
33 | private function ensureICanSeeAdvancedSearchBox(Client $I) |
|
34 | { |
|
35 | $this->index->containsFilters([ |
|
36 | Input::asAdvancedSearch($I, 'IP'), |
|
37 | Select2::asAdvancedSearch($I, 'Tags'), |
|
38 | Select2::asAdvancedSearch($I, 'Servers'), |
|
39 | ]); |
|
40 | } |
|
41 | ||
42 | private function ensureICanSeeLegendBox() |
|
43 | { |
|
44 | $this->index->containsLegend([ |
|
45 | 'Shared', |
|
46 | 'Free', |
|
47 | 'Dedicated', |
|
48 | 'System', |
|
49 | 'Blocked', |
|
50 | ]); |
|
51 | } |
|
52 | ||
53 | private function ensureICanSeeBulkSearchBox() |
|
54 | { |
|
55 | $this->index->containsColumns([ |
|
56 | 'IP', |
|
57 | 'Counters', |
|
58 | 'Links', |
|
59 | ]); |
|
60 | } |
|
61 | } |
|
62 |
@@ 11-61 (lines=51) @@ | ||
8 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
9 | use hipanel\tests\_support\Step\Acceptance\Seller; |
|
10 | ||
11 | class IPAddressesCest |
|
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('@ip')); |
|
27 | $I->see('IP addresses', 'h1'); |
|
28 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
29 | $this->ensureICanSeeLegendBox(); |
|
30 | $this->ensureICanSeeBulkSearchBox(); |
|
31 | } |
|
32 | ||
33 | private function ensureICanSeeAdvancedSearchBox(Seller $I) |
|
34 | { |
|
35 | $this->index->containsFilters([ |
|
36 | Input::asAdvancedSearch($I, 'IP'), |
|
37 | Select2::asAdvancedSearch($I, 'Servers'), |
|
38 | Select2::asAdvancedSearch($I, 'Tags'), |
|
39 | ]); |
|
40 | } |
|
41 | ||
42 | private function ensureICanSeeLegendBox() |
|
43 | { |
|
44 | $this->index->containsLegend([ |
|
45 | 'Shared', |
|
46 | 'Free', |
|
47 | 'Dedicated', |
|
48 | 'System', |
|
49 | 'Blocked', |
|
50 | ]); |
|
51 | } |
|
52 | ||
53 | private function ensureICanSeeBulkSearchBox() |
|
54 | { |
|
55 | $this->index->containsColumns([ |
|
56 | 'IP', |
|
57 | 'Counters', |
|
58 | 'Links', |
|
59 | ]); |
|
60 | } |
|
61 | } |
|
62 |