use of com.vaadin.flow.dom.impl.ShadowRootStateProvider in project flow by vaadin.
the class ShadowRootStateProviderTest method createShadowRootNode_originalNodeIsInitialized.
@Test
public void createShadowRootNode_originalNodeIsInitialized() {
ShadowRootStateProvider provider = ShadowRootStateProvider.get();
StateNode node = new StateNode(ShadowRootData.class);
StateNode shadowRoot = provider.createShadowRootNode(node);
Assert.assertEquals(shadowRoot, node.getFeature(ShadowRootData.class).getShadowRoot());
}
use of com.vaadin.flow.dom.impl.ShadowRootStateProvider in project flow by vaadin.
the class ShadowRootStateProviderTest method doesNotSupportEmptyNode.
@Test
public void doesNotSupportEmptyNode() {
ShadowRootStateProvider provider = ShadowRootStateProvider.get();
Assert.assertFalse(provider.supports(new StateNode()));
}
use of com.vaadin.flow.dom.impl.ShadowRootStateProvider in project flow by vaadin.
the class ShadowRootStateProviderTest method getParent_parentIsHostElement.
@Test
public void getParent_parentIsHostElement() {
ShadowRootStateProvider provider = ShadowRootStateProvider.get();
StateNode node = new StateNode(ShadowRootData.class);
StateNode shadowRoot = provider.createShadowRootNode(node);
Assert.assertEquals(node, shadowRoot.getParent());
}
use of com.vaadin.flow.dom.impl.ShadowRootStateProvider in project flow by vaadin.
the class ShadowRootStateProviderTest method supportsSelfCreatedNode.
@Test
public void supportsSelfCreatedNode() {
ShadowRootStateProvider provider = ShadowRootStateProvider.get();
StateNode node = new StateNode(ShadowRootData.class);
StateNode shadowRoot = provider.createShadowRootNode(node);
Assert.assertTrue(provider.supports(shadowRoot));
}
Aggregations