Skip to content

Commit

Permalink
システムテストの日報作成日付を過去の基準日前に変更、モデルバリデーションからHTMLバリデーションのチェックに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
ayu-0505 committed Nov 8, 2024
1 parent 6bbefbf commit f346c57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/system/reports_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,12 @@ def wait_for_watch_change
within('form[name=report]') do
fill_in('report[title]', with: '学習日が2013年1月1日より前では日報を作成できない')
fill_in('report[description]', with: 'エラーになる')
fill_in('report[reported_on]', with: Date.new(2013, 1, 1))
fill_in('report[reported_on]', with: Date.new(2012, 12, 31))
end
click_button '提出'
assert_text '学習日は2013年01月01日から今日以前の間の日付にしてください'
html_validataion_message = page.find('#report_reported_on').native.attribute('validationMessage')
assert_not_nil html_validataion_message
assert_not_empty html_validataion_message
end

test 'display recently reports' do
Expand Down

0 comments on commit f346c57

Please sign in to comment.