Skip to content

Commit

Permalink
テスト修正
Browse files Browse the repository at this point in the history
  • Loading branch information
motohiro-mm committed Oct 10, 2024
1 parent e24f3d5 commit d3e67c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion spec/support/login_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ def log_in_as(user)
})
end
visit root_path
click_on 'Googleでログイン'
click_on 'Googleでログイン', match: :first
end
end
16 changes: 8 additions & 8 deletions spec/system/meal_plans_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
visit new_meal_plan_path(meal_date: Time.zone.today)

within '#breakfast' do
fill_in '料理名', with: 'シリアル'
fill_in '料理', with: 'シリアル'
end
within '#lunch' do
fill_in '料理名', with: 'ハンバーガー'
fill_in '料理', with: 'ハンバーガー'
end
within '#dinner' do
fill_in '料理名', with: 'ステーキ'
fill_in '料理', with: 'ステーキ'
end
click_on '登録する'
click_on '登録'

expect(page).to have_content I18n.l(Time.zone.today, format: :long)
expect(page).to have_content 'シリアル'
Expand All @@ -36,10 +36,10 @@
it '献立を詳細表示する' do
visit meal_plans_path(start_date: meal_plan.meal_date)
within ".#{css_class_day(meal_plan.meal_date)}" do
click_on '詳細 >'
find('.right_caret').click
end

expect(page).to have_css 'h2', text: I18n.l(meal_plan.meal_date, format: :long)
expect(page).to have_css 'h1', text: I18n.l(meal_plan.meal_date, format: :long)
expect(page).to have_content meal_breakfast.name
expect(page).to have_content meal_lunch.name
expect(page).to have_content meal_dinner.name
Expand All @@ -50,9 +50,9 @@
click_on '編集'

within '#lunch' do
fill_in '料理名', with: 'EditName'
fill_in '料理', with: 'EditName'
end
click_on '更新する'
click_on '更新'

expect(page).to have_content 'EditName'
end
Expand Down

0 comments on commit d3e67c9

Please sign in to comment.