From 75d088b472642bcf70605a371fcdb30ee38d4d55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baza=CC=81n?= Date: Tue, 14 Feb 2017 15:01:04 +0100 Subject: [PATCH] fixes specs --- spec/features/admin/poll/polls_spec.rb | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/spec/features/admin/poll/polls_spec.rb b/spec/features/admin/poll/polls_spec.rb index 3875ade17..ebe21b335 100644 --- a/spec/features/admin/poll/polls_spec.rb +++ b/spec/features/admin/poll/polls_spec.rb @@ -175,8 +175,7 @@ feature 'Admin polls' do visit admin_poll_path(poll) - click_link "Questions (1)" - + expect(page).to have_content "Questions (1)" expect(page).to have_content question.title expect(page).to_not have_content other_question.title expect(page).to_not have_content "There are no questions assigned to this poll" @@ -187,10 +186,8 @@ feature 'Admin polls' do question = create(:poll_question, poll: nil, title: 'Should we rebuild the city?') visit admin_poll_path(poll) - within('#poll-resources') do - click_link 'Questions (0)' - end + expect(page).to have_content 'Questions (0)' expect(page).to have_content 'There are no questions assigned to this poll' fill_in 'search-questions', with: 'rebuild' @@ -203,10 +200,8 @@ feature 'Admin polls' do expect(page).to have_content 'Question added to this poll' visit admin_poll_path(poll) - within('#poll-resources') do - click_link 'Questions (1)' - end + expect(page).to have_content 'Questions (1)' expect(page).to_not have_content 'There are no questions assigned to this poll' expect(page).to have_content question.title end @@ -216,10 +211,8 @@ feature 'Admin polls' do question = create(:poll_question, poll: poll) visit admin_poll_path(poll) - within('#poll-resources') do - click_link 'Questions (1)' - end + expect(page).to have_content 'Questions (1)' expect(page).to_not have_content 'There are no questions assigned to this poll' expect(page).to have_content question.title @@ -230,10 +223,8 @@ feature 'Admin polls' do expect(page).to have_content 'Question removed from this poll' visit admin_poll_path(poll) - within('#poll-resources') do - click_link 'Questions (0)' - end + expect(page).to have_content 'Questions (0)' expect(page).to have_content 'There are no questions assigned to this poll' expect(page).to_not have_content question.title end