Skip to content

Commit

Permalink
Merge pull request EC-CUBE#5998 from dotani1111/features/feat_mypage_…
Browse files Browse the repository at this point in the history
…change_throttling

feat:会員情報編集・お届け先編集時にスロットリングを追加
  • Loading branch information
ji-eunsoo authored Jun 5, 2023
2 parents b809b34 + 6d0df3d commit 1cd8c88
Show file tree
Hide file tree
Showing 4 changed files with 532 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/e2e-test-throttling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
matrix:
php: [ 8.1 ]
db: [ pgsql ]
method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入 ]
method: [ フロント画面ログイン_IP, フロント画面ログイン_会員, 管理画面ログイン_IP, 管理画面ログイン_会員, 会員登録, 問い合わせ, パスワード再発行, 注文確認_非会員購入, 注文確認_会員購入, 注文完了_非会員購入, 注文完了_会員購入, 会員情報編集, 配送先情報_追加, 配送先情報_編集, 配送先情報_削除, order_お届け先追加, order_お届け先変更 ]
include:
- db: pgsql
database_url: postgres://postgres:[email protected]:5432/eccube_db
Expand Down Expand Up @@ -70,6 +70,25 @@ jobs:
limit: 10
interval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml
# delivery deleteのテストするため、delivery addの上限値を変更する
- name: Fix limiter limi for delivery delete
if: startsWith(matrix.method, '配送先情報_削除')
run: |
echo "eccube:
rate_limiter:
mypage_delivery_new:
route: mypage_delivery_new
method: [ 'POST' ]
type: customer
limit: 1024
interval: '30 minutes'
mypage_delivery_delete:
route: mypage_delivery_delete
method: [ 'DELETE' ]
type: customer
limit: 10
interval: '30 minutes'" > app/config/eccube/packages/prod/eccube_rate_limiter.yaml
- name: Setup PHP
uses: nanasess/setup-php@master
with:
Expand Down
36 changes: 36 additions & 0 deletions app/config/eccube/packages/prod/eccube_rate_limiter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,42 @@ eccube:
type: ip
limit: 5
interval: '30 minutes'
mypage_change:
route: mypage_change
method: [ 'POST' ]
type: customer
limit: 10
interval: '30 minutes'
mypage_delivery_new:
route: mypage_delivery_new
method: [ 'POST' ]
type: customer
limit: 10
interval: '30 minutes'
mypage_delivery_edit:
route: mypage_delivery_edit
method: [ 'POST' ]
type: customer
limit: 10
interval: '30 minutes'
mypage_delivery_delete:
route: mypage_delivery_delete
method: [ 'DELETE' ]
type: customer
limit: 10
interval: '30 minutes'
shopping_shipping_multiple_edit_customer:
route: shopping_shipping_multiple_edit
method: [ 'POST' ]
type: customer
limit: 10
interval: '30 minutes'
shopping_shipping_edit_customer:
route: shopping_shipping_edit
method: [ 'POST' ]
type: customer
limit: 10
interval: '30 minutes'
contact:
route: contact
method: [ 'POST' ]
Expand Down
107 changes: 107 additions & 0 deletions codeception/_support/Page/Front/CustomerAddressChangePage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?php

/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Page\Front;

class CustomerAddressChangePage extends AbstractFrontPage
{
public function __construct(\AcceptanceTester $I)
{
parent::__construct($I);
}

public static function at($I)
{
$page = new self($I);
$page->tester->see('お届け先の指定', 'div.ec-pageHeader h1');

return $page;
}

public function go($I)
{
$page = new self($I);
$page->tester->click('#page_shopping_shipping > div.ec-layoutRole > div > main > div.ec-registerRole > div > div > div > div > a');

return $this;
}


public function 入力_姓($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_name_name01'], $value);

return $this;
}

public function 入力_名($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_name_name02'], $value);

return $this;
}

public function 入力_セイ($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_kana_kana01'], $value);

return $this;
}

public function 入力_メイ($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_kana_kana02'], $value);

return $this;
}

public function 入力_郵便番号($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_postal_code'], $value);

return $this;
}

public function 入力_都道府県($value)
{
$this->tester->selectOption(['id' => 'shopping_shipping_address_pref'], $value);

return $this;
}

public function 入力_市区町村名($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_address_addr01'], $value);

return $this;
}

public function 入力_番地_ビル名($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_address_addr02'], $value);

return $this;
}

public function 入力_電話番号($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_phone_number'], $value);

return $this;
}

public function 登録する()
{
$this->tester->click('div.ec-RegisterRole__actions button');
}
}
Loading

0 comments on commit 1cd8c88

Please sign in to comment.