mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-11 03:28:09 +03:00
make tabs test helpers types more generic
needed to be used in carousel which requires other additional types of interactions
This commit is contained in:
parent
35efdcadeb
commit
a3fc5e1bc6
@ -31,7 +31,7 @@ type alias TestContext =
|
||||
ProgramTest State Msg ()
|
||||
|
||||
|
||||
ensureTabbable : String -> TestContext -> TestContext
|
||||
ensureTabbable : String -> ProgramTest model msg effect -> ProgramTest model msg effect
|
||||
ensureTabbable word testContext =
|
||||
testContext
|
||||
|> ensureView
|
||||
@ -40,7 +40,7 @@ ensureTabbable word testContext =
|
||||
)
|
||||
|
||||
|
||||
ensurePanelsFocusable : List String -> TestContext -> TestContext
|
||||
ensurePanelsFocusable : List String -> ProgramTest model msg effect -> ProgramTest model msg effect
|
||||
ensurePanelsFocusable words testContext =
|
||||
testContext
|
||||
|> ensureView
|
||||
@ -49,7 +49,7 @@ ensurePanelsFocusable words testContext =
|
||||
)
|
||||
|
||||
|
||||
ensurePanelDisplayed : String -> TestContext -> TestContext
|
||||
ensurePanelDisplayed : String -> ProgramTest model msg effect -> ProgramTest model msg effect
|
||||
ensurePanelDisplayed word testContext =
|
||||
testContext
|
||||
|> ensureView
|
||||
@ -58,7 +58,7 @@ ensurePanelDisplayed word testContext =
|
||||
)
|
||||
|
||||
|
||||
ensureOnlyOnePanelDisplayed : List String -> TestContext -> TestContext
|
||||
ensureOnlyOnePanelDisplayed : List String -> ProgramTest model msg effect -> ProgramTest model msg effect
|
||||
ensureOnlyOnePanelDisplayed panels testContext =
|
||||
testContext
|
||||
|> ensureView
|
||||
@ -71,7 +71,7 @@ ensureOnlyOnePanelDisplayed panels testContext =
|
||||
)
|
||||
|
||||
|
||||
ensureOnlyOneTabInSequence : List String -> TestContext -> TestContext
|
||||
ensureOnlyOneTabInSequence : List String -> ProgramTest model msg effect -> ProgramTest model msg effect
|
||||
ensureOnlyOneTabInSequence tabs testContext =
|
||||
testContext
|
||||
|> ensureView
|
||||
@ -84,13 +84,13 @@ ensureOnlyOneTabInSequence tabs testContext =
|
||||
)
|
||||
|
||||
|
||||
releaseRightArrow : TestContext -> TestContext
|
||||
releaseRightArrow : ProgramTest model msg effect -> ProgramTest model msg effect
|
||||
releaseRightArrow =
|
||||
KeyboardHelpers.releaseRightArrow { targetDetails = [] }
|
||||
[ Selector.attribute Role.tab, Selector.attribute (Key.tabbable True) ]
|
||||
|
||||
|
||||
releaseLeftArrow : TestContext -> TestContext
|
||||
releaseLeftArrow : ProgramTest model msg effect -> ProgramTest model msg effect
|
||||
releaseLeftArrow =
|
||||
KeyboardHelpers.releaseLeftArrow { targetDetails = [] }
|
||||
[ Selector.attribute Role.tab, Selector.attribute (Key.tabbable True) ]
|
||||
|
Loading…
Reference in New Issue
Block a user