diff --git a/test/dotcom_web/components/route_symbols_test.exs b/test/dotcom_web/components/route_symbols_test.exs index 0e1743bdd7..7fbae8be0a 100644 --- a/test/dotcom_web/components/route_symbols_test.exs +++ b/test/dotcom_web/components/route_symbols_test.exs @@ -103,11 +103,14 @@ defmodule DotcomWeb.Components.RouteSymbolsTest do end defp matches_title?(html, text) do - html - |> Floki.find("title") - |> Floki.text() - |> String.trim() + title = + html + |> Floki.find("title") + |> Floki.text() + |> String.trim() + + text |> Regex.compile!("i") - |> Regex.match?(text) + |> Regex.match?(title) end end