Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/experimental/sf' into fix-clas…
Browse files Browse the repository at this point in the history
…sloader
  • Loading branch information
nanasess committed Aug 3, 2018
2 parents 7673547 + a63e5ff commit 1495b99
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ tools:

external_code_coverage:
runs: 1
timeout: 36000 #The timeout must be in the interval [60,36000].
timeout: 3600

#php_code_sniffer:
# enabled: true
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ jobs:
env: GROUP=admin03 APP_ENV=codeception DATABASE_URL=postgres://postgres:password@localhost/eccube_db DATABASE_SERVER_VERSION=9 MAILER_URL=smtp://localhost:1025
- <<: *e2e_test
env: GROUP=front APP_ENV=codeception DATABASE_URL=postgres://postgres:password@localhost/eccube_db DATABASE_SERVER_VERSION=9 MAILER_URL=smtp://localhost:1025
- &coverage
stage: Code Coverage
- stage: Code Coverage
if: type != pull_request
env: DATABASE_URL=sqlite:///%kernel.project_dir%/var/eccube.db DATABASE_SERVER_VERSION=3 COVERAGE=1
before_install:
- *php_setup
Expand Down
11 changes: 11 additions & 0 deletions codeception/_support/Page/Admin/ProductEditPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ public function 入力_公開()
return $this;
}

public function 入力_非公開()
{
$this->tester->selectOption('#admin_product_Status', '非公開');
return $this;
}

public function クリックして開くタグリスト()
{
$this->tester->click(['css' => 'div[href="#allTags"] > a']);
Expand Down Expand Up @@ -89,4 +95,9 @@ public function 登録()
return $this;
}

public function プレビュー()
{
$this->tester->click(['xpath' => "//*[@id='preview']/div/div/a[text()='プレビュー']"]);
}

}
35 changes: 35 additions & 0 deletions codeception/acceptance/EA03ProductCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,4 +729,39 @@ public function product_一覧からの商品確認(\AcceptanceTester $I)
$I->switchToNewWindow();
$I->seeInCurrentUrl('/products/detail/');
}

public function product_商品編集からの商品確認_公開(\AcceptanceTester $I)
{
$I->wantTo('EA0310-UC05-T02 編集からの商品確認 公開');

ProductManagePage::go($I)
->検索('パーコレーター')
->検索結果_選択(1);

ProductEditPage::at($I)
->入力_公開()
->登録()
->プレビュー();

$I->switchToNewWindow();
$I->seeInCurrentUrl('/products/detail/');
}

public function product_商品編集からの商品確認_非公開(\AcceptanceTester $I)
{
$I->wantTo('EA0310-UC05-T03 編集からの商品確認 非公開');

ProductManagePage::go($I)
->検索('パーコレーター')
->検索結果_選択(1);

ProductEditPage::at($I)
->入力_非公開()
->登録()
->プレビュー();

$I->switchToNewWindow();
$I->seeInCurrentUrl('/products/detail/');
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ id,name,sort_no,discriminator_type
"4","注文受付","5","customerorderstatus"
"5","発送済み","6","customerorderstatus"
"8","注文未完了","7","customerorderstatus"
"9","注文受付","8","customerorderstatus"
"10","返品","9","customerorderstatus"
1 change: 1 addition & 0 deletions src/Eccube/Resource/locale/messages.en.php
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@
'admin.product.product.521' => 'Registration Date',
'admin.product.product.522' => 'Updated on',
'admin.product.product.523' => 'Store Owner\'s Notes',
'admin.product.product.preview' => 'Preview',
'admin.product.product_class.524' => 'Products',
'admin.product.product_class.525' => 'Add New Product',
'admin.product.product_class.526' => 'The data will be deleted permanently. Are you sure to delete?',
Expand Down
1 change: 1 addition & 0 deletions src/Eccube/Resource/locale/messages.ja.php
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,7 @@
'admin.product.product.text09' => 'この商品の規格管理',
'admin.product.product.text10' => 'ページを移動します。',
'admin.product.product.text11' => '%name%に移動します。商品情報を保存してから移動しますか?',
'admin.product.product.preview' => 'プレビュー',
'admin.product.product.save' => '変更を保存',
'admin.product.product.cancel' => '保存せずに移動',
'admin.product.product.category' => 'カテゴリ',
Expand Down
14 changes: 14 additions & 0 deletions src/Eccube/Resource/template/admin/Product/product.twig
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,20 @@ file that was distributed with this source code.
</div>
<div class="c-contentsArea__secondaryCol">
<div class="c-secondaryCol">
{% if id is not null %}
<div class="card rounded border-0 mb-4">
<div class="collapse show ec-cardCollapse" id="preview">
<div class="card-body">
<div class="d-block text-center">
<a class="btn btn-block btn-ec-regular"
target="_blank"
href="{{ url('product_detail', {id:id}) }}"
title="{{ 'admin.product.product.preview'|trans }}">{{ 'admin.product.product.preview'|trans }}</a>
</div>
</div>
</div>
</div>
{% endif %}
<div class="card rounded border-0 mb-4">
<div class="card-header">
<div class="row">
Expand Down

0 comments on commit 1495b99

Please sign in to comment.