| @@ 18-56 (lines=39) @@ | ||
| 15 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
| 16 | use hipanel\tests\_support\Step\Acceptance\Client; |
|
| 17 | ||
| 18 | class CronsCest |
|
| 19 | { |
|
| 20 | /** |
|
| 21 | * @var IndexPage |
|
| 22 | */ |
|
| 23 | private $index; |
|
| 24 | ||
| 25 | public function _before(Client $I) |
|
| 26 | { |
|
| 27 | $this->index = new IndexPage($I); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function ensureIndexPageWorks(Client $I) |
|
| 31 | { |
|
| 32 | $I->login(); |
|
| 33 | $I->needPage(Url::to('@crontab')); |
|
| 34 | $I->see('Crons', 'h1'); |
|
| 35 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
| 36 | $this->ensureICanSeeBulkSearchBox(); |
|
| 37 | } |
|
| 38 | ||
| 39 | private function ensureICanSeeAdvancedSearchBox(Client $I) |
|
| 40 | { |
|
| 41 | $this->index->containsFilters([ |
|
| 42 | Select2::asAdvancedSearch($I, 'Account'), |
|
| 43 | Select2::asAdvancedSearch($I, 'Server'), |
|
| 44 | ]); |
|
| 45 | } |
|
| 46 | ||
| 47 | private function ensureICanSeeBulkSearchBox() |
|
| 48 | { |
|
| 49 | $this->index->containsColumns([ |
|
| 50 | 'Crontab', |
|
| 51 | 'Account', |
|
| 52 | 'Server', |
|
| 53 | 'Status', |
|
| 54 | ]); |
|
| 55 | } |
|
| 56 | } |
|
| 57 | ||
| @@ 19-58 (lines=40) @@ | ||
| 16 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
| 17 | use hipanel\tests\_support\Step\Acceptance\Client; |
|
| 18 | ||
| 19 | class IPAddressesCest |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * @var IndexPage |
|
| 23 | */ |
|
| 24 | private $index; |
|
| 25 | ||
| 26 | public function _before(Client $I) |
|
| 27 | { |
|
| 28 | $this->index = new IndexPage($I); |
|
| 29 | } |
|
| 30 | ||
| 31 | public function ensureIndexPageWorks(Client $I) |
|
| 32 | { |
|
| 33 | $I->login(); |
|
| 34 | $I->needPage(Url::to('@ip')); |
|
| 35 | $I->see('IP addresses', 'h1'); |
|
| 36 | $this->ensureICanSeeAdvancedSearchBox($I); |
|
| 37 | $this->ensureICanSeeLegendBox(); |
|
| 38 | $this->ensureICanSeeBulkSearchBox(); |
|
| 39 | } |
|
| 40 | ||
| 41 | private function ensureICanSeeAdvancedSearchBox(Client $I) |
|
| 42 | { |
|
| 43 | $this->index->containsFilters([ |
|
| 44 | Input::asAdvancedSearch($I, 'IPs'), |
|
| 45 | Input::asAdvancedSearch($I, 'Servers'), |
|
| 46 | Select2::asAdvancedSearch($I, 'Tags'), |
|
| 47 | ]); |
|
| 48 | } |
|
| 49 | ||
| 50 | private function ensureICanSeeBulkSearchBox() |
|
| 51 | { |
|
| 52 | $this->index->containsColumns([ |
|
| 53 | 'IP', |
|
| 54 | 'Counters', |
|
| 55 | 'Links', |
|
| 56 | ]); |
|
| 57 | } |
|
| 58 | } |
|
| 59 | ||