| Total Complexity | 4 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | class PreOrdersCest |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var IndexPage |
||
| 23 | */ |
||
| 24 | private $index; |
||
| 25 | |||
| 26 | public function _before(Seller $I) |
||
| 27 | { |
||
| 28 | $this->index = new IndexPage($I); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function ensureIndexPageWorks(Seller $I) |
||
| 32 | { |
||
| 33 | $I->login(); |
||
| 34 | $I->needPage(Url::to('@pre-order')); |
||
| 35 | $I->see('Pending confirmation servers', 'h1'); |
||
| 36 | $this->ensureICanSeeAdvancedSearchBox($I); |
||
| 37 | $this->ensureICanSeeBulkServerSearchBox(); |
||
| 38 | } |
||
| 39 | |||
| 40 | private function ensureICanSeeAdvancedSearchBox(Seller $I) |
||
| 41 | { |
||
| 42 | $this->index->containsFilters([ |
||
| 43 | Select2::asAdvancedSearch($I, 'Client'), |
||
| 44 | (Dropdown::asAdvancedSearch($I, 'State'))->withItems([ |
||
| 45 | 'New', |
||
| 46 | 'Approved', |
||
| 47 | 'Rejected', |
||
| 48 | ]), |
||
| 49 | ]); |
||
| 50 | } |
||
| 51 | |||
| 52 | private function ensureICanSeeBulkServerSearchBox() |
||
| 63 | ]); |
||
| 64 | } |
||
| 65 | } |
||
| 66 |