From 11281acd9ef0ee58f3b62d5869e2973c42747ddb Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Tue, 5 Sep 2023 10:42:16 +0200 Subject: [PATCH] Apply unified capitalization to buttons and titles --- assets/js/dashboard/datepicker.js | 57 ++++++++++--------- assets/js/dashboard/site-switcher.js | 4 +- lib/plausible_web/email.ex | 2 +- lib/plausible_web/live/funnel_settings.ex | 2 +- .../live/funnel_settings/form.ex | 17 +++--- lib/plausible_web/live/goal_settings/form.ex | 18 +++--- .../templates/layout/site_settings.html.eex | 2 +- .../templates/site/change_domain.html.eex | 6 +- .../templates/site/index.html.eex | 4 +- .../site/settings_danger_zone.html.eex | 8 +-- .../site/settings_email_reports.html.eex | 4 +- .../templates/site/settings_funnels.html.heex | 4 +- .../templates/site/settings_general.html.eex | 16 +++--- .../templates/site/settings_goals.html.heex | 4 +- .../site/settings_visibility.html.eex | 16 +++--- lib/plausible_web/views/layout_view.ex | 2 +- .../controllers/site_controller_test.exs | 6 +- .../live/funnel_settings_test.exs | 2 +- .../live/goal_settings/form_test.exs | 8 +-- .../plausible_web/live/goal_settings_test.exs | 4 +- test/workers/spike_notifier_test.exs | 6 +- 21 files changed, 98 insertions(+), 94 deletions(-) diff --git a/assets/js/dashboard/datepicker.js b/assets/js/dashboard/datepicker.js index e42c93e1565d..c473e6d8597c 100644 --- a/assets/js/dashboard/datepicker.js +++ b/assets/js/dashboard/datepicker.js @@ -101,7 +101,7 @@ function renderArrow(query, site, period, prevDate, nextDate) { ); } -function DatePickerArrows({site, query}) { +function DatePickerArrows({ site, query }) { if (query.period === "year") { const prevDate = formatISO(shiftMonths(query.date, -12)); const nextDate = formatISO(shiftMonths(query.date, 12)); @@ -122,7 +122,7 @@ function DatePickerArrows({site, query}) { return null } -function DisplayPeriod({query, site}) { +function DisplayPeriod({ query, site }) { if (query.period === "day") { if (isToday(site, query.date)) { return "Today"; @@ -154,7 +154,7 @@ function DisplayPeriod({query, site}) { return 'Realtime' } -function DatePicker({query, site, history}) { +function DatePicker({ query, site, history }) { const [open, setOpen] = useState(false) const [mode, setMode] = useState('menu') const dropDownNode = useRef(null) @@ -208,21 +208,21 @@ function DatePicker({query, site, history}) { setOpen(false); const keybindings = { - d: {date: false, period: 'day'}, - e: {date: formatISO(shiftDays(nowForSite(site), -1)), period: 'day'}, - r: {period: 'realtime'}, - w: {date: false, period: '7d'}, - m: {date: false, period: 'month'}, - y: {date: false, period: 'year'}, - t: {date: false, period: '30d'}, - s: {date: false, period: '6mo'}, - l: {date: false, period: '12mo'}, - a: {date: false, period: 'all'}, + d: { date: false, period: 'day' }, + e: { date: formatISO(shiftDays(nowForSite(site), -1)), period: 'day' }, + r: { period: 'realtime' }, + w: { date: false, period: '7d' }, + m: { date: false, period: 'month' }, + y: { date: false, period: 'year' }, + t: { date: false, period: '30d' }, + s: { date: false, period: '6mo' }, + l: { date: false, period: '12mo' }, + a: { date: false, period: 'all' }, } const redirect = keybindings[e.key.toLowerCase()] if (redirect) { - navigateToQuery(history, query, {...newSearch, ...redirect}) + navigateToQuery(history, query, { ...newSearch, ...redirect }) } else if (e.key.toLowerCase() === 'x') { toggleComparisons(history, query, site) } else if (e.key.toLowerCase() === 'c') { @@ -240,7 +240,7 @@ function DatePicker({query, site, history}) { }) useEffect(() => { - if (mode === 'calendar' && open) { + if (mode === 'calendar' && open) { openCalendar() } }, [mode]) @@ -260,9 +260,9 @@ function DatePicker({query, site, history}) { [from, to] = [parseNaiveDate(from), parseNaiveDate(to)] if (from.isSame(to)) { - navigateToQuery( history, query, { period: 'day', date: formatISO(from), from: false, to: false }) + navigateToQuery(history, query, { period: 'day', date: formatISO(from), from: false, to: false }) } else { - navigateToQuery( history, query, { period: 'custom', date: false, from: formatISO(from), to: formatISO(to) }) + navigateToQuery(history, query, { period: 'custom', date: false, from: formatISO(from), to: formatISO(to) }) } } @@ -305,10 +305,10 @@ function DatePicker({query, site, history}) { return ( setOpen(false)} query={query} - className={`${boldClass } px-4 py-2 text-sm leading-tight hover:bg-gray-100 hover:text-gray-900 + className={`${boldClass} px-4 py-2 text-sm leading-tight hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-900 dark:hover:text-gray-100 flex items-center justify-between`} > {text} @@ -333,12 +333,12 @@ function DatePicker({query, site, history}) { {renderLink("realtime", "Realtime")}
- {renderLink("7d", "Last 7 days")} - {renderLink("30d", "Last 30 days")} + {renderLink("7d", "Last 7 Days")} + {renderLink("30d", "Last 30 Days")}
- { renderLink('month', 'Month to Date') } - { renderLink('month', 'Last month', {date: lastMonth(site)}) } + {renderLink('month', 'Month to Date')} + {renderLink('month', 'Last Month', { date: lastMonth(site) })}
{renderLink("year", "Year to Date")} @@ -358,11 +358,11 @@ function DatePicker({query, site, history}) { aria-expanded="false" aria-controls="calendar" > - Custom range + Custom Range C
- { !COMPARISON_DISABLED_PERIODS.includes(query.period) && + {!COMPARISON_DISABLED_PERIODS.includes(query.period) &&
{ @@ -370,10 +370,10 @@ function DatePicker({query, site, history}) { setOpen(false) }} className="px-4 py-2 text-sm leading-tight hover:bg-gray-100 dark:hover:bg-gray-900 hover:text-gray-900 dark:hover:text-gray-100 cursor-pointer flex items-center justify-between"> - { isComparisonEnabled(query.comparison) ? 'Disable comparison' : 'Compare' } + {isComparisonEnabled(query.comparison) ? 'Disable comparison' : 'Compare'} X -
} + } ); @@ -388,7 +388,8 @@ function DatePicker({query, site, history}) { minDate: site.statsBegin, showMonths: 1, static: true, - animate: true}} + animate: true + }} ref={calendar} className="invisible" onClose={setCustomDate} diff --git a/assets/js/dashboard/site-switcher.js b/assets/js/dashboard/site-switcher.js index 52df96bba494..baf413d16d7f 100644 --- a/assets/js/dashboard/site-switcher.js +++ b/assets/js/dashboard/site-switcher.js @@ -169,7 +169,7 @@ export default class SiteSwitcher extends React.Component { role="menuitem" > - Site settings + Site Settings
@@ -217,7 +217,7 @@ export default class SiteSwitcher extends React.Component { className="flex px-4 py-2 md:text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 hover:text-gray-900 dark:hover:text-gray-100 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-900 focus:text-gray-900 dark:focus:text-gray-100" role="menuitem" > - View all + View All ) diff --git a/lib/plausible_web/email.ex b/lib/plausible_web/email.ex index 17df60ae66d5..0dd02b142115 100644 --- a/lib/plausible_web/email.ex +++ b/lib/plausible_web/email.ex @@ -114,7 +114,7 @@ defmodule PlausibleWeb.Email do base_email() |> to(email) |> tag("spike-notification") - |> subject("Traffic spike on #{site.domain}") + |> subject("Traffic Spike on #{site.domain}") |> render("spike_notification.html", %{ site: site, current_visitors: current_visitors, diff --git a/lib/plausible_web/live/funnel_settings.ex b/lib/plausible_web/live/funnel_settings.ex index 0f7f5bf308c8..245b82a16f5e 100644 --- a/lib/plausible_web/live/funnel_settings.ex +++ b/lib/plausible_web/live/funnel_settings.ex @@ -55,7 +55,7 @@ defmodule PlausibleWeb.Live.FunnelSettings do id="funnels-list" funnels={@funnels} /> - +
diff --git a/lib/plausible_web/live/funnel_settings/form.ex b/lib/plausible_web/live/funnel_settings/form.ex index cedc658fc56d..795dcaa99188 100644 --- a/lib/plausible_web/live/funnel_settings/form.ex +++ b/lib/plausible_web/live/funnel_settings/form.ex @@ -49,15 +49,18 @@ defmodule PlausibleWeb.Live.FunnelSettings.Form do phx-target="#funnel-form" onkeydown="return event.key != 'Enter';" > - <%= label(f, "Funnel name", - class: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" - ) %> + <.input field={f[:name]} />
- <%= label(f, "Funnel Steps", - class: "mt-6 block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" - ) %> +
@@ -131,7 +134,7 @@ defmodule PlausibleWeb.Live.FunnelSettings.Form do class="focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-900 dark:text-gray-300 block w-7/12 rounded-md sm:text-sm border-gray-300 dark:border-gray-500" /> - <.error :for={{msg, _} <- @field.errors}>Funnel name <%= msg %> + <.error :for={{msg, _} <- @field.errors}>Funnel Name <%= msg %>
""" end diff --git a/lib/plausible_web/live/goal_settings/form.ex b/lib/plausible_web/live/goal_settings/form.ex index 1985248f4440..671f33b169ce 100644 --- a/lib/plausible_web/live/goal_settings/form.ex +++ b/lib/plausible_web/live/goal_settings/form.ex @@ -50,7 +50,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do phx-submit="save-goal" phx-click-away="cancel-add-goal" > -

Add goal for <%= @domain %>

+

Add Goal for <%= @domain %>

<.tabs tabs={@tabs} /> @@ -59,7 +59,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do
@@ -75,7 +75,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do ~H"""
<.label for="page_path_input"> - Page path + Page Path <.live_component @@ -106,7 +106,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do
- Custom events are not tracked by default - you have to configure them on your site to be sent to Plausible. See examples and learn more in - Enable revenue tracking + Enable Revenue Tracking
+
Goal Trigger
<.custom_events_tab tabs={@tabs} /> <.pageviews_tab tabs={@tabs} /> @@ -216,7 +216,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do id="event-tab" phx-click="switch-tab" > - Custom event + Custom Event """ end diff --git a/lib/plausible_web/templates/layout/site_settings.html.eex b/lib/plausible_web/templates/layout/site_settings.html.eex index 91e78cc64914..2759a03214dc 100644 --- a/lib/plausible_web/templates/layout/site_settings.html.eex +++ b/lib/plausible_web/templates/layout/site_settings.html.eex @@ -1,6 +1,6 @@ <%= render_layout "app.html", assigns do %>
- <%= link("← Back to stats", to: "/#{URI.encode_www_form(@site.domain)}", class: "text-sm text-indigo-600 font-bold") %> + <%= link("← Back to Stats", to: "/#{URI.encode_www_form(@site.domain)}", class: "text-sm text-indigo-600 font-bold") %>

Settings for <%= @site.domain %> diff --git a/lib/plausible_web/templates/site/change_domain.html.eex b/lib/plausible_web/templates/site/change_domain.html.eex index 17d77e21de2a..040d34c97b6d 100644 --- a/lib/plausible_web/templates/site/change_domain.html.eex +++ b/lib/plausible_web/templates/site/change_domain.html.eex @@ -15,15 +15,15 @@

- Once you change your domain, you must update the JavaScript snippet on your site within 72 hours to guarantee continuous tracking. If you're using the API, please also make sure to update your API credentials.

+ Once you change your domain, you must update the JavaScript snippet on your site within 72 hours to guarantee continuous tracking. If you're using the API, please also make sure to update your API credentials.

Visit our documentation for details.

- <%= submit "Change domain and add new snippet →", class: "button mt-4 w-full" %> + <%= submit "Change Domain and add new Snippet →", class: "button mt-4 w-full" %>
- <%= link "Back to site settings", to: Routes.site_path(@conn, :settings_general, @site.domain), class: "text-indigo-500 w-full text-center" %> + <%= link "Back to Site Settings", to: Routes.site_path(@conn, :settings_general, @site.domain), class: "text-indigo-500 w-full text-center" %>
<% end %>
diff --git a/lib/plausible_web/templates/site/index.html.eex b/lib/plausible_web/templates/site/index.html.eex index b0b6609644a9..7e5d07623894 100644 --- a/lib/plausible_web/templates/site/index.html.eex +++ b/lib/plausible_web/templates/site/index.html.eex @@ -25,9 +25,9 @@

- My sites + My Sites

- + Add a website + + Add Website
    diff --git a/lib/plausible_web/templates/site/settings_danger_zone.html.eex b/lib/plausible_web/templates/site/settings_danger_zone.html.eex index 0c32d78c5ae0..b8c9415cc889 100644 --- a/lib/plausible_web/templates/site/settings_danger_zone.html.eex +++ b/lib/plausible_web/templates/site/settings_danger_zone.html.eex @@ -4,11 +4,11 @@

    Danger zone

    Destructive actions below can result in irrecoverable data loss. Be careful.

- <%= if @conn.assigns[:current_user_role] == :owner do %> + <%= if @conn.assigns[:current_user_role] == :owner do %>
  • - Transfer site ownership + Transfer Site Ownership

    Transfer ownership of the site to a different account @@ -22,7 +22,7 @@

  • - Reset stats + Reset Stats

    Reset all stats but keep the site configuration intact @@ -35,7 +35,7 @@

  • - Delete site + Delete Site

    Permanently remove all stats and the site configuration too diff --git a/lib/plausible_web/templates/site/settings_email_reports.html.eex b/lib/plausible_web/templates/site/settings_email_reports.html.eex index 614340067598..0423d6bb9eea 100644 --- a/lib/plausible_web/templates/site/settings_email_reports.html.eex +++ b/lib/plausible_web/templates/site/settings_email_reports.html.eex @@ -1,6 +1,6 @@

    -

    Email reports

    +

    Email Reports

    Send weekly/monthly analytics reports to as many addresses as you wish

    <%= link(to: "https://plausible.io/docs/email-reports", target: "_blank", rel: "noferrer") do %> @@ -112,7 +112,7 @@
    -

    Traffic spike notifications

    +

    Traffic Spike Notifications

    Get notified when your site has unusually high number of current visitors

    <%= link(to: "https://plausible.io/docs/traffic-spikes", target: "_blank", rel: "noreferrer") do %> diff --git a/lib/plausible_web/templates/site/settings_funnels.html.heex b/lib/plausible_web/templates/site/settings_funnels.html.heex index b814742f3f60..4cc05a228c1b 100644 --- a/lib/plausible_web/templates/site/settings_funnels.html.heex +++ b/lib/plausible_web/templates/site/settings_funnels.html.heex @@ -12,7 +12,7 @@

    Funnels

    - Compose goals into funnels + Compose Goals into Funnels

    <%= link(to: "https://plausible.io/docs/funnel-analysis", target: "_blank", rel: "noreferrer") do %> @@ -35,7 +35,7 @@ <%= live_render(@conn, PlausibleWeb.Live.FunnelSettings, diff --git a/lib/plausible_web/templates/site/settings_general.html.eex b/lib/plausible_web/templates/site/settings_general.html.eex index f625b60423ed..2c5f9691d499 100644 --- a/lib/plausible_web/templates/site/settings_general.html.eex +++ b/lib/plausible_web/templates/site/settings_general.html.eex @@ -1,8 +1,8 @@
    -

    Site domain

    -

    Moving your site to a different domain? We got you!

    +

    Site Domain

    +

    Moving your Site to a different Domain? We got you!

    <%= link(to: "https://plausible.io/docs/change-domain-name/", target: "_blank", rel: "noreferrer") do %> <% end %> @@ -14,7 +14,7 @@
    - <%= link "Change domain", to: Routes.site_path(@conn, :change_domain, @site.domain), class: "button" %> + <%= link "Change Domain", to: Routes.site_path(@conn, :change_domain, @site.domain), class: "button" %>
    @@ -23,8 +23,8 @@
    -

    Site timezone

    -

    Update your reporting timezone.

    +

    Site Timezone

    +

    Update your reporting Timezone.

    <%= link(to: "https://plausible.io/docs/general/", target: "_blank", rel: "noreferrer") do %> <% end %> @@ -44,8 +44,8 @@ <%= form_for @conn, "/", [class: "shadow bg-white dark:bg-gray-800 sm:rounded-md sm:overflow-hidden py-6 px-4 sm:p-6"], fn f -> %>
    -

    JavaScript snippet

    -

    Include this snippet in the <head> of your website.

    +

    JavaScript Snippet

    +

    Include this Snippet in the <head> of your Website.

    <%= link(to: "https://plausible.io/docs/plausible-script", target: "_blank", rel: "noreferrer") do %> @@ -103,7 +103,7 @@ From <%= PlausibleWeb.EmailView.date_format(@site.imported_data.start_date) %> to <%= PlausibleWeb.EmailView.date_format(@site.imported_data.end_date) %>

    - <%= link("Clear " <> PlausibleWeb.StatsView.large_number_format(@imported_pageviews) <> " imported pageviews", to: "/#{URI.encode_www_form(@site.domain)}/settings/forget-imported", method: :delete, class: "inline-block mt-4 px-4 py-2 border border-gray-300 dark:border-gray-500 text-sm leading-5 font-medium rounded-md text-red-700 bg-white dark:bg-gray-800 hover:text-red-500 dark:hover:text-red-400 focus:outline-none focus:border-blue-300 focus:ring active:text-red-800 active:bg-gray-50 transition ease-in-out duration-150") %> + <%= link("Clear " <> PlausibleWeb.StatsView.large_number_format(@imported_pageviews) <> " Imported Pageviews", to: "/#{URI.encode_www_form(@site.domain)}/settings/forget-imported", method: :delete, class: "inline-block mt-4 px-4 py-2 border border-gray-300 dark:border-gray-500 text-sm leading-5 font-medium rounded-md text-red-700 bg-white dark:bg-gray-800 hover:text-red-500 dark:hover:text-red-400 focus:outline-none focus:border-blue-300 focus:ring active:text-red-800 active:bg-gray-50 transition ease-in-out duration-150") %>
  • <% true -> %> diff --git a/lib/plausible_web/templates/site/settings_goals.html.heex b/lib/plausible_web/templates/site/settings_goals.html.heex index 064578ac679d..5e4ee903e627 100644 --- a/lib/plausible_web/templates/site/settings_goals.html.heex +++ b/lib/plausible_web/templates/site/settings_goals.html.heex @@ -8,7 +8,7 @@ You can also compose goals into funnels. + >compose Goals into Funnels.

    <%= link(to: "https://plausible.io/docs/goal-conversions", target: "_blank", rel: "noreferrer") do %> @@ -31,7 +31,7 @@ <%= live_render(@conn, PlausibleWeb.Live.GoalSettings, diff --git a/lib/plausible_web/templates/site/settings_visibility.html.eex b/lib/plausible_web/templates/site/settings_visibility.html.eex index 96b159018ab8..1f7b86ad7ab1 100644 --- a/lib/plausible_web/templates/site/settings_visibility.html.eex +++ b/lib/plausible_web/templates/site/settings_visibility.html.eex @@ -30,7 +30,7 @@
    -

    Shared links

    +

    Shared Links

    You can share your stats privately by generating a shared link. The links are impossible to guess and you can add password protection for extra security.

    <%= link(to: "https://plausible.io/docs/shared-links", target: "_blank", rel: "noreferrer") do %> @@ -65,13 +65,13 @@
    <% end %> - <%= link("+ New link", to: Routes.site_path(@conn, :new_shared_link, @site.domain), class: "button mt-4") %> + <%= link("+ New Link", to: Routes.site_path(@conn, :new_shared_link, @site.domain), class: "button mt-4") %>
    -

    Embed dashboard

    +

    Embed Dashboard

    You can use shared links to embed your stats in any other webpage using an iframe. Copy & paste a shared link into the form below to generate the embed code.

    <%= link(to: "https://plausible.io/docs/embed-dashboard", target: "_blank", rel: "noreferrer") do %> @@ -80,7 +80,7 @@
    - +

    Only public shared links without password protection can be embedded

    @@ -88,7 +88,7 @@
    - + @@ -106,11 +106,11 @@
    - +
    - +
    diff --git a/lib/plausible_web/views/layout_view.ex b/lib/plausible_web/views/layout_view.ex index aeae09fd792d..f67c7789664f 100644 --- a/lib/plausible_web/views/layout_view.ex +++ b/lib/plausible_web/views/layout_view.ex @@ -32,7 +32,7 @@ defmodule PlausibleWeb.LayoutView do end, [key: "Custom Properties", value: "properties"], [key: "Search Console", value: "search-console"], - [key: "Email reports", value: "email-reports"], + [key: "Email Reports", value: "email-reports"], if !is_selfhost() && conn.assigns[:site].custom_domain do [key: "Custom domain", value: "custom-domain"] end, diff --git a/test/plausible_web/controllers/site_controller_test.exs b/test/plausible_web/controllers/site_controller_test.exs index 34581205b480..1a689b983cc7 100644 --- a/test/plausible_web/controllers/site_controller_test.exs +++ b/test/plausible_web/controllers/site_controller_test.exs @@ -323,7 +323,7 @@ defmodule PlausibleWeb.SiteControllerTest do conn = get(conn, "/#{site.domain}/settings/general") resp = html_response(conn, 200) - assert resp =~ "Site timezone" + assert resp =~ "Site Timezone" assert resp =~ "Data Import from Google Analytics" assert resp =~ "https://accounts.google.com/o/oauth2/v2/auth?" assert resp =~ "analytics.readonly" @@ -1241,8 +1241,8 @@ defmodule PlausibleWeb.SiteControllerTest do conn = get(conn, Routes.site_path(conn, :settings_general, site.domain)) resp = html_response(conn, 200) - assert resp =~ "Site domain" - assert resp =~ "Change domain" + assert resp =~ "Site Domain" + assert resp =~ "Change Domain" assert resp =~ Routes.site_path(conn, :change_domain, site.domain) end diff --git a/test/plausible_web/live/funnel_settings_test.exs b/test/plausible_web/live/funnel_settings_test.exs index 5b224c1ac604..946be079cf6e 100644 --- a/test/plausible_web/live/funnel_settings_test.exs +++ b/test/plausible_web/live/funnel_settings_test.exs @@ -11,7 +11,7 @@ defmodule PlausibleWeb.Live.FunnelSettingsTest do conn = get(conn, "/#{site.domain}/settings/funnels") resp = html_response(conn, 200) - assert resp =~ "Compose goals into funnels" + assert resp =~ "Compose Goals into Funnels" assert resp =~ "From blog to signup" assert resp =~ "From signup to blog" assert element_exists?(resp, "a[href=\"https://plausible.io/docs/funnel-analysis\"]") diff --git a/test/plausible_web/live/goal_settings/form_test.exs b/test/plausible_web/live/goal_settings/form_test.exs index d0aaca8ef113..8534268710c0 100644 --- a/test/plausible_web/live/goal_settings/form_test.exs +++ b/test/plausible_web/live/goal_settings/form_test.exs @@ -16,19 +16,19 @@ defmodule PlausibleWeb.Live.GoalSettings.FormTest do assert element_exists?(html, ~s/a#event-tab/) pageview_tab = lv |> element(~s/a#pageview-tab/) |> render_click() - assert pageview_tab =~ "Page path" + assert pageview_tab =~ "Page Path" event_tab = lv |> element(~s/a#event-tab/) |> render_click() - assert event_tab =~ "Event name" + assert event_tab =~ "Event Name" end test "escape closes the form", %{conn: conn, site: site} do {parent, lv} = get_liveview(conn, site, with_parent?: true) html = render(parent) - assert html =~ "Goal trigger" + assert html =~ "Goal Trigger" render_keydown(lv, "cancel-add-goal") html = render(parent) - refute html =~ "Goal trigger" + refute html =~ "Goal Trigger" end end diff --git a/test/plausible_web/live/goal_settings_test.exs b/test/plausible_web/live/goal_settings_test.exs index e90351ae0aab..d301aec1c554 100644 --- a/test/plausible_web/live/goal_settings_test.exs +++ b/test/plausible_web/live/goal_settings_test.exs @@ -12,7 +12,7 @@ defmodule PlausibleWeb.Live.GoalSettingsTest do resp = html_response(conn, 200) assert resp =~ "Define actions that you want your users to take" - assert resp =~ "compose goals into funnels" + assert resp =~ "compose Goals into Funnels" assert resp =~ "/#{site.domain}/settings/funnels" assert element_exists?(resp, ~s|a[href="https://plausible.io/docs/goal-conversions"]|) @@ -139,7 +139,7 @@ defmodule PlausibleWeb.Live.GoalSettingsTest do lv = get_liveview(conn, site) html = lv |> element(~s/button[phx-click="add-goal"]/) |> render_click() - assert html =~ "Add goal for #{site.domain}" + assert html =~ "Add Goal for #{site.domain}" assert element_exists?( html, diff --git a/test/workers/spike_notifier_test.exs b/test/workers/spike_notifier_test.exs index dea8f6fc90ae..35857e64f3bc 100644 --- a/test/workers/spike_notifier_test.exs +++ b/test/workers/spike_notifier_test.exs @@ -38,12 +38,12 @@ defmodule Plausible.Workers.SpikeNotifierTest do SpikeNotifier.perform(nil, clickhouse_stub) assert_email_delivered_with( - subject: "Traffic spike on #{site.domain}", + subject: "Traffic Spike on #{site.domain}", to: [nil: "jerod@example.com"] ) assert_email_delivered_with( - subject: "Traffic spike on #{site.domain}", + subject: "Traffic Spike on #{site.domain}", to: [nil: "uku@example.com"] ) end @@ -77,7 +77,7 @@ defmodule Plausible.Workers.SpikeNotifierTest do SpikeNotifier.perform(nil, clickhouse_stub) assert_email_delivered_with( - subject: "Traffic spike on #{site.domain}", + subject: "Traffic Spike on #{site.domain}", to: [nil: "uku@example.com"] )