From 1e1754db4b40fd9fdf1c0672a8d3488277bb975e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Mon, 10 Feb 2025 16:45:33 +1100 Subject: [PATCH 1/2] Hopefully fix flaky OC spec I couldn't reproduce this reliably but I found the loading of AngularJS components a bit slow sometimes. So this is just a guess. --- spec/system/admin/order_cycles/simple_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/system/admin/order_cycles/simple_spec.rb b/spec/system/admin/order_cycles/simple_spec.rb index e5bbf0c86a..dc26983144 100644 --- a/spec/system/admin/order_cycles/simple_spec.rb +++ b/spec/system/admin/order_cycles/simple_spec.rb @@ -459,6 +459,7 @@ RSpec.describe ' visit edit_admin_order_cycle_path(oc) click_link "Outgoing Products" + expect(page).to have_content "Managed distributor" within "tr.distributor-#{distributor_managed.id}" do page.find("td.products").click end From 5e1690f736d3d71bc725923973b1cca23ff3ac81 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Mon, 10 Feb 2025 16:49:11 +1100 Subject: [PATCH 2/2] Restore missed expectation A previous pull request re-wrote this spec but omitted the main expectation of this spec block. * https://github.com/openfoodfoundation/openfoodnetwork/pull/11852/files --- spec/system/admin/order_cycles/simple_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/system/admin/order_cycles/simple_spec.rb b/spec/system/admin/order_cycles/simple_spec.rb index dc26983144..6fef56e540 100644 --- a/spec/system/admin/order_cycles/simple_spec.rb +++ b/spec/system/admin/order_cycles/simple_spec.rb @@ -488,6 +488,7 @@ RSpec.describe ' expect(page).to have_content v1.product.name expect(page).not_to have_content "No variant available for this product" + expect(page).to have_content "(Some variants might be hidden via inventory settings)" end end