Fixed some failing specs

This commit is contained in:
Juan Salvador Pérez García
2018-06-28 17:30:55 +02:00
parent 59eb1a4f47
commit 084e9855e4
5 changed files with 20 additions and 8 deletions

View File

@@ -13,7 +13,10 @@ feature 'Polls' do
end
scenario 'Initially there are no polls' do
click_link 'Polls'
within('#side_menu') do
click_link 'Polls'
end
expect(page).to have_content('There are no polls coming up.')
end

View File

@@ -442,7 +442,9 @@ feature 'Proposals' do
expect(page.html).not_to include "<script>alert('hey')</script>"
click_link 'Dashboard'
click_link 'Edit'
within('#side_menu') do
click_link 'Edit'
end
expect(page).to have_current_path(edit_proposal_path(Proposal.last))
expect(page).not_to have_link('click me')
@@ -518,7 +520,10 @@ feature 'Proposals' do
click_link 'Dashboard'
end
click_link 'Retire'
within('#side_menu') do
click_link 'Retire'
end
expect(page).to have_current_path(retire_form_proposal_path(proposal))
select 'Duplicated', from: 'proposal_retired_reason'