Use the new goals route in funnel settings

pull/3310/head
Adam Rutkowski 3 years ago
parent a35b618786
commit 2a61b390a4

@ -67,7 +67,7 @@ defmodule PlausibleWeb.Live.FunnelSettings do
<PlausibleWeb.Components.Generic.notice class="mt-4" title="Not enough goals">
You need to define at least two goals to create a funnel. Go ahead and <%= link(
"add goals",
to: PlausibleWeb.Router.Helpers.site_path(@socket, :new_goal, @domain),
to: PlausibleWeb.Router.Helpers.site_path(@socket, :settings_goals, @domain),
class: "text-indigo-500 w-full text-center"
) %> to proceed.
</PlausibleWeb.Components.Generic.notice>

@ -51,12 +51,12 @@ defmodule PlausibleWeb.Live.FunnelSettingsTest do
doc = conn |> html_response(200)
assert Floki.text(doc) =~ "You need to define at least two goals to create a funnel."
add_goals_path = Routes.site_path(conn, :new_goal, site.domain)
add_goals_path = Routes.site_path(conn, :settings_goals, site.domain)
assert element_exists?(doc, ~s/a[href="#{add_goals_path}"]/)
end
end
describe "FunnelSettings component" do
describe "FunnelSettings live view" do
setup [:create_user, :log_in, :create_site]
test "allows to delete funnels", %{conn: conn, site: site} do

Loading…
Cancel
Save