jQuery Jasmine Flashcards
tags that have checked attribute
toBeChecked
tags with disabled attribute
toBeDisabled
child DOM elements or text
toBeEmpty
focused inputs
toBeFocused
selected options in select boxes
toBeSelected
values on fields
toHaveValue
elements that handle events
toHandle
handles with a given fn
toHandleWith(eventName, eventHandler)
if event has been triggered on selector
toHaveBeenTriggeredOn(selector)
event triggered
toHaveBeenTriggered
event triggered with parameters
toHaveBeenTriggeredOnAndWith(selector, extraParameters)
event has been prevented
toHaveBeenPreventedOn(selector)
event prevented
toHaveBeenPrevented
DOM element with class
toHaveClass(className)
DOM styling
toHaveCss(css in object)
DOM data attribute
toHaveData(key, value)
DOM html
toHaveHtml(string)
DOM id
toHaveId(id)
DOM selection length
toHaveLength(value)
DOM property
toHaveProp(propertyName, propertyValue)
DOM text node
toHaveText(string)
DOM hidden
toBeHidden()
DOM visible
toBeVisible()
DOM attached
toBeInDOM()