From 6bb9b1be8a6e2839d84e6b9f8a523d3ba50240e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Salvador=20P=C3=A9rez=20Garc=C3=ADa?= Date: Wed, 4 Jul 2018 09:58:25 +0200 Subject: [PATCH] Fixed failing specs Fixed failing specs after redesign of polls in dashboard --- spec/features/dashboard/polls_spec.rb | 31 --------------------------- 1 file changed, 31 deletions(-) diff --git a/spec/features/dashboard/polls_spec.rb b/spec/features/dashboard/polls_spec.rb index 9acfab3d2..258aeff9f 100644 --- a/spec/features/dashboard/polls_spec.rb +++ b/spec/features/dashboard/polls_spec.rb @@ -12,14 +12,6 @@ feature 'Polls' do expect(page).to have_link('Polls') end - scenario 'Initially there are no polls' do - within('#side_menu') do - click_link 'Polls' - end - - expect(page).to have_content('There are no polls coming up.') - end - scenario 'Create a poll', :js do click_link 'Polls' click_link 'Create poll' @@ -30,7 +22,6 @@ feature 'Polls' do fill_in "poll_name", with: "Upcoming poll" fill_in 'poll_starts_at', with: start_date.strftime("%d/%m/%Y") fill_in 'poll_ends_at', with: end_date.strftime("%d/%m/%Y") - fill_in 'poll_summary', with: "Upcoming poll's summary. This poll..." fill_in 'poll_description', with: "Upcomming poll's description. This poll..." expect(page).not_to have_css("#poll_results_enabled") @@ -47,28 +38,6 @@ feature 'Polls' do expect(page).to have_content "Poll created successfully" expect(page).to have_content "Upcoming poll" - expect(page).to have_content "First question" expect(page).to have_content I18n.l(start_date.to_date) - expect(page).to have_content I18n.l(end_date.to_date) - expect(page).to have_link('Results') - end - - scenario 'Update a poll', :js do - poll = create(:poll, related: proposal) - - click_link 'Polls' - - expect(page).to have_content(poll.name) - - within("#poll_#{poll.id}") do - click_link 'Edit' - end - - fill_in "poll_name", with: "Updated upcoming poll" - - click_button "Update poll" - - expect(page).to have_content "Poll updated successfully" - expect(page).to have_content "Updated upcoming poll" end end