This is testable now that we have a separate widgetset for testing.
import com.vaadin.annotations.Widgetset;
import com.vaadin.terminal.WrappedRequest;
import com.vaadin.tests.components.AbstractTestRoot;
+import com.vaadin.tests.widgetset.server.MissingFromDefaultWidgetsetComponent;
-@Widgetset("invalid")
+@Widgetset("com.vaadin.tests.widgetset.TestingWidgetSet")
public class TestRootWidgetset extends AbstractTestRoot {
@Override
protected void setup(WrappedRequest request) {
- // Nothing here
+ addComponent(new MissingFromDefaultWidgetsetComponent());
}
@Override
public String getTestDescription() {
- return "This root should never load, as the widgetset can not be loaded";
+ return "This contents if this root should work as the component is present in TestingWidgetSet";
}
@Override
--- /dev/null
+package com.vaadin.tests.components.root;
+
+import com.vaadin.terminal.WrappedRequest;
+import com.vaadin.tests.components.AbstractTestRoot;
+import com.vaadin.tests.widgetset.server.MissingFromDefaultWidgetsetComponent;
+
+public class TestRootWidgetset2 extends AbstractTestRoot {
+
+ @Override
+ protected void setup(WrappedRequest request) {
+ addComponent(new MissingFromDefaultWidgetsetComponent());
+ }
+
+ @Override
+ public String getTestDescription() {
+ return "This contents if this root should not work as the component is not present in DefaultWidgetSet";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(7885);
+ }
+
+}
--- /dev/null
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.tests.widgetset.client;
+
+import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.label.VLabel;
+import com.vaadin.tests.widgetset.server.MissingFromDefaultWidgetsetComponent;
+
+@Connect(MissingFromDefaultWidgetsetComponent.class)
+public class MissingFromDefaultWidgetsetConnector extends
+ AbstractComponentConnector {
+ @Override
+ public VLabel getWidget() {
+ return (VLabel) super.getWidget();
+ }
+
+ @Override
+ protected void init() {
+ getWidget()
+ .setText(
+ "This component is available in TestingWidgetset, but not in DefaultWidgetset");
+ super.init();
+ }
+}
--- /dev/null
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.tests.widgetset.server;
+
+import com.vaadin.ui.AbstractComponent;
+
+public class MissingFromDefaultWidgetsetComponent extends AbstractComponent {
+
+}