From f7d5217ef683fe383da41d03edf3ff24bfae1b0f Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 27 Jul 2023 09:40:08 +1000 Subject: [PATCH] Compile JS before testing caching That avoids flakiness. --- spec/system/consumer/caching/shops_caching_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/system/consumer/caching/shops_caching_spec.rb b/spec/system/consumer/caching/shops_caching_spec.rb index 35261ee46c..75607f8200 100644 --- a/spec/system/consumer/caching/shops_caching_spec.rb +++ b/spec/system/consumer/caching/shops_caching_spec.rb @@ -14,9 +14,12 @@ describe "Shops caching", caching: true do } describe "caching enterprises AMS data" do - xit "caches data for all enterprises, with the provided options" do - pending "#11010" + it "caches data for all enterprises, with the provided options" do + # Trigger lengthy tasks like JS compilation before testing caching: + visit shops_path + Rails.cache.clear + # Now run the test, hopefully in a timely manner: visit shops_path key, options = CacheService::FragmentCaching.ams_shops