mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-05 08:34:38 +03:00
Add markdown label test for Block
This commit is contained in:
parent
27af57ef33
commit
728b4c08c5
@ -16,6 +16,7 @@ spec =
|
||||
describe "Nri.Ui.Block.V4"
|
||||
[ describe "content" contentSpec
|
||||
, describe "labelId" labelIdSpec
|
||||
, describe "labelMarkdown" labelMarkdownSpec
|
||||
, describe "getLabelPositions" getLabelPositionsSpec
|
||||
]
|
||||
|
||||
@ -94,6 +95,20 @@ labelIdSpec =
|
||||
]
|
||||
|
||||
|
||||
labelMarkdownSpec : List Test
|
||||
labelMarkdownSpec =
|
||||
[ test "An emphasized word with a markdown label" <|
|
||||
\_ ->
|
||||
[ Block.plaintext "Hello there"
|
||||
, Block.emphasize
|
||||
, Block.labelId "yo-id"
|
||||
, Block.label "This **is** markdown"
|
||||
]
|
||||
|> toQuery
|
||||
|> Query.has [ Selector.text "This is markdown" ]
|
||||
]
|
||||
|
||||
|
||||
toQuery : List (Block.Attribute a) -> Query.Single a
|
||||
toQuery block =
|
||||
Block.view block
|
||||
|
Loading…
Reference in New Issue
Block a user