Package com.vaadin.browserless.mocks
Class MockedUI
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.UI
com.vaadin.browserless.mocks.MockedUI
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasComponentsOfType<com.vaadin.flow.component.Component>,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.PollNotifier,com.vaadin.flow.router.RouterLayout,Serializable
public class MockedUI
extends com.vaadin.flow.component.UI
The
UI the mocked environment creates by default.
It stands in for the browser in the two places the browser would normally act: it renders a navigation server-side, since there is no client router to hand the location to, and it flushes the state tree after a modality change, since there is no client response to trigger it.
The class is not final, so a test that needs a different UI can pass a factory producing a subclass, but the shape of what it overrides is not part of the published API.
For internal use only. May be renamed or removed in a future release.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.UI
com.vaadin.flow.component.UI.BrowserLeaveNavigationEvent, com.vaadin.flow.component.UI.BrowserNavigateEvent, com.vaadin.flow.component.UI.BrowserRefreshEvent, com.vaadin.flow.component.UI.ClientViewPlaceholder, com.vaadin.flow.component.UI.UiJs -
Field Summary
Fields inherited from class com.vaadin.flow.component.UI
CLIENT_NAVIGATE_TO, wrapperElement -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToModalComponent(com.vaadin.flow.component.Component component) voidRenders the route server side, as a test has no client router to hand the navigation to.voidsetChildComponentModal(com.vaadin.flow.component.Component childComponent, com.vaadin.flow.component.ModalityMode mode) Methods inherited from class com.vaadin.flow.component.UI
access, accessLater, accessLater, accessSynchronously, add, addAfterNavigationListener, addBeforeEnterListener, addBeforeLeaveListener, addHeartbeatListener, addModal, addShortcutListener, addShortcutListener, beforeClientResponse, browserNavigate, close, doInit, getActiveDragSourceComponent, getActiveRouterTargetsChain, getActiveViewLocation, getChildren, getCsrfToken, getCurrent, getCurrentOrThrow, getCurrentView, getElement, getForwardToClientUrl, getInternals, getLastUpdateSentTimestamp, getLoadingIndicatorConfiguration, getLocale, getNavigationListeners, getPage, getPollInterval, getPushConfiguration, getReconnectDialogConfiguration, getSession, getSessionOrThrow, getUI, getUIId, hasModalComponent, init, isClosing, isNavigationSupported, leaveNavigation, localeSignal, navigate, navigate, navigate, navigate, navigate, navigate, navigate, navigate, navigateToClient, onAttach, onDetach, push, refreshCurrentRoute, routerStateSignal, setChildComponentModal, setCurrent, setDirection, setLocale, setPollInterval, triggerAfterMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUIOrThrow, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttachedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
addMethods inherited from interface com.vaadin.flow.component.HasComponentsOfType
add, addComponentAsFirst, addComponentAtIndex, bindChildren, getComponentAt, getComponentCount, indexOf, remove, remove, removeAll, replaceMethods inherited from interface com.vaadin.flow.component.HasEnabled
bindEnabled, isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.PollNotifier
addPollListenerMethods inherited from interface com.vaadin.flow.router.RouterLayout
removeRouterLayoutContent, showRouterLayoutContent
-
Constructor Details
-
MockedUI
public MockedUI()Creates the UI.
-
-
Method Details
-
setChildComponentModal
public void setChildComponentModal(com.vaadin.flow.component.Component childComponent, com.vaadin.flow.component.ModalityMode mode) - Overrides:
setChildComponentModalin classcom.vaadin.flow.component.UI
-
addToModalComponent
public void addToModalComponent(com.vaadin.flow.component.Component component) - Overrides:
addToModalComponentin classcom.vaadin.flow.component.UI
-