From deea04885f0733558314c09d27178daee172ce4d Mon Sep 17 00:00:00 2001 From: jamey Date: Thu, 12 Feb 2026 00:16:32 +0000 Subject: [PATCH] restructure LiveView directories: admin/, shop/, auth/ Consolidates admin_live/, theme_live/, provider_live/ into admin/ (with theme/ and providers/ subdirs). Renames shop_live/ to shop/ and user_live/ to auth/. Updates all module names, router refs, test files, CSS source paths, and dialyzer ignore. Co-Authored-By: Claude Opus 4.6 --- .dialyzer_ignore.exs | 2 +- assets/css/app-shop.css | 2 +- .../live/{admin_live => admin}/order_show.ex | 2 +- .../live/{admin_live => admin}/orders.ex | 2 +- .../providers}/form.ex | 2 +- .../providers}/form.html.heex | 0 .../providers}/index.ex | 2 +- .../providers}/index.html.heex | 0 .../live/{admin_live => admin}/settings.ex | 2 +- .../live/{theme_live => admin/theme}/index.ex | 2 +- .../theme}/index.html.heex | 0 .../live/{user_live => auth}/confirmation.ex | 2 +- .../live/{user_live => auth}/login.ex | 2 +- .../live/{user_live => auth}/registration.ex | 2 +- .../live/{user_live => auth}/settings.ex | 2 +- .../live/{shop_live => shop}/cart.ex | 2 +- .../{shop_live => shop}/checkout_success.ex | 2 +- .../live/{shop_live => shop}/collection.ex | 2 +- .../live/{shop_live => shop}/coming_soon.ex | 2 +- .../live/{shop_live => shop}/contact.ex | 2 +- .../live/{shop_live => shop}/content.ex | 2 +- .../live/{shop_live => shop}/home.ex | 2 +- .../live/{shop_live => shop}/product_show.ex | 2 +- .../live/theme_live/preview_pages.ex | 0 lib/simpleshop_theme_web/router.ex | 46 +++++++++---------- .../{admin_live => admin}/orders_test.exs | 2 +- .../{admin_live => admin}/settings_test.exs | 2 +- .../theme_test.exs} | 2 +- .../{user_live => auth}/confirmation_test.exs | 2 +- .../live/{user_live => auth}/login_test.exs | 2 +- .../{user_live => auth}/registration_test.exs | 2 +- .../{user_live => auth}/settings_test.exs | 2 +- .../live/{shop_live => shop}/cart_test.exs | 2 +- .../{shop_live => shop}/collection_test.exs | 2 +- .../{shop_live => shop}/coming_soon_test.exs | 2 +- .../live/{shop_live => shop}/content_test.exs | 2 +- .../live/{shop_live => shop}/home_test.exs | 2 +- .../{shop_live => shop}/product_show_test.exs | 2 +- 38 files changed, 56 insertions(+), 56 deletions(-) rename lib/simpleshop_theme_web/live/{admin_live => admin}/order_show.ex (99%) rename lib/simpleshop_theme_web/live/{admin_live => admin}/orders.ex (99%) rename lib/simpleshop_theme_web/live/{provider_live => admin/providers}/form.ex (98%) rename lib/simpleshop_theme_web/live/{provider_live => admin/providers}/form.html.heex (100%) rename lib/simpleshop_theme_web/live/{provider_live => admin/providers}/index.ex (98%) rename lib/simpleshop_theme_web/live/{provider_live => admin/providers}/index.html.heex (100%) rename lib/simpleshop_theme_web/live/{admin_live => admin}/settings.ex (99%) rename lib/simpleshop_theme_web/live/{theme_live => admin/theme}/index.ex (99%) rename lib/simpleshop_theme_web/live/{theme_live => admin/theme}/index.html.heex (100%) rename lib/simpleshop_theme_web/live/{user_live => auth}/confirmation.ex (98%) rename lib/simpleshop_theme_web/live/{user_live => auth}/login.ex (98%) rename lib/simpleshop_theme_web/live/{user_live => auth}/registration.ex (98%) rename lib/simpleshop_theme_web/live/{user_live => auth}/settings.ex (98%) rename lib/simpleshop_theme_web/live/{shop_live => shop}/cart.ex (89%) rename lib/simpleshop_theme_web/live/{shop_live => shop}/checkout_success.ex (95%) rename lib/simpleshop_theme_web/live/{shop_live => shop}/collection.ex (99%) rename lib/simpleshop_theme_web/live/{shop_live => shop}/coming_soon.ex (91%) rename lib/simpleshop_theme_web/live/{shop_live => shop}/contact.ex (84%) rename lib/simpleshop_theme_web/live/{shop_live => shop}/content.ex (97%) rename lib/simpleshop_theme_web/live/{shop_live => shop}/home.ex (91%) rename lib/simpleshop_theme_web/live/{shop_live => shop}/product_show.ex (99%) delete mode 100644 lib/simpleshop_theme_web/live/theme_live/preview_pages.ex rename test/simpleshop_theme_web/live/{admin_live => admin}/orders_test.exs (99%) rename test/simpleshop_theme_web/live/{admin_live => admin}/settings_test.exs (98%) rename test/simpleshop_theme_web/live/{theme_live_test.exs => admin/theme_test.exs} (99%) rename test/simpleshop_theme_web/live/{user_live => auth}/confirmation_test.exs (98%) rename test/simpleshop_theme_web/live/{user_live => auth}/login_test.exs (98%) rename test/simpleshop_theme_web/live/{user_live => auth}/registration_test.exs (97%) rename test/simpleshop_theme_web/live/{user_live => auth}/settings_test.exs (99%) rename test/simpleshop_theme_web/live/{shop_live => shop}/cart_test.exs (98%) rename test/simpleshop_theme_web/live/{shop_live => shop}/collection_test.exs (98%) rename test/simpleshop_theme_web/live/{shop_live => shop}/coming_soon_test.exs (97%) rename test/simpleshop_theme_web/live/{shop_live => shop}/content_test.exs (97%) rename test/simpleshop_theme_web/live/{shop_live => shop}/home_test.exs (97%) rename test/simpleshop_theme_web/live/{shop_live => shop}/product_show_test.exs (99%) diff --git a/.dialyzer_ignore.exs b/.dialyzer_ignore.exs index 6d301fb..ea89234 100644 --- a/.dialyzer_ignore.exs +++ b/.dialyzer_ignore.exs @@ -19,7 +19,7 @@ {"lib/simpleshop_theme_web/controllers/checkout_controller.ex", :no_return}, # Environment-dependent: localhost?() is always true in dev - {"lib/simpleshop_theme_web/live/admin_live/settings.ex", :pattern_match}, + {"lib/simpleshop_theme_web/live/admin/settings.ex", :pattern_match}, # Provider behaviour type not derived by dialyzer {"lib/simpleshop_theme/providers/provider.ex", :unknown_type}, diff --git a/assets/css/app-shop.css b/assets/css/app-shop.css index 4e64692..7fa646c 100644 --- a/assets/css/app-shop.css +++ b/assets/css/app-shop.css @@ -7,7 +7,7 @@ @source "../css"; @source "../js"; /* Only scan shop-specific files, not admin pages */ -@source "../../lib/simpleshop_theme_web/live/shop_live"; +@source "../../lib/simpleshop_theme_web/live/shop"; @source "../../lib/simpleshop_theme_web/components/shop_components.ex"; @source "../../lib/simpleshop_theme_web/components/shop_components"; @source "../../lib/simpleshop_theme_web/components/page_templates"; diff --git a/lib/simpleshop_theme_web/live/admin_live/order_show.ex b/lib/simpleshop_theme_web/live/admin/order_show.ex similarity index 99% rename from lib/simpleshop_theme_web/live/admin_live/order_show.ex rename to lib/simpleshop_theme_web/live/admin/order_show.ex index b4fafdd..02b9d9d 100644 --- a/lib/simpleshop_theme_web/live/admin_live/order_show.ex +++ b/lib/simpleshop_theme_web/live/admin/order_show.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.AdminLive.OrderShow do +defmodule SimpleshopThemeWeb.Admin.OrderShow do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Orders diff --git a/lib/simpleshop_theme_web/live/admin_live/orders.ex b/lib/simpleshop_theme_web/live/admin/orders.ex similarity index 99% rename from lib/simpleshop_theme_web/live/admin_live/orders.ex rename to lib/simpleshop_theme_web/live/admin/orders.ex index 0d0c6e7..abccb11 100644 --- a/lib/simpleshop_theme_web/live/admin_live/orders.ex +++ b/lib/simpleshop_theme_web/live/admin/orders.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.AdminLive.Orders do +defmodule SimpleshopThemeWeb.Admin.Orders do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Orders diff --git a/lib/simpleshop_theme_web/live/provider_live/form.ex b/lib/simpleshop_theme_web/live/admin/providers/form.ex similarity index 98% rename from lib/simpleshop_theme_web/live/provider_live/form.ex rename to lib/simpleshop_theme_web/live/admin/providers/form.ex index 0df2f9a..1ed922b 100644 --- a/lib/simpleshop_theme_web/live/provider_live/form.ex +++ b/lib/simpleshop_theme_web/live/admin/providers/form.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ProviderLive.Form do +defmodule SimpleshopThemeWeb.Admin.Providers.Form do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Products diff --git a/lib/simpleshop_theme_web/live/provider_live/form.html.heex b/lib/simpleshop_theme_web/live/admin/providers/form.html.heex similarity index 100% rename from lib/simpleshop_theme_web/live/provider_live/form.html.heex rename to lib/simpleshop_theme_web/live/admin/providers/form.html.heex diff --git a/lib/simpleshop_theme_web/live/provider_live/index.ex b/lib/simpleshop_theme_web/live/admin/providers/index.ex similarity index 98% rename from lib/simpleshop_theme_web/live/provider_live/index.ex rename to lib/simpleshop_theme_web/live/admin/providers/index.ex index ba4aaa3..37ee029 100644 --- a/lib/simpleshop_theme_web/live/provider_live/index.ex +++ b/lib/simpleshop_theme_web/live/admin/providers/index.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ProviderLive.Index do +defmodule SimpleshopThemeWeb.Admin.Providers.Index do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Products diff --git a/lib/simpleshop_theme_web/live/provider_live/index.html.heex b/lib/simpleshop_theme_web/live/admin/providers/index.html.heex similarity index 100% rename from lib/simpleshop_theme_web/live/provider_live/index.html.heex rename to lib/simpleshop_theme_web/live/admin/providers/index.html.heex diff --git a/lib/simpleshop_theme_web/live/admin_live/settings.ex b/lib/simpleshop_theme_web/live/admin/settings.ex similarity index 99% rename from lib/simpleshop_theme_web/live/admin_live/settings.ex rename to lib/simpleshop_theme_web/live/admin/settings.ex index 32b222e..f4c88fb 100644 --- a/lib/simpleshop_theme_web/live/admin_live/settings.ex +++ b/lib/simpleshop_theme_web/live/admin/settings.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.AdminLive.Settings do +defmodule SimpleshopThemeWeb.Admin.Settings do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Settings diff --git a/lib/simpleshop_theme_web/live/theme_live/index.ex b/lib/simpleshop_theme_web/live/admin/theme/index.ex similarity index 99% rename from lib/simpleshop_theme_web/live/theme_live/index.ex rename to lib/simpleshop_theme_web/live/admin/theme/index.ex index df9f8a2..579a122 100644 --- a/lib/simpleshop_theme_web/live/theme_live/index.ex +++ b/lib/simpleshop_theme_web/live/admin/theme/index.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ThemeLive.Index do +defmodule SimpleshopThemeWeb.Admin.Theme.Index do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Settings diff --git a/lib/simpleshop_theme_web/live/theme_live/index.html.heex b/lib/simpleshop_theme_web/live/admin/theme/index.html.heex similarity index 100% rename from lib/simpleshop_theme_web/live/theme_live/index.html.heex rename to lib/simpleshop_theme_web/live/admin/theme/index.html.heex diff --git a/lib/simpleshop_theme_web/live/user_live/confirmation.ex b/lib/simpleshop_theme_web/live/auth/confirmation.ex similarity index 98% rename from lib/simpleshop_theme_web/live/user_live/confirmation.ex rename to lib/simpleshop_theme_web/live/auth/confirmation.ex index 22ebdc2..3d3ae50 100644 --- a/lib/simpleshop_theme_web/live/user_live/confirmation.ex +++ b/lib/simpleshop_theme_web/live/auth/confirmation.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.UserLive.Confirmation do +defmodule SimpleshopThemeWeb.Auth.Confirmation do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Accounts diff --git a/lib/simpleshop_theme_web/live/user_live/login.ex b/lib/simpleshop_theme_web/live/auth/login.ex similarity index 98% rename from lib/simpleshop_theme_web/live/user_live/login.ex rename to lib/simpleshop_theme_web/live/auth/login.ex index 0126c3c..3e96b09 100644 --- a/lib/simpleshop_theme_web/live/user_live/login.ex +++ b/lib/simpleshop_theme_web/live/auth/login.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.UserLive.Login do +defmodule SimpleshopThemeWeb.Auth.Login do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Accounts diff --git a/lib/simpleshop_theme_web/live/user_live/registration.ex b/lib/simpleshop_theme_web/live/auth/registration.ex similarity index 98% rename from lib/simpleshop_theme_web/live/user_live/registration.ex rename to lib/simpleshop_theme_web/live/auth/registration.ex index 53c33f3..46eefa9 100644 --- a/lib/simpleshop_theme_web/live/user_live/registration.ex +++ b/lib/simpleshop_theme_web/live/auth/registration.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.UserLive.Registration do +defmodule SimpleshopThemeWeb.Auth.Registration do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Accounts diff --git a/lib/simpleshop_theme_web/live/user_live/settings.ex b/lib/simpleshop_theme_web/live/auth/settings.ex similarity index 98% rename from lib/simpleshop_theme_web/live/user_live/settings.ex rename to lib/simpleshop_theme_web/live/auth/settings.ex index d2441b9..8707aa7 100644 --- a/lib/simpleshop_theme_web/live/user_live/settings.ex +++ b/lib/simpleshop_theme_web/live/auth/settings.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.UserLive.Settings do +defmodule SimpleshopThemeWeb.Auth.Settings do use SimpleshopThemeWeb, :live_view on_mount {SimpleshopThemeWeb.UserAuth, :require_sudo_mode} diff --git a/lib/simpleshop_theme_web/live/shop_live/cart.ex b/lib/simpleshop_theme_web/live/shop/cart.ex similarity index 89% rename from lib/simpleshop_theme_web/live/shop_live/cart.ex rename to lib/simpleshop_theme_web/live/shop/cart.ex index 77e53ef..38bfa1a 100644 --- a/lib/simpleshop_theme_web/live/shop_live/cart.ex +++ b/lib/simpleshop_theme_web/live/shop/cart.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.Cart do +defmodule SimpleshopThemeWeb.Shop.Cart do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Cart diff --git a/lib/simpleshop_theme_web/live/shop_live/checkout_success.ex b/lib/simpleshop_theme_web/live/shop/checkout_success.ex similarity index 95% rename from lib/simpleshop_theme_web/live/shop_live/checkout_success.ex rename to lib/simpleshop_theme_web/live/shop/checkout_success.ex index 8b18c44..de17e47 100644 --- a/lib/simpleshop_theme_web/live/shop_live/checkout_success.ex +++ b/lib/simpleshop_theme_web/live/shop/checkout_success.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.CheckoutSuccess do +defmodule SimpleshopThemeWeb.Shop.CheckoutSuccess do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Orders diff --git a/lib/simpleshop_theme_web/live/shop_live/collection.ex b/lib/simpleshop_theme_web/live/shop/collection.ex similarity index 99% rename from lib/simpleshop_theme_web/live/shop_live/collection.ex rename to lib/simpleshop_theme_web/live/shop/collection.ex index 4367404..2e1c021 100644 --- a/lib/simpleshop_theme_web/live/shop_live/collection.ex +++ b/lib/simpleshop_theme_web/live/shop/collection.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.Collection do +defmodule SimpleshopThemeWeb.Shop.Collection do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Theme.PreviewData diff --git a/lib/simpleshop_theme_web/live/shop_live/coming_soon.ex b/lib/simpleshop_theme_web/live/shop/coming_soon.ex similarity index 91% rename from lib/simpleshop_theme_web/live/shop_live/coming_soon.ex rename to lib/simpleshop_theme_web/live/shop/coming_soon.ex index 51bb928..025e2fd 100644 --- a/lib/simpleshop_theme_web/live/shop_live/coming_soon.ex +++ b/lib/simpleshop_theme_web/live/shop/coming_soon.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.ComingSoon do +defmodule SimpleshopThemeWeb.Shop.ComingSoon do use SimpleshopThemeWeb, :live_view @impl true diff --git a/lib/simpleshop_theme_web/live/shop_live/contact.ex b/lib/simpleshop_theme_web/live/shop/contact.ex similarity index 84% rename from lib/simpleshop_theme_web/live/shop_live/contact.ex rename to lib/simpleshop_theme_web/live/shop/contact.ex index b150ce9..d2f4eea 100644 --- a/lib/simpleshop_theme_web/live/shop_live/contact.ex +++ b/lib/simpleshop_theme_web/live/shop/contact.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.Contact do +defmodule SimpleshopThemeWeb.Shop.Contact do use SimpleshopThemeWeb, :live_view @impl true diff --git a/lib/simpleshop_theme_web/live/shop_live/content.ex b/lib/simpleshop_theme_web/live/shop/content.ex similarity index 97% rename from lib/simpleshop_theme_web/live/shop_live/content.ex rename to lib/simpleshop_theme_web/live/shop/content.ex index 2e7b19a..04120f0 100644 --- a/lib/simpleshop_theme_web/live/shop_live/content.ex +++ b/lib/simpleshop_theme_web/live/shop/content.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.Content do +defmodule SimpleshopThemeWeb.Shop.Content do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Theme.PreviewData diff --git a/lib/simpleshop_theme_web/live/shop_live/home.ex b/lib/simpleshop_theme_web/live/shop/home.ex similarity index 91% rename from lib/simpleshop_theme_web/live/shop_live/home.ex rename to lib/simpleshop_theme_web/live/shop/home.ex index 972f6af..1381568 100644 --- a/lib/simpleshop_theme_web/live/shop_live/home.ex +++ b/lib/simpleshop_theme_web/live/shop/home.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.Home do +defmodule SimpleshopThemeWeb.Shop.Home do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Theme.PreviewData diff --git a/lib/simpleshop_theme_web/live/shop_live/product_show.ex b/lib/simpleshop_theme_web/live/shop/product_show.ex similarity index 99% rename from lib/simpleshop_theme_web/live/shop_live/product_show.ex rename to lib/simpleshop_theme_web/live/shop/product_show.ex index 43f27b1..b88bd6f 100644 --- a/lib/simpleshop_theme_web/live/shop_live/product_show.ex +++ b/lib/simpleshop_theme_web/live/shop/product_show.ex @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.ProductShow do +defmodule SimpleshopThemeWeb.Shop.ProductShow do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Cart diff --git a/lib/simpleshop_theme_web/live/theme_live/preview_pages.ex b/lib/simpleshop_theme_web/live/theme_live/preview_pages.ex deleted file mode 100644 index e69de29..0000000 diff --git a/lib/simpleshop_theme_web/router.ex b/lib/simpleshop_theme_web/router.ex index defe6aa..396364a 100644 --- a/lib/simpleshop_theme_web/router.ex +++ b/lib/simpleshop_theme_web/router.ex @@ -37,7 +37,7 @@ defmodule SimpleshopThemeWeb.Router do on_mount: [ {SimpleshopThemeWeb.ThemeHook, :mount_theme} ] do - live "/coming-soon", ShopLive.ComingSoon, :index + live "/coming-soon", Shop.ComingSoon, :index end live_session :public_shop, @@ -47,16 +47,16 @@ defmodule SimpleshopThemeWeb.Router do {SimpleshopThemeWeb.ThemeHook, :require_site_live}, {SimpleshopThemeWeb.CartHook, :mount_cart} ] do - live "/", ShopLive.Home, :index - live "/about", ShopLive.Content, :about - live "/delivery", ShopLive.Content, :delivery - live "/privacy", ShopLive.Content, :privacy - live "/terms", ShopLive.Content, :terms - live "/contact", ShopLive.Contact, :index - live "/collections/:slug", ShopLive.Collection, :show - live "/products/:id", ShopLive.ProductShow, :show - live "/cart", ShopLive.Cart, :index - live "/checkout/success", ShopLive.CheckoutSuccess, :show + live "/", Shop.Home, :index + live "/about", Shop.Content, :about + live "/delivery", Shop.Content, :delivery + live "/privacy", Shop.Content, :privacy + live "/terms", Shop.Content, :terms + live "/contact", Shop.Contact, :index + live "/collections/:slug", Shop.Collection, :show + live "/products/:id", Shop.ProductShow, :show + live "/cart", Shop.Cart, :index + live "/checkout/success", Shop.CheckoutSuccess, :show end # Checkout (POST — creates Stripe session and redirects) @@ -135,15 +135,15 @@ defmodule SimpleshopThemeWeb.Router do live_session :require_authenticated_user, on_mount: [{SimpleshopThemeWeb.UserAuth, :require_authenticated}] do - live "/users/settings", UserLive.Settings, :edit - live "/users/settings/confirm-email/:token", UserLive.Settings, :confirm_email - live "/admin/theme", ThemeLive.Index, :index - live "/admin/providers", ProviderLive.Index, :index - live "/admin/providers/new", ProviderLive.Form, :new - live "/admin/providers/:id/edit", ProviderLive.Form, :edit - live "/admin/orders", AdminLive.Orders, :index - live "/admin/orders/:id", AdminLive.OrderShow, :show - live "/admin/settings", AdminLive.Settings, :index + live "/users/settings", Auth.Settings, :edit + live "/users/settings/confirm-email/:token", Auth.Settings, :confirm_email + live "/admin/theme", Admin.Theme.Index, :index + live "/admin/providers", Admin.Providers.Index, :index + live "/admin/providers/new", Admin.Providers.Form, :new + live "/admin/providers/:id/edit", Admin.Providers.Form, :edit + live "/admin/orders", Admin.Orders, :index + live "/admin/orders/:id", Admin.OrderShow, :show + live "/admin/settings", Admin.Settings, :index end post "/users/update-password", UserSessionController, :update_password @@ -154,9 +154,9 @@ defmodule SimpleshopThemeWeb.Router do live_session :current_user, on_mount: [{SimpleshopThemeWeb.UserAuth, :mount_current_scope}] do - live "/users/register", UserLive.Registration, :new - live "/users/log-in", UserLive.Login, :new - live "/users/log-in/:token", UserLive.Confirmation, :new + live "/users/register", Auth.Registration, :new + live "/users/log-in", Auth.Login, :new + live "/users/log-in/:token", Auth.Confirmation, :new end post "/users/log-in", UserSessionController, :create diff --git a/test/simpleshop_theme_web/live/admin_live/orders_test.exs b/test/simpleshop_theme_web/live/admin/orders_test.exs similarity index 99% rename from test/simpleshop_theme_web/live/admin_live/orders_test.exs rename to test/simpleshop_theme_web/live/admin/orders_test.exs index bde4809..ce910b8 100644 --- a/test/simpleshop_theme_web/live/admin_live/orders_test.exs +++ b/test/simpleshop_theme_web/live/admin/orders_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.AdminLive.OrdersTest do +defmodule SimpleshopThemeWeb.Admin.OrdersTest do use SimpleshopThemeWeb.ConnCase, async: false import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/admin_live/settings_test.exs b/test/simpleshop_theme_web/live/admin/settings_test.exs similarity index 98% rename from test/simpleshop_theme_web/live/admin_live/settings_test.exs rename to test/simpleshop_theme_web/live/admin/settings_test.exs index fcb9877..20fdc48 100644 --- a/test/simpleshop_theme_web/live/admin_live/settings_test.exs +++ b/test/simpleshop_theme_web/live/admin/settings_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.AdminLive.SettingsTest do +defmodule SimpleshopThemeWeb.Admin.SettingsTest do use SimpleshopThemeWeb.ConnCase, async: false import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/theme_live_test.exs b/test/simpleshop_theme_web/live/admin/theme_test.exs similarity index 99% rename from test/simpleshop_theme_web/live/theme_live_test.exs rename to test/simpleshop_theme_web/live/admin/theme_test.exs index d86e7fe..4d5178c 100644 --- a/test/simpleshop_theme_web/live/theme_live_test.exs +++ b/test/simpleshop_theme_web/live/admin/theme_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ThemeLiveTest do +defmodule SimpleshopThemeWeb.Admin.ThemeTest do use SimpleshopThemeWeb.ConnCase, async: false import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/user_live/confirmation_test.exs b/test/simpleshop_theme_web/live/auth/confirmation_test.exs similarity index 98% rename from test/simpleshop_theme_web/live/user_live/confirmation_test.exs rename to test/simpleshop_theme_web/live/auth/confirmation_test.exs index 2294727..36c56a9 100644 --- a/test/simpleshop_theme_web/live/user_live/confirmation_test.exs +++ b/test/simpleshop_theme_web/live/auth/confirmation_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.UserLive.ConfirmationTest do +defmodule SimpleshopThemeWeb.Auth.ConfirmationTest do use SimpleshopThemeWeb.ConnCase import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/user_live/login_test.exs b/test/simpleshop_theme_web/live/auth/login_test.exs similarity index 98% rename from test/simpleshop_theme_web/live/user_live/login_test.exs rename to test/simpleshop_theme_web/live/auth/login_test.exs index 0a49988..ac9c82b 100644 --- a/test/simpleshop_theme_web/live/user_live/login_test.exs +++ b/test/simpleshop_theme_web/live/auth/login_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.UserLive.LoginTest do +defmodule SimpleshopThemeWeb.Auth.LoginTest do use SimpleshopThemeWeb.ConnCase import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/user_live/registration_test.exs b/test/simpleshop_theme_web/live/auth/registration_test.exs similarity index 97% rename from test/simpleshop_theme_web/live/user_live/registration_test.exs rename to test/simpleshop_theme_web/live/auth/registration_test.exs index 7226330..c7a56da 100644 --- a/test/simpleshop_theme_web/live/user_live/registration_test.exs +++ b/test/simpleshop_theme_web/live/auth/registration_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.UserLive.RegistrationTest do +defmodule SimpleshopThemeWeb.Auth.RegistrationTest do use SimpleshopThemeWeb.ConnCase import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/user_live/settings_test.exs b/test/simpleshop_theme_web/live/auth/settings_test.exs similarity index 99% rename from test/simpleshop_theme_web/live/user_live/settings_test.exs rename to test/simpleshop_theme_web/live/auth/settings_test.exs index 9a853d8..8b95950 100644 --- a/test/simpleshop_theme_web/live/user_live/settings_test.exs +++ b/test/simpleshop_theme_web/live/auth/settings_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.UserLive.SettingsTest do +defmodule SimpleshopThemeWeb.Auth.SettingsTest do use SimpleshopThemeWeb.ConnCase alias SimpleshopTheme.Accounts diff --git a/test/simpleshop_theme_web/live/shop_live/cart_test.exs b/test/simpleshop_theme_web/live/shop/cart_test.exs similarity index 98% rename from test/simpleshop_theme_web/live/shop_live/cart_test.exs rename to test/simpleshop_theme_web/live/shop/cart_test.exs index bfb02e2..6083b10 100644 --- a/test/simpleshop_theme_web/live/shop_live/cart_test.exs +++ b/test/simpleshop_theme_web/live/shop/cart_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.CartTest do +defmodule SimpleshopThemeWeb.Shop.CartTest do use SimpleshopThemeWeb.ConnCase, async: false import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/shop_live/collection_test.exs b/test/simpleshop_theme_web/live/shop/collection_test.exs similarity index 98% rename from test/simpleshop_theme_web/live/shop_live/collection_test.exs rename to test/simpleshop_theme_web/live/shop/collection_test.exs index 7cbb21a..ba0ed91 100644 --- a/test/simpleshop_theme_web/live/shop_live/collection_test.exs +++ b/test/simpleshop_theme_web/live/shop/collection_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.CollectionTest do +defmodule SimpleshopThemeWeb.Shop.CollectionTest do use SimpleshopThemeWeb.ConnCase, async: false import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/shop_live/coming_soon_test.exs b/test/simpleshop_theme_web/live/shop/coming_soon_test.exs similarity index 97% rename from test/simpleshop_theme_web/live/shop_live/coming_soon_test.exs rename to test/simpleshop_theme_web/live/shop/coming_soon_test.exs index 336e621..1191476 100644 --- a/test/simpleshop_theme_web/live/shop_live/coming_soon_test.exs +++ b/test/simpleshop_theme_web/live/shop/coming_soon_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.ComingSoonTest do +defmodule SimpleshopThemeWeb.Shop.ComingSoonTest do use SimpleshopThemeWeb.ConnCase, async: false import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/shop_live/content_test.exs b/test/simpleshop_theme_web/live/shop/content_test.exs similarity index 97% rename from test/simpleshop_theme_web/live/shop_live/content_test.exs rename to test/simpleshop_theme_web/live/shop/content_test.exs index 984a5fb..6410b2c 100644 --- a/test/simpleshop_theme_web/live/shop_live/content_test.exs +++ b/test/simpleshop_theme_web/live/shop/content_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.ContentTest do +defmodule SimpleshopThemeWeb.Shop.ContentTest do use SimpleshopThemeWeb.ConnCase, async: false import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/shop_live/home_test.exs b/test/simpleshop_theme_web/live/shop/home_test.exs similarity index 97% rename from test/simpleshop_theme_web/live/shop_live/home_test.exs rename to test/simpleshop_theme_web/live/shop/home_test.exs index 7ae6a2e..3ecc259 100644 --- a/test/simpleshop_theme_web/live/shop_live/home_test.exs +++ b/test/simpleshop_theme_web/live/shop/home_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.HomeTest do +defmodule SimpleshopThemeWeb.Shop.HomeTest do use SimpleshopThemeWeb.ConnCase, async: false import Phoenix.LiveViewTest diff --git a/test/simpleshop_theme_web/live/shop_live/product_show_test.exs b/test/simpleshop_theme_web/live/shop/product_show_test.exs similarity index 99% rename from test/simpleshop_theme_web/live/shop_live/product_show_test.exs rename to test/simpleshop_theme_web/live/shop/product_show_test.exs index 3b1aa9f..689b751 100644 --- a/test/simpleshop_theme_web/live/shop_live/product_show_test.exs +++ b/test/simpleshop_theme_web/live/shop/product_show_test.exs @@ -1,4 +1,4 @@ -defmodule SimpleshopThemeWeb.ShopLive.ProductShowTest do +defmodule SimpleshopThemeWeb.Shop.ProductShowTest do use SimpleshopThemeWeb.ConnCase, async: false import Phoenix.LiveViewTest