Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/hiqdev/hipanel-module-ticket
- Loading branch information
Showing
6 changed files
with
325 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
namespace hipanel\modules\ticket\tests\acceptance\admin; | ||
|
||
use hipanel\helpers\Url; | ||
use hipanel\tests\_support\Page\IndexPage; | ||
use hipanel\tests\_support\Page\Widget\Input\Input; | ||
use hipanel\tests\_support\Page\Widget\Input\Select2; | ||
use hipanel\tests\_support\Step\Acceptance\Admin; | ||
|
||
class TemplateCest | ||
{ | ||
/** | ||
* @var IndexPage | ||
*/ | ||
private $index; | ||
|
||
public function _before(Admin $I) | ||
{ | ||
$this->index = new IndexPage($I); | ||
} | ||
|
||
public function ensureIndexPageWorks(Admin $I) | ||
{ | ||
$I->login(); | ||
$I->needPage(Url::to('@ticket/template')); | ||
$I->see('Answer templates', 'h1'); | ||
$I->seeLink('Create template', Url::to('create')); | ||
$this->ensureICanSeeAdvancedSearchBox(); | ||
$this->ensureICanSeeBulkSearchBox(); | ||
} | ||
|
||
private function ensureICanSeeAdvancedSearchBox() | ||
{ | ||
$this->index->containsFilters([ | ||
new Input('Name'), | ||
new Select2('Author'), | ||
]); | ||
} | ||
|
||
private function ensureICanSeeBulkSearchBox() | ||
{ | ||
$this->index->containsBulkButtons([ | ||
'Delete', | ||
]); | ||
$this->index->containsColumns([ | ||
'Author', | ||
'Name', | ||
'Is published', | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
namespace hipanel\modules\ticket\tests\acceptance\admin; | ||
|
||
use hipanel\helpers\Url; | ||
use hipanel\tests\_support\Page\IndexPage; | ||
use hipanel\tests\_support\Page\Widget\Input\Input; | ||
use hipanel\tests\_support\Page\Widget\Input\Select2; | ||
use hipanel\tests\_support\Step\Acceptance\Admin; | ||
|
||
class TicketCest | ||
{ | ||
/** | ||
* @var IndexPage | ||
*/ | ||
private $index; | ||
|
||
public function _before(Admin $I) | ||
{ | ||
$this->index = new IndexPage($I); | ||
} | ||
|
||
public function ensureIndexPageWorks(Admin $I) | ||
{ | ||
$I->login(); | ||
$I->needPage(Url::to('@ticket')); | ||
$I->see('Tickets', 'h1'); | ||
$I->seeLink('Create ticket', Url::to('@ticket/create')); | ||
$this->ensureICanSeeAdvancedSearchBox(); | ||
$this->ensureICanSeeBulkSearchBox(); | ||
} | ||
|
||
private function ensureICanSeeAdvancedSearchBox() | ||
{ | ||
$this->index->containsFilters([ | ||
new Input('Subject or message'), | ||
new Select2('Author'), | ||
new Select2('Recipient'), | ||
new Select2('Status'), | ||
new Select2('Assignee'), | ||
new Select2('Priority'), | ||
new Select2('Watchers'), | ||
new Input('Topics'), | ||
]); | ||
} | ||
|
||
private function ensureICanSeeBulkSearchBox() | ||
{ | ||
$this->index->containsBulkButtons([ | ||
'Subscribe', | ||
'Unsubscribe', | ||
'Close', | ||
]); | ||
$this->index->containsColumns([ | ||
'Subject', | ||
'Author', | ||
'Assignee', | ||
'Recipient', | ||
'Answers', | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
namespace hipanel\modules\ticket\tests\acceptance\seller; | ||
|
||
use hipanel\helpers\Url; | ||
use hipanel\tests\_support\Page\IndexPage; | ||
use hipanel\tests\_support\Page\Widget\Input\Input; | ||
use hipanel\tests\_support\Page\Widget\Input\Select2; | ||
use hipanel\tests\_support\Step\Acceptance\Seller; | ||
|
||
class TemplateCest | ||
{ | ||
/** | ||
* @var IndexPage | ||
*/ | ||
private $index; | ||
|
||
public function _before(Seller $I) | ||
{ | ||
$this->index = new IndexPage($I); | ||
} | ||
|
||
public function ensureIndexPageWorks(Seller $I) | ||
{ | ||
$I->login(); | ||
$I->needPage(Url::to('@ticket/template')); | ||
$I->see('Answer templates', 'h1'); | ||
$I->seeLink('Create template', Url::to('create')); | ||
$this->ensureICanSeeAdvancedSearchBox(); | ||
$this->ensureICanSeeBulkSearchBox(); | ||
} | ||
|
||
private function ensureICanSeeAdvancedSearchBox() | ||
{ | ||
$this->index->containsFilters([ | ||
new Input('Name'), | ||
new Select2('Author'), | ||
]); | ||
} | ||
|
||
private function ensureICanSeeBulkSearchBox() | ||
{ | ||
$this->index->containsBulkButtons([ | ||
'Delete', | ||
]); | ||
$this->index->containsColumns([ | ||
'Author', | ||
'Name', | ||
'Is published', | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
namespace hipanel\modules\ticket\tests\acceptance\seller; | ||
|
||
use hipanel\helpers\Url; | ||
use hipanel\tests\_support\Page\IndexPage; | ||
use hipanel\tests\_support\Page\Widget\Input\Input; | ||
use hipanel\tests\_support\Page\Widget\Input\Select2; | ||
use hipanel\tests\_support\Step\Acceptance\Seller; | ||
|
||
class TicketCest | ||
{ | ||
/** | ||
* @var IndexPage | ||
*/ | ||
private $index; | ||
|
||
public function _before(Seller $I) | ||
{ | ||
$this->index = new IndexPage($I); | ||
} | ||
|
||
public function ensureIndexPageWorks(Seller $I) | ||
{ | ||
$I->login(); | ||
$I->needPage(Url::to('@ticket')); | ||
$I->see('Tickets', 'h1'); | ||
$I->seeLink('Create ticket', Url::to('@ticket/create')); | ||
$this->ensureICanSeeAdvancedSearchBox(); | ||
$this->ensureICanSeeBulkSearchBox(); | ||
} | ||
|
||
private function ensureICanSeeAdvancedSearchBox() | ||
{ | ||
$this->index->containsFilters([ | ||
new Input('Subject or message'), | ||
new Select2('Author'), | ||
new Select2('Recipient'), | ||
new Select2('Status'), | ||
new Select2('Assignee'), | ||
new Select2('Priority'), | ||
new Select2('Watchers'), | ||
new Input('Topics'), | ||
]); | ||
} | ||
|
||
private function ensureICanSeeBulkSearchBox() | ||
{ | ||
$this->index->containsBulkButtons([ | ||
'Subscribe', | ||
'Unsubscribe', | ||
'Close', | ||
]); | ||
$this->index->containsColumns([ | ||
'Subject', | ||
'Author', | ||
'Assignee', | ||
'Recipient', | ||
'Answers', | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
namespace hipanel\modules\ticket\tests\acceptance\seller; | ||
|
||
use hipanel\helpers\Url; | ||
use hipanel\tests\_support\Page\IndexPage; | ||
use hipanel\tests\_support\Page\Widget\Input\Input; | ||
use hipanel\tests\_support\Page\Widget\Input\Select2; | ||
use hipanel\tests\_support\Step\Acceptance\Seller; | ||
|
||
class TicketStatisticsCest | ||
{ | ||
/** | ||
* @var IndexPage | ||
*/ | ||
private $index; | ||
|
||
public function _before(Seller $I) | ||
{ | ||
$this->index = new IndexPage($I); | ||
} | ||
|
||
public function ensureIndexPageWorks(Seller $I) | ||
{ | ||
$I->login(); | ||
$I->needPage(Url::to('/ticket/statistic')); | ||
$I->see('Tickets statistics', 'h1'); | ||
$I->seeLink('Create ticket', Url::to('@ticket/create')); | ||
$this->ensureICanSeeAdvancedSearchBox(); | ||
$this->ensureICanSeeBulkSearchBox(); | ||
} | ||
|
||
private function ensureICanSeeAdvancedSearchBox() | ||
{ | ||
$this->index->containsFilters([ | ||
new Input('Anytext'), | ||
new Select2('Author'), | ||
new Select2('Recipient'), | ||
new Select2('Status'), | ||
new Select2('Assignee'), | ||
new Select2('Priority'), | ||
new Select2('Watchers'), | ||
new Input('Topics'), | ||
]); | ||
} | ||
|
||
private function ensureICanSeeBulkSearchBox() | ||
{ | ||
$this->index->containsColumns([ | ||
'Client', | ||
'Spent', | ||
'Tickets', | ||
]); | ||
} | ||
} |