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 test

Damian Legawiec94cb019b5195
diff --git a/admin/spec/features/spree/admin/settings/store_spec.rb b/admin/spec/features/spree/admin/settings/store_spec.rb
index d35b299b14..10483a7868 100644
--- a/admin/spec/features/spree/admin/settings/store_spec.rb
+++ b/admin/spec/features/spree/admin/settings/store_spec.rb
@@ -28,12 +28,12 @@ describe 'Store admin', type: :feature, js: true do
visit spree.edit_admin_store_path(section: 'general-settings')
page.fill_in 'store_name', with: '', wait: 5
page.fill_in 'store_name', with: 'New Store Name', wait: 5
- click_button 'Update'
+ within('#page-header') { click_button 'Update' }
expect(page).to have_content('successfully updated')
# tom_select 'EUR', from: 'Currency'
- # click_button 'Update'
+ # within('#page-header') { click_button 'Update' }
wait_for_turbo
@@ -59,7 +59,7 @@ describe 'Store admin', type: :feature, js: true do
)
select 'Imperial system', from: 'store_preferred_unit_system'
- click_button 'Update'
+ within('#page-header') { click_button 'Update' }
expect(page).to have_content('successfully updated')