From c2aeeac3f182e3c110212f13b365e24e2825a539 Mon Sep 17 00:00:00 2001 From: Aleksi Hietanen Date: Thu, 8 Dec 2016 11:34:28 +0200 Subject: [PATCH] Fix UnknownComponentConnector and ComponentMissingFromDefaultWidgetSet tests Change-Id: I050c9e07a80c73ff9cf301427e2f32e2d90ce3bb --- .../components/UnknownComponentConnector.java | 48 +++++++++++++++++++ ...ponentMissingFromDefaultWidgetsetTest.java | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 uitest/src/main/java/com/vaadin/tests/components/UnknownComponentConnector.java diff --git a/uitest/src/main/java/com/vaadin/tests/components/UnknownComponentConnector.java b/uitest/src/main/java/com/vaadin/tests/components/UnknownComponentConnector.java new file mode 100644 index 0000000000..2688be29e4 --- /dev/null +++ b/uitest/src/main/java/com/vaadin/tests/components/UnknownComponentConnector.java @@ -0,0 +1,48 @@ +/* + * Copyright 2000-2016 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components; + +import com.vaadin.annotations.Widgetset; +import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.AbstractComponent; + +@Widgetset("com.vaadin.DefaultWidgetSet") +public class UnknownComponentConnector extends AbstractTestUI { + + public static class ComponentWithoutConnector extends AbstractComponent { + + } + + @Override + protected void setup(VaadinRequest request) { + ComponentWithoutConnector component = new ComponentWithoutConnector(); + component.setId("no-connector-component"); + addComponent(component); + } + + @Override + protected String getTestDescription() { + // TODO Auto-generated method stub + return null; + } + + @Override + protected Integer getTicketNumber() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentMissingFromDefaultWidgetsetTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentMissingFromDefaultWidgetsetTest.java index d64bd88046..65eea0f234 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentMissingFromDefaultWidgetsetTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentMissingFromDefaultWidgetsetTest.java @@ -35,7 +35,7 @@ public class ComponentMissingFromDefaultWidgetsetTest openTestURL(); WebElement component = vaadinElementById("missing-component"); assertTrue(component.getText().startsWith( - "Widgetset 'com.vaadin.DefaultWidgetSet' does not contain implementation for com.vaadin.tests.widgetset.server.MissingFromDefaultWidgetsetComponent.")); + "Widgetset 'com.vaadin.DefaultWidgetSet' does not contain an implementation for com.vaadin.tests.widgetset.server.MissingFromDefaultWidgetsetComponent.")); } } -- 2.39.5