| @@ 11-59 (lines=49) @@ | ||
| 8 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
| 9 | use hipanel\tests\_support\Step\Acceptance\Admin; |
|
| 10 | ||
| 11 | class AccountsCest |
|
| 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('@account')); |
|
| 27 | $I->see('Accounts', 'h1'); |
|
| 28 | $I->see('Create account', 'a'); |
|
| 29 | $this->ensureICanSeeAdvancedSearchBox(); |
|
| 30 | $this->ensureICanSeeBulkSearchBox(); |
|
| 31 | } |
|
| 32 | ||
| 33 | private function ensureICanSeeAdvancedSearchBox() |
|
| 34 | { |
|
| 35 | $this->index->containsFilters([ |
|
| 36 | new Input('Login'), |
|
| 37 | new Select2('Server'), |
|
| 38 | new Select2('Client'), |
|
| 39 | new Select2('Reseller'), |
|
| 40 | new Select2('Type'), |
|
| 41 | new Select2('Status'), |
|
| 42 | ]); |
|
| 43 | } |
|
| 44 | ||
| 45 | private function ensureICanSeeBulkSearchBox() |
|
| 46 | { |
|
| 47 | $this->index->containsBulkButtons([ |
|
| 48 | 'Basic actions', |
|
| 49 | ]); |
|
| 50 | $this->index->containsColumns([ |
|
| 51 | 'Account', |
|
| 52 | 'Client', |
|
| 53 | 'Reseller', |
|
| 54 | 'Server', |
|
| 55 | 'Status', |
|
| 56 | 'Type', |
|
| 57 | ]); |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| @@ 11-60 (lines=50) @@ | ||
| 8 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
| 9 | use hipanel\tests\_support\Step\Acceptance\Admin; |
|
| 10 | ||
| 11 | class DatabasesCest |
|
| 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('@db')); |
|
| 27 | $I->see('Databases', 'h1'); |
|
| 28 | $I->seeLink('Create DB', Url::to('create')); |
|
| 29 | $this->ensureICanSeeAdvancedSearchBox(); |
|
| 30 | $this->ensureICanSeeBulkSearchBox(); |
|
| 31 | } |
|
| 32 | ||
| 33 | private function ensureICanSeeAdvancedSearchBox() |
|
| 34 | { |
|
| 35 | $this->index->containsFilters([ |
|
| 36 | new Input('DB name'), |
|
| 37 | new Select2('Server'), |
|
| 38 | new Input('Description'), |
|
| 39 | new Select2('Client'), |
|
| 40 | new Select2('Reseller'), |
|
| 41 | new Input('Status'), |
|
| 42 | ]); |
|
| 43 | } |
|
| 44 | ||
| 45 | private function ensureICanSeeBulkSearchBox() |
|
| 46 | { |
|
| 47 | $this->index->containsBulkButtons([ |
|
| 48 | 'Delete', |
|
| 49 | ]); |
|
| 50 | $this->index->containsColumns([ |
|
| 51 | 'DB name', |
|
| 52 | 'Account', |
|
| 53 | 'Server', |
|
| 54 | 'Client', |
|
| 55 | 'Reseller', |
|
| 56 | 'Description', |
|
| 57 | 'Status', |
|
| 58 | ]); |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| @@ 11-59 (lines=49) @@ | ||
| 8 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
| 9 | use hipanel\tests\_support\Step\Acceptance\Seller; |
|
| 10 | ||
| 11 | class AccountsCest |
|
| 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('@account')); |
|
| 27 | $I->see('Accounts', 'h1'); |
|
| 28 | $I->see('Create account', 'a'); |
|
| 29 | $this->ensureICanSeeAdvancedSearchBox(); |
|
| 30 | $this->ensureICanSeeBulkSearchBox(); |
|
| 31 | } |
|
| 32 | ||
| 33 | private function ensureICanSeeAdvancedSearchBox() |
|
| 34 | { |
|
| 35 | $this->index->containsFilters([ |
|
| 36 | new Input('Login'), |
|
| 37 | new Select2('Server'), |
|
| 38 | new Select2('Client'), |
|
| 39 | new Select2('Reseller'), |
|
| 40 | new Select2('Type'), |
|
| 41 | new Select2('Status'), |
|
| 42 | ]); |
|
| 43 | } |
|
| 44 | ||
| 45 | private function ensureICanSeeBulkSearchBox() |
|
| 46 | { |
|
| 47 | $this->index->containsBulkButtons([ |
|
| 48 | 'Basic actions', |
|
| 49 | ]); |
|
| 50 | $this->index->containsColumns([ |
|
| 51 | 'Account', |
|
| 52 | 'Client', |
|
| 53 | 'Reseller', |
|
| 54 | 'Server', |
|
| 55 | 'Status', |
|
| 56 | 'Type', |
|
| 57 | ]); |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| @@ 11-60 (lines=50) @@ | ||
| 8 | use hipanel\tests\_support\Page\Widget\Input\Select2; |
|
| 9 | use hipanel\tests\_support\Step\Acceptance\Seller; |
|
| 10 | ||
| 11 | class DatabasesCest |
|
| 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('@db')); |
|
| 27 | $I->see('Databases', 'h1'); |
|
| 28 | $I->seeLink('Create DB', Url::to('create')); |
|
| 29 | $this->ensureICanSeeAdvancedSearchBox(); |
|
| 30 | $this->ensureICanSeeBulkSearchBox(); |
|
| 31 | } |
|
| 32 | ||
| 33 | private function ensureICanSeeAdvancedSearchBox() |
|
| 34 | { |
|
| 35 | $this->index->containsFilters([ |
|
| 36 | new Input('DB name'), |
|
| 37 | new Select2('Server'), |
|
| 38 | new Input('Description'), |
|
| 39 | new Select2('Client'), |
|
| 40 | new Select2('Reseller'), |
|
| 41 | new Input('Status'), |
|
| 42 | ]); |
|
| 43 | } |
|
| 44 | ||
| 45 | private function ensureICanSeeBulkSearchBox() |
|
| 46 | { |
|
| 47 | $this->index->containsBulkButtons([ |
|
| 48 | 'Delete', |
|
| 49 | ]); |
|
| 50 | $this->index->containsColumns([ |
|
| 51 | 'DB name', |
|
| 52 | 'Account', |
|
| 53 | 'Server', |
|
| 54 | 'Client', |
|
| 55 | 'Reseller', |
|
| 56 | 'Description', |
|
| 57 | 'Status', |
|
| 58 | ]); |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||