mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-01 00:34:27 +03:00
26 lines
733 B
Elm
26 lines
733 B
Elm
module Spec.Nri.Ui.TextInput exposing (spec)
|
|
|
|
import Html.Styled
|
|
import Nri.Ui.TextInput.V6 as TextInput
|
|
import Test exposing (..)
|
|
import Test.Html.Query as Query
|
|
import Test.Html.Selector exposing (..)
|
|
|
|
|
|
spec : Test
|
|
spec =
|
|
describe "Nri.Ui.TextInput.V6"
|
|
[ 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")
|
|
]
|
|
]
|