Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2Eテストが落ちる問題の修正 #4921

Merged
merged 4 commits into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codeception/_support/Page/Admin/OrderManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class OrderManagePage extends AbstractAdminPageStyleGuide
public static $検索条件_受注ステータス = ['id' => 'admin_search_order_status'];
public static $検索結果_メッセージ = '#search_form #search_total_count';
public static $検索結果_エラーメッセージ = '//*[@id="page_admin_order"]/div[1]/div[3]/div[3]/div/div/div[1]/div/div[1]';
public static $詳細検索ボタン = '//*[@id="search_form"]/div[1]/div/div/div[3]/a/i/span';
public static $詳細検索ボタン = '//*[@id="search_form"]/div[1]/div/div/div[3]';
public static $タイトル要素 = '.c-container .c-contentsArea .c-pageTitle .c-pageTitle__titles';

/**
Expand Down
78 changes: 38 additions & 40 deletions src/Eccube/Resource/template/admin/Customer/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -33,56 +33,54 @@ file that was distributed with this source code.
{% endblock stylesheet %}

{% block javascript %}
<script src="{{ asset('assets/js/vendor/moment.min.js', 'admin') }}"></script>
<script src="{{ asset('assets/js/vendor/moment-with-locales.min.js', 'admin') }}"></script>
<script src="{{ asset('assets/js/vendor/tempusdominus-bootstrap-4.min.js', 'admin') }}"></script>

<script>
$(function() {

// datetimepicker と競合するため HTML5 のカレンダ入力を無効に
$('input[type="date"]').attr('type','text');

$.when(
$.getScript("{{ asset('assets/js/vendor/moment.min.js', 'admin') }}"),
$.getScript("{{ asset('assets/js/vendor/moment-with-locales.min.js', 'admin') }}"),
$.getScript("{{ asset('assets/js/vendor/tempusdominus-bootstrap-4.min.js', 'admin') }}")
).done(function() {
// datetimepicker で value が消えてしまうので data-value に保持しておく
$('input.datetimepicker-input').each(function() {
$(this).data('value', $(this).val());
});
// datetimepicker で value が消えてしまうので data-value に保持しておく
$('input.datetimepicker-input').each(function() {
$(this).data('value', $(this).val());
});

$('input.datetimepicker-input').not('#admin_search_customer_birth_start').not('#admin_search_customer_birth_end').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD HH:mm:ss',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
},
});
$('input.datetimepicker-input').not('#admin_search_customer_birth_start').not('#admin_search_customer_birth_end').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD HH:mm:ss',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
},
});

$('#admin_search_customer_birth_start').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
}
});
$('#admin_search_customer_birth_start').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
}
});

$('#admin_search_customer_birth_end').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
}
});
$('#admin_search_customer_birth_end').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
}
});

// datetimepicker で value が消えてしまうので更新
$('input.datetimepicker-input').each(function() {
$(this).val($(this).data('value'));
});
// datetimepicker で value が消えてしまうので更新
$('input.datetimepicker-input').each(function() {
$(this).val($(this).data('value'));
});
});

Expand Down
42 changes: 20 additions & 22 deletions src/Eccube/Resource/template/admin/Order/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,30 @@ file that was distributed with this source code.
{% endblock stylesheet %}

{% block javascript %}
<script src="{{ asset('assets/js/vendor/moment.min.js', 'admin') }}"></script>
<script src="{{ asset('assets/js/vendor/moment-with-locales.min.js', 'admin') }}"></script>
<script src="{{ asset('assets/js/vendor/tempusdominus-bootstrap-4.min.js', 'admin') }}"></script>

<script>
$(function() {
$.when(
$.getScript("{{ asset('assets/js/vendor/moment.min.js', 'admin') }}"),
$.getScript("{{ asset('assets/js/vendor/moment-with-locales.min.js', 'admin') }}"),
$.getScript("{{ asset('assets/js/vendor/tempusdominus-bootstrap-4.min.js', 'admin') }}")
).done(function() {
// datetimepicker で value が消えてしまうので data-value に保持しておく
$('input.datetimepicker-input').each(function() {
$(this).data('value', $(this).val());
});
// datetimepicker で value が消えてしまうので data-value に保持しておく
$('input.datetimepicker-input').each(function() {
$(this).data('value', $(this).val());
});

$('input.datetimepicker-input').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD HH:mm:ss',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
},
});
$('input.datetimepicker-input').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD HH:mm:ss',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
},
});

// datetimepicker で value が消えてしまうので更新
$('input.datetimepicker-input').each(function() {
$(this).val($(this).data('value'));
});
// datetimepicker で value が消えてしまうので更新
$('input.datetimepicker-input').each(function() {
$(this).val($(this).data('value'));
});

toggleBtnBulk('input[id^="check_"]', '.btn-bulk-wrapper');
Expand Down
33 changes: 14 additions & 19 deletions src/Eccube/Resource/template/admin/Order/order_pdf.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,21 @@ file that was distributed with this source code.
{% endblock stylesheet %}

{% block javascript %}
<script src="{{ asset('assets/js/vendor/moment.min.js', 'admin') }}"></script>
<script src="{{ asset('assets/js/vendor/moment-with-locales.min.js', 'admin') }}"></script>
<script src="{{ asset('assets/js/vendor/tempusdominus-bootstrap-4.min.js', 'admin') }}"></script>

<script type="text/javascript">
$(function() {
if ($('[type="date"]').prop('type') != 'date') {
// input type属性でdateが利用できるかどうか(カレンダー表示できないブラウザ対応)
$.when(
$.getScript("{{ asset('assets/js/vendor/moment.min.js', 'admin') }}"),
$.getScript("{{ asset('assets/js/vendor/moment-with-locales.min.js', 'admin') }}"),
$.getScript("{{ asset('assets/js/vendor/tempusdominus-bootstrap-4.min.js', 'admin') }}")
).done(function() {
$('input[id$=_issue_date]').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD',
useCurrent: true,
buttons: {
showToday: true,
showClose: true
}
});
});
}
$('input[id$=_issue_date]').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD',
useCurrent: true,
buttons: {
showToday: true,
showClose: true
}
});

var close = $('#windowclose');

Expand Down Expand Up @@ -96,7 +91,7 @@ file that was distributed with this source code.
<div class="card-body">
<div class="form-group">
<label>{{ 'admin.order.delivery_note_create_date'|trans }}</label>
{{ form_widget(form.issue_date) }}
{{ form_widget(form.issue_date, { type: 'text' }) }}
{{ form_errors(form.issue_date) }}
</div>

Expand Down
42 changes: 20 additions & 22 deletions src/Eccube/Resource/template/admin/Product/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,30 @@ file that was distributed with this source code.
{% endblock stylesheet %}

{% block javascript %}
<script src="{{ asset('assets/js/vendor/moment.min.js', 'admin') }}"></script>
<script src="{{ asset('assets/js/vendor/moment-with-locales.min.js', 'admin') }}"></script>
<script src="{{ asset('assets/js/vendor/tempusdominus-bootstrap-4.min.js', 'admin') }}"></script>

<script>
$(function() {
$.when(
$.getScript("{{ asset('assets/js/vendor/moment.min.js', 'admin') }}"),
$.getScript("{{ asset('assets/js/vendor/moment-with-locales.min.js', 'admin') }}"),
$.getScript("{{ asset('assets/js/vendor/tempusdominus-bootstrap-4.min.js', 'admin') }}")
).done(function() {
// datetimepicker で value が消えてしまうので data-value に保持しておく
$('input.datetimepicker-input').each(function() {
$(this).data('value', $(this).val());
});
// datetimepicker で value が消えてしまうので data-value に保持しておく
$('input.datetimepicker-input').each(function() {
$(this).data('value', $(this).val());
});

$('input.datetimepicker-input').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD HH:mm:ss',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
},
});
$('input.datetimepicker-input').datetimepicker({
locale: '{{ eccube_config.locale }}',
format: 'YYYY-MM-DD HH:mm:ss',
useCurrent: false,
buttons: {
showToday: true,
showClose: true
},
});

// datetimepicker で value が消えてしまうので更新
$('input.datetimepicker-input').each(function() {
$(this).val($(this).data('value'));
});
// datetimepicker で value が消えてしまうので更新
$('input.datetimepicker-input').each(function() {
$(this).val($(this).data('value'));
});

$('#bulkDelete').on('click', function() {
Expand Down