Initial commit,修正
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use tests\codeception\_pages\CreateItemPage;
|
||||
|
||||
/* @var $scenario Codeception\Scenario */
|
||||
|
||||
$I = new FunctionalTester($scenario);
|
||||
$I->wantTo('ensure that create item work');
|
||||
|
||||
$createItemPage = CreateItemPage::openBy($I);
|
||||
|
||||
$I->see('Create Role', 'h1');
|
||||
|
||||
$I->amGoingTo('submit contact form with no data');
|
||||
$createItemPage->submit([]);
|
||||
if (method_exists($I, 'wait')) {
|
||||
$I->wait(3); // only for selenium
|
||||
}
|
||||
$I->expectTo('see validations errors');
|
||||
$I->see('Create Role', 'h1');
|
||||
$I->see('Name cannot be blank');
|
||||
|
||||
$I->amGoingTo('submit contact form with correct data');
|
||||
$createItemPage->submit([
|
||||
'name' => 'roleTester',
|
||||
'description' => 'Role created for test',
|
||||
]);
|
||||
if (method_exists($I, 'wait')) {
|
||||
$I->wait(3); // only for selenium
|
||||
}
|
||||
$I->dontSeeElement('#item-form');
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
use tests\codeception\_pages\RoutePage;
|
||||
|
||||
/* @var $scenario Codeception\Scenario */
|
||||
|
||||
$I = new FunctionalTester($scenario);
|
||||
$I->wantTo('ensure that create route work');
|
||||
RoutePage::openBy($I);
|
||||
$I->see('Routes', 'h1');
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
new yii\web\Application(require(dirname(__DIR__) . '/config/functional.php'));
|
||||
Reference in New Issue
Block a user