Ensure we test for the right text after AJAX loads filters

This commit is contained in:
Maikel Linke
2025-03-11 17:02:48 +11:00
parent 46b5fddf76
commit fc73d8cd4a

View File

@@ -83,8 +83,11 @@ RSpec.describe "Shops caching", caching: true do
it "caches rendered response for taxons and properties, with the provided options" do
visit enterprise_shop_path(distributor)
expect(page).to have_content "Cached Taxon"
expect(page).to have_content "Cached Property"
# Ensure we test for the right text after AJAX loads filters:
within(".sticky-shop-filters-container", text: "Filter by") do
expect(page).to have_content "Cached Taxon"
expect(page).to have_content "Cached Property"
end
expect_cached taxons_key, options
expect_cached properties_key, options