Skip to content

Commit

Permalink
WIP状態の日報を提出する際にエラーが発生した場合に関するシステムテストを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
unikounio committed May 9, 2024
1 parent cb43df0 commit 3771064
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/system/reports_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -735,4 +735,23 @@ def wait_for_watch_change
end
assert_equal '.file-input', find('textarea.a-text-input')['data-input']
end

test 'submit wip report with error' do
report = reports(:report9)
visit_with_auth "/reports/#{report.id}", 'sotugyou'

click_link '内容修正'
uncheck '学習時間は無し', allow_label_click: true
click_link '学習時間追加'

first('.learning-time').all('.learning-time__started-at select')[0].select('07')
first('.learning-time').all('.learning-time__started-at select')[1].select('30')
first('.learning-time').all('.learning-time__finished-at select')[0].select('07')
first('.learning-time').all('.learning-time__finished-at select')[1].select('30')

click_button '提出'
assert_text '学習時間は不正な値です'
assert_no_text 'この日報はすでに提出済みです。'
assert_button '提出'
end
end

0 comments on commit 3771064

Please sign in to comment.