NoRedInk / noredink-ui / Nri.Test.MouseHelpers.V1

MouseHelpers provides a set of functions to simulate mouse events for testing Elm programs.

Basic helpers

click : List Test.Html.Selector.Selector -> ProgramTest a b c -> ProgramTest a b c

Simulate a click event on elements that match the given selectors.

mouseDown : List Test.Html.Selector.Selector -> ProgramTest a b c -> ProgramTest a b c

Simulate a mouse down event on elements that match the given selectors.

mouseUp : List Test.Html.Selector.Selector -> ProgramTest a b c -> ProgramTest a b c

Simulate a mouse up event on elements that match the given selectors.

mouseOver : List Test.Html.Selector.Selector -> ProgramTest a b c -> ProgramTest a b c

Simulate a mouse over event on elements that match the given selectors.

Cancelable Events

cancelableMouseDown : List Test.Html.Selector.Selector -> ProgramTest a b c -> ProgramTest a b c

Simulate a cancelable mouse down event on elements that match the given selectors.

cancelableMouseUp : List Test.Html.Selector.Selector -> ProgramTest a b c -> ProgramTest a b c

Simulate a cancelable mouse up event on elements that match the given selectors.

cancelableMouseOver : List Test.Html.Selector.Selector -> ProgramTest a b c -> ProgramTest a b c

Simulate a cancelable mouse over event on elements that match the given selectors.