Repository: phoenixframework/phoenix
Pull request #4956 (2022-09-21 04:50:29)

Update confirmation_live_test.exs
Small typo in the test.


Patch:
diff --git a/installer/templates/phx_single/mix.exs b/installer/templates/phx_single/mix.exs
index 3a26fdd43..549338c3a 100644
--- a/installer/templates/phx_single/mix.exs
+++ b/installer/templates/phx_single/mix.exs
@@ -47,7 +47,7 @@ defmodule <%= @app_module %>.MixProject do
       {:heroicons, github: "chrismccord/heroicons_elixir", branch: "cm-generate-module"},
       {:floki, ">= 0.30.0", only: :test},
       {:tailwind, "~> 0.1.8", runtime: Mix.env() == :dev},<% end %><%= if @dashboard do %>
-      {:phoenix_live_dashboard, "~> 0.6"},<% end %><%= if @assets do %>
+      {:phoenix_live_dashboard, "~> 0.7"},<% end %><%= if @assets do %>
       {:esbuild, "~> 0.5", runtime: Mix.env() == :dev},<% end %><%= if @mailer do %>
       {:swoosh, "~> 1.3"},<% end %>
       {:telemetry_metrics, "~> 0.6"},
diff --git a/installer/templates/phx_umbrella/apps/app_name_web/mix.exs b/installer/templates/phx_umbrella/apps/app_name_web/mix.exs
index cd9e56cce..5388c041a 100644
--- a/installer/templates/phx_umbrella/apps/app_name_web/mix.exs
+++ b/installer/templates/phx_umbrella/apps/app_name_web/mix.exs
@@ -45,7 +45,7 @@ defmodule <%= @web_namespace %>.MixProject do
       {:heroicons, github: "chrismccord/heroicons_elixir", branch: "cm-generate-module"},
       {:floki, ">= 0.30.0", only: :test},
       {:tailwind, "~> 0.1.8", runtime: Mix.env() == :dev},<% end %><%= if @dashboard do %>
-      {:phoenix_live_dashboard, "~> 0.6"},<% end %><%= if @assets do %>
+      {:phoenix_live_dashboard, "~> 0.7"},<% end %><%= if @assets do %>
       {:esbuild, "~> 0.5", runtime: Mix.env() == :dev},<% end %>
       {:telemetry_metrics, "~> 0.6"},
       {:telemetry_poller, "~> 1.0"},<%= if @gettext do %>
diff --git a/lib/mix/tasks/phx.gen.live.ex b/lib/mix/tasks/phx.gen.live.ex
index 96f512a01..839f142c8 100644
--- a/lib/mix/tasks/phx.gen.live.ex
+++ b/lib/mix/tasks/phx.gen.live.ex
@@ -229,8 +229,8 @@ defmodule Mix.Tasks.Phx.Gen.Live do
     unless Code.ensure_loaded?(Phoenix.LiveView.JS) do
       Mix.shell().info """
 
-      You must update :phoenix_live_view to v0.17 or later and
-      :phoenix_live_dashboard to v0.6 or later to use the features
+      You must update :phoenix_live_view to v0.18 or later and
+      :phoenix_live_dashboard to v0.7 or later to use the features
       in this generator.
       """
     end
diff --git a/priv/templates/phx.gen.live/components.ex b/priv/templates/phx.gen.live/components.ex
index 25ae560ff..25e7dca99 100644
--- a/priv/templates/phx.gen.live/components.ex
+++ b/priv/templates/phx.gen.live/components.ex
@@ -7,7 +7,7 @@ defmodule <%= @web_namespace %>.Components do
   customize the generated components in this module.
 
   Icons are provided by [heroicons](https://heroicons.com), using the
-  [heroicons_elixir](https://github.com/mveytsman/) project.
+  [heroicons_elixir](https://github.com/mveytsman/heroicons_elixir) project.
   """
   use Phoenix.Component
 
@@ -420,7 +420,7 @@ defmodule <%= @web_namespace %>.Components do
       <table class="mt-11 w-[40rem] sm:w-full">
         <thead class="text-left text-[0.8125rem] leading-6 text-zinc-500">
           <tr>
-            <th :for={col <- @col} class="p-0 pb-4 pr-6 font-normal"><%%= col.label %></th>
+            <th :for={col <- @col} class="p-0 pb-4 pr-6 font-normal"><%%= col[:label] %></th>
             <th class="relative p-0 pb-4"><span class="sr-only">Actions</span></th>
           </tr>
         </thead>
@@ -433,7 +433,7 @@ defmodule <%= @web_namespace %>.Components do
             <td
               :for={{col, i} <- Enum.with_index(@col)}
               phx-click={@row_click && @row_click.(row)}
-              class="relative p-0 hover:cursor-pointer"
+              class={["relative p-0", @row_click && "hover:cursor-pointer"]}
             >
               <div class="block py-4 pr-6">
                 <span class="absolute -inset-y-px right-0 -left-4 group-hover:bg-zinc-50 sm:rounded-l-xl" />


Test patch:
diff --git a/priv/templates/phx.gen.auth/confirmation_live_test.exs b/priv/templates/phx.gen.auth/confirmation_live_test.exs
index 5b5e83a9e..75b907e14 100644
--- a/priv/templates/phx.gen.auth/confirmation_live_test.exs
+++ b/priv/templates/phx.gen.auth/confirmation_live_test.exs
@@ -67,7 +67,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
       assert {:ok, conn} = result
       refute Phoenix.Flash.get(conn.assigns.flash, :error)
-    en
+    end
 
 
 
diff --git a/test/mix/tasks/phx.gen.live_test.exs b/test/mix/tasks/phx.gen.live_test.exs
index 72186aa95..284d8e4e3 100644
--- a/test/mix/tasks/phx.gen.live_test.exs
+++ b/test/mix/tasks/phx.gen.live_test.exs
@@ -166,8 +166,8 @@ defmodule Mix.Tasks.Phx.Gen.LiveTest do
 
       assert_receive({:mix_shell, :info, ["""
 
-      You must update :phoenix_live_view to v0.17 or later and
-      :phoenix_live_dashboard to v0.6 or later to use the features
+      You must update :phoenix_live_view to v0.18 or later and
+      :phoenix_live_dashboard to v0.7 or later to use the features
       in this generator.
       """]})
     end