noredink-ui/tests/Spec/Nri/Ui/TextInput.elm
Tessa Kelly e7f5f5e559 Fix ci
2021-10-29 11:56:54 -07:00

24 lines
689 B
Elm

module Spec.Nri.Ui.TextInput exposing (spec)
import Html.Styled
import Nri.Ui.TextInput.V7 as TextInput
import Test exposing (..)
import Test.Html.Query as Query
import Test.Html.Selector exposing (..)
spec : Test
spec =
describe "Nri.Ui.TextInput.V7"
[ test "it uses the same DOM id that generateId produces" <|
\() ->
TextInput.view "myLabel"
[ TextInput.text identity ]
|> Html.Styled.toUnstyled
|> Query.fromHtml
|> Query.has
[ tag "input"
, id (TextInput.generateId "myLabel")
]
]