mirror of
https://github.com/Orasund/elm-ui-widgets.git
synced 2024-11-22 13:14:10 +03:00
48 lines
2.0 KiB
Elm
48 lines
2.0 KiB
Elm
module VerifyExamples.Widget.SelectItem0 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 =
|
|
Select Int
|
|
|
|
|
|
|
|
|
|
|
|
spec0 : Test.Test
|
|
spec0 =
|
|
Test.test "#selectItem: \n\n ( { selected = Just 1\n , options =\n [ \"Option 1\", \"Option 2\" ]\n |> List.map\n (\\text ->\n { text = text\n , icon = always Element.none\n }\n )\n , onSelect = (\\int ->\n int\n |> Select\n |> Just\n )\n }\n |> Widget.selectItem (Material.selectItem Material.defaultPalette)\n )\n |> Widget.itemList (Material.cardColumn Material.defaultPalette)\n |> always \"Ignore this line\"\n --> \"Ignore this line\"" <|
|
|
\() ->
|
|
Expect.equal
|
|
(
|
|
( { selected = Just 1
|
|
, options =
|
|
[ "Option 1", "Option 2" ]
|
|
|> List.map
|
|
(\text ->
|
|
{ text = text
|
|
, icon = always Element.none
|
|
}
|
|
)
|
|
, onSelect = (\int ->
|
|
int
|
|
|> Select
|
|
|> Just
|
|
)
|
|
}
|
|
|> Widget.selectItem (Material.selectItem Material.defaultPalette)
|
|
)
|
|
|> Widget.itemList (Material.cardColumn Material.defaultPalette)
|
|
|> always "Ignore this line"
|
|
)
|
|
(
|
|
"Ignore this line"
|
|
) |