Add name_of/1 html helper

Currently with Floki there's no way to query for
`[name=foo[some]]` selector
pull/3310/head
Adam Rutkowski 3 years ago
parent 5e8b64ab28
commit 7b271a8b0b

@ -37,4 +37,8 @@ defmodule Plausible.Test.Support.HTML do
|> Floki.text()
|> String.trim()
end
def name_of(element) do
List.first(Floki.attribute(element, "name"))
end
end

Loading…
Cancel
Save