From 88903522cbd5ce84468099ad69fdface6d6b7b2a Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Mon, 11 Sep 2023 13:38:42 +0900 Subject: [PATCH 01/29] =?UTF-8?q?=E3=83=BB=E6=96=B0=E8=A6=8F=E4=BC=9A?= =?UTF-8?q?=E5=93=A1=E7=99=BB=E9=8C=B2=E7=94=BB=E9=9D=A2=E3=81=AB=E3=82=B9?= =?UTF-8?q?=E3=83=AD=E3=83=83=E3=83=88=E3=83=AA=E3=83=B3=E3=82=B0=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20=E3=83=BBE2E=E3=81=AE=E3=82=B7=E3=83=8A?= =?UTF-8?q?=E3=83=AA=E3=82=AA=E3=81=B8=E6=96=B0=E8=A6=8F=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=81=AE=E3=82=B9=E3=83=AD=E3=83=83=E3=83=88=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E3=83=86=E3=82=B9=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/prod/eccube_rate_limiter.yaml | 6 +++++ codeception/_support/Page/Front/EntryPage.php | 27 +++++++++++++++++++ codeception/acceptance/EF09ThrottlingCest.php | 21 +++++++++++++++ 3 files changed, 54 insertions(+) diff --git a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml index a86553f75d5..cd0464d5557 100644 --- a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml +++ b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml @@ -7,6 +7,12 @@ eccube: limit: 5 interval: '30 minutes' entry: + route: entry + method: [ 'POST' ] + type: ip + limit: 10 + interval: '30 minutes' + entry_complete: route: entry method: [ 'POST' ] params: diff --git a/codeception/_support/Page/Front/EntryPage.php b/codeception/_support/Page/Front/EntryPage.php index acd3844a1e8..d650c9f3182 100644 --- a/codeception/_support/Page/Front/EntryPage.php +++ b/codeception/_support/Page/Front/EntryPage.php @@ -55,4 +55,31 @@ public function 新規会員登録($form = []) return $this; } + + public function 新規会員登録_メアド指定($email, $form = []) + { + $this->tester->amOnPage('/entry'); + + $form += [ + 'entry[name][name01]' => '姓', + 'entry[name][name02]' => '名', + 'entry[kana][kana01]' => 'セイ', + 'entry[kana][kana02]' => 'メイ', + 'entry[postal_code]' => '530-0001', + 'entry[address][pref]' => ['value' => '27'], + 'entry[address][addr01]' => '大阪市北区', + 'entry[address][addr02]' => '梅田2-4-9 ブリーゼタワー13F', + 'entry[phone_number]' => '1234567890', + 'entry[email][first]' => $email, + 'entry[email][second]' => $email, + 'entry[plain_password][first]' => 'password1234', + 'entry[plain_password][second]' => 'password1234', + 'entry[user_policy_check]' => '1', + ]; + $this->tester->submitForm(['css' => '.ec-layoutRole__main form'], $form, ['css' => 'button.ec-blockBtn--action']); + $this->tester->seeInField(['id' => 'entry_email_first'], $form['entry[email][first]']); + $this->tester->click('.ec-registerRole form button.ec-blockBtn--action'); + + return $this; + } } diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 043ed34df9c..37653ef9a72 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -748,4 +748,25 @@ public function order_お届け先変更(AcceptanceTester $I) $I->wait(1); $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); } + + public function 会員登録_入力(AcceptanceTester $I) + { + $I->wantTo('EF0901-UC01-T18_会員登録_入力'); + + // 仮会員を1件登録 + $email = 'test@ec-cube.com'; + $I->expect('会員登録を行います:'); + \Page\Front\EntryPage::go($I) + ->新規会員登録_メアド指定($email); + $I->see('現在、仮会員の状態です。', 'p.ec-reportDescription'); + + // 重複するメールアドレスを繰り返し登録 + $I->expect('試行回数上限を超過します'); + for ($i = 0; $i < 10; $i++) { + \Page\Front\EntryPage::go($I) + ->新規会員登録_メアド指定($email); + } + $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); + } + } From 6e5feac97ab1166efcba572066e3e3c47cf0f6df Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Wed, 13 Sep 2023 13:24:08 +0900 Subject: [PATCH 02/29] =?UTF-8?q?-=20=E3=83=91=E3=83=A9=E3=83=A1=E3=83=BC?= =?UTF-8?q?=E3=82=BF=20mode=20=E3=81=A7=E3=81=AE=E7=B5=9E=E3=82=8A?= =?UTF-8?q?=E8=BE=BC=E3=81=BF=E8=A8=AD=E5=AE=9A=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/eccube/packages/prod/eccube_rate_limiter.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml index cd0464d5557..65c225cdd71 100644 --- a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml +++ b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml @@ -10,6 +10,8 @@ eccube: route: entry method: [ 'POST' ] type: ip + params: + mode: confirm limit: 10 interval: '30 minutes' entry_complete: From 00852f52f10d53629350b057350a338194415fca Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Wed, 13 Sep 2023 14:11:24 +0900 Subject: [PATCH 03/29] =?UTF-8?q?mode=20=3D=20confirm=20=E3=81=AF=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/eccube/packages/prod/eccube_rate_limiter.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml index 65c225cdd71..4404343aafa 100644 --- a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml +++ b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml @@ -10,9 +10,7 @@ eccube: route: entry method: [ 'POST' ] type: ip - params: - mode: confirm - limit: 10 + limit: 30 interval: '30 minutes' entry_complete: route: entry From 790338d188bf12cb0b5693a082946a5e52ecdf2d Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Fri, 15 Sep 2023 13:03:15 +0900 Subject: [PATCH 04/29] =?UTF-8?q?=E6=96=B0=E8=A6=8F=E4=BC=9A=E5=93=A1?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E7=94=BB=E9=9D=A2=E3=81=AE=E3=82=B9=E3=83=AD?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=83=AA=E3=83=B3=E3=82=B0=E5=9B=9E=E6=95=B0?= =?UTF-8?q?=E5=88=9D=E6=9C=9F=E5=80=A4=20=3D=2025=E3=81=AB=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/eccube/packages/prod/eccube_rate_limiter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml index 4404343aafa..7d89321115c 100644 --- a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml +++ b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml @@ -10,7 +10,7 @@ eccube: route: entry method: [ 'POST' ] type: ip - limit: 30 + limit: 25 interval: '30 minutes' entry_complete: route: entry From 0d24825d8cea3f4f627bd9c093d4c21682195b63 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Fri, 15 Sep 2023 13:59:25 +0900 Subject: [PATCH 05/29] =?UTF-8?q?-=20=E9=96=BE=E5=80=A4=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=AB=E4=BC=B4=E3=81=86E2E=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E5=AE=9F=E8=A1=8C=E5=9B=9E=E6=95=B0=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 37653ef9a72..b41b9410095 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -762,7 +762,7 @@ public function 会員登録_入力(AcceptanceTester $I) // 重複するメールアドレスを繰り返し登録 $I->expect('試行回数上限を超過します'); - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < 25; $i++) { \Page\Front\EntryPage::go($I) ->新規会員登録_メアド指定($email); } From 1c989ea7ce916ba201590d18a2fb846ff80233f3 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Tue, 19 Sep 2023 14:22:52 +0900 Subject: [PATCH 06/29] =?UTF-8?q?E2E=E3=83=86=E3=82=B9=E3=83=88=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index b41b9410095..34c047aa3ee 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -754,7 +754,7 @@ public function 会員登録_入力(AcceptanceTester $I) $I->wantTo('EF0901-UC01-T18_会員登録_入力'); // 仮会員を1件登録 - $email = 'test@ec-cube.com'; + $email = $email = uniqid().microtime(true).'@example.com'; $I->expect('会員登録を行います:'); \Page\Front\EntryPage::go($I) ->新規会員登録_メアド指定($email); From 88d3c851fe781c93d5d09dedf316a73a2e644495 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Tue, 19 Sep 2023 14:55:41 +0900 Subject: [PATCH 07/29] =?UTF-8?q?EF0901-UC01-T05=5F=E4=BC=9A=E5=93=A1?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E3=80=80=E3=81=A7=E3=82=AB=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8B=E7=82=BA=E3=80=81?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 34c047aa3ee..a8db18a577c 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -749,24 +749,4 @@ public function order_お届け先変更(AcceptanceTester $I) $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); } - public function 会員登録_入力(AcceptanceTester $I) - { - $I->wantTo('EF0901-UC01-T18_会員登録_入力'); - - // 仮会員を1件登録 - $email = $email = uniqid().microtime(true).'@example.com'; - $I->expect('会員登録を行います:'); - \Page\Front\EntryPage::go($I) - ->新規会員登録_メアド指定($email); - $I->see('現在、仮会員の状態です。', 'p.ec-reportDescription'); - - // 重複するメールアドレスを繰り返し登録 - $I->expect('試行回数上限を超過します'); - for ($i = 0; $i < 25; $i++) { - \Page\Front\EntryPage::go($I) - ->新規会員登録_メアド指定($email); - } - $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); - } - } From 86bbd89fd6928635de87827d24955580273dfa85 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Wed, 20 Sep 2023 19:59:21 +0900 Subject: [PATCH 08/29] =?UTF-8?q?=E4=BC=9A=E5=93=A1=E5=85=A5=E5=8A=9B?= =?UTF-8?q?=E6=99=82=E3=81=AE=E3=82=B9=E3=83=AD=E3=83=83=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E7=94=A8E2E=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index a8db18a577c..eb6a8b56556 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -749,4 +749,23 @@ public function order_お届け先変更(AcceptanceTester $I) $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); } + public function 会員登録_入力(AcceptanceTester $I) + { + $I->wantTo('EF0901-UC01-T18_会員登録_入力'); + + $email = uniqid().microtime(true).'@example.com'; + + // EF0901-UC01-T05_会員登録で12回消化済みであるが標準リミットである25回実行 + for ($i = 0; $i < 25; $i++) { + $I->expect('会員登録を行います:'.$i); + \Page\Front\EntryPage::go($I) + ->新規会員登録_メアド指定($email); + } + + $I->expect('試行回数上限を超過します'); + \Page\Front\EntryPage::go($I) + ->新規会員登録_メアド指定($email); + $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); + } + } From 4dcd7fff3309f0fbff7b24542ee71df8edc6fe4a Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Wed, 20 Sep 2023 20:20:28 +0900 Subject: [PATCH 09/29] =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=97=E5=9B=9E?= =?UTF-8?q?=E6=95=B0=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/_support/Page/Front/EntryPage.php | 13 +++++++------ codeception/acceptance/EF09ThrottlingCest.php | 11 +++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/codeception/_support/Page/Front/EntryPage.php b/codeception/_support/Page/Front/EntryPage.php index d650c9f3182..0a5a17fea71 100644 --- a/codeception/_support/Page/Front/EntryPage.php +++ b/codeception/_support/Page/Front/EntryPage.php @@ -56,16 +56,17 @@ public function 新規会員登録($form = []) return $this; } - public function 新規会員登録_メアド指定($email, $form = []) + public function 新規会員登録_入力エラー($form = []) { $this->tester->amOnPage('/entry'); + $email = uniqid().microtime(true).'@example.com'; $form += [ - 'entry[name][name01]' => '姓', - 'entry[name][name02]' => '名', - 'entry[kana][kana01]' => 'セイ', - 'entry[kana][kana02]' => 'メイ', - 'entry[postal_code]' => '530-0001', + 'entry[name][name01]' => '', + 'entry[name][name02]' => '', + 'entry[kana][kana01]' => '', + 'entry[kana][kana02]' => '', + 'entry[postal_code]' => '', 'entry[address][pref]' => ['value' => '27'], 'entry[address][addr01]' => '大阪市北区', 'entry[address][addr02]' => '梅田2-4-9 ブリーゼタワー13F', diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index eb6a8b56556..1b7e767ca2b 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -755,16 +755,15 @@ public function 会員登録_入力(AcceptanceTester $I) $email = uniqid().microtime(true).'@example.com'; - // EF0901-UC01-T05_会員登録で12回消化済みであるが標準リミットである25回実行 - for ($i = 0; $i < 25; $i++) { - $I->expect('会員登録を行います:'.$i); + // EF0901-UC01-T05_会員登録で12回消化済み + for ($i = 12; $i < 25; $i++) { + $I->expect('会員登録を行います:'); \Page\Front\EntryPage::go($I) - ->新規会員登録_メアド指定($email); + ->新規会員登録_入力エラー(); } - $I->expect('試行回数上限を超過します'); \Page\Front\EntryPage::go($I) - ->新規会員登録_メアド指定($email); + ->新規会員登録_入力エラー(); $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); } From 8a5a3258660261fbd1b0a34263412a3c3c9fb346 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Wed, 20 Sep 2023 21:48:03 +0900 Subject: [PATCH 10/29] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E5=A4=89=E6=95=B0?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=80=82=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 1b7e767ca2b..33c009f6f97 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -753,11 +753,9 @@ public function 会員登録_入力(AcceptanceTester $I) { $I->wantTo('EF0901-UC01-T18_会員登録_入力'); - $email = uniqid().microtime(true).'@example.com'; - // EF0901-UC01-T05_会員登録で12回消化済み for ($i = 12; $i < 25; $i++) { - $I->expect('会員登録を行います:'); + $I->expect('会員登録を行います:'.$i); \Page\Front\EntryPage::go($I) ->新規会員登録_入力エラー(); } From e9859952454baa98bea8cd8b27646432af37f9c1 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Wed, 20 Sep 2023 22:09:11 +0900 Subject: [PATCH 11/29] =?UTF-8?q?=E5=9B=9E=E6=95=B0=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 33c009f6f97..1c46026b9f3 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -754,7 +754,7 @@ public function 会員登録_入力(AcceptanceTester $I) $I->wantTo('EF0901-UC01-T18_会員登録_入力'); // EF0901-UC01-T05_会員登録で12回消化済み - for ($i = 12; $i < 25; $i++) { + for ($i = 12; $i < 19; $i++) { $I->expect('会員登録を行います:'.$i); \Page\Front\EntryPage::go($I) ->新規会員登録_入力エラー(); From cdacac41a51a1b1363ff45ae5b0b67c9922d3965 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Thu, 21 Sep 2023 10:10:54 +0900 Subject: [PATCH 12/29] =?UTF-8?q?=E5=9B=9E=E6=95=B0=E5=86=8D=E8=AA=BF?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 1c46026b9f3..6f6420b1487 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -754,7 +754,7 @@ public function 会員登録_入力(AcceptanceTester $I) $I->wantTo('EF0901-UC01-T18_会員登録_入力'); // EF0901-UC01-T05_会員登録で12回消化済み - for ($i = 12; $i < 19; $i++) { + for ($i = 12; $i < 18; $i++) { $I->expect('会員登録を行います:'.$i); \Page\Front\EntryPage::go($I) ->新規会員登録_入力エラー(); From 3914a2b7de63825523fb340e60f3f4f4d0770865 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Thu, 21 Sep 2023 13:19:30 +0900 Subject: [PATCH 13/29] =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=81=AE=E3=82=A2=E3=82=B5=E3=83=BC=E3=83=88=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/_support/Page/Front/EntryPage.php | 1 - 1 file changed, 1 deletion(-) diff --git a/codeception/_support/Page/Front/EntryPage.php b/codeception/_support/Page/Front/EntryPage.php index 0a5a17fea71..5378c6ccb2b 100644 --- a/codeception/_support/Page/Front/EntryPage.php +++ b/codeception/_support/Page/Front/EntryPage.php @@ -78,7 +78,6 @@ public function 新規会員登録_入力エラー($form = []) 'entry[user_policy_check]' => '1', ]; $this->tester->submitForm(['css' => '.ec-layoutRole__main form'], $form, ['css' => 'button.ec-blockBtn--action']); - $this->tester->seeInField(['id' => 'entry_email_first'], $form['entry[email][first]']); $this->tester->click('.ec-registerRole form button.ec-blockBtn--action'); return $this; From f40f2791077fb81afc4f5987af19c4fc760dc912 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Sat, 23 Sep 2023 16:47:22 +0900 Subject: [PATCH 14/29] =?UTF-8?q?=E4=BC=9A=E5=93=A1=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=EF=BC=88=E5=85=A5=E5=8A=9B-=E7=A2=BA=E8=AA=8D=EF=BC=89?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88=E5=AE=9F?= =?UTF-8?q?=E8=A1=8C=E5=89=8D=E3=81=AB=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A5=E5=89=8A=E9=99=A4=E6=93=8D=E4=BD=9C=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 6f6420b1487..e0b92ce8212 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -753,8 +753,18 @@ public function 会員登録_入力(AcceptanceTester $I) { $I->wantTo('EF0901-UC01-T18_会員登録_入力'); - // EF0901-UC01-T05_会員登録で12回消化済み - for ($i = 12; $i < 18; $i++) { + // キャッシュを削除 + $I->loginAsAdmin(); + $I->amOnPage('/'); + $I->waitForText('EC-CUBE SHOP', 10, 'h1'); + $config = Fixtures::get('config'); + $I->amOnPage("/{$config['eccube_admin_route']}/content/cache"); + $I->click('.c-contentsArea .btn-ec-conversion'); + $I->waitForElement('.alert', 10); + $I->waitForText('削除しました', 10, '.alert'); + + // 会員登録(エラーとなるパターン)を実行 + for ($i = 0; $i < 25; $i++) { $I->expect('会員登録を行います:'.$i); \Page\Front\EntryPage::go($I) ->新規会員登録_入力エラー(); From 7007cfc83eb942b961eb41f9205fff2b2ebf8ad4 Mon Sep 17 00:00:00 2001 From: kentanakayrglm Date: Sat, 23 Sep 2023 20:05:34 +0900 Subject: [PATCH 15/29] =?UTF-8?q?=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A5=E5=89=8A=E9=99=A4=E6=96=B9=E6=B3=95=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index e0b92ce8212..ba7540aa40d 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -754,14 +754,13 @@ public function 会員登録_入力(AcceptanceTester $I) $I->wantTo('EF0901-UC01-T18_会員登録_入力'); // キャッシュを削除 - $I->loginAsAdmin(); - $I->amOnPage('/'); - $I->waitForText('EC-CUBE SHOP', 10, 'h1'); - $config = Fixtures::get('config'); - $I->amOnPage("/{$config['eccube_admin_route']}/content/cache"); - $I->click('.c-contentsArea .btn-ec-conversion'); - $I->waitForElement('.alert', 10); - $I->waitForText('削除しました', 10, '.alert'); + $fs = new Symfony\Component\Filesystem\Filesystem(); + foreach (['prod', 'codeception'] as $env) { + $cacheDir = __DIR__."/../../var/cache/${env}/pools"; + if ($fs->exists($cacheDir)) { + $fs->remove($cacheDir); + } + } // 会員登録(エラーとなるパターン)を実行 for ($i = 0; $i < 25; $i++) { From 26f28df8dc75217a5df50eb7b060f02d51878482 Mon Sep 17 00:00:00 2001 From: ji-eunsoo Date: Mon, 25 Sep 2023 11:11:26 +0900 Subject: [PATCH 16/29] =?UTF-8?q?=E4=BC=9A=E5=93=A1=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=EF=BC=BF=E5=85=A5=E5=8A=9B=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test-throttling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test-throttling.yml b/.github/workflows/e2e-test-throttling.yml index d5c1d0a6328..b8f01456c45 100644 --- a/.github/workflows/e2e-test-throttling.yml +++ b/.github/workflows/e2e-test-throttling.yml @@ -21,7 +21,7 @@ jobs: matrix: php: [ 8.1 ] db: [ pgsql ] - method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入, 会員情報編集, 配送先情報_追加, 配送先情報_編集, 配送先情報_削除, order_お届け先追加, order_お届け先変更 ] + method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入, 会員情報編集, 配送先情報_追加, 配送先情報_編集, 配送先情報_削除, order_お届け先追加, order_お届け先変更, '会員登録_入力' ] include: - db: pgsql database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db From 440a387a6ea8c9eab33864d0449145cd0e7fc24f Mon Sep 17 00:00:00 2001 From: ji-eunsoo <132241702+ji-eunsoo@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:43:29 +0900 Subject: [PATCH 17/29] =?UTF-8?q?=E2=80=99=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test-throttling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test-throttling.yml b/.github/workflows/e2e-test-throttling.yml index b8f01456c45..d80a90bad31 100644 --- a/.github/workflows/e2e-test-throttling.yml +++ b/.github/workflows/e2e-test-throttling.yml @@ -21,7 +21,7 @@ jobs: matrix: php: [ 8.1 ] db: [ pgsql ] - method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入, 会員情報編集, 配送先情報_追加, 配送先情報_編集, 配送先情報_削除, order_お届け先追加, order_お届け先変更, '会員登録_入力' ] + method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入, 会員情報編集, 配送先情報_追加, 配送先情報_編集, 配送先情報_削除, order_お届け先追加, order_お届け先変更, 会員登録_入力 ] include: - db: pgsql database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db From db880d6f1bbebed7a17cb489aad543355f658438 Mon Sep 17 00:00:00 2001 From: ji-eunsoo <132241702+ji-eunsoo@users.noreply.github.com> Date: Mon, 25 Sep 2023 13:04:58 +0900 Subject: [PATCH 18/29] =?UTF-8?q?entry=5Fcomplete=E3=81=AE=E4=B8=8A?= =?UTF-8?q?=E9=99=90=E5=80=A4=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test-throttling.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/e2e-test-throttling.yml b/.github/workflows/e2e-test-throttling.yml index d80a90bad31..03eddbb481e 100644 --- a/.github/workflows/e2e-test-throttling.yml +++ b/.github/workflows/e2e-test-throttling.yml @@ -88,6 +88,27 @@ jobs: type: customer limit: 10 interval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml + + # entryのテストするため、entry_completeの上限値を変更する + - name: Fix limiter limit for entry complete + if: startsWith(matrix.method, '会員登録_入力') + run: | + echo "eccube: + rate_limiter: + entry: + route: entry + method: [ 'POST' ] + type: ip + limit: 25 + interval: '30 minutes' + entry_complete: + route: entry + method: [ 'POST' ] + params: + mode: complete + type: ip + limit: 1024 + iinterval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml - name: Setup PHP uses: nanasess/setup-php@master From 63561f2b42e00e9301f2a4fff895c02a2ab19c12 Mon Sep 17 00:00:00 2001 From: ji-eunsoo <132241702+ji-eunsoo@users.noreply.github.com> Date: Mon, 25 Sep 2023 14:21:27 +0900 Subject: [PATCH 19/29] =?UTF-8?q?=E4=BC=9A=E5=93=A1=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=81=AE=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E5=90=8D=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/acceptance/EF09ThrottlingCest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index ba7540aa40d..04905158c82 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -132,7 +132,7 @@ private function failLoginAsAdmin(AcceptanceTester $I, $loginId, $password) ]); } - public function 会員登録(AcceptanceTester $I) + public function 仮会員登録(AcceptanceTester $I) { $I->wantTo('EF0901-UC01-T05_会員登録'); @@ -749,6 +749,13 @@ public function order_お届け先変更(AcceptanceTester $I) $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); } + /** + * entryでのスロットリングのテスト + * entry_completeでの制限に引っかかるため、entry_completeのlimiter上限値を変更してから実施してください。 + * + * @param AcceptanceTester $I + * @return void + */ public function 会員登録_入力(AcceptanceTester $I) { $I->wantTo('EF0901-UC01-T18_会員登録_入力'); From d42c4ff1638231867217e1005b6674fe1695c452 Mon Sep 17 00:00:00 2001 From: ji-eunsoo <132241702+ji-eunsoo@users.noreply.github.com> Date: Mon, 25 Sep 2023 14:21:50 +0900 Subject: [PATCH 20/29] =?UTF-8?q?=E4=BC=9A=E5=93=A1=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=81=AE=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E5=90=8D=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test-throttling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test-throttling.yml b/.github/workflows/e2e-test-throttling.yml index 03eddbb481e..2836135d34e 100644 --- a/.github/workflows/e2e-test-throttling.yml +++ b/.github/workflows/e2e-test-throttling.yml @@ -21,7 +21,7 @@ jobs: matrix: php: [ 8.1 ] db: [ pgsql ] - method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入, 会員情報編集, 配送先情報_追加, 配送先情報_編集, 配送先情報_削除, order_お届け先追加, order_お届け先変更, 会員登録_入力 ] + method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 仮会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入, 会員情報編集, 配送先情報_追加, 配送先情報_編集, 配送先情報_削除, order_お届け先追加, order_お届け先変更, 会員登録_入力 ] include: - db: pgsql database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db From 941898629dfcc46aa42d2508714d77181737aa5b Mon Sep 17 00:00:00 2001 From: ji-eunsoo <132241702+ji-eunsoo@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:00:59 +0900 Subject: [PATCH 21/29] =?UTF-8?q?=E8=AA=A4=E5=AD=97=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test-throttling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test-throttling.yml b/.github/workflows/e2e-test-throttling.yml index 2836135d34e..669dc38de40 100644 --- a/.github/workflows/e2e-test-throttling.yml +++ b/.github/workflows/e2e-test-throttling.yml @@ -108,7 +108,7 @@ jobs: mode: complete type: ip limit: 1024 - iinterval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml + interval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml - name: Setup PHP uses: nanasess/setup-php@master From a612b824eb6a55edc0bedf35f2b392cb964e20c6 Mon Sep 17 00:00:00 2001 From: ji-eunsoo <132241702+ji-eunsoo@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:13:17 +0900 Subject: [PATCH 22/29] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3?= =?UTF-8?q?=E3=83=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test-throttling.yml | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e-test-throttling.yml b/.github/workflows/e2e-test-throttling.yml index 669dc38de40..8091e855180 100644 --- a/.github/workflows/e2e-test-throttling.yml +++ b/.github/workflows/e2e-test-throttling.yml @@ -95,20 +95,20 @@ jobs: run: | echo "eccube: rate_limiter: - entry: - route: entry - method: [ 'POST' ] - type: ip - limit: 25 - interval: '30 minutes' - entry_complete: - route: entry - method: [ 'POST' ] - params: - mode: complete - type: ip - limit: 1024 - interval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml + entry: + route: entry + method: [ 'POST' ] + type: ip + limit: 3 + interval: '30 minutes' + entry_complete: + route: entry + method: [ 'POST' ] + params: + mode: complete + type: ip + limit: 1024 + interval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml - name: Setup PHP uses: nanasess/setup-php@master From c051f1f2296e42718611209b7a950c7ffd40cfc0 Mon Sep 17 00:00:00 2001 From: ji-eunsoo Date: Wed, 27 Sep 2023 11:31:53 +0900 Subject: [PATCH 23/29] =?UTF-8?q?2=E5=9B=9Esubmit=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test-throttling.yml | 21 ------------------- codeception/_support/Page/Front/EntryPage.php | 1 - codeception/acceptance/EF09ThrottlingCest.php | 18 +--------------- 3 files changed, 1 insertion(+), 39 deletions(-) diff --git a/.github/workflows/e2e-test-throttling.yml b/.github/workflows/e2e-test-throttling.yml index 8091e855180..db203bac0f6 100644 --- a/.github/workflows/e2e-test-throttling.yml +++ b/.github/workflows/e2e-test-throttling.yml @@ -88,27 +88,6 @@ jobs: type: customer limit: 10 interval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml - - # entryのテストするため、entry_completeの上限値を変更する - - name: Fix limiter limit for entry complete - if: startsWith(matrix.method, '会員登録_入力') - run: | - echo "eccube: - rate_limiter: - entry: - route: entry - method: [ 'POST' ] - type: ip - limit: 3 - interval: '30 minutes' - entry_complete: - route: entry - method: [ 'POST' ] - params: - mode: complete - type: ip - limit: 1024 - interval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml - name: Setup PHP uses: nanasess/setup-php@master diff --git a/codeception/_support/Page/Front/EntryPage.php b/codeception/_support/Page/Front/EntryPage.php index 5378c6ccb2b..db35af0762e 100644 --- a/codeception/_support/Page/Front/EntryPage.php +++ b/codeception/_support/Page/Front/EntryPage.php @@ -77,7 +77,6 @@ public function 新規会員登録_入力エラー($form = []) 'entry[plain_password][second]' => 'password1234', 'entry[user_policy_check]' => '1', ]; - $this->tester->submitForm(['css' => '.ec-layoutRole__main form'], $form, ['css' => 'button.ec-blockBtn--action']); $this->tester->click('.ec-registerRole form button.ec-blockBtn--action'); return $this; diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 04905158c82..659b06f5959 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -132,7 +132,7 @@ private function failLoginAsAdmin(AcceptanceTester $I, $loginId, $password) ]); } - public function 仮会員登録(AcceptanceTester $I) + public function 会員登録(AcceptanceTester $I) { $I->wantTo('EF0901-UC01-T05_会員登録'); @@ -749,26 +749,10 @@ public function order_お届け先変更(AcceptanceTester $I) $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); } - /** - * entryでのスロットリングのテスト - * entry_completeでの制限に引っかかるため、entry_completeのlimiter上限値を変更してから実施してください。 - * - * @param AcceptanceTester $I - * @return void - */ public function 会員登録_入力(AcceptanceTester $I) { $I->wantTo('EF0901-UC01-T18_会員登録_入力'); - // キャッシュを削除 - $fs = new Symfony\Component\Filesystem\Filesystem(); - foreach (['prod', 'codeception'] as $env) { - $cacheDir = __DIR__."/../../var/cache/${env}/pools"; - if ($fs->exists($cacheDir)) { - $fs->remove($cacheDir); - } - } - // 会員登録(エラーとなるパターン)を実行 for ($i = 0; $i < 25; $i++) { $I->expect('会員登録を行います:'.$i); From 1b2c7962a8fd42b28eba232d3246c605648473db Mon Sep 17 00:00:00 2001 From: ji-eunsoo <132241702+ji-eunsoo@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:47:10 +0900 Subject: [PATCH 24/29] =?UTF-8?q?entry=E3=81=A8entry=5Fcompleteno?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/eccube/packages/prod/eccube_rate_limiter.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml index 7d89321115c..9feb31de1cb 100644 --- a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml +++ b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml @@ -6,12 +6,14 @@ eccube: type: ip limit: 5 interval: '30 minutes' + # 新規会員登録(入力)画面で mode = confirm の場合に発生 entry: route: entry method: [ 'POST' ] type: ip limit: 25 interval: '30 minutes' + # 新規会員登録(入力)画面で 「確認画面から戻る」場合に発生 entry_complete: route: entry method: [ 'POST' ] From 25292b4901120d68d2914b7c0bcef55962943159 Mon Sep 17 00:00:00 2001 From: ji-eunsoo Date: Wed, 27 Sep 2023 13:10:11 +0900 Subject: [PATCH 25/29] =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?UTF-8?q?=E5=90=8D=E3=81=AE=E9=87=8D=E8=A4=87=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E8=A7=A3=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test-throttling.yml | 2 +- codeception/acceptance/EF09ThrottlingCest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test-throttling.yml b/.github/workflows/e2e-test-throttling.yml index db203bac0f6..bff054e4cda 100644 --- a/.github/workflows/e2e-test-throttling.yml +++ b/.github/workflows/e2e-test-throttling.yml @@ -21,7 +21,7 @@ jobs: matrix: php: [ 8.1 ] db: [ pgsql ] - method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 仮会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入, 会員情報編集, 配送先情報_追加, 配送先情報_編集, 配送先情報_削除, order_お届け先追加, order_お届け先変更, 会員登録_入力 ] + method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入, 会員情報編集, 配送先情報_追加, 配送先情報_編集, 配送先情報_削除, order_お届け先追加, order_お届け先変更, 新規会員登録_入力 ] include: - db: pgsql database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 659b06f5959..3e1a71312c3 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -749,7 +749,7 @@ public function order_お届け先変更(AcceptanceTester $I) $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); } - public function 会員登録_入力(AcceptanceTester $I) + public function 新規会員登録_入力(AcceptanceTester $I) { $I->wantTo('EF0901-UC01-T18_会員登録_入力'); From dbd8955a8f3a52b51a7a1f05a8b75299e8cc60f1 Mon Sep 17 00:00:00 2001 From: ji-eunsoo <132241702+ji-eunsoo@users.noreply.github.com> Date: Wed, 27 Sep 2023 14:18:57 +0900 Subject: [PATCH 26/29] =?UTF-8?q?=E3=82=B9=E3=83=AD=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=82=B0=E3=81=AE=E6=84=8F=E5=9B=B3=E3=82=92?= =?UTF-8?q?=E3=82=8F=E3=81=8B=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/eccube/packages/prod/eccube_rate_limiter.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml index 9feb31de1cb..75ce92a401a 100644 --- a/app/config/eccube/packages/prod/eccube_rate_limiter.yaml +++ b/app/config/eccube/packages/prod/eccube_rate_limiter.yaml @@ -6,15 +6,13 @@ eccube: type: ip limit: 5 interval: '30 minutes' - # 新規会員登録(入力)画面で mode = confirm の場合に発生 - entry: + entry: # 存在しているメールアドレスの確認を防止するためのスロットリング route: entry method: [ 'POST' ] type: ip limit: 25 interval: '30 minutes' - # 新規会員登録(入力)画面で 「確認画面から戻る」場合に発生 - entry_complete: + entry_complete: # 不正な会員登録を防止するためのスロットリング route: entry method: [ 'POST' ] params: From a82a5d3a9bc9474dbcdd785585a40f99b0c4a23d Mon Sep 17 00:00:00 2001 From: ji-eunsoo <132241702+ji-eunsoo@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:19:45 +0900 Subject: [PATCH 27/29] =?UTF-8?q?=E3=83=95=E3=83=AD=E3=83=BC=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/EF09ThrottlingCest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 3e1a71312c3..615cde0c61f 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -758,6 +758,7 @@ public function 新規会員登録_入力(AcceptanceTester $I) $I->expect('会員登録を行います:'.$i); \Page\Front\EntryPage::go($I) ->新規会員登録_入力エラー(); + $I->see('入力されていません。','p.ec-errorMessage'); } $I->expect('試行回数上限を超過します'); \Page\Front\EntryPage::go($I) From 148fdcf97bc7df5cc921b17a32df7a09d8a4afee Mon Sep 17 00:00:00 2001 From: ji-eunsoo Date: Thu, 28 Sep 2023 15:58:13 +0900 Subject: [PATCH 28/29] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AAmethod?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/_support/Page/Front/EntryPage.php | 26 ------------------- codeception/acceptance/EF09ThrottlingCest.php | 9 +++---- 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/codeception/_support/Page/Front/EntryPage.php b/codeception/_support/Page/Front/EntryPage.php index db35af0762e..acd3844a1e8 100644 --- a/codeception/_support/Page/Front/EntryPage.php +++ b/codeception/_support/Page/Front/EntryPage.php @@ -55,30 +55,4 @@ public function 新規会員登録($form = []) return $this; } - - public function 新規会員登録_入力エラー($form = []) - { - $this->tester->amOnPage('/entry'); - $email = uniqid().microtime(true).'@example.com'; - - $form += [ - 'entry[name][name01]' => '', - 'entry[name][name02]' => '', - 'entry[kana][kana01]' => '', - 'entry[kana][kana02]' => '', - 'entry[postal_code]' => '', - 'entry[address][pref]' => ['value' => '27'], - 'entry[address][addr01]' => '大阪市北区', - 'entry[address][addr02]' => '梅田2-4-9 ブリーゼタワー13F', - 'entry[phone_number]' => '1234567890', - 'entry[email][first]' => $email, - 'entry[email][second]' => $email, - 'entry[plain_password][first]' => 'password1234', - 'entry[plain_password][second]' => 'password1234', - 'entry[user_policy_check]' => '1', - ]; - $this->tester->click('.ec-registerRole form button.ec-blockBtn--action'); - - return $this; - } } diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index 615cde0c61f..d02a639912a 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -753,16 +753,15 @@ public function 新規会員登録_入力(AcceptanceTester $I) { $I->wantTo('EF0901-UC01-T18_会員登録_入力'); - // 会員登録(エラーとなるパターン)を実行 + \Page\Front\EntryPage::go($I); + for ($i = 0; $i < 25; $i++) { $I->expect('会員登録を行います:'.$i); - \Page\Front\EntryPage::go($I) - ->新規会員登録_入力エラー(); + $I->click('.ec-registerRole form button.ec-blockBtn--action'); $I->see('入力されていません。','p.ec-errorMessage'); } $I->expect('試行回数上限を超過します'); - \Page\Front\EntryPage::go($I) - ->新規会員登録_入力エラー(); + $I->click('.ec-registerRole form button.ec-blockBtn--action'); $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); } From 205f5803bdd3595ab49785a0b044c2059f074d3a Mon Sep 17 00:00:00 2001 From: ji-eunsoo Date: Thu, 28 Sep 2023 19:58:03 +0900 Subject: [PATCH 29/29] =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E5=85=A5=E5=8A=9B/=E5=90=8C=E6=84=8F=E3=81=99=E3=82=8B/?= =?UTF-8?q?=E4=BC=9A=E5=93=A1=E7=99=BB=E9=8C=B2=E3=81=AB=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codeception/_support/Page/Front/EntryPage.php | 29 +++++++++++++++---- codeception/acceptance/EA07BasicinfoCest.php | 22 +++++++++----- codeception/acceptance/EF09ThrottlingCest.php | 27 ++++++++++------- 3 files changed, 55 insertions(+), 23 deletions(-) diff --git a/codeception/_support/Page/Front/EntryPage.php b/codeception/_support/Page/Front/EntryPage.php index acd3844a1e8..ad5a8a5fd06 100644 --- a/codeception/_support/Page/Front/EntryPage.php +++ b/codeception/_support/Page/Front/EntryPage.php @@ -15,11 +15,20 @@ class EntryPage extends AbstractFrontPage { + + private $formData = []; + public function __construct(\AcceptanceTester $I) { parent::__construct($I); } + /** + * @param $I + * @param $id + * + * @return EntryPage + */ public static function go($I) { $page = new self($I); @@ -28,11 +37,11 @@ public static function go($I) return $page; } - public function 新規会員登録($form = []) + public function フォーム入力($form = []) { $this->tester->amOnPage('/entry'); $email = uniqid().microtime(true).'@example.com'; - + $form += [ 'entry[name][name01]' => '姓', 'entry[name][name02]' => '名', @@ -49,10 +58,20 @@ public function 新規会員登録($form = []) 'entry[plain_password][second]' => 'password1234', 'entry[user_policy_check]' => '1', ]; - $this->tester->submitForm(['css' => '.ec-layoutRole__main form'], $form, ['css' => 'button.ec-blockBtn--action']); - $this->tester->seeInField(['id' => 'entry_email_first'], $form['entry[email][first]']); - $this->tester->click('.ec-registerRole form button.ec-blockBtn--action'); + $this->formData = $form; + return $this; + } + + public function 同意する() + { + $this->tester->submitForm(['css' => '.ec-layoutRole__main form'], $this->formData, ['css' => 'button.ec-blockBtn--action']); + $this->tester->seeInField(['id' => 'entry_email_first'], $this->formData['entry[email][first]']); + return $this; + } + public function 登録する() + { + $this->tester->click('.ec-registerRole form button.ec-blockBtn--action'); return $this; } } diff --git a/codeception/acceptance/EA07BasicinfoCest.php b/codeception/acceptance/EA07BasicinfoCest.php index a2361f6daa6..3bde8fc50a8 100644 --- a/codeception/acceptance/EA07BasicinfoCest.php +++ b/codeception/acceptance/EA07BasicinfoCest.php @@ -98,10 +98,13 @@ public function basicinfo_会員設定_仮会員機能(AcceptanceTester $I) // 会員登録 $faker = Fixtures::get('faker'); $email = microtime(true).'.'.$faker->safeEmail; - EntryPage::go($I)->新規会員登録([ - 'entry[email][first]' => $email, - 'entry[email][second]' => $email, - ]); + EntryPage::go($I) + ->フォーム入力([ + 'entry[email][first]' => $email, + 'entry[email][second]' => $email, + ]) + ->同意する() + ->登録する(); // 会員ステータスのチェック $page = CustomerManagePage::go($I); @@ -119,10 +122,13 @@ public function basicinfo_会員設定_仮会員機能(AcceptanceTester $I) // 会員登録 $I->logoutAsMember(); $email = microtime(true).'.'.$faker->safeEmail; - EntryPage::go($I)->新規会員登録([ - 'entry[email][first]' => $email, - 'entry[email][second]' => $email, - ]); + EntryPage::go($I) + ->フォーム入力([ + 'entry[email][first]' => $email, + 'entry[email][second]' => $email, + ]) + ->同意する() + ->登録する(); $I->logoutAsMember(); // 会員ステータスのチェック diff --git a/codeception/acceptance/EF09ThrottlingCest.php b/codeception/acceptance/EF09ThrottlingCest.php index d02a639912a..85bd15cc4f8 100644 --- a/codeception/acceptance/EF09ThrottlingCest.php +++ b/codeception/acceptance/EF09ThrottlingCest.php @@ -24,6 +24,8 @@ use Page\Front\ShoppingLoginPage; use Page\Front\ShoppingNonmemberPage; use Page\Front\ShoppingPage; +use Page\Front\EntryPage; + /** * @group throttling @@ -138,14 +140,18 @@ public function 会員登録(AcceptanceTester $I) for ($i = 0; $i < 5; $i++) { $I->expect('会員登録を行います:'.$i); - \Page\Front\EntryPage::go($I) - ->新規会員登録(); + EntryPage::go($I) + ->フォーム入力() + ->同意する() + ->登録する(); $I->see('現在、仮会員の状態です。', 'p.ec-reportDescription'); } $I->expect('試行回数上限を超過します'); - \Page\Front\EntryPage::go($I) - ->新規会員登録(); + EntryPage::go($I) + ->フォーム入力() + ->同意する() + ->登録する(); $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); } @@ -753,15 +759,16 @@ public function 新規会員登録_入力(AcceptanceTester $I) { $I->wantTo('EF0901-UC01-T18_会員登録_入力'); - \Page\Front\EntryPage::go($I); - for ($i = 0; $i < 25; $i++) { $I->expect('会員登録を行います:'.$i); - $I->click('.ec-registerRole form button.ec-blockBtn--action'); - $I->see('入力されていません。','p.ec-errorMessage'); + EntryPage::go($I) + ->フォーム入力() + ->登録する(); } - $I->expect('試行回数上限を超過します'); - $I->click('.ec-registerRole form button.ec-blockBtn--action'); + + EntryPage::go($I) + ->フォーム入力() + ->登録する(); $I->see('試行回数の上限を超過しました。しばらくお待ちいただき、再度お試しください。', 'p.ec-reportDescription'); }