5 public function _before(FunctionalTester $I)
7 $I->amLoggedInAs(\app\models\User::findByUsername('admin'));
8 $I->amOnRoute('types/index');
12 public function openPage(FunctionalTester $I)
14 $header = Yii::t('types', 'Types');
15 $createHeader = Yii::t('types', 'Create type');
16 $colName = Yii::t('types', 'Type');
17 $btCreate = Yii::t('types', 'Create type');
18 $btCancel = Yii::t('app', 'Cancel');
21 $I->see($header, 'h1');
23 $I->see($colName, '#TypesTable th a');
25 $I->see($btCreate, 'a.btn');
26 $I->click($btCreate, 'a.btn');
27 $I->see($createHeader, 'h1');
28 $I->click($btCancel, 'a.btn');
29 $I->see($header, 'h1');