Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fixed flaky spec

Damian Legawiecdff7c9038529
diff --git a/frontend/spec/features/locale_spec.rb b/frontend/spec/features/locale_spec.rb
index 6be6f1d337..0158e049df 100644
--- a/frontend/spec/features/locale_spec.rb
+++ b/frontend/spec/features/locale_spec.rb
@@ -45,10 +45,11 @@ describe 'setting locale', type: :feature, js: true do
end
shared_examples 'generates proper URLs' do
- it 'has localized links' do
+ it 'has localized links', retry: 3 do
expect(page).to have_link(store.name, href: '/fr')
- expect(page).to have_selector('#link-to-cart a[href="/fr/cart"]')
expect(page).to have_link('Femmes', href: '/fr/t/women')
+ wait_for_ajax
+ expect(page).to have_selector('#link-to-cart a[href="/fr/cart"]')
end
end