Code Duplication    Length = 39-39 lines in 3 locations

tests/acceptance/admin/CronsCest.php 1 location

@@ 10-48 (lines=39) @@
7
use hipanel\tests\_support\Page\Widget\Input\Select2;
8
use hipanel\tests\_support\Step\Acceptance\Admin;
9
10
class CronsCest
11
{
12
    /**
13
     * @var IndexPage
14
     */
15
    private $index;
16
17
    public function _before(Admin $I)
18
    {
19
        $this->index = new IndexPage($I);
20
    }
21
22
    public function ensureIndexPageWorks(Admin $I)
23
    {
24
        $I->login();
25
        $I->needPage(Url::to('@crontab'));
26
        $I->see('Crons', 'h1');
27
        $this->ensureICanSeeAdvancedSearchBox();
28
        $this->ensureICanSeeBulkSearchBox();
29
    }
30
31
    private function ensureICanSeeAdvancedSearchBox()
32
    {
33
        $this->index->containsFilters([
34
            new Select2('Account'),
35
            new Select2('Server'),
36
        ]);
37
    }
38
39
    private function ensureICanSeeBulkSearchBox()
40
    {
41
        $this->index->containsColumns([
42
            'Crontab',
43
            'Account',
44
            'Server',
45
            'Status',
46
        ]);
47
    }
48
}
49

tests/acceptance/client/CronsCest.php 1 location

@@ 10-48 (lines=39) @@
7
use hipanel\tests\_support\Page\Widget\Input\Select2;
8
use hipanel\tests\_support\Step\Acceptance\Client;
9
10
class CronsCest
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('@crontab'));
26
        $I->see('Crons', 'h1');
27
        $this->ensureICanSeeAdvancedSearchBox();
28
        $this->ensureICanSeeBulkSearchBox();
29
    }
30
31
    private function ensureICanSeeAdvancedSearchBox()
32
    {
33
        $this->index->containsFilters([
34
            new Select2('Account'),
35
            new Select2('Server'),
36
        ]);
37
    }
38
39
    private function ensureICanSeeBulkSearchBox()
40
    {
41
        $this->index->containsColumns([
42
            'Crontab',
43
            'Account',
44
            'Server',
45
            'Status',
46
        ]);
47
    }
48
}
49

tests/acceptance/seller/CronsCest.php 1 location

@@ 10-48 (lines=39) @@
7
use hipanel\tests\_support\Page\Widget\Input\Select2;
8
use hipanel\tests\_support\Step\Acceptance\Seller;
9
10
class CronsCest
11
{
12
    /**
13
     * @var IndexPage
14
     */
15
    private $index;
16
17
    public function _before(Seller $I)
18
    {
19
        $this->index = new IndexPage($I);
20
    }
21
22
    public function ensureIndexPageWorks(Seller $I)
23
    {
24
        $I->login();
25
        $I->needPage(Url::to('@crontab'));
26
        $I->see('Crons', 'h1');
27
        $this->ensureICanSeeAdvancedSearchBox();
28
        $this->ensureICanSeeBulkSearchBox();
29
    }
30
31
    private function ensureICanSeeAdvancedSearchBox()
32
    {
33
        $this->index->containsFilters([
34
            new Select2('Account'),
35
            new Select2('Server'),
36
        ]);
37
    }
38
39
    private function ensureICanSeeBulkSearchBox()
40
    {
41
        $this->index->containsColumns([
42
            'Crontab',
43
            'Account',
44
            'Server',
45
            'Status',
46
        ]);
47
    }
48
}
49