Module

Enzyme.ShallowWrapper

Package
purescript-enzyme
Repository
coot/purescript-enzyme

#ShallowWrapper Source

#getNode Source

getNode :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) ReactElement

#getNodes Source

getNodes :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) (Array ReactElement)

#instance_ Source

instance_ :: forall e state props. ShallowWrapper -> Eff (enzyme :: ENZYME | e) (ReactThis props state)

#update Source

update :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#rerender Source

rerender :: forall e props. props -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#rerenderWithContext Source

rerenderWithContext :: forall e context props. props -> context -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#setProps Source

setProps :: forall e r props. props -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) r

#setState Source

setState :: forall e state. state -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

Set state of your component. Note that it will wrap state as { state: state }, since this is what purescript-react does in it's own bindings.

#setState_ Source

setState_ :: forall e. Foreign -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

The original which does not wrap state.

#setContext Source

setContext :: forall e ctx. ctx -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#containsNode Source

containsNode :: forall e. ReactElement -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#containsNodes Source

containsNodes :: forall e. Array ReactElement -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#containsMatchingElement Source

#containsAllMatchingElements Source

#containsAnyMatchingElements Source

#equals Source

equals :: forall e. ReactElement -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#matchesElement Source

matchesElement :: forall e. ReactElement -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#find Source

find :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#findReactClass Source

findReactClass :: forall e props. ReactClass props -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#is Source

is :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#isEmptyRender Source

isEmptyRender :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#filterWhere Source

filterWhere :: forall e. (ShallowWrapper -> Boolean) -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#filter Source

filter :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#not Source

not :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#text Source

text :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) String

#html Source

html :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) String

#unmount Source

unmount :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#simulate Source

simulate :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#simulateWithArgs Source

#props Source

props :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) Foreign

#prop Source

prop :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Foreign

#state Source

state :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) (F Foreign)

Note that purescript-react writes state as { state: state } (so you can use any purescript value as a state). This function will unwrap state and return what you specified in your ReactSpec signature.

Use runExcept $ join ((readState :: Foreign -> State) <$> state) to read the state from F Foreign.

#unsafeState Source

unsafeState :: forall state e. Proxy state -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) state

#state_ Source

state_ :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) Foreign

The original which does not unwrap the state.

#stateByKey Source

stateByKey :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Foreign

#context Source

context :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Foreign

#children Source

children :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#childrenBySelector Source

#childAt Source

childAt :: forall e. Int -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#parents Source

parents :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#parentsBySelector Source

parentsBySelector :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#parent Source

parent :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#closest Source

closest :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#shallow Source

shallow :: forall e. Foreign -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#key Source

key :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) String

#type_ Source

type_ :: forall p e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) (Either String (ReactClass p))

#name Source

name :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) String

#hasClass Source

hasClass :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#map Source

map :: forall e a. (ReactElement -> a) -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) (Array a)

#reduce Source

reduce :: forall e a. (a -> ShallowWrapper -> Int -> a) -> a -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) a

#reduceRight Source

reduceRight :: forall e a. (a -> ShallowWrapper -> Int -> a) -> a -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) a

#slice Source

slice :: forall e. Int -> Int -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#some Source

some :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#someWhere Source

someWhere :: forall e. (ShallowWrapper -> Boolean) -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#every Source

every :: forall e. String -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#everyWhere Source

everyWhere :: forall e. (ShallowWrapper -> Boolean) -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#findWhere Source

findWhere :: forall e. (ShallowWrapper -> Boolean) -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#get Source

get :: forall e. Int -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ReactElement

#at Source

at :: forall e. Int -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#first Source

first :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#last Source

last :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper

#isEmpty Source

isEmpty :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#exists Source

exists :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) Boolean

#debug Source

debug :: forall e. ShallowWrapper -> Eff (enzyme :: ENZYME | e) String

#dive Source

dive :: forall e. Foreign -> ShallowWrapper -> Eff (enzyme :: ENZYME | e) ShallowWrapper