From 8341226e6163d5713a6683b3a708b03b7e62d26b Mon Sep 17 00:00:00 2001 From: "h.matsuo" Date: Wed, 16 Mar 2022 11:17:22 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=82=B0=E8=A1=A8=E7=A4=BA(=E7=A2=BA?= =?UTF-8?q?=E8=AA=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EA08SysteminfoCest.php | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/codeception/acceptance/EA08SysteminfoCest.php b/codeception/acceptance/EA08SysteminfoCest.php index ea39ef9bc10..9d0d40027cc 100644 --- a/codeception/acceptance/EA08SysteminfoCest.php +++ b/codeception/acceptance/EA08SysteminfoCest.php @@ -456,12 +456,37 @@ public function systeminfo_権限管理削除(AcceptanceTester $I) $I->seeInTitle('コンテンツ管理'); } + public function systeminfo_ログ表示_確認(AcceptanceTester $I) + { + $admin_route = Fixtures::get('config')['eccube_admin_route']; + $access_url = "/{$admin_route}/product"; + $now = new DateTime(); + + $I->wantTo('EA0806-UC01-T01 ログ表示(確認)'); + + $I->amOnPage($access_url); + $I->see('商品一覧商品管理', '.c-pageTitle'); + + $I->amOnPage("/{$admin_route}/setting/system/log"); + $I->see('ログ表示システム設定', '.c-pageTitle'); + + $log_filename = 'admin-'. $now->format('Y-m-d') . '.log'; + $I->seeInField('#admin_system_log_files', $log_filename); + + $I->click('#form1 button:nth-child(1)'); + $logs = $I->grabTextFrom('.c-contentsArea textarea'); + + $result = preg_match("|^.*{$access_url}.*$|m", $logs, $matches); + $I->assertEquals($result, 1); + $I->assertRegExp('/\['.$now->format('Y-m-d').' \d+:\d+:\d+\]/', $matches[0]); + } + /** * @group vaddy */ - public function systeminfo_ログ表示(AcceptanceTester $I) + public function systeminfo_ログ表示_正常(AcceptanceTester $I) { - $I->wantTo('EA0806-UC02-T01 ログ表示'); + $I->wantTo('EA0806-UC02-T01 ログ表示(正常)'); // 表示 $config = Fixtures::get('config');