elm-ui-widgets/tests/VerifyExamples/Widget/TextInput0.elm

52 lines
2.6 KiB
Elm
Raw Normal View History

2021-02-03 00:22:10 +03:00
module VerifyExamples.Widget.TextInput0 exposing (..)
-- This file got generated by [elm-verify-examples](https://github.com/stoeffel/elm-verify-examples).
-- Please don't modify this file by hand!
import Test
import Expect
import Widget exposing (..)
import Widget.Material as Material
import Element
type Msg =
ToggleTextInputChip String
| SetTextInput String
spec0 : Test.Test
spec0 =
Test.test "#textInput: \n\n {text = \"Hello World\"}\n |> (\\model ->\n { chips =\n [ \"Cat\", \"Fish\", \"Dog\"]\n |> List.map\n (\\string ->\n { icon = always Element.none\n , text = string\n , onPress =\n string\n |> ToggleTextInputChip\n |> Just\n }\n )\n , text = model.text\n , placeholder = Nothing\n , label = \"Chips\"\n , onChange = SetTextInput\n }\n )\n |> Widget.textInput (Material.textInput Material.defaultPalette)\n |> always \"Ignore this line\"\n --> \"Ignore this line\"" <|
\() ->
Expect.equal
(
{text = "Hello World"}
|> (\model ->
{ chips =
[ "Cat", "Fish", "Dog"]
|> List.map
(\string ->
{ icon = always Element.none
, text = string
, onPress =
string
|> ToggleTextInputChip
|> Just
}
)
, text = model.text
, placeholder = Nothing
, label = "Chips"
, onChange = SetTextInput
}
)
|> Widget.textInput (Material.textInput Material.defaultPalette)
|> always "Ignore this line"
)
(
"Ignore this line"
)