Initial commit,修正

This commit is contained in:
2025-07-13 19:37:38 +08:00
parent 38ce288e27
commit 65bbd06981
12384 changed files with 3985464 additions and 8 deletions
@@ -0,0 +1,31 @@
<?php
use tests\codeception\_pages\CreateItemPage;
/* @var $scenario Codeception\Scenario */
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that create role item work');
$createItemPage = CreateItemPage::openBy($I);
$I->see('Create Role', 'h1');
$I->amGoingTo('submit role 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 role form with correct data');
$createItemPage->submit([
'name' => 'roleTesterAcp',
'description' => 'Role created for test',
]);
if (method_exists($I, 'wait')) {
$I->wait(3); // only for selenium
}
$I->dontSeeElement('#item-form');
+10
View File
@@ -0,0 +1,10 @@
<?php
use tests\codeception\_pages\RoutePage;
/* @var $scenario Codeception\Scenario */
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that create route work');
RoutePage::openBy($I);
$I->see('Routes', 'h1');
+2
View File
@@ -0,0 +1,2 @@
<?php
new yii\web\Application(require(dirname(__DIR__) . '/config/acceptance.php'));