MockRouterCtlF

japgolly.scalajs.react.test.MockRouterCtlF
See theMockRouterCtlF companion object
class MockRouterCtlF[F[_], P](val baseUrl: BaseUrl, pageToPath: P => Path)(implicit ff: Sync[F]) extends RouterCtlF[F, P]

Mock RouterCtl that does nothing but record events.

Call events to inspect recorded events, and clear to clear them.

Attributes

Companion
object
Graph
Supertypes
class RouterCtlF[F, P]
class Object
trait Matchable
class Any
Known subtypes
class MockRouterCtl[P]
Self type

Members list

Value members

Concrete methods

def clear(): Unit
def events(): Vector[Event[P]]
override def pathFor(p: P): Path

Attributes

Definition Classes
RouterCtlF
override def refresh: F[Unit]

Attributes

Definition Classes
RouterCtlF
override def set(p: P, v: SetRouteVia): F[Unit]

Attributes

Definition Classes
RouterCtlF

Inherited methods

final def contramap[B](f: B => P): RouterCtlF[F, B]

Attributes

Inherited from:
RouterCtlF
final def narrow[B <: P]: RouterCtlF[F, B]

Attributes

Inherited from:
RouterCtlF
final def onLinkClick(route: P): ReactMouseEvent => Option[F[Unit]]

Attributes

Inherited from:
RouterCtlF
final def onSet(f: F[Unit] => F[Unit]): RouterCtlF[F, Route]

Change the behaviour of set and all derivatives.

Change the behaviour of set and all derivatives.

For example, this can be used to set a component's state immediately before setting a new route.

Attributes

Inherited from:
RouterCtlF
final def onSet(f: (P, F[Unit]) => F[Unit]): RouterCtlF[F, Route]

Change the behaviour of set and all derivatives.

Change the behaviour of set and all derivatives.

For example, this can be used to set a component's state immediately before setting a new route.

Attributes

Inherited from:
RouterCtlF
final def onSetRun(f: F[Unit]): RouterCtlF[F, Route]

Return a new version of this that executes the specified callback after setting new routes.

Return a new version of this that executes the specified callback after setting new routes.

Attributes

Inherited from:
RouterCtlF
final def set(route: P): F[Unit]

Attributes

Inherited from:
RouterCtlF
final def setEH(route: P): ReactEvent => F[Unit]

Attributes

Inherited from:
RouterCtlF
final def setOnClick(route: P): TagMod

Attributes

Inherited from:
RouterCtlF
final def setOnLinkClick(route: P): TagMod

Attributes

Inherited from:
RouterCtlF
final def urlFor(route: P): AbsUrl

Attributes

Inherited from:
RouterCtlF
def withEffect[G[_]](implicit G: Sync[G]): RouterCtlF[G, Route]

Attributes

Inherited from:
RouterCtlF

Deprecated and Inherited methods

final def setOnClick(route: P, callback: F[Unit]): TagMod

Attributes

Deprecated
true
Inherited from:
RouterCtlF
final def setOnLinkClick(route: P, callback: F[Unit]): TagMod

Attributes

Deprecated
true
Inherited from:
RouterCtlF

Concrete fields

override val baseUrl: BaseUrl
override val byPath: RouterCtlF[F, Path]