mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
use find instead of click_link because <a> element no longer has href attribute
- click_link only looks for <a> element with href attribute - Use a regexp for a case-insensitive search (as CSS use a uppercase transform)
This commit is contained in:
@@ -39,7 +39,7 @@ feature "Credit Cards", js: true do
|
||||
it "passes the smoke test" do
|
||||
visit "/account"
|
||||
|
||||
click_link I18n.t('spree.users.show.tabs.cards')
|
||||
find("a", :text => %r{#{I18n.t('spree.users.show.tabs.cards')}}i).click
|
||||
|
||||
expect(page).to have_content I18n.t(:saved_cards)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ feature "Account Settings", js: true do
|
||||
setup_email
|
||||
login_as user
|
||||
visit "/account"
|
||||
click_link I18n.t('spree.users.show.tabs.settings')
|
||||
find("a", :text => %r{#{I18n.t('spree.users.show.tabs.settings')}}i).click
|
||||
expect(page).to have_content I18n.t('spree.users.form.account_settings')
|
||||
end
|
||||
|
||||
@@ -37,7 +37,7 @@ feature "Account Settings", js: true do
|
||||
user.reload
|
||||
expect(user.email).to eq 'old@email.com'
|
||||
expect(user.unconfirmed_email).to eq 'new@email.com'
|
||||
click_link I18n.t('spree.users.show.tabs.settings')
|
||||
find("a", :text => %r{#{I18n.t('spree.users.show.tabs.settings')}}i).click
|
||||
expect(page).to have_content I18n.t('spree.users.show.unconfirmed_email',
|
||||
unconfirmed_email: 'new@email.com')
|
||||
end
|
||||
|
||||
@@ -54,7 +54,7 @@ feature '
|
||||
href: "#{distributor_credit.permalink}/shop", count: 1)
|
||||
|
||||
# Viewing transaction history
|
||||
click_link I18n.t('spree.users.show.tabs.transactions')
|
||||
find("a", :text => %r{#{I18n.t('spree.users.show.tabs.transactions')}}i).click
|
||||
|
||||
# It shows all hubs that have been ordered from with balance or credit
|
||||
expect(page).to have_content distributor1.name
|
||||
|
||||
Reference in New Issue
Block a user