diff --git a/vaadin-app-layout-flow-parent/vaadin-app-layout-flow/src/main/java/com/vaadin/flow/component/applayout/AppLayout.java b/vaadin-app-layout-flow-parent/vaadin-app-layout-flow/src/main/java/com/vaadin/flow/component/applayout/AppLayout.java index 4b464aa17e3..4e26bcdcb37 100644 --- a/vaadin-app-layout-flow-parent/vaadin-app-layout-flow/src/main/java/com/vaadin/flow/component/applayout/AppLayout.java +++ b/vaadin-app-layout-flow-parent/vaadin-app-layout-flow/src/main/java/com/vaadin/flow/component/applayout/AppLayout.java @@ -27,6 +27,7 @@ import com.vaadin.flow.component.AttachEvent; import com.vaadin.flow.component.Component; import com.vaadin.flow.component.HasElement; +import com.vaadin.flow.component.HasStyle; import com.vaadin.flow.component.PropertyDescriptor; import com.vaadin.flow.component.PropertyDescriptors; import com.vaadin.flow.component.Synchronize; @@ -51,7 +52,7 @@ @NpmPackage(value = "@vaadin/app-layout", version = "23.0.1") @NpmPackage(value = "@vaadin/vaadin-app-layout", version = "23.0.1") @JsModule("@vaadin/app-layout/src/vaadin-app-layout.js") -public class AppLayout extends Component implements RouterLayout { +public class AppLayout extends Component implements RouterLayout, HasStyle { private static final PropertyDescriptor primarySectionProperty = PropertyDescriptors .propertyWithDefault("primarySection", Section.NAVBAR.toWebcomponentValue()); diff --git a/vaadin-app-layout-flow-parent/vaadin-app-layout-flow/src/test/java/com/vaadin/flow/component/applayout/AppLayoutTest.java b/vaadin-app-layout-flow-parent/vaadin-app-layout-flow/src/test/java/com/vaadin/flow/component/applayout/AppLayoutTest.java index 4c5904f48ff..92d8545f77d 100644 --- a/vaadin-app-layout-flow-parent/vaadin-app-layout-flow/src/test/java/com/vaadin/flow/component/applayout/AppLayoutTest.java +++ b/vaadin-app-layout-flow-parent/vaadin-app-layout-flow/src/test/java/com/vaadin/flow/component/applayout/AppLayoutTest.java @@ -2,8 +2,11 @@ import com.vaadin.flow.component.Component; import com.vaadin.flow.component.HasElement; +import com.vaadin.flow.component.HasStyle; import com.vaadin.flow.component.html.Div; import com.vaadin.flow.dom.Element; + +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -179,6 +182,11 @@ public void setI18n() { assertEquals(i18n, systemUnderTest.getI18n()); } + @Test + public void hasStyle() { + Assert.assertTrue(systemUnderTest instanceof HasStyle); + } + private void testDrawerOpened(boolean expectedDrawerOpened) { assertEquals(expectedDrawerOpened, systemUnderTest.getElement() .getProperty("drawerOpened", false));