-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #339 from nanasess/fix-memberlogin
管理画面ログインのバリデーションをインストーラに合わせる
- Loading branch information
Showing
16 changed files
with
277 additions
and
34 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
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 |
---|---|---|
|
@@ -15,3 +15,5 @@ modules: | |
user: '' | ||
password: '' | ||
dump: ctests/_data/dump.sql | ||
params: | ||
- env |
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,78 @@ | ||
<?php | ||
/** | ||
* @group installer | ||
*/ | ||
$I = new AcceptanceTester($scenario); | ||
$faker = Codeception\Util\Fixtures::get('faker'); | ||
$I->wantTo('正常にインストール可能か検証する'); | ||
// $I->amOnPage('/'); | ||
$I->amOnPage('/install/'); | ||
$I->seeInCurrentUrl('/install/'); | ||
$I->see('EC-CUBEのインストールを開始します。'); | ||
$I->click('次へ進む'); | ||
|
||
$I->expect('パーミッションのチェックをします'); | ||
$I->see('チェック結果'); | ||
$I->see('>> ○:アクセス権限は正常です。', ['css' => 'textarea[name=disp_area]']); | ||
$I->click('次へ進む'); | ||
|
||
$I->expect('必要なファイルのコピーをします'); | ||
$I->see('ice130.jpg', ['css' => 'textarea[name=disp_area]']); | ||
$I->click('次へ進む'); | ||
|
||
$I->see('ECサイトの設定'); | ||
$I->expect('STEP1'); | ||
$admindirectory = $faker->regexify('[A-Za-z0-9]{8,10}'); | ||
$user = $faker->userName; | ||
$password = $faker->regexify('[A-Za-z]{8,10}').$faker->regexify('[0-9]{3,5}'); | ||
$I->fillField('input[name=shop_name]', $faker->name); | ||
$I->fillField('input[name=admin_mail]', $faker->safeEmail); | ||
$I->fillField('input[name=login_id]', $user); | ||
$I->fillField('input[name=login_pass]', $password); | ||
$I->fillField('input[name=admin_dir]', $admindirectory); | ||
|
||
$I->click('>> オプション設定'); | ||
$I->selectOption('input[name=mail_backend]', 'smtp'); | ||
$I->fillField('input[name=smtp_host]', '127.0.0.1'); | ||
$I->fillField('input[name=smtp_port]', '1025'); | ||
$I->click('次へ進む'); | ||
|
||
$I->expect('STEP2'); | ||
defined('DB_TYPE') or define('DB_TYPE', getenv('DB') == 'mysql' ? 'mysqli' : getenv('DB')); | ||
defined('DB_USER') or define('DB_USER', getenv('DBUSER')); | ||
defined('DB_NAME') or define('DB_NAME', getenv('DBNAME')); | ||
defined('DB_PASSWORD') or define('DB_PASSWORD', getenv('DBPASS') ); | ||
defined('DB_PORT') or define('DB_PORT', getenv('DBPORT')); | ||
defined('DB_SERVER') or define('DB_SERVER', getenv('DBSERVER')); | ||
|
||
$I->selectOption('select[name=db_type]', DB_TYPE); | ||
$I->fillField('input[name=db_server]', DB_SERVER); | ||
$I->fillField('input[name=db_port]', DB_PORT); | ||
$I->fillField('input[name=db_name]', DB_NAME); | ||
$I->fillField('input[name=db_user]', DB_USER); | ||
$I->fillField('input[name=db_password]', DB_PASSWORD); | ||
$I->click('次へ進む'); | ||
|
||
$I->expect('STEP3'); | ||
$I->see('データベースの初期化'); | ||
$I->click('次へ進む'); | ||
|
||
$I->see('データベースの初期化'); | ||
$I->waitForText('○:テーブルの作成に成功しました。', 30); | ||
$I->waitForText('○:シーケンスの作成に成功しました。', 30); | ||
$I->click('次へ進む'); | ||
|
||
$I->expect('STEP4'); | ||
$I->see('サイト情報について'); | ||
$I->click('次へ進む'); | ||
|
||
$I->see('インストールが完了しました。'); | ||
$I->seeInDatabase('dtb_member', ['login_id' => $user]); | ||
$I->click('管理画面へログインする'); | ||
|
||
$I->seeInCurrentUrl('/'.$admindirectory); | ||
$I->fillField('input[name=login_id]', $user); | ||
$I->fillField('input[name=password]', $password); | ||
$I->click(['css' => '.btn-tool-format']); | ||
|
||
$I->see('ログイン : 管理者 様'); |
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
Oops, something went wrong.