Replace deprecated capybara only_path option for ignore_query

This commit is contained in:
Bertocq
2018-01-11 00:07:56 +01:00
parent 9a0eca73d7
commit 2f27a86034
6 changed files with 12 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ feature 'Account' do
click_link "My account"
expect(page).to have_current_path(account_path, only_path: true)
expect(page).to have_current_path(account_path, ignore_query: true)
expect(page).to have_selector("input[value='Manuela Colau']")
expect(page).to have_selector(avatar('Manuela Colau'), count: 1)
@@ -116,7 +116,7 @@ feature 'Account' do
click_link 'My account'
expect(page).to have_current_path(account_path, only_path: true)
expect(page).to have_current_path(account_path, ignore_query: true)
expect(page).to have_link('Change my credentials')
click_link 'Change my credentials'

View File

@@ -46,7 +46,7 @@ feature 'Admin officials' do
fill_in 'name_or_email', with: @citizen.email
click_button 'Search'
expect(page).to have_current_path(search_admin_officials_path, only_path: true)
expect(page).to have_current_path(search_admin_officials_path, ignore_query: true)
expect(page).not_to have_content @official.name
click_link @citizen.name
@@ -71,7 +71,7 @@ feature 'Admin officials' do
click_link "Remove 'Official' status"
expect(page).to have_content 'Details saved: the user is no longer an official'
expect(page).to have_current_path(admin_officials_path, only_path: true)
expect(page).to have_current_path(admin_officials_path, ignore_query: true)
expect(page).not_to have_content @citizen.name
expect(page).not_to have_content @official.name
end

View File

@@ -40,7 +40,7 @@ feature 'Admin::Organizations' do
fill_in "term", with: " "
click_button "Search"
expect(page).to have_current_path(search_admin_organizations_path, only_path: true)
expect(page).to have_current_path(search_admin_organizations_path, ignore_query: true)
within("#search-results") do
expect(page).not_to have_content("Get up, Stand up")
end
@@ -88,13 +88,13 @@ feature 'Admin::Organizations' do
visit admin_organizations_path
within("#organization_#{organization.id}") do
expect(page).to have_current_path(admin_organizations_path, only_path: true)
expect(page).to have_current_path(admin_organizations_path, ignore_query: true)
expect(page).to have_link('Verify')
expect(page).to have_link('Reject')
click_on 'Verify'
end
expect(page).to have_current_path(admin_organizations_path, only_path: true)
expect(page).to have_current_path(admin_organizations_path, ignore_query: true)
expect(page).to have_content 'Verified'
expect(organization.reload.verified?).to eq(true)
@@ -114,7 +114,7 @@ feature 'Admin::Organizations' do
click_on 'Reject'
end
expect(page).to have_current_path(admin_organizations_path, only_path: true)
expect(page).to have_current_path(admin_organizations_path, ignore_query: true)
expect(page).not_to have_content organization.name
click_on 'Rejected'
@@ -136,7 +136,7 @@ feature 'Admin::Organizations' do
click_on 'Verify'
end
expect(page).to have_current_path(admin_organizations_path, only_path: true)
expect(page).to have_current_path(admin_organizations_path, ignore_query: true)
expect(page).not_to have_content organization.name
click_on('Verified')

View File

@@ -58,7 +58,7 @@ feature 'Admin poll questions' do
visit proposals_path
click_link "Create question"
expect(page).to have_current_path(new_admin_question_path, only_path: true)
expect(page).to have_current_path(new_admin_question_path, ignore_query: true)
expect(page).to have_field('poll_question_title', with: proposal.title)
select 'Proposals', from: 'poll_question_poll_id'

View File

@@ -310,7 +310,7 @@ feature 'Ballots' do
click_link group.name
# No need to click on the heading name
expect(page).to have_content("Investment projects with scope: #{heading.name}")
expect(page).to have_current_path(budget_investments_path(budget), only_path: true)
expect(page).to have_current_path(budget_investments_path(budget), ignore_query: true)
end
scenario 'Displaying the correct group, heading, count & amount' do

View File

@@ -95,7 +95,7 @@ feature 'Proposals' do
fill_in "search", with: "what you got"
click_button "Search"
expect(page).to have_current_path(management_proposals_path, only_path: true)
expect(page).to have_current_path(management_proposals_path, ignore_query: true)
within(".proposals-list") do
expect(page).to have_css('.proposal', count: 1)