add variants to all mock products and fix CSSCache race condition
All 16 mock products now have at least one variant so add-to-cart works in demo mode. CSSCache.invalidate/0 rescues ArgumentError when the ETS table doesn't exist yet (seed_defaults runs before CSSCache starts). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -103,11 +103,11 @@ defmodule SimpleshopThemeWeb.ShopLive.ProductShowTest do
|
||||
assert html =~ "disabled"
|
||||
end
|
||||
|
||||
test "shows 'One size' for products without options", %{conn: conn} do
|
||||
# Product "2" (Ocean Waves Art Print) has no option_types
|
||||
test "shows single variant for products with one option", %{conn: conn} do
|
||||
# Product "2" (Ocean Waves Art Print) has a single size variant
|
||||
{:ok, _view, html} = live(conn, ~p"/products/2")
|
||||
|
||||
assert html =~ "One size"
|
||||
assert html =~ "12×18"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user