From 89a3da1edf97f6b3456e5508f94409247ed0ef62 Mon Sep 17 00:00:00 2001 From: iagirre Date: Tue, 3 Apr 2018 10:03:57 +0200 Subject: [PATCH] Specs modified to fit the new UI Now, a page refresh isn't needed to see the updated information because it is done via AJAX. The spec has been updated to check that the message is being correctly updated without the refresh. --- spec/features/admin/budget_groups_spec.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spec/features/admin/budget_groups_spec.rb b/spec/features/admin/budget_groups_spec.rb index 664c4aeda..d69867b8c 100644 --- a/spec/features/admin/budget_groups_spec.rb +++ b/spec/features/admin/budget_groups_spec.rb @@ -49,7 +49,7 @@ feature 'Admin can change the groups name' do scenario "Defaults to 1 heading per group", :js do visit admin_budget_path(group.budget) - expect(page).to have_content('Maxium number of headings in which a user can vote 1 of 3') + expect(page).to have_content('Maximum number of headings in which a user can vote 1 of 3') within("#budget_group_#{group.id}") do click_link 'Edit group' @@ -68,8 +68,7 @@ feature 'Admin can change the groups name' do click_button 'Save group' end - visit admin_budget_path(group.budget) - expect(page).to have_content('Maxium number of headings in which a user can vote 2 of 3') + expect(page).to have_content('Maximum number of headings in which a user can vote 2 of 3') within("#budget_group_#{group.id}") do click_link 'Edit group' @@ -78,13 +77,13 @@ feature 'Admin can change the groups name' do end end - scenario "Do not display maxium votable headings' select in new form", :js do + scenario "Do not display maximum votable headings' select in new form", :js do visit admin_budget_path(group.budget) click_link 'Add new group' expect(page).to have_field('budget_group_name') - expect(page).to_not have_field('budget_group_max_votable_headings') + expect(page).not_to have_field('budget_group_max_votable_headings') end end