Skip to content

Commit

Permalink
Merge branch '4.1' into zap_category_export
Browse files Browse the repository at this point in the history
  • Loading branch information
chihiro-adachi authored Apr 22, 2022
2 parents 81daeb1 + f0b4346 commit 2906af1
Show file tree
Hide file tree
Showing 40 changed files with 1,064 additions and 92 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/penetration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@ jobs:
operating-system: [ ubuntu-18.04 ]
group:
- 'test/front_login/contact.test.ts'
- 'test/front_guest/about.test.ts'
- 'test/front_guest/contact.test.ts'
- 'test/admin/content_layout.test.ts'
- 'test/admin/content_layout_delete.test.ts'
- 'test/admin/customer.test.ts'
- 'test/admin/content_cache.test.ts'
- 'test/admin/customer_edit.test.ts'
- 'test/admin/product_class_name.test.ts'
- 'test/admin/order_mail.test.ts'

- 'test/admin/product.test.ts'
- 'test/admin/product_csv_template.test.ts'
- 'test/admin/content_block.test.ts'
- 'test/admin/content_page.test.ts'
- 'test/admin/product_category_export.test.ts'
- 'test/admin/change_password.test.ts'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -44,6 +53,10 @@ jobs:
- run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
- name: Apply patch to change_password
if: matrix.group == 'test/admin/change_password.test.ts'
working-directory: zap/selenium/ci/TypeScript
run: git am patches/0001-Member.patch
- name: Apply patch to delete_layout
if: matrix.group == 'test/admin/content_layout_delete.test.ts'
working-directory: zap/selenium/ci/TypeScript
Expand Down
9 changes: 9 additions & 0 deletions app/config/eccube/packages/prod/monolog.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
monolog:
handlers:
e_user_deprecated_filter:
type: filter
accepted_levels: ['info']
channels: ['php']
handler: blackhole
bubble: false
main:
type: fingers_crossed
action_level: error
Expand Down Expand Up @@ -39,3 +45,6 @@ monolog:
type: console
process_psr_3_messages: false
channels: ['!event', '!doctrine']
# keep this last
blackhole:
type: "null"
6 changes: 3 additions & 3 deletions codeception/_support/Page/Admin/CustomerManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomerManagePage extends AbstractAdminPageStyleGuide
public static $検索条件_仮会員 = ['id' => 'admin_search_customer_customer_status_1'];
public static $検索条件_本会員 = ['id' => 'admin_search_customer_customer_status_2'];
public static $検索条件_退会 = ['id' => 'admin_search_customer_customer_status_3'];
public static $ポイント = ['id' => 'admin_customer_point'];

/**
* CustomerListPage constructor.
Expand Down Expand Up @@ -124,8 +125,7 @@ public function 一覧_仮会員メール再送($rowNum, $execute = true)
$this->tester->wait(5);
if ($execute) {
$this->tester->click('送信');
}
else {
} else {
$this->tester->click('キャンセル');
}

Expand Down Expand Up @@ -175,7 +175,7 @@ public function assertSortedIdList($order)

public function assertSortedNameList($order)
{
$values = array_map(function($s) {
$values = array_map(function ($s) {
// 一覧の会員名の文字列から姓だけを抽出
return preg_replace('/ .*$/', '', $s);
}, $this->tester->grabMultiple('.c-contentsArea__primaryCol tr > td:nth-child(2)'));
Expand Down
4 changes: 3 additions & 1 deletion codeception/_support/Page/Admin/OrderEditPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
class OrderEditPage extends AbstractAdminPageStyleGuide
{
public static $姓_エラーメッセージ = '#ordererInfo > div > div > div:nth-child(1) > div:nth-child(2) > div > div > div:nth-child(1) > span';

public static $登録完了メッセージ = 'div.c-container > div.c-contentsArea > div.alert.alert-success.alert-dismissible.fade.show.m-3 > span';
public static $ポイント値引き額 = '//span[contains(text(), "ポイント")]/parent::div/following-sibling::div/span';
public static $利用ポイント = '#order_use_point';
public static $加算ポイント = '//span[contains(text(), "加算ポイント")]/parent::div/following-sibling::div/span';

/**
* OrderRegisterPage constructor.
Expand Down
16 changes: 16 additions & 0 deletions codeception/_support/Page/Admin/ShopSettingPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
class ShopSettingPage extends AbstractAdminPageStyleGuide
{
public static $登録完了メッセージ = '#page_admin_setting_shop > div > div.c-contentsArea > div.alert.alert-success.alert-dismissible.fade.show.m-3 > span';
public static $チェックボックス_商品別税率機能 = 'shop_master_option_product_tax_rule';
public static $チェックボックス_ポイント機能 = 'shop_master_option_point';
public static $チェックボックス_仮会員機能 = 'shop_master_option_customer_activate';
public static $チェックボックス_マイページに注文状況を表示 = 'shop_master_option_mypage_order_status_display';
public static $チェックボックス_お気に入り商品機能 = 'shop_master_option_favorite_product';
Expand Down Expand Up @@ -61,6 +63,20 @@ public function 入力_電話番号($value)
return $this;
}

public function 入力_ポイント付与率($value)
{
$this->tester->fillField(['id' => 'shop_master_basic_point_rate'], $value);

return $this;
}

public function 入力_ポイント換算レート($value)
{
$this->tester->fillField(['id' => 'shop_master_point_conversion_rate'], $value);

return $this;
}

public function 入力_チェックボックス($id, $bool)
{
if ($this->tester->grabAttributeFrom(['id' => $id], 'checked') != $bool) {
Expand Down
2 changes: 2 additions & 0 deletions codeception/_support/Page/Front/CartPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

class CartPage extends AbstractFrontPage
{
public static $加算ポイント = '//span[contains(text(), "加算ポイント")]/../../dd/span';

public function __construct(\AcceptanceTester $I)
{
parent::__construct($I);
Expand Down
4 changes: 4 additions & 0 deletions codeception/_support/Page/Front/HistoryPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

class HistoryPage extends AbstractFrontPage
{
public static $ポイント値引き額 = '//dt[contains(text(), "ポイント")]/../dd';
public static $利用ポイント = '//dt[contains(text(), "ご利用ポイント")]/../dd';
public static $加算ポイント = '//dt[contains(text(), "加算ポイント")]/../dd';

public function __construct(\AcceptanceTester $I)
{
parent::__construct($I);
Expand Down
11 changes: 11 additions & 0 deletions codeception/_support/Page/Front/ShoppingPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

class ShoppingPage extends AbstractFrontPage
{
public static $ポイント値引き額 = '//dt[contains(text(), "ポイント")]/../dd';
public static $利用ポイント = '//dt[contains(text(), "ご利用ポイント")]/../dd';
public static $加算ポイント = '//span[contains(text(), "加算ポイント")]/../../dd/span';

public function __construct(\AcceptanceTester $I)
{
parent::__construct($I);
Expand Down Expand Up @@ -59,6 +63,13 @@ public function 入力_姓($value)
return $this;
}

public function 入力_利用ポイント($value)
{
$this->tester->executeJS("$('#shopping_order_use_point').val('{$value}')");

return $this;
}

public function お客様情報変更OK()
{
$this->tester->click('div.ec-orderAccount #customer-ok button');
Expand Down
21 changes: 21 additions & 0 deletions codeception/acceptance/EA06ContentsManagementCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,25 @@ public function contentsmanagement_メンテナンス管理(AcceptanceTester $I)
$I->dontSee('メンテナンスモードが有効になっています。', '#page_homepage > div.ec-maintenanceAlert > div');
$I->see('全ての商品', TopPage::$検索_カテゴリ選択);
}

public function contentsmanagement_キャッシュ管理(AcceptanceTester $I)
{
$I->wantTo('EA0608-UC01-T01_キャッシュ管理');

$I->expect('トップページを確認します');
$I->amOnPage('/');
$I->see('EC-CUBE SHOP', 'h1');

$I->expect('キャッシュを削除します');
$config = Fixtures::get('config');
$I->amOnPage("/{$config['eccube_admin_route']}/content/cache");

$I->click('.c-contentsArea .btn-ec-conversion');
$I->waitForElement('.alert', 10);
$I->see('削除しました', '.alert');

$I->expect('トップページを確認します');
$I->amOnPage('/');
$I->see('EC-CUBE SHOP', 'h1');
}
}
Loading

0 comments on commit 2906af1

Please sign in to comment.