Skip to content

Commit

Permalink
Merge pull request #7179 from fjordllc/feature/report_learning_times_…
Browse files Browse the repository at this point in the history
…extension

学習時間が日付を跨いだ場合の表記を追加
  • Loading branch information
komagata authored Jan 16, 2024
2 parents 31c6781 + 7ae12a5 commit 711110b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/reports/_learning_times.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
ul.learning-times__items
- @report.learning_times.each do |learning_time|
li.learning-times__item
| #{l learning_time.started_at, format: :time_only}#{l learning_time.finished_at, format: :time_only}
| #{l learning_time.started_at, format: :time_only}#{'(翌日)' if learning_time.started_at.day < learning_time.finished_at.day}#{l learning_time.finished_at, format: :time_only}
4 changes: 2 additions & 2 deletions test/system/reports_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class ReportsTest < ApplicationSystemTestCase
within '.learning-times__total-time' do
assert_text '1時間', exact: true
end
assert_text '23:00 〜 00:00'
assert_text '23:00 〜 (翌日)00:00'

click_link '内容修正'

Expand Down Expand Up @@ -273,7 +273,7 @@ class ReportsTest < ApplicationSystemTestCase
click_button '提出'

assert_text "4時間\n"
assert_text '22:00 〜 00:00'
assert_text '22:00 〜 (翌日)00:00'
assert_text '00:30 〜 02:30'
end

Expand Down

0 comments on commit 711110b

Please sign in to comment.