@@ 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($I); |
|
30 | $this->ensureICanSeeBulkSearchBox(); |
|
31 | } |
|
32 | ||
33 | private function ensureICanSeeAdvancedSearchBox(Admin $I) |
|
34 | { |
|
35 | $this->index->containsFilters([ |
|
36 | Input::asAdvancedSearch($I, 'Login'), |
|
37 | Select2::asAdvancedSearch($I, 'Server'), |
|
38 | Select2::asAdvancedSearch($I, 'Client'), |
|
39 | Select2::asAdvancedSearch($I, 'Reseller'), |
|
40 | Select2::asAdvancedSearch($I, 'Type'), |
|
41 | Select2::asAdvancedSearch($I, '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($I); |
|
30 | $this->ensureICanSeeBulkSearchBox(); |
|
31 | } |
|
32 | ||
33 | private function ensureICanSeeAdvancedSearchBox(Admin $I) |
|
34 | { |
|
35 | $this->index->containsFilters([ |
|
36 | Input::asAdvancedSearch($I, 'DB name'), |
|
37 | Select2::asAdvancedSearch($I, 'Server'), |
|
38 | Input::asAdvancedSearch($I, 'Description'), |
|
39 | Select2::asAdvancedSearch($I, 'Client'), |
|
40 | Select2::asAdvancedSearch($I, 'Reseller'), |
|
41 | Select2::asAdvancedSearch($I, '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($I); |
|
30 | $this->ensureICanSeeBulkSearchBox(); |
|
31 | } |
|
32 | ||
33 | private function ensureICanSeeAdvancedSearchBox(Seller $I) |
|
34 | { |
|
35 | $this->index->containsFilters([ |
|
36 | Input::asAdvancedSearch($I, 'Login'), |
|
37 | Select2::asAdvancedSearch($I, 'Server'), |
|
38 | Select2::asAdvancedSearch($I, 'Client'), |
|
39 | Select2::asAdvancedSearch($I, 'Reseller'), |
|
40 | Select2::asAdvancedSearch($I, 'Type'), |
|
41 | Select2::asAdvancedSearch($I, '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($I); |
|
30 | $this->ensureICanSeeBulkSearchBox(); |
|
31 | } |
|
32 | ||
33 | private function ensureICanSeeAdvancedSearchBox(Seller $I) |
|
34 | { |
|
35 | $this->index->containsFilters([ |
|
36 | Input::asAdvancedSearch($I, 'DB name'), |
|
37 | Select2::asAdvancedSearch($I, 'Server'), |
|
38 | Input::asAdvancedSearch($I, 'Description'), |
|
39 | Select2::asAdvancedSearch($I, 'Client'), |
|
40 | Select2::asAdvancedSearch($I, 'Reseller'), |
|
41 | Select2::asAdvancedSearch($I, '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 |