From 91e14f22e813b8e9c82b8dafedf81551dfb96e0d Mon Sep 17 00:00:00 2001 From: Bertocq Date: Fri, 15 Dec 2017 16:39:33 +0100 Subject: [PATCH] Update milestone feature specs to reflect default title value changes --- .../admin/budget_investment_milestones_spec.rb | 10 +++------- spec/features/budgets/investments_spec.rb | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/spec/features/admin/budget_investment_milestones_spec.rb b/spec/features/admin/budget_investment_milestones_spec.rb index 0b198f6ab..f3de2157e 100644 --- a/spec/features/admin/budget_investment_milestones_spec.rb +++ b/spec/features/admin/budget_investment_milestones_spec.rb @@ -39,15 +39,13 @@ feature 'Admin budget investment milestones' do click_link 'Create new milestone' - fill_in 'budget_investment_milestone_title', with: 'New title milestone' fill_in 'budget_investment_milestone_description', with: 'New description milestone' - fill_in 'budget_investment_milestone_publication_date', with: Time.zone.today.to_date + fill_in 'budget_investment_milestone_publication_date', with: Time.zone.today click_button 'Create milestone' - expect(page).to have_content 'New title milestone' expect(page).to have_content 'New description milestone' - expect(page).to have_content Time.zone.today.to_date + expect(page).to have_content Time.zone.today end scenario "Show validation errors on milestone form" do @@ -60,7 +58,7 @@ feature 'Admin budget investment milestones' do click_button 'Create milestone' within "#new_budget_investment_milestone" do - expect(page).to have_content "can't be blank", count: 2 + expect(page).to have_content "can't be blank", count: 1 expect(page).to have_content 'New description milestone' end end @@ -79,14 +77,12 @@ feature 'Admin budget investment milestones' do expect(page).to have_css("img[alt='#{milestone.image.title}']") - fill_in 'budget_investment_milestone_title', with: 'Changed title' fill_in 'budget_investment_milestone_description', with: 'Changed description' fill_in 'budget_investment_milestone_publication_date', with: Time.zone.today.to_date fill_in 'budget_investment_milestone_documents_attributes_0_title', with: 'New document title' click_button 'Update milestone' - expect(page).to have_content 'Changed title' expect(page).to have_content 'Changed description' expect(page).to have_content Time.zone.today.to_date expect(page).to have_link 'Show image' diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb index 98f7d8f5e..6f646ca53 100644 --- a/spec/features/budgets/investments_spec.rb +++ b/spec/features/budgets/investments_spec.rb @@ -515,7 +515,6 @@ feature 'Budget Investments' do find("#tab-milestones-label").trigger('click') within("#tab-milestones") do - expect(page).to have_content(milestone.title) expect(page).to have_content(milestone.description) expect(page).to have_content(Time.zone.today.to_date) expect(page.find("#image_#{milestone.id}")['alt']).to have_content image.title