summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2015-09-23 16:28:28 +0300
committerVaadin Code Review <review@vaadin.com>2015-09-28 07:16:02 +0000
commit1011cff7e8139cd1b7138b2e538264c755c7482f (patch)
tree58d0ff473452a7dc725e5df8cc6a2b20a3943645 /server/tests
parenta85e221774b5b4936a886005ec64d0d07a5c63f8 (diff)
downloadvaadin-framework-1011cff7e8139cd1b7138b2e538264c755c7482f.tar.gz
vaadin-framework-1011cff7e8139cd1b7138b2e538264c755c7482f.zip
Use "vaadin-" as default prefix for Design (#18957)
Change-Id: Ic9e0650e5c8e305258cbce033c4ef3f33307bf0f
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java12
-rw-r--r--server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java12
-rw-r--r--server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/design/DesignContextLocalIdTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.html10
-rw-r--r--server/tests/src/com/vaadin/tests/design/InvalidTagNames.java18
-rw-r--r--server/tests/src/com/vaadin/tests/design/LocaleTest.java10
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java14
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseLegacyPrefixTest.java46
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseMixedLegacyAndNewPrefixTest.java35
-rw-r--r--server/tests/src/com/vaadin/tests/design/WriteLegacyDesignTest.java102
-rw-r--r--server/tests/src/com/vaadin/tests/design/all-components-legacy.html122
-rw-r--r--server/tests/src/com/vaadin/tests/design/all-components.html128
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.html10
-rw-r--r--server/tests/src/com/vaadin/tests/design/duplicate-ids.html8
-rw-r--r--server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html8
-rw-r--r--server/tests/src/com/vaadin/tests/design/local-ids.html8
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java12
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/mychilddesign.html6
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/mydesignroot.html4
-rw-r--r--server/tests/src/com/vaadin/tests/design/testFile-legacy.html19
-rw-r--r--server/tests/src/com/vaadin/tests/design/testFile.html22
-rw-r--r--server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html6
-rw-r--r--server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java10
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java34
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java10
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java40
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java24
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java16
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java41
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java28
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java16
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java12
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java69
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java28
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java36
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java22
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java12
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java10
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java10
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java12
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java10
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java16
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java24
-rw-r--r--server/tests/src/com/vaadin/ui/declarative/DesignTest.java2
73 files changed, 804 insertions, 460 deletions
diff --git a/server/tests/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java b/server/tests/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java
index 735216c474..71373857fa 100644
--- a/server/tests/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java
@@ -29,9 +29,9 @@ public class DragAndDropWrapperDeclarativeTest extends
@Test
public void testDefaultDnDWrapper() {
Button okButton = new Button("OK");
- String input = "<v-drag-and-drop-wrapper>"
+ String input = "<vaadin-drag-and-drop-wrapper>"
+ new DesignContext().createElement(okButton)
- + "</v-drag-and-drop-wrapper>";
+ + "</vaadin-drag-and-drop-wrapper>";
DragAndDropWrapper wrapper = new DragAndDropWrapper(okButton);
testWrite(input, wrapper);
testRead(input, wrapper);
@@ -40,9 +40,9 @@ public class DragAndDropWrapperDeclarativeTest extends
@Test
public void testNoDragImage() {
Button okButton = new Button("OK");
- String input = "<v-drag-and-drop-wrapper drag-start-mode='wrapper'>"
+ String input = "<vaadin-drag-and-drop-wrapper drag-start-mode='wrapper'>"
+ new DesignContext().createElement(okButton)
- + "</v-drag-and-drop-wrapper>";
+ + "</vaadin-drag-and-drop-wrapper>";
DragAndDropWrapper wrapper = new DragAndDropWrapper(okButton);
wrapper.setDragStartMode(DragStartMode.WRAPPER);
testWrite(input, wrapper);
@@ -53,10 +53,10 @@ public class DragAndDropWrapperDeclarativeTest extends
public void testWithDragImage() {
Button dragImage = new Button("Cancel");
Button okButton = new Button("OK");
- String input = "<v-drag-and-drop-wrapper drag-start-mode='component_other'>"
+ String input = "<vaadin-drag-and-drop-wrapper drag-start-mode='component_other'>"
+ new DesignContext().createElement(okButton)
+ new DesignContext().createElement(dragImage).attr(
- ":drag-image", "") + "</v-drag-and-drop-wrapper>";
+ ":drag-image", "") + "</vaadin-drag-and-drop-wrapper>";
DragAndDropWrapper wrapper = new DragAndDropWrapper(okButton);
wrapper.setDragStartMode(DragStartMode.COMPONENT_OTHER);
wrapper.setDragImageComponent(dragImage);
diff --git a/server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java b/server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java
index d058ae1dcd..b131c5a21d 100644
--- a/server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java
@@ -38,14 +38,14 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
@Test
// #16328
public void testReadWrite() throws IOException {
- String design = "<v-menu-bar auto-open='' tabindex=5>"
+ String design = "<vaadin-menu-bar auto-open='' tabindex=5>"
+ "<menu checkable=''>Save</menu>"
+ "<menu description='Open a file'>Open</menu>"
+ "<menu disabled=''>Close</menu>"
+ "<menu icon='http://foo.bar/ico.png'>Help</menu>"
+ "<menu visible='false'>About</menu>"
+ "<menu>Sub<menu>Item</menu></menu>"
- + "<menu more>WTF?!</menu>" + "</v-menu-bar>";
+ + "<menu more>WTF?!</menu>" + "</vaadin-menu-bar>";
MenuBar bar = new MenuBar();
bar.setAutoOpen(true);
bar.setHtmlContentAllowed(true);
@@ -69,7 +69,7 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
@Test
// #16328
public void testTicketSpec1() throws IOException {
- String design = "<v-menu-bar auto-open='' plain-text tabindex=5> "
+ String design = "<vaadin-menu-bar auto-open='' plain-text tabindex=5> "
+ "<menu>File"
+ "<menu>Save</menu>"
+ "<menu icon=\"theme://../runo/icons/16/folder.png\">Open</menu>"
@@ -85,7 +85,7 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
+ "</menu>" //
+ "</menu>" //
+ "<menu more icon=\"theme://icon.png\">foo</menu>"
- + "</v-menu-bar>";
+ + "</vaadin-menu-bar>";
// for one reason or another, no component has a correct .equals
// implementation, which makes tests a bit annoying
MenuBar menuBar = new MenuBar();
@@ -120,12 +120,12 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
@Test
// #16328
public void testTicketSpec2() throws IOException {
- String design = "<v-menu-bar>"
+ String design = "<vaadin-menu-bar>"
+ "<menu><b>File</b>"
+ "<menu><font style=\"color: red\">Save</font></menu>"
+ "<menu icon=\"theme://../runo/icons/16/folder.png\">Open</menu>"
+ "<menu separator='' />" + "<menu disabled=''>Exit</menu>" //
- + "</menu></v-menu-bar>";
+ + "</menu></vaadin-menu-bar>";
MenuBar menuBar = new MenuBar();
menuBar.setHtmlContentAllowed(true);
MenuItem fileMenu = menuBar.addItem("<b>File</b>", null);
diff --git a/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java b/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
index 1119301c55..b68f56218d 100644
--- a/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
+++ b/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
@@ -29,7 +29,7 @@ public class AbstractComponentSetResponsiveTest extends
label.setContentMode(ContentMode.HTML);
label.setResponsive(true);
- String design = "<v-label responsive='' />";
+ String design = "<vaadin-label responsive='' />";
testWrite(design, label);
testRead(design, label);
diff --git a/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java b/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java
index 85efa22c40..472c079e42 100644
--- a/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java
+++ b/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java
@@ -74,7 +74,7 @@ public class ComponentFactoryTest {
}
});
- Design.read(new ByteArrayInputStream("<v-label />".getBytes()));
+ Design.read(new ByteArrayInputStream("<vaadin-label />".getBytes()));
Assert.assertEquals("There should be one message logged", 1,
messages.size());
@@ -93,7 +93,7 @@ public class ComponentFactoryTest {
}
});
- Design.read(new ByteArrayInputStream("<v-label />".getBytes()));
+ Design.read(new ByteArrayInputStream("<vaadin-label />".getBytes()));
}
@Test(expected = DesignException.class)
@@ -108,7 +108,7 @@ public class ComponentFactoryTest {
}
});
- Design.read(new ByteArrayInputStream("<v-label />".getBytes()));
+ Design.read(new ByteArrayInputStream("<vaadin-label />".getBytes()));
}
@Test
diff --git a/server/tests/src/com/vaadin/tests/design/DesignContextLocalIdTest.java b/server/tests/src/com/vaadin/tests/design/DesignContextLocalIdTest.java
index 6cedb17409..f8fb1249b9 100644
--- a/server/tests/src/com/vaadin/tests/design/DesignContextLocalIdTest.java
+++ b/server/tests/src/com/vaadin/tests/design/DesignContextLocalIdTest.java
@@ -101,7 +101,7 @@ public class DesignContextLocalIdTest {
Element e = ctx.createElement(ctr);
assertEquals("Unexpected child local id for "
+ ctr.getClass().getSimpleName(), "button-id", e
- .getElementsByTag("v-button").first().attr("_id"));
+ .getElementsByTag("vaadin-button").first().attr("_id"));
}
SingleComponentContainer[] sctrs = { new Window(), new Panel() };
@@ -111,7 +111,7 @@ public class DesignContextLocalIdTest {
Element e = ctx.createElement(ctr);
assertEquals("Unexpected child local id for "
+ ctr.getClass().getSimpleName(), "button-id", e
- .getElementsByTag("v-button").first().attr("_id"));
+ .getElementsByTag("vaadin-button").first().attr("_id"));
}
}
diff --git a/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.html b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.html
index 86c9c2a2da..72f65d744a 100644
--- a/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.html
+++ b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.html
@@ -1,5 +1,5 @@
-<v-vertical-layout>
- <v-text-field caption="First name" />
- <v-text-field caption="Last name" />
- <v-button>OK!</v-button>
-</v-vertical-layout> \ No newline at end of file
+<vaadin-vertical-layout>
+ <vaadin-text-field caption="First name" />
+ <vaadin-text-field caption="Last name" />
+ <vaadin-button>OK!</vaadin-button>
+</vaadin-vertical-layout> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/InvalidTagNames.java b/server/tests/src/com/vaadin/tests/design/InvalidTagNames.java
index 0b6ccf8cb1..9f405f4e56 100644
--- a/server/tests/src/com/vaadin/tests/design/InvalidTagNames.java
+++ b/server/tests/src/com/vaadin/tests/design/InvalidTagNames.java
@@ -42,7 +42,7 @@ public class InvalidTagNames {
@Test(expected = DesignException.class)
public void onlyPrefix() {
- readDesign("<v->foo</v->");
+ readDesign("<vaadin->foo</vaadin->");
}
@Test
@@ -55,7 +55,7 @@ public class InvalidTagNames {
@Test(expected = DesignException.class)
public void unknownClass() {
- readDesign("<v-unknownbutton>foo</v-unknownbutton>");
+ readDesign("<vaadin-unknownbutton>foo</vaadin-unknownbutton>");
}
@Test(expected = DesignException.class)
@@ -65,31 +65,31 @@ public class InvalidTagNames {
// @Test(expected = DesignException.class)
// This is a side effect of not actively checking for invalid input. Will be
- // parsed currently as <v-button> (this should not be considered API)
+ // parsed currently as <vaadin-button> (this should not be considered API)
public void tagEndsInDash() {
- Component c = readDesign("<v-button-></v-button->");
+ Component c = readDesign("<vaadin-button-></vaadin-button->");
Assert.assertTrue(c.getClass() == Button.class);
}
// @Test(expected = DesignException.class)
// This is a side effect of not actively checking for invalid input. Will be
- // parsed currently as <v-button> (this should not be considered API)
+ // parsed currently as <vaadin-button> (this should not be considered API)
public void tagEndsInTwoDashes() {
- Component c = readDesign("<v-button--></v-button-->");
+ Component c = readDesign("<vaadin-button--></vaadin-button-->");
Assert.assertTrue(c.getClass() == Button.class);
}
// @Test(expected = DesignException.class)
// This is a side effect of not actively checking for invalid input. Will be
- // parsed currently as <v-button> (this should not be considered API)
+ // parsed currently as <vaadin-button> (this should not be considered API)
public void tagWithTwoDashes() {
- Component c = readDesign("<v--button></v--button>");
+ Component c = readDesign("<vaadin--button></vaadin--button>");
Assert.assertTrue(c.getClass() == Button.class);
}
@Test(expected = DesignException.class)
public void specialCharacters() {
- readDesign("<v-button-&!#></v-button-&!#>");
+ readDesign("<vaadin-button-&!#></vaadin-button-&!#>");
}
private Component readDesign(String string) {
diff --git a/server/tests/src/com/vaadin/tests/design/LocaleTest.java b/server/tests/src/com/vaadin/tests/design/LocaleTest.java
index 8f0ef4d13e..6cb288db23 100644
--- a/server/tests/src/com/vaadin/tests/design/LocaleTest.java
+++ b/server/tests/src/com/vaadin/tests/design/LocaleTest.java
@@ -145,18 +145,18 @@ public class LocaleTest {
html.appendChild(doc.createElement("head"));
Element body = doc.createElement("body");
html.appendChild(body);
- Element evLayout = doc.createElement("v-vertical-layout");
+ Element evLayout = doc.createElement("vaadin-vertical-layout");
evLayout.attr("locale", "en_US");
body.appendChild(evLayout);
- Element ehLayout = doc.createElement("v-horizontal-layout");
+ Element ehLayout = doc.createElement("vaadin-horizontal-layout");
evLayout.appendChild(ehLayout);
- Element eb1 = doc.createElement("v-button");
+ Element eb1 = doc.createElement("vaadin-button");
eb1.attr("locale", "en_US");
ehLayout.appendChild(eb1);
- Element eb2 = doc.createElement("v-button");
+ Element eb2 = doc.createElement("vaadin-button");
eb2.attr("locale", "en_GB");
ehLayout.appendChild(eb2);
- Element eb3 = doc.createElement("v-button");
+ Element eb3 = doc.createElement("vaadin-button");
ehLayout.appendChild(eb3);
// parse the created document and check the constructed component
diff --git a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
index 50ab261195..20903512d1 100644
--- a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
+++ b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
@@ -15,10 +15,16 @@
*/
package com.vaadin.tests.design;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@@ -37,12 +43,6 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.ui.declarative.DesignException;
-import org.junit.rules.ExpectedException;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.*;
/**
* A test for checking that parsing a layout preserves the IDs and the mapping
diff --git a/server/tests/src/com/vaadin/tests/design/ParseLegacyPrefixTest.java b/server/tests/src/com/vaadin/tests/design/ParseLegacyPrefixTest.java
new file mode 100644
index 0000000000..feaf73af3c
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/ParseLegacyPrefixTest.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2000-2014 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.design;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+import org.junit.Test;
+
+import com.vaadin.ui.declarative.Design;
+import com.vaadin.ui.declarative.DesignContext;
+
+/**
+ * Test reading a design with all components using the legacy prefix.
+ */
+public class ParseLegacyPrefixTest {
+
+ @Test
+ public void allComponentsAreParsed() throws FileNotFoundException {
+ DesignContext ctx = Design
+ .read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/all-components-legacy.html"),
+ null);
+
+ assertThat(ctx, is(not(nullValue())));
+ assertThat(ctx.getRootComponent(), is(not(nullValue())));
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/ParseMixedLegacyAndNewPrefixTest.java b/server/tests/src/com/vaadin/tests/design/ParseMixedLegacyAndNewPrefixTest.java
new file mode 100644
index 0000000000..2996cb23c1
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/ParseMixedLegacyAndNewPrefixTest.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2000-2014 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.design;
+
+import java.io.ByteArrayInputStream;
+
+import org.junit.Test;
+
+import com.vaadin.ui.declarative.Design;
+
+/**
+ * Parse mixed content with legacy and new prefixes (not a required feature but
+ * works).
+ */
+public class ParseMixedLegacyAndNewPrefixTest {
+ @Test
+ public void parseMixedContent() {
+ Design.read(new ByteArrayInputStream(
+ "<v-vertical-layout><vaadin-label /></v-vertical-layout>"
+ .getBytes()));
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/WriteLegacyDesignTest.java b/server/tests/src/com/vaadin/tests/design/WriteLegacyDesignTest.java
new file mode 100644
index 0000000000..e57a03c232
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/WriteLegacyDesignTest.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2000-2014 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.design;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.nodes.Node;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.vaadin.server.Constants;
+import com.vaadin.server.DefaultDeploymentConfiguration;
+import com.vaadin.server.DeploymentConfiguration;
+import com.vaadin.server.VaadinService;
+import com.vaadin.server.VaadinServletService;
+import com.vaadin.ui.declarative.Design;
+import com.vaadin.ui.declarative.DesignContext;
+import com.vaadin.util.CurrentInstance;
+
+/**
+ * Parse and write a legacy design (using the "v-" prefix).
+ */
+public class WriteLegacyDesignTest {
+
+ // The context is used for accessing the created component hierarchy.
+ private DesignContext ctx;
+
+ @Before
+ public void setUp() throws Exception {
+ Properties properties = new Properties();
+ properties
+ .put(Constants.SERVLET_PARAMETER_LEGACY_DESIGN_PREFIX, "true");
+ final DeploymentConfiguration configuration = new DefaultDeploymentConfiguration(
+ WriteLegacyDesignTest.class, properties);
+
+ VaadinService service = new VaadinServletService(null, configuration);
+
+ CurrentInstance.set(VaadinService.class, service);
+
+ ctx = Design
+ .read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/testFile-legacy.html"),
+ null);
+ }
+
+ @After
+ public void tearDown() {
+ CurrentInstance.set(VaadinService.class, null);
+ }
+
+ private ByteArrayOutputStream serializeDesign(DesignContext context)
+ throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Design.write(context, out);
+
+ return out;
+ }
+
+ @Test
+ public void designIsSerializedWithCorrectPrefixesAndPackageNames()
+ throws IOException {
+ ByteArrayOutputStream out = serializeDesign(ctx);
+
+ Document doc = Jsoup.parse(out.toString("UTF-8"));
+ for (Node child : doc.body().childNodes()) {
+ checkNode(child);
+ }
+ }
+
+ private void checkNode(Node node) {
+ if (node instanceof Element) {
+ assertTrue("Wrong design element prefix", node.nodeName()
+ .startsWith("v-"));
+ for (Node child : node.childNodes()) {
+ checkNode(child);
+ }
+ }
+ }
+
+}
diff --git a/server/tests/src/com/vaadin/tests/design/all-components-legacy.html b/server/tests/src/com/vaadin/tests/design/all-components-legacy.html
new file mode 100644
index 0000000000..39aecb6db1
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/all-components-legacy.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta name="package-mapping" content="my:com.addon.mypackage"/>
+ </head>
+ <body>
+ <v-vertical-layout>
+ <!-- abstract component -->
+ <v-button primary-style-name="button" id="foo" style-name="red" caption="Some caption" icon="vaadin://themes/runo/icons/16/ok.png" description="My tooltip" error="Something went wrong" locale="en_US"></v-button>
+
+ <!-- absolute layout -->
+ <v-absolute-layout>
+ <v-button :top="100px" :left="0px" :z-index=21>OK</v-button>
+ <v-button :bottom="0px" :right="0px">Cancel</v-button>
+ </v-absolute-layout>
+
+ <!-- vertical layout -->
+ <v-vertical-layout spacing margin>
+ <v-button :top>OK</v-button>
+ <v-table size-full :expand=1 />
+ </v-vertical-layout>
+
+ <!-- horizontal layout -->
+ <v-horizontal-layout spacing margin>
+ <v-button :top>OK</v-button>
+ <v-table size-full :expand=1 />
+ </v-horizontal-layout>
+
+ <!-- form layout -->
+ <v-form-layout spacing margin>
+ <v-button :top>OK</v-button>
+ <v-table size-full :expand=1 />
+ </v-form-layout>
+
+ <!-- css layout -->
+ <v-css-layout>
+ <v-button>OK</v-button>
+ <v-table size-full />
+ </v-css-layout>
+
+ <!-- panel -->
+ <v-panel caption="Hello world" tabindex=2 scroll-left="10" scroll-top="10">
+ <v-table size-full />
+ </v-panel>
+
+ <!-- abstract field -->
+ <v-text-field buffered validation-visible=false invalid-committed invalid-allowed=false required required-error="This is a required field" conversion-error="Input {0} cannot be parsed" tabindex=3 readonly />
+ <!-- abstract text field, text field -->
+ <v-text-field null-representation="" null-setting-allowed maxlength=10 columns=5 input-prompt="Please enter a value" text-change-event-mode="eager" text-change-timeout=2 value="foo" />
+ <!-- password field -->
+ <v-password-field null-representation="" null-setting-allowed maxlength=10 columns=5 input-prompt="Please enter a value" text-change-event-mode="eager" text-change-timeout=2 value="foo" />
+ <!-- text area -->
+ <v-text-area rows=5 wordwrap=false >test value</v-text-area>
+ <!-- button -->
+ <v-button click-shortcut="ctrl-shift-o" disable-on-click tabindex=1 icon="http://vaadin.com/image.png" icon-alt="ok" plain-text>OK</v-button>
+ <!-- native button -->
+ <v-button click-shortcut="ctrl-shift-o" disable-on-click tabindex=1 icon="http://vaadin.com/image.png" icon-alt="ok" plain-text>OK</v-button>
+
+ <!-- tabsheet -->
+ <v-tab-sheet tabindex=5>
+ <tab visible=false closable caption="My first tab">
+ <v-vertical-layout>
+ <v-text-field/>
+ </v-vertical-layout>
+ </tab>
+ <tab enabled=false caption="Disabled second tab">
+ <v-button>In disabled tab - can’t be shown by default</v-button>
+ </tab>
+ <tab icon="theme://../runo/icons/16/ok.png" icon-alt="Ok png from Runo - very helpful" description="Click to show a text field" style-name="red" id="uniqueDomId">
+ <v-text-field input-prompt="Icon only in tab" />
+ </tab>
+ </v-tab-sheet>
+
+ <!-- accordion -->
+ <v-accordion tabindex=5>
+ <tab visible=false closable caption="My first tab">
+ <v-vertical-layout>
+ <v-text-field/>
+ </v-vertical-layout>
+ </tab>
+ <tab enabled=false caption="Disabled second tab">
+ <v-button>In disabled tab - can’t be shown by default</v-button>
+ </tab>
+ <tab icon="theme://../runo/icons/16/ok.png" icon-alt="Ok png from Runo - very helpful" description="Click to show a text field" style-name="red" id="uniqueDomId">
+ <v-text-field input-prompt="Icon only in tab" />
+ </tab>
+ </v-accordion>
+
+ <!-- abstract split panel -->
+ <v-horizontal-split-panel split-position="20px" min-split-position="0px" max-split-position="50px" locked>
+ <v-button>First slot</v-button>
+ </v-horizontal-split-panel>
+ <v-vertical-split-panel split-position="25%" reversed>
+ <v-button :second>Second slot</v-button>
+ </v-vertical-split-panel>
+ <v-horizontal-split-panel split-position="25%" reversed>
+ <v-button>First slot</v-button>
+ <v-button>Second slot</v-button>
+ </v-horizontal-split-panel>
+
+ <!-- label -->
+ <v-label>Hello world!</v-label>
+ <v-label>This is <b><u>Rich</u></b> content!</v-label>
+ <v-label plain-text>This is only <b>text</b> and will contain visible tags</v-label>
+
+ <!-- checkbox -->
+ <v-check-box checked/>
+
+ <!-- abstract select -->
+ <v-list-select new-items-allowed multi-select
+ item-caption-mode="index"
+ null-selection-allowed=false>
+ </v-list-select>
+
+ <v-combo-box>
+ <option icon="http://something/my-icon.png">First value</option>
+ <option>Second value</option>
+ </v-combo-box>
+
+ </v-vertical-layout>
+ </body>
+</html>
diff --git a/server/tests/src/com/vaadin/tests/design/all-components.html b/server/tests/src/com/vaadin/tests/design/all-components.html
index 39aecb6db1..6507188cd7 100644
--- a/server/tests/src/com/vaadin/tests/design/all-components.html
+++ b/server/tests/src/com/vaadin/tests/design/all-components.html
@@ -4,119 +4,119 @@
<meta name="package-mapping" content="my:com.addon.mypackage"/>
</head>
<body>
- <v-vertical-layout>
+ <vaadin-vertical-layout>
<!-- abstract component -->
- <v-button primary-style-name="button" id="foo" style-name="red" caption="Some caption" icon="vaadin://themes/runo/icons/16/ok.png" description="My tooltip" error="Something went wrong" locale="en_US"></v-button>
+ <vaadin-button primary-style-name="button" id="foo" style-name="red" caption="Some caption" icon="vaadin://themes/runo/icons/16/ok.png" description="My tooltip" error="Something went wrong" locale="en_US"></vaadin-button>
<!-- absolute layout -->
- <v-absolute-layout>
- <v-button :top="100px" :left="0px" :z-index=21>OK</v-button>
- <v-button :bottom="0px" :right="0px">Cancel</v-button>
- </v-absolute-layout>
+ <vaadin-absolute-layout>
+ <vaadin-button :top="100px" :left="0px" :z-index=21>OK</vaadin-button>
+ <vaadin-button :bottom="0px" :right="0px">Cancel</vaadin-button>
+ </vaadin-absolute-layout>
<!-- vertical layout -->
- <v-vertical-layout spacing margin>
- <v-button :top>OK</v-button>
- <v-table size-full :expand=1 />
- </v-vertical-layout>
+ <vaadin-vertical-layout spacing margin>
+ <vaadin-button :top>OK</vaadin-button>
+ <vaadin-table size-full :expand=1 />
+ </vaadin-vertical-layout>
<!-- horizontal layout -->
- <v-horizontal-layout spacing margin>
- <v-button :top>OK</v-button>
- <v-table size-full :expand=1 />
- </v-horizontal-layout>
+ <vaadin-horizontal-layout spacing margin>
+ <vaadin-button :top>OK</vaadin-button>
+ <vaadin-table size-full :expand=1 />
+ </vaadin-horizontal-layout>
<!-- form layout -->
- <v-form-layout spacing margin>
- <v-button :top>OK</v-button>
- <v-table size-full :expand=1 />
- </v-form-layout>
+ <vaadin-form-layout spacing margin>
+ <vaadin-button :top>OK</vaadin-button>
+ <vaadin-table size-full :expand=1 />
+ </vaadin-form-layout>
<!-- css layout -->
- <v-css-layout>
- <v-button>OK</v-button>
- <v-table size-full />
- </v-css-layout>
+ <vaadin-css-layout>
+ <vaadin-button>OK</vaadin-button>
+ <vaadin-table size-full />
+ </vaadin-css-layout>
<!-- panel -->
- <v-panel caption="Hello world" tabindex=2 scroll-left="10" scroll-top="10">
- <v-table size-full />
- </v-panel>
+ <vaadin-panel caption="Hello world" tabindex=2 scroll-left="10" scroll-top="10">
+ <vaadin-table size-full />
+ </vaadin-panel>
<!-- abstract field -->
- <v-text-field buffered validation-visible=false invalid-committed invalid-allowed=false required required-error="This is a required field" conversion-error="Input {0} cannot be parsed" tabindex=3 readonly />
+ <vaadin-text-field buffered validation-visible=false invalid-committed invalid-allowed=false required required-error="This is a required field" conversion-error="Input {0} cannot be parsed" tabindex=3 readonly />
<!-- abstract text field, text field -->
- <v-text-field null-representation="" null-setting-allowed maxlength=10 columns=5 input-prompt="Please enter a value" text-change-event-mode="eager" text-change-timeout=2 value="foo" />
+ <vaadin-text-field null-representation="" null-setting-allowed maxlength=10 columns=5 input-prompt="Please enter a value" text-change-event-mode="eager" text-change-timeout=2 value="foo" />
<!-- password field -->
- <v-password-field null-representation="" null-setting-allowed maxlength=10 columns=5 input-prompt="Please enter a value" text-change-event-mode="eager" text-change-timeout=2 value="foo" />
+ <vaadin-password-field null-representation="" null-setting-allowed maxlength=10 columns=5 input-prompt="Please enter a value" text-change-event-mode="eager" text-change-timeout=2 value="foo" />
<!-- text area -->
- <v-text-area rows=5 wordwrap=false >test value</v-text-area>
+ <vaadin-text-area rows=5 wordwrap=false >test value</vaadin-text-area>
<!-- button -->
- <v-button click-shortcut="ctrl-shift-o" disable-on-click tabindex=1 icon="http://vaadin.com/image.png" icon-alt="ok" plain-text>OK</v-button>
+ <vaadin-button click-shortcut="ctrl-shift-o" disable-on-click tabindex=1 icon="http://vaadin.com/image.png" icon-alt="ok" plain-text>OK</vaadin-button>
<!-- native button -->
- <v-button click-shortcut="ctrl-shift-o" disable-on-click tabindex=1 icon="http://vaadin.com/image.png" icon-alt="ok" plain-text>OK</v-button>
+ <vaadin-button click-shortcut="ctrl-shift-o" disable-on-click tabindex=1 icon="http://vaadin.com/image.png" icon-alt="ok" plain-text>OK</vaadin-button>
<!-- tabsheet -->
- <v-tab-sheet tabindex=5>
+ <vaadin-tab-sheet tabindex=5>
<tab visible=false closable caption="My first tab">
- <v-vertical-layout>
- <v-text-field/>
- </v-vertical-layout>
+ <vaadin-vertical-layout>
+ <vaadin-text-field/>
+ </vaadin-vertical-layout>
</tab>
<tab enabled=false caption="Disabled second tab">
- <v-button>In disabled tab - can’t be shown by default</v-button>
+ <vaadin-button>In disabled tab - can’t be shown by default</vaadin-button>
</tab>
<tab icon="theme://../runo/icons/16/ok.png" icon-alt="Ok png from Runo - very helpful" description="Click to show a text field" style-name="red" id="uniqueDomId">
- <v-text-field input-prompt="Icon only in tab" />
+ <vaadin-text-field input-prompt="Icon only in tab" />
</tab>
- </v-tab-sheet>
+ </vaadin-tab-sheet>
<!-- accordion -->
- <v-accordion tabindex=5>
+ <vaadin-accordion tabindex=5>
<tab visible=false closable caption="My first tab">
- <v-vertical-layout>
- <v-text-field/>
- </v-vertical-layout>
+ <vaadin-vertical-layout>
+ <vaadin-text-field/>
+ </vaadin-vertical-layout>
</tab>
<tab enabled=false caption="Disabled second tab">
- <v-button>In disabled tab - can’t be shown by default</v-button>
+ <vaadin-button>In disabled tab - can’t be shown by default</vaadin-button>
</tab>
<tab icon="theme://../runo/icons/16/ok.png" icon-alt="Ok png from Runo - very helpful" description="Click to show a text field" style-name="red" id="uniqueDomId">
- <v-text-field input-prompt="Icon only in tab" />
+ <vaadin-text-field input-prompt="Icon only in tab" />
</tab>
- </v-accordion>
+ </vaadin-accordion>
<!-- abstract split panel -->
- <v-horizontal-split-panel split-position="20px" min-split-position="0px" max-split-position="50px" locked>
- <v-button>First slot</v-button>
- </v-horizontal-split-panel>
- <v-vertical-split-panel split-position="25%" reversed>
- <v-button :second>Second slot</v-button>
- </v-vertical-split-panel>
- <v-horizontal-split-panel split-position="25%" reversed>
- <v-button>First slot</v-button>
- <v-button>Second slot</v-button>
- </v-horizontal-split-panel>
+ <vaadin-horizontal-split-panel split-position="20px" min-split-position="0px" max-split-position="50px" locked>
+ <vaadin-button>First slot</vaadin-button>
+ </vaadin-horizontal-split-panel>
+ <vaadin-vertical-split-panel split-position="25%" reversed>
+ <vaadin-button :second>Second slot</vaadin-button>
+ </vaadin-vertical-split-panel>
+ <vaadin-horizontal-split-panel split-position="25%" reversed>
+ <vaadin-button>First slot</vaadin-button>
+ <vaadin-button>Second slot</vaadin-button>
+ </vaadin-horizontal-split-panel>
<!-- label -->
- <v-label>Hello world!</v-label>
- <v-label>This is <b><u>Rich</u></b> content!</v-label>
- <v-label plain-text>This is only <b>text</b> and will contain visible tags</v-label>
+ <vaadin-label>Hello world!</vaadin-label>
+ <vaadin-label>This is <b><u>Rich</u></b> content!</vaadin-label>
+ <vaadin-label plain-text>This is only <b>text</b> and will contain visible tags</vaadin-label>
<!-- checkbox -->
- <v-check-box checked/>
+ <vaadin-check-box checked/>
<!-- abstract select -->
- <v-list-select new-items-allowed multi-select
+ <vaadin-list-select new-items-allowed multi-select
item-caption-mode="index"
null-selection-allowed=false>
- </v-list-select>
+ </vaadin-list-select>
- <v-combo-box>
+ <vaadin-combo-box>
<option icon="http://something/my-icon.png">First value</option>
<option>Second value</option>
- </v-combo-box>
+ </vaadin-combo-box>
- </v-vertical-layout>
+ </vaadin-vertical-layout>
</body>
</html>
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.html b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.html
index 66e9202ca7..3e7977f568 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.html
+++ b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.html
@@ -1,5 +1,5 @@
-<v-vertical-layout>
- <v-button>OK</v-button>
- <v-button>Cancel</v-button>
- <v-label caption="preInitializedField">a Label that should not override pre initalized field<v-label/>
-</v-vertical-layout> \ No newline at end of file
+<vaadin-vertical-layout>
+ <vaadin-button>OK</vaadin-button>
+ <vaadin-button>Cancel</vaadin-button>
+ <vaadin-label caption="preInitializedField">a Label that should not override pre initalized field<vaadin-label/>
+</vaadin-vertical-layout> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/duplicate-ids.html b/server/tests/src/com/vaadin/tests/design/duplicate-ids.html
index ef845d46d5..984bb1e047 100644
--- a/server/tests/src/com/vaadin/tests/design/duplicate-ids.html
+++ b/server/tests/src/com/vaadin/tests/design/duplicate-ids.html
@@ -1,4 +1,4 @@
-<v-vertical-layout>
- <v-label id="foo"/>
- <v-label id="foo"/>
-</v-vertical-layout> \ No newline at end of file
+<vaadin-vertical-layout>
+ <vaadin-label id="foo"/>
+ <vaadin-label id="foo"/>
+</vaadin-vertical-layout> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html b/server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html
index 5a506ad00c..e8a698a39f 100644
--- a/server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html
+++ b/server/tests/src/com/vaadin/tests/design/duplicate-local-ids.html
@@ -1,4 +1,4 @@
-<v-vertical-layout>
- <v-label _id="foo"/>
- <v-label _id="foo"/>
-</v-vertical-layout> \ No newline at end of file
+<vaadin-vertical-layout>
+ <vaadin-label _id="foo"/>
+ <vaadin-label _id="foo"/>
+</vaadin-vertical-layout> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/local-ids.html b/server/tests/src/com/vaadin/tests/design/local-ids.html
index 638d004124..76ff642ee0 100644
--- a/server/tests/src/com/vaadin/tests/design/local-ids.html
+++ b/server/tests/src/com/vaadin/tests/design/local-ids.html
@@ -1,4 +1,4 @@
-<v-vertical-layout>
- <v-text-field caption="Enter your name" _id="foo"/>
- <v-button _id="bar">Say hello</v-button>
-</v-vertical-layout>
+<vaadin-vertical-layout>
+ <vaadin-text-field caption="Enter your name" _id="foo"/>
+ <vaadin-button _id="bar">Say hello</vaadin-button>
+</vaadin-vertical-layout>
diff --git a/server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java b/server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
index 344cd94ac2..5c78802472 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
@@ -15,15 +15,19 @@
*/
package com.vaadin.tests.design.nested;
-import com.vaadin.ui.declarative.DesignContext;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Element;
import org.jsoup.parser.Tag;
import org.junit.Before;
import org.junit.Test;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.*;
+import com.vaadin.ui.declarative.DesignContext;
/**
*
@@ -43,7 +47,7 @@ public class WriteNestedTemplatesTest {
}
private Element createDesign() {
- Element design = new Element(Tag.valueOf("v-vertical-layout"), "",
+ Element design = new Element(Tag.valueOf("vaadin-vertical-layout"), "",
new Attributes());
DesignContext designContext = new DesignContext();
diff --git a/server/tests/src/com/vaadin/tests/design/nested/mychilddesign.html b/server/tests/src/com/vaadin/tests/design/nested/mychilddesign.html
index c636033d2d..0d2613539b 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/mychilddesign.html
+++ b/server/tests/src/com/vaadin/tests/design/nested/mychilddesign.html
@@ -4,9 +4,9 @@
<meta name="package-mapping" content="x:com.vaadin.tests.design.nested"/>
</head>
<body>
- <v-horizontal-layout caption="Default caption for child design">
- <v-label _id="childLabel">test content</v-label>
+ <vaadin-horizontal-layout caption="Default caption for child design">
+ <vaadin-label _id="childLabel">test content</vaadin-label>
<!-- Test some custom component in child template -->
<x-my-child-design-custom-component _id="childCustomComponent">custom content</x-my-child-design-custom-component>
- </v-horizontal-layout>
+ </vaadin-horizontal-layout>
</body> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/nested/mydesignroot.html b/server/tests/src/com/vaadin/tests/design/nested/mydesignroot.html
index 55ac27c194..6bf38db8f6 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/mydesignroot.html
+++ b/server/tests/src/com/vaadin/tests/design/nested/mydesignroot.html
@@ -4,7 +4,7 @@
<meta name="package-mapping" content="x:com.vaadin.tests.design.nested"/>
</head>
<body>
- <v-vertical-layout caption="root caption">
+ <vaadin-vertical-layout caption="root caption">
<x-my-extended-child-design _id="childDesign" caption="child caption"/>
- </v-vertical-layout>
+ </vaadin-vertical-layout>
</body> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/testFile-legacy.html b/server/tests/src/com/vaadin/tests/design/testFile-legacy.html
new file mode 100644
index 0000000000..79ae1e9eaf
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/testFile-legacy.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta name="package-mapping" content="my:com.addon.mypackage"/>
+ </head>
+ <body>
+ <v-vertical-layout width="500px">
+ <v-horizontal-layout>
+ <v-label plain-text caption="FooBar"></v-label>
+ <v-native-button _id=firstButton>Native click me</v-native-button>
+ <v-native-button id = secondButton _id="localID">Another button</v-native-button>
+ <v-native-button>Yet another button</v-native-button>
+ <v-button plain-text width = "150px">Click me</v-button>
+ </v-horizontal-layout>
+ <v-text-field caption = "Text input"/>
+ <v-text-area caption = "Text area" height="200px" width="300px"/>
+ </v-vertical-layout>
+ </body>
+</html> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/testFile.html b/server/tests/src/com/vaadin/tests/design/testFile.html
index 79ae1e9eaf..ab23d1d1b2 100644
--- a/server/tests/src/com/vaadin/tests/design/testFile.html
+++ b/server/tests/src/com/vaadin/tests/design/testFile.html
@@ -4,16 +4,16 @@
<meta name="package-mapping" content="my:com.addon.mypackage"/>
</head>
<body>
- <v-vertical-layout width="500px">
- <v-horizontal-layout>
- <v-label plain-text caption="FooBar"></v-label>
- <v-native-button _id=firstButton>Native click me</v-native-button>
- <v-native-button id = secondButton _id="localID">Another button</v-native-button>
- <v-native-button>Yet another button</v-native-button>
- <v-button plain-text width = "150px">Click me</v-button>
- </v-horizontal-layout>
- <v-text-field caption = "Text input"/>
- <v-text-area caption = "Text area" height="200px" width="300px"/>
- </v-vertical-layout>
+ <vaadin-vertical-layout width="500px">
+ <vaadin-horizontal-layout>
+ <vaadin-label plain-text caption="FooBar"></vaadin-label>
+ <vaadin-native-button _id=firstButton>Native click me</vaadin-native-button>
+ <vaadin-native-button id = secondButton _id="localID">Another button</vaadin-native-button>
+ <vaadin-native-button>Yet another button</vaadin-native-button>
+ <vaadin-button plain-text width = "150px">Click me</vaadin-button>
+ </vaadin-horizontal-layout>
+ <vaadin-text-field caption = "Text input"/>
+ <vaadin-text-area caption = "Text area" height="200px" width="300px"/>
+ </vaadin-vertical-layout>
</body>
</html> \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html b/server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html
index 4b0123b9ed..cf3dc65e48 100644
--- a/server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html
+++ b/server/tests/src/com/vaadin/tests/design/verticallayout-one-child.html
@@ -1,3 +1,3 @@
-<v-vertical-layout>
- <v-button>OK</v-button>
-</v-vertical-layout>
+<vaadin-vertical-layout>
+ <vaadin-button>OK</vaadin-button>
+</vaadin-vertical-layout>
diff --git a/server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html b/server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html
index 87ae9eee8e..dcf71a190b 100644
--- a/server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html
+++ b/server/tests/src/com/vaadin/tests/design/verticallayout-two-children.html
@@ -1,4 +1,4 @@
-<v-vertical-layout>
- <v-text-field caption="Enter your name" />
- <v-button>Say hello</v-button>
-</v-vertical-layout>
+<vaadin-vertical-layout>
+ <vaadin-text-field caption="Enter your name" />
+ <vaadin-button>Say hello</vaadin-button>
+</vaadin-vertical-layout>
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java
index 80ca95733c..f00eb91c50 100644
--- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java
@@ -32,10 +32,10 @@ public class AbsoluteLayoutDeclarativeTest extends
@Test
public void testAbsoluteLayoutFeatures() {
- String design = "<v-absolute-layout caption=\"test-layout\">"
- + "<v-button :top='100px' :left='0px' :z-index=21>OK</v-button>"
- + "<v-button :bottom='0px' :right='0px'>Cancel</v-button>"
- + "</v-absolute-layout>";
+ String design = "<vaadin-absolute-layout caption=\"test-layout\">"
+ + "<vaadin-button :top='100px' :left='0px' :z-index=21>OK</vaadin-button>"
+ + "<vaadin-button :bottom='0px' :right='0px'>Cancel</vaadin-button>"
+ + "</vaadin-absolute-layout>";
AbsoluteLayout layout = new AbsoluteLayout();
layout.setCaption("test-layout");
Button b1 = new Button("OK");
@@ -51,7 +51,7 @@ public class AbsoluteLayoutDeclarativeTest extends
@Test
public void testEmpty() {
- String design = "<v-absolute-layout/>";
+ String design = "<vaadin-absolute-layout/>";
AbsoluteLayout layout = new AbsoluteLayout();
testRead(design, layout);
testWrite(design, layout);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java
index 71021a06e1..15a667eb28 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java
@@ -62,14 +62,14 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testEmptyDesign() {
- String design = "<v-label>";
+ String design = "<vaadin-label>";
testRead(design, component);
testWrite(design, component);
}
@Test
public void testProperties() {
- String design = "<v-label id=\"testId\" primary-style-name=\"test-style\" "
+ String design = "<vaadin-label id=\"testId\" primary-style-name=\"test-style\" "
+ "caption=\"test-caption\" locale=\"fi_FI\" description=\"test-description\" "
+ "error=\"<div>test-error</div>\" immediate=\"\"/>";
component.setId("testId");
@@ -89,8 +89,8 @@ public class AbstractComponentDeclarativeTest extends
public void testReadImmediate() {
// Additional tests for the immediate property, including
// explicit immediate values
- String[] design = { "<v-label/>", "<v-label immediate=\"false\"/>",
- "<v-label immediate=\"true\"/>", "<v-label immediate=\"\"/>" };
+ String[] design = { "<vaadin-label/>", "<vaadin-label immediate=\"false\"/>",
+ "<vaadin-label immediate=\"true\"/>", "<vaadin-label immediate=\"\"/>" };
Boolean[] explicitImmediate = { null, Boolean.FALSE, Boolean.TRUE,
Boolean.TRUE };
boolean[] immediate = { false, false, true, true };
@@ -105,7 +105,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testExternalIcon() {
- String design = "<v-label icon=\"http://example.com/example.gif\"/>";
+ String design = "<vaadin-label icon=\"http://example.com/example.gif\"/>";
component
.setIcon(new ExternalResource("http://example.com/example.gif"));
testRead(design, component);
@@ -114,7 +114,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testThemeIcon() {
- String design = "<v-label icon=\"theme://example.gif\"/>";
+ String design = "<vaadin-label icon=\"theme://example.gif\"/>";
component.setIcon(new ThemeResource("example.gif"));
testRead(design, component);
testWrite(design, component);
@@ -122,7 +122,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testFileResourceIcon() {
- String design = "<v-label icon=\"img/example.gif\"/>";
+ String design = "<vaadin-label icon=\"img/example.gif\"/>";
component.setIcon(new FileResource(new File("img/example.gif")));
testRead(design, component);
testWrite(design, component);
@@ -130,7 +130,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testWidthAndHeight() {
- String design = "<v-label width=\"70%\" height=\"12px\"/>";
+ String design = "<vaadin-label width=\"70%\" height=\"12px\"/>";
component.setWidth("70%");
component.setHeight("12px");
testRead(design, component);
@@ -139,7 +139,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testSizeFull() {
- String design = "<v-label size-full=\"\"/>";
+ String design = "<vaadin-label size-full=\"\"/>";
component.setSizeFull();
testRead(design, component);
testWrite(design, component);
@@ -147,7 +147,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testSizeAuto() {
- String design = "<v-label size-auto=\"\"/>";
+ String design = "<vaadin-label size-auto=\"\"/>";
component.setSizeUndefined();
testRead(design, component);
testWrite(design, component);
@@ -155,7 +155,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testHeightFull() {
- String design = "<v-label height-full=\"\"/ width=\"20px\"/>";
+ String design = "<vaadin-label height-full=\"\"/ width=\"20px\"/>";
component.setHeight("100%");
component.setWidth("20px");
testRead(design, component);
@@ -164,7 +164,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testHeightAuto() {
- String design = "<v-horizontal-split-panel height-auto=\"\"/ width=\"20px\" >";
+ String design = "<vaadin-horizontal-split-panel height-auto=\"\"/ width=\"20px\" >";
// we need to have default height of 100% -> use split panel
AbstractComponent component = new HorizontalSplitPanel();
component.setHeight(null);
@@ -175,7 +175,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testWidthFull() {
- String design = "<v-button width-full=\"\"/ height=\"20px\">Foo</button>";
+ String design = "<vaadin-button width-full=\"\"/ height=\"20px\">Foo</button>";
AbstractComponent component = new Button();
component.setCaptionAsHtml(true);
component.setCaption("Foo");
@@ -187,7 +187,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testWidthAuto() {
- String design = "<v-label height=\"20px\"/ width-auto=\"\"/>";
+ String design = "<vaadin-label height=\"20px\"/ width-auto=\"\"/>";
component.setCaptionAsHtml(false);
component.setHeight("20px");
component.setWidth(null);
@@ -197,7 +197,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testResponsive() {
- String design = "<v-label responsive =\"\"/>";
+ String design = "<vaadin-label responsive =\"\"/>";
Responsive.makeResponsive(component);
testRead(design, component);
testWrite(design, component);
@@ -205,7 +205,7 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testResponsiveFalse() {
- String design = "<v-label responsive =\"false\"/>";
+ String design = "<vaadin-label responsive =\"false\"/>";
// Only test read as the attribute responsive=false would not be written
testRead(design, component);
}
@@ -223,7 +223,7 @@ public class AbstractComponentDeclarativeTest extends
private Element createDesign(String key, String value) {
Attributes attributes = new Attributes();
attributes.put(key, value);
- Element node = new Element(Tag.valueOf("v-label"), "", attributes);
+ Element node = new Element(Tag.valueOf("vaadin-label"), "", attributes);
return node;
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java
index b4afde5923..a4ed0d364f 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java
@@ -33,7 +33,7 @@ public class AbstractFieldDeclarativeTest extends
@Test
public void testPlainText() {
- String design = "<v-text-field buffered='' validation-visible='false' invalid-committed=''"
+ String design = "<vaadin-text-field buffered='' validation-visible='false' invalid-committed=''"
+ " invalid-allowed='false' required='' required-error='This is a required field'"
+ " conversion-error='Input {0} cannot be parsed' tabindex=3 readonly=''/>";
AbstractField tf = new TextField();
@@ -61,7 +61,7 @@ public class AbstractFieldDeclarativeTest extends
public void testModelReadOnly() {
// Test that read only value coming from property data source is not
// written to design.
- String design = "<v-text-field value=test></v-text-field>";
+ String design = "<vaadin-text-field value=test></vaadin-text-field>";
AbstractField component = new TextField();
ObjectProperty<String> property = new ObjectProperty<String>("test");
property.setReadOnly(true);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
index 28ccfa407c..b23083ab05 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
@@ -42,7 +42,7 @@ public class AbstractOrderedLayoutDeclarativeTest extends
@Test
public void testMargins() {
- testMargins("v-vertical-layout");
+ testMargins("vaadin-vertical-layout");
}
@Test
@@ -74,8 +74,8 @@ public class AbstractOrderedLayoutDeclarativeTest extends
}
private String getDesign(float expandRatio, String... alignments) {
- String result = "<v-vertical-layout caption=test-layout>";
- result += "<v-label caption=test-label ";
+ String result = "<vaadin-vertical-layout caption=test-layout>";
+ result += "<vaadin-label caption=test-label ";
String ratioString = expandRatio == 1.0f ? "\"\"" : String
.valueOf(expandRatio);
if (expandRatio != 0) {
@@ -86,7 +86,7 @@ public class AbstractOrderedLayoutDeclarativeTest extends
result += " " + alignment + "=\"\"";
}
}
- result += "></v-label><v-button ";
+ result += "></vaadin-label><vaadin-button ";
if (expandRatio != 0) {
result += ":expand=" + ratioString;
}
@@ -95,7 +95,7 @@ public class AbstractOrderedLayoutDeclarativeTest extends
result += " " + alignment + "=\"\"";
}
}
- result += "></v-button></v-vertical-layout>";
+ result += "></vaadin-button></vaadin-vertical-layout>";
return result;
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
index 4f971412b8..b93bcc0ae8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
@@ -43,7 +43,7 @@ public class AbstractSelectDeclarativeTest extends
DeclarativeTestBase<AbstractSelect> {
public String getDesignSingleSelectNewItemsAllowed() {
- return "<v-combo-box new-items-allowed='' item-caption-mode='icon_only'"
+ return "<vaadin-combo-box new-items-allowed='' item-caption-mode='icon_only'"
+ " null-selection-item-id='nullIid'/>";
}
@@ -58,7 +58,7 @@ public class AbstractSelectDeclarativeTest extends
}
public String getDesignMultiSelect() {
- return "<v-list-select multi-select='' null-selection-allowed='false' new-items-allowed='' item-caption-mode='property' />";
+ return "<vaadin-list-select multi-select='' null-selection-allowed='false' new-items-allowed='' item-caption-mode='property' />";
}
public AbstractSelect getExpectedMultiSelect() {
@@ -99,8 +99,8 @@ public class AbstractSelectDeclarativeTest extends
@Test(expected = DesignException.class)
public void testReadMultipleValuesForSingleSelect() {
- testRead("<v-list-select>" + "<option selected>1</option>"
- + "<option selected>2</option>" + "</v-list-select>", null);
+ testRead("<vaadin-list-select>" + "<option selected>1</option>"
+ + "<option selected>2</option>" + "</vaadin-list-select>", null);
}
@Test
@@ -111,8 +111,9 @@ public class AbstractSelectDeclarativeTest extends
ls.addItem("2");
ls.select("1");
ls.select("2");
- testRead("<v-list-select multi-select>" + "<option selected>1</option>"
- + "<option selected>2</option>" + "</v-list-select>", ls);
+ testRead("<vaadin-list-select multi-select>"
+ + "<option selected>1</option>" + "<option selected>2</option>"
+ + "</vaadin-list-select>", ls);
}
@Test
@@ -122,8 +123,9 @@ public class AbstractSelectDeclarativeTest extends
ls.addItem("1");
ls.addItem("2");
ls.select("1");
- testRead("<v-list-select multi-select>" + "<option selected>1</option>"
- + "<option>2</option>" + "</v-list-select>", ls);
+ testRead("<vaadin-list-select multi-select>"
+ + "<option selected>1</option>" + "<option>2</option>"
+ + "</vaadin-list-select>", ls);
}
@Test
@@ -133,8 +135,8 @@ public class AbstractSelectDeclarativeTest extends
ls.addItem("1");
ls.addItem("2");
ls.select("1");
- testRead("<v-list-select>" + "<option selected>1</option>"
- + "<option>2</option>" + "</v-list-select>", ls);
+ testRead("<vaadin-list-select>" + "<option selected>1</option>"
+ + "<option>2</option>" + "</vaadin-list-select>", ls);
}
@Test
@@ -151,10 +153,10 @@ public class AbstractSelectDeclarativeTest extends
}
private String getDesignForInlineData() {
- return "<v-list-select>\n"
+ return "<vaadin-list-select>\n"
+ " <option icon='http://some.url/icon.png'>Value 1</option>\n" //
+ " <option selected>Value 2</option>\n"//
- + "</v-list-select>";
+ + "</vaadin-list-select>";
}
private AbstractSelect getExpectedComponentForInlineData() {
@@ -213,7 +215,7 @@ public class AbstractSelectDeclarativeTest extends
attributes.put("item-icon-property-id", "icon");
attributes.put("null-selection-allowed", "");
attributes.put("null-selection-item-id", "No items selected");
- return new Element(Tag.valueOf("v-combo-box"), "", attributes);
+ return new Element(Tag.valueOf("vaadin-combo-box"), "", attributes);
}
private Element createDesignWithAttributesMultiSelect() {
@@ -221,13 +223,13 @@ public class AbstractSelectDeclarativeTest extends
attributes.put("multi-select", "");
attributes.put("item-caption-mode", "EXPLICIT");
attributes.put("null-selection-allowed", "false");
- return new Element(Tag.valueOf("v-list-select"), "", attributes);
+ return new Element(Tag.valueOf("vaadin-list-select"), "", attributes);
}
@Test
public void testWriteAttributesSingleSelect() {
ComboBox cb = createSingleSelectWithOnlyAttributes();
- Element e = new Element(Tag.valueOf("v-combo-box"), "");
+ Element e = new Element(Tag.valueOf("vaadin-combo-box"), "");
cb.writeDesign(e, new DesignContext());
assertEquals("Wrong caption for the combo box.", "A combo box",
e.attr("caption"));
@@ -248,7 +250,7 @@ public class AbstractSelectDeclarativeTest extends
@Test
public void testWriteMultiListSelect() {
ListSelect ls = createMultiSelect();
- Element e = new Element(Tag.valueOf("v-list-select"), "");
+ Element e = new Element(Tag.valueOf("vaadin-list-select"), "");
ls.writeDesign(e, new DesignContext());
assertEquals("Null selection should not be allowed.", "false",
e.attr("null-selection-allowed"));
@@ -260,9 +262,9 @@ public class AbstractSelectDeclarativeTest extends
@Test
public void testHtmlEntities() {
- String design = "<v-combo-box>"
+ String design = "<vaadin-combo-box>"
+ " <option item-id=\"one\">&gt; One</option>"
- + " <option>&gt; Two</option>" + "</v-combo-box>";
+ + " <option>&gt; Two</option>" + "</vaadin-combo-box>";
AbstractSelect read = read(design);
Assert.assertEquals("> One", read.getItemCaption("one"));
@@ -270,7 +272,7 @@ public class AbstractSelectDeclarativeTest extends
AbstractSelect underTest = new ComboBox();
underTest.addItem("> One");
- Element root = new Element(Tag.valueOf("v-combo-box"), "");
+ Element root = new Element(Tag.valueOf("vaadin-combo-box"), "");
DesignContext dc = new DesignContext();
dc.setShouldWriteDataDelegate(DeclarativeTestBaseBase.ALWAYS_WRITE_DATA);
underTest.writeDesign(root, dc);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java b/server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java
index 3e6a7a15cb..92a8c12a9a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTests.java
@@ -35,7 +35,7 @@ public class OptionGroupDeclarativeTests extends
@Test
public void testBasicSyntax() {
- String expected = "<v-option-group />";
+ String expected = "<vaadin-option-group />";
testReadWrite(expected);
}
@@ -47,12 +47,12 @@ public class OptionGroupDeclarativeTests extends
//@formatter:off
String expected =
- "<v-option-group>"
+ "<vaadin-option-group>"
+ "<option>foo</option>"
+ "<option>bar</option>"
+ "<option>baz</option>"
+ "<option>bang</option>"
- + "</v-option-group>";
+ + "</vaadin-option-group>";
//@formatter:on
testReadWrite(expected);
@@ -67,12 +67,12 @@ public class OptionGroupDeclarativeTests extends
//@formatter:off
String expected =
- "<v-option-group>"
+ "<vaadin-option-group>"
+ "<option>foo</option>"
+ "<option>bar</option>"
+ "<option disabled>baz</option>"
+ "<option>bang</option>"
- + "</v-option-group>";
+ + "</vaadin-option-group>";
//@formatter:on
testReadWrite(expected);
@@ -87,12 +87,12 @@ public class OptionGroupDeclarativeTests extends
//@formatter:off
String expected =
- "<v-option-group>"
+ "<vaadin-option-group>"
+ "<option>foo</option>"
+ "<option icon='theme://foobar.png'>bar</option>"
+ "<option>baz</option>"
+ "<option>bang</option>"
- + "</v-option-group>";
+ + "</vaadin-option-group>";
//@formatter:on
testReadWrite(expected);
@@ -111,12 +111,12 @@ public class OptionGroupDeclarativeTests extends
//@formatter:off
String expected =
- "<v-option-group html-content-allowed=''>"
+ "<vaadin-option-group html-content-allowed=''>"
+ "<option item-id=\"foo\"><b>True</b></option>"
+ "<option item-id=\"bar\"><font color='red'>False</font></option>"
+ "<option>baz</option>"
+ "<option>bang</option>"
- + "</v-option-group>";
+ + "</vaadin-option-group>";
//@formatter:on
testReadWrite(expected);
@@ -131,13 +131,13 @@ public class OptionGroupDeclarativeTests extends
og.setItemCaption("bar", "<font color=\"red\">False</font>");
//@formatter:off
- String expected =
- "<v-option-group>"
+ String expected =
+ "<vaadin-option-group>"
+ "<option item-id=\"foo\">&lt;b&gt;True&lt;/b&gt;</option>"
+ "<option item-id=\"bar\">&lt;font color=\"red\"&gt;False&lt;/font&gt;</option>"
+ "<option>baz</option>"
+ "<option>bang</option>"
- + "</v-option-group>";
+ + "</vaadin-option-group>";
//@formatter:on
testReadWrite(expected);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java
index 11d97d191b..3ac8416762 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java
@@ -37,10 +37,10 @@ public class AbstractSplitPanelDeclarativeTest extends
@Test
public void testWithBothChildren() {
- String design = "<v-horizontal-split-panel split-position=20.5% "
+ String design = "<vaadin-horizontal-split-panel split-position=20.5% "
+ "min-split-position=20% max-split-position=50px locked='' "
- + "reversed=\"\"> <v-table /> <v-vertical-layout />"
- + "</v-horizontal-split-panel>";
+ + "reversed=\"\"> <vaadin-table /> <vaadin-vertical-layout />"
+ + "</vaadin-horizontal-split-panel>";
AbstractSplitPanel sp = new HorizontalSplitPanel();
sp.setSplitPosition(20.5f, Unit.PERCENTAGE, true);
sp.setMinSplitPosition(20, Unit.PERCENTAGE);
@@ -54,8 +54,8 @@ public class AbstractSplitPanelDeclarativeTest extends
@Test
public void testWithFirstChild() {
- String design = "<v-vertical-split-panel><v-table caption=\"First slot\"/>"
- + "</v-vertical-split-panel>";
+ String design = "<vaadin-vertical-split-panel><vaadin-table caption=\"First slot\"/>"
+ + "</vaadin-vertical-split-panel>";
AbstractSplitPanel sp = new VerticalSplitPanel();
Table t = new Table();
t.setCaption("First slot");
@@ -66,8 +66,8 @@ public class AbstractSplitPanelDeclarativeTest extends
@Test
public void testWithSecondChild() {
- String design = "<v-horizontal-split-panel><v-button :second>Second slot</v-button>"
- + "</v-vertical-split-panel>";
+ String design = "<vaadin-horizontal-split-panel><vaadin-button :second>Second slot</vaadin-button>"
+ + "</vaadin-vertical-split-panel>";
AbstractSplitPanel sp = new HorizontalSplitPanel();
Button b = new Button("Second slot");
b.setCaptionAsHtml(true);
@@ -78,7 +78,7 @@ public class AbstractSplitPanelDeclarativeTest extends
@Test
public void testEmpty() {
- String design = "<v-horizontal-split-panel/>";
+ String design = "<vaadin-horizontal-split-panel/>";
AbstractSplitPanel sp = new HorizontalSplitPanel();
testRead(design, sp);
testWrite(design, sp);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
index b8e570bc89..4d6411845e 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
@@ -33,7 +33,7 @@ public class AbstractTextFieldDeclarativeTest extends
@Test
public void testAttributes() {
- String design = "<v-text-field null-representation=this-is-null "
+ String design = "<vaadin-text-field null-representation=this-is-null "
+ "null-setting-allowed='' maxlength=5 columns=3 "
+ "input-prompt=input text-change-event-mode=eager "
+ "text-change-timeout=100 />";
diff --git a/server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java
index ec2b5241f3..d1143ff0c1 100644
--- a/server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java
@@ -35,7 +35,7 @@ public class AudioDeclarativeTest extends DeclarativeTestBase<Audio> {
@Test
public void testEmptyAudio() {
- String design = "<v-audio />";
+ String design = "<vaadin-audio />";
Audio audio = new Audio();
testRead(design, audio);
testWrite(design, audio);
@@ -43,12 +43,12 @@ public class AudioDeclarativeTest extends DeclarativeTestBase<Audio> {
@Test
public void testAudioMultipleSources() {
- String design = "<v-audio muted='' show-controls='false'>"
+ String design = "<vaadin-audio muted='' show-controls='false'>"
+ "some <b>text</b>" //
+ "<source href='http://foo.pl' />"
+ "<source href='https://bar.pl' />" //
+ "<source href='ohai' />" //
- + "</v-audio>";
+ + "</vaadin-audio>";
Audio audio = new Audio();
audio.setAltText("some <b>text</b>");
audio.setAutoplay(false);
diff --git a/server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java
index 5be70bd2db..f904c146a7 100644
--- a/server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java
@@ -28,7 +28,7 @@ public class VideoDeclarativeTest extends DeclarativeTestBase<Video> {
@Test
public void testEmptyVideo() {
- String design = "<v-video />";
+ String design = "<vaadin-video />";
Video audio = new Video();
testRead(design, audio);
testWrite(design, audio);
@@ -36,13 +36,13 @@ public class VideoDeclarativeTest extends DeclarativeTestBase<Video> {
@Test
public void testVideoMultipleSources() {
- String design = "<v-video muted='' show-controls='false'>"
+ String design = "<vaadin-video muted='' show-controls='false'>"
+ "some <b>text</b>" //
+ "<source href='http://foo.pl' />"
+ "<source href='https://bar.pl' />" //
+ "<source href='ohai' />" //
+ "<poster href='http://foo.pl/poster' />" //
- + "</v-video>";
+ + "</vaadin-video>";
Video video = new Video();
video.setAltText("some <b>text</b>");
video.setAutoplay(false);
diff --git a/server/tests/src/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java
index f4f50560b4..b62499a28e 100644
--- a/server/tests/src/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java
@@ -31,7 +31,7 @@ public class BrowserFrameDeclarativeTest extends
DeclarativeTestBase<BrowserFrame> {
protected String getDesign() {
- return "<v-browser-frame source='http://foo.bar/some.html' />";
+ return "<vaadin-browser-frame source='http://foo.bar/some.html' />";
}
protected BrowserFrame getExpectedResult() {
@@ -52,6 +52,6 @@ public class BrowserFrameDeclarativeTest extends
@Test
public void testEmpty() {
- testRead("<v-browser-frame/>", new BrowserFrame());
+ testRead("<vaadin-browser-frame/>", new BrowserFrame());
}
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java
index e299b5ecf7..a1ce2ed1b3 100644
--- a/server/tests/src/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java
@@ -38,73 +38,74 @@ public class ButtonDeclarativeTest extends DeclarativeTestBase<Button> {
@Test
public void testEmptyPlainText() {
- String design = "<v-button plain-text=''></v-button>";
+ String design = "<vaadin-button plain-text=''></vaadin-button>";
testButtonAndNativeButton(design, false, "");
}
@Test
public void testPlainTextCaption() {
- String design = "<v-button plain-text=''>Click</v-button>";
+ String design = "<vaadin-button plain-text=''>Click</vaadin-button>";
testButtonAndNativeButton(design, false, "Click");
}
@Test
public void testEmptyHtml() {
- String design = "<v-button />";
+ String design = "<vaadin-button />";
testButtonAndNativeButton(design, true, "");
}
@Test
public void testHtmlCaption() {
- String design = "<v-button><b>Click</b></v-button>";
+ String design = "<vaadin-button><b>Click</b></vaadin-button>";
testButtonAndNativeButton(design, true, "<b>Click</b>");
}
@Test
public void testWithCaptionAttribute() {
// The caption attribute should be ignored
- String design = "<v-button caption=Caption>Click</v-button>";
- String expectedWritten = "<v-button>Click</v-button>";
+ String design = "<vaadin-button caption=Caption>Click</vaadin-button>";
+ String expectedWritten = "<vaadin-button>Click</vaadin-button>";
testButtonAndNativeButton(design, true, "Click", expectedWritten);
}
@Test
public void testWithOnlyCaptionAttribute() {
- String design = "<v-button caption=Click/>";
- String expectedWritten = "<v-button/>";
+ String design = "<vaadin-button caption=Click/>";
+ String expectedWritten = "<vaadin-button/>";
testButtonAndNativeButton(design, true, "", expectedWritten);
}
@Test
public void testHtmlEntitiesInCaption() {
- String designPlainText = "<v-button plain-text=\"true\">&gt; One</v-button>";
+ String designPlainText = "<vaadin-button plain-text=\"true\">&gt; One</vaadin-button>";
String expectedCaptionPlainText = "> One";
Button read = read(designPlainText);
Assert.assertEquals(expectedCaptionPlainText, read.getCaption());
- designPlainText = designPlainText
- .replace("v-button", "v-native-button");
+ designPlainText = designPlainText.replace("vaadin-button",
+ "vaadin-native-button");
Button nativeButton = read(designPlainText);
Assert.assertEquals(expectedCaptionPlainText, nativeButton.getCaption());
- String designHtml = "<v-button>&gt; One</v-button>";
+ String designHtml = "<vaadin-button>&gt; One</vaadin-button>";
String expectedCaptionHtml = "&gt; One";
read = read(designHtml);
Assert.assertEquals(expectedCaptionHtml, read.getCaption());
- designHtml = designHtml.replace("v-button", "v-native-button");
+ designHtml = designHtml
+ .replace("vaadin-button", "vaadin-native-button");
nativeButton = read(designHtml);
Assert.assertEquals(expectedCaptionHtml, nativeButton.getCaption());
read = new Button("&amp; Test");
read.setHtmlContentAllowed(true);
- Element root = new Element(Tag.valueOf("v-button"), "");
+ Element root = new Element(Tag.valueOf("vaadin-button"), "");
read.writeDesign(root, new DesignContext());
assertEquals("&amp; Test", root.html());
read.setHtmlContentAllowed(false);
- root = new Element(Tag.valueOf("v-button"), "");
+ root = new Element(Tag.valueOf("vaadin-button"), "");
read.writeDesign(root, new DesignContext());
assertEquals("&amp;amp; Test", root.html());
@@ -124,9 +125,9 @@ public class ButtonDeclarativeTest extends DeclarativeTestBase<Button> {
testRead(expectedWritten, b);
testWrite(expectedWritten, b);
// Test NativeButton
- design = design.replace("v-button", "v-native-button");
- expectedWritten = expectedWritten
- .replace("v-button", "v-native-button");
+ design = design.replace("vaadin-button", "vaadin-native-button");
+ expectedWritten = expectedWritten.replace("vaadin-button",
+ "vaadin-native-button");
NativeButton nb = new NativeButton();
nb.setCaptionAsHtml(html);
nb.setCaption(caption);
@@ -136,8 +137,8 @@ public class ButtonDeclarativeTest extends DeclarativeTestBase<Button> {
@Test
public void testAttributes() {
- String design = "<v-button tabindex=3 plain-text='' icon-alt=OK "
- + "click-shortcut=shift-ctrl-o></v-button>";
+ String design = "<vaadin-button tabindex=3 plain-text='' icon-alt=OK "
+ + "click-shortcut=shift-ctrl-o></vaadin-button>";
Button b = new Button("");
b.setTabIndex(3);
b.setIconAlternateText("OK");
diff --git a/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java
index d866878fc7..f0ee8f7298 100644
--- a/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java
@@ -30,12 +30,12 @@ public class CalendarDeclarativeTest extends DeclarativeTestBase<Calendar> {
@Test
public void testEmpty() {
- verifyDeclarativeDesign("<v-calendar></v-calendar>", new Calendar());
+ verifyDeclarativeDesign("<vaadin-calendar></vaadin-calendar>", new Calendar());
}
@Test
public void testCalendarAllFeatures() throws ParseException {
- String design = "<v-calendar start-date='2014-11-17' end-date='2014-11-23' "
+ String design = "<vaadin-calendar start-date='2014-11-17' end-date='2014-11-23' "
+ "first-visible-day-of-week=2 last-visible-day-of-week=5 "
+ "time-zone='EST' time-format='12h' first-visible-hour-of-day=8 "
+ "last-visible-hour-of-day=18 weekly-caption-format='mmm MM/dd' />";
diff --git a/server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java
index 6206617cd8..ec68f7ccbb 100644
--- a/server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java
@@ -30,7 +30,7 @@ public class CheckboxDeclarativeTest extends DeclarativeTestBase<CheckBox> {
@Test
public void testChecked() {
- String design = "<v-check-box />";
+ String design = "<vaadin-check-box />";
CheckBox checkBox = new CheckBox();
testRead(design, checkBox);
testWrite(design, checkBox);
@@ -38,7 +38,7 @@ public class CheckboxDeclarativeTest extends DeclarativeTestBase<CheckBox> {
@Test
public void testUnchecked() {
- String design = "<v-check-box checked='' />";
+ String design = "<vaadin-check-box checked='' />";
CheckBox checkBox = new CheckBox();
checkBox.setValue(true);
testRead(design, checkBox);
@@ -47,7 +47,7 @@ public class CheckboxDeclarativeTest extends DeclarativeTestBase<CheckBox> {
@Test
public void testReadOnlyValue() {
- String design = "<v-check-box readonly checked='' />";
+ String design = "<vaadin-check-box readonly checked='' />";
CheckBox checkBox = new CheckBox();
checkBox.setValue(true);
checkBox.setReadOnly(true);
diff --git a/server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
index 33521d3af2..a075a974c9 100644
--- a/server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
@@ -29,7 +29,7 @@ public class AbstractColorPickerDeclarativeTest extends
@Test
public void testAllAbstractColorPickerFeatures() {
- String design = "<v-color-picker color='#fafafa' default-caption-enabled='' position='100,100'"
+ String design = "<vaadin-color-picker color='#fafafa' default-caption-enabled='' position='100,100'"
+ " popup-style='simple' rgb-visibility='false' hsv-visibility='false'"
+ " history-visibility=false textfield-visibility=false />";
ColorPicker colorPicker = new ColorPicker();
@@ -50,7 +50,7 @@ public class AbstractColorPickerDeclarativeTest extends
@Test
public void testEmptyColorPicker() {
- String design = "<v-color-picker />";
+ String design = "<vaadin-color-picker />";
ColorPicker colorPicker = new ColorPicker();
testRead(design, colorPicker);
testWrite(design, colorPicker);
@@ -58,7 +58,7 @@ public class AbstractColorPickerDeclarativeTest extends
@Test
public void testAllAbstractColorPickerAreaFeatures() {
- String design = "<v-color-picker-area color='#fafafa' default-caption-enabled='' position='100,100'"
+ String design = "<vaadin-color-picker-area color='#fafafa' default-caption-enabled='' position='100,100'"
+ " popup-style='simple' rgb-visibility='false' hsv-visibility='false'"
+ " history-visibility=false textfield-visibility=false />";
AbstractColorPicker colorPicker = new ColorPickerArea();
@@ -79,7 +79,7 @@ public class AbstractColorPickerDeclarativeTest extends
@Test
public void testEmptyColorPickerArea() {
- String design = "<v-color-picker-area />";
+ String design = "<vaadin-color-picker-area />";
AbstractColorPicker colorPicker = new ColorPickerArea();
testRead(design, colorPicker);
testWrite(design, colorPicker);
diff --git a/server/tests/src/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java
index d49d2b79e2..fcc7eb97a1 100644
--- a/server/tests/src/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java
@@ -38,7 +38,7 @@ public class ComboBoxDeclarativeTest extends DeclarativeTestBase<ComboBox> {
}
private String getReadOnlyWithOptionsDesign() {
- return "<v-combo-box text-input-allowed='false'><option>Hello</option><option>World</option></v-combo-box>";
+ return "<vaadin-combo-box text-input-allowed='false'><option>Hello</option><option>World</option></vaadin-combo-box>";
}
@Test
@@ -59,7 +59,7 @@ public class ComboBoxDeclarativeTest extends DeclarativeTestBase<ComboBox> {
@Test
public void testReadOnlyValue() {
- String design = "<v-combo-box readonly value='foo'><option selected>foo</option></v-combo-box>";
+ String design = "<vaadin-combo-box readonly value='foo'><option selected>foo</option></vaadin-combo-box>";
ComboBox comboBox = new ComboBox();
comboBox.addItems("foo", "bar");
@@ -69,12 +69,12 @@ public class ComboBoxDeclarativeTest extends DeclarativeTestBase<ComboBox> {
testRead(design, comboBox);
// Selects items are not written out by default
- String design2 = "<v-combo-box readonly></v-combo-box>";
+ String design2 = "<vaadin-combo-box readonly></vaadin-combo-box>";
testWrite(design2, comboBox);
}
private String getBasicDesign() {
- return "<v-combo-box input-prompt=\"Select something\" filtering-mode=\"off\" scroll-to-selected-item='false'>";
+ return "<vaadin-combo-box input-prompt=\"Select something\" filtering-mode=\"off\" scroll-to-selected-item='false'>";
}
private ComboBox getBasicExpected() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java
index 0782295310..31ee1a05f5 100644
--- a/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java
@@ -33,11 +33,11 @@ public class CssLayoutDeclarativeTest extends DeclarativeTestBase<CssLayout> {
@Test
public void testNoChildren() {
- String design = "<v-css-layout />";
+ String design = "<vaadin-css-layout />";
CssLayout layout = new CssLayout();
testRead(design, layout);
testWrite(design, layout);
- design = "<v-css-layout caption=\"A caption\"/>";
+ design = "<vaadin-css-layout caption=\"A caption\"/>";
layout = new CssLayout();
layout.setCaption("A caption");
testRead(design, layout);
@@ -46,8 +46,8 @@ public class CssLayoutDeclarativeTest extends DeclarativeTestBase<CssLayout> {
@Test
public void testFeatures() {
- String design = "<v-css-layout caption=test-layout><v-label caption=test-label />"
- + "<v-button>test-button</v-button></v-css-layout>";
+ String design = "<vaadin-css-layout caption=test-layout><vaadin-label caption=test-label />"
+ + "<vaadin-button>test-button</vaadin-button></vaadin-css-layout>";
CssLayout layout = new CssLayout();
layout.setCaption("test-layout");
Label l = new Label();
diff --git a/server/tests/src/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java
index 44261a61dc..6ee3490c05 100644
--- a/server/tests/src/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java
@@ -33,17 +33,17 @@ public class CustomLayoutDeclarativeTest extends
@Test
public void testEmpty() {
- String design = "<v-custom-layout>";
+ String design = "<vaadin-custom-layout>";
CustomLayout expected = new CustomLayout();
test(design, expected);
}
@Test
public void testWithChildren() {
- String design = "<v-custom-layout>" + //
- "<v-button plain-text :location='b'></v-button>" + //
- "<v-label plain-text :location='l'></v-label>" + //
- "</v-custom-layout>";
+ String design = "<vaadin-custom-layout>" + //
+ "<vaadin-button plain-text :location='b'></vaadin-button>" + //
+ "<vaadin-label plain-text :location='l'></vaadin-label>" + //
+ "</vaadin-custom-layout>";
CustomLayout expected = new CustomLayout();
expected.addComponent(new Button(), "b");
@@ -54,7 +54,7 @@ public class CustomLayoutDeclarativeTest extends
@Test
public void testWithOneChild() {
- String design = "<v-custom-layout><v-button plain-text></v-button></v-custom-layout>";
+ String design = "<vaadin-custom-layout><vaadin-button plain-text></vaadin-button></vaadin-custom-layout>";
CustomLayout expected = new CustomLayout();
expected.addComponent(new Button());
@@ -64,17 +64,17 @@ public class CustomLayoutDeclarativeTest extends
@Test
public void testWithTemplate() {
- String design = "<v-custom-layout template-name='template.html'></v-custom-layout>";
+ String design = "<vaadin-custom-layout template-name='template.html'></vaadin-custom-layout>";
CustomLayout expected = new CustomLayout("template.html");
test(design, expected);
}
@Test
public void testWithDuplicateLocations() {
- String design = "<v-custom-layout>" + //
- "<v-button plain-text :location='foo'></v-button>" + //
- "<v-label plain-text :location='foo'></v-label>" + //
- "</v-custom-layout>";
+ String design = "<vaadin-custom-layout>" + //
+ "<vaadin-button plain-text :location='foo'></vaadin-button>" + //
+ "<vaadin-label plain-text :location='foo'></vaadin-label>" + //
+ "</vaadin-custom-layout>";
CustomLayout expected = new CustomLayout();
expected.addComponent(new Button(), "foo");
@@ -82,9 +82,9 @@ public class CustomLayoutDeclarativeTest extends
testRead(design, expected);
- String written = "<v-custom-layout>" + //
- "<v-label plain-text :location='foo'></v-label>" + //
- "</v-custom-layout>";
+ String written = "<vaadin-custom-layout>" + //
+ "<vaadin-label plain-text :location='foo'></vaadin-label>" + //
+ "</vaadin-custom-layout>";
testWrite(written, expected);
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java
index f5ae6871a2..e245adcba8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java
@@ -33,7 +33,7 @@ import com.vaadin.ui.DateField;
public class DateFieldDeclarativeTest extends DeclarativeTestBase<DateField> {
private String getYearResolutionDesign() {
- return "<v-date-field resolution='year' value='2020'/>";
+ return "<vaadin-date-field resolution='year' value='2020'/>";
}
private DateField getYearResolutionExpected() {
@@ -44,7 +44,7 @@ public class DateFieldDeclarativeTest extends DeclarativeTestBase<DateField> {
}
private String getTimezoneDesign() {
- return "<v-date-field range-start=\"2014-05-05 00:00:00+0300\" range-end=\"2014-06-05 00:00:00+0300\" date-out-of-range-message=\"Please select a sensible date\" date-format=\"yyyy-MM-dd\" lenient='' show-iso-week-numbers='' parse-error-message=\"You are doing it wrong\" time-zone=\"GMT+05:00\" value=\"2014-05-15 00:00:00+0300\"/>";
+ return "<vaadin-date-field range-start=\"2014-05-05 00:00:00+0300\" range-end=\"2014-06-05 00:00:00+0300\" date-out-of-range-message=\"Please select a sensible date\" date-format=\"yyyy-MM-dd\" lenient='' show-iso-week-numbers='' parse-error-message=\"You are doing it wrong\" time-zone=\"GMT+05:00\" value=\"2014-05-15 00:00:00+0300\"/>";
}
private DateField getTimezoneExpected() {
@@ -90,7 +90,7 @@ public class DateFieldDeclarativeTest extends DeclarativeTestBase<DateField> {
@Test
public void testReadOnlyValue() {
- String design = "<v-date-field readonly resolution='year' value='2020-01-01 00:00:00+0200'/>";
+ String design = "<vaadin-date-field readonly resolution='year' value='2020-01-01 00:00:00+0200'/>";
DateField df = new DateField();
df.setResolution(Resolution.YEAR);
df.setValue(new Date(2020 - 1900, 1 - 1, 1));
diff --git a/server/tests/src/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java
index 708c800300..b637d10c9e 100644
--- a/server/tests/src/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java
@@ -34,7 +34,7 @@ public class PopupDateFieldDeclarativeTest extends
DeclarativeTestBase<PopupDateField> {
private String getBasicDesign() {
- return "<v-popup-date-field assistive-text='at' text-field-enabled='false' show-iso-week-numbers resolution=\"MINUTE\" range-end=\"2019-01-15\" input-prompt=\"Pick a day\" value=\"2003-02-27 07:15\"></v-popup-date-field>";
+ return "<vaadin-popup-date-field assistive-text='at' text-field-enabled='false' show-iso-week-numbers resolution=\"MINUTE\" range-end=\"2019-01-15\" input-prompt=\"Pick a day\" value=\"2003-02-27 07:15\"></vaadin-popup-date-field>";
}
private PopupDateField getBasicExpected() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java
index f16184d8b1..0c2deaaf0a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java
@@ -43,10 +43,10 @@ public class FlashDeclarativeTest extends DeclarativeTestBase<Flash> {
};
protected String getDesign() {
- return "<v-flash standby='Please wait' archive='arch' codebase='foo' codetype='bar' >"
+ return "<vaadin-flash standby='Please wait' archive='arch' codebase='foo' codetype='bar' >"
+ " <parameter name='baz' value='foo' />\n" //
+ " <parameter name='foo' value='bar' />\n" //
- + "</v-flash>"; //
+ + "</vaadin-flash>"; //
}
@Test
@@ -61,7 +61,7 @@ public class FlashDeclarativeTest extends DeclarativeTestBase<Flash> {
@Test
public void testEmpty() {
- testRead("<v-flash />", new Flash());
+ testRead("<vaadin-flash />", new Flash());
}
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java
index aa9a499469..94d611a98b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java
@@ -23,7 +23,7 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testSimpleGridColumns() {
- String design = "<v-grid><table>"//
+ String design = "<vaadin-grid><table>"//
+ "<colgroup>"
+ " <col sortable='' width='100' property-id='Column1'>"
+ " <col sortable=false max-width='200' expand='2' property-id='Column2'>"
@@ -32,7 +32,7 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase {
+ " <col sortable='' hidden='' property-id='Column5'>"
+ "</colgroup>" //
+ "<thead />" //
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
Grid grid = new Grid();
grid.addColumn("Column1", String.class).setWidth(100);
grid.addColumn("Column2", String.class).setMaximumWidth(200)
@@ -53,14 +53,14 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testReadColumnsWithoutPropertyId() {
- String design = "<v-grid><table>"//
+ String design = "<vaadin-grid><table>"//
+ "<colgroup>"
+ " <col sortable=true width='100' property-id='Column1'>"
+ " <col sortable=true max-width='200' expand='2'>" // property-id="property-1"
+ " <col sortable=true min-width='15' expand='1' property-id='Column3'>"
+ " <col sortable=true hidden=true hidable=true hiding-toggle-caption='col 4'>" // property-id="property-3"
+ "</colgroup>" //
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
Grid grid = new Grid();
grid.addColumn("Column1", String.class).setWidth(100);
grid.addColumn("property-1", String.class).setMaximumWidth(200)
@@ -75,11 +75,11 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testReadEmptyExpand() {
- String design = "<v-grid><table>"//
+ String design = "<vaadin-grid><table>"//
+ "<colgroup>"
+ " <col sortable=true expand />"
+ "</colgroup>" //
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
Grid grid = new Grid();
grid.addColumn("property-0", String.class).setExpandRatio(1);
@@ -89,11 +89,11 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testReadColumnWithNoAttributes() {
- String design = "<v-grid><table>"//
+ String design = "<vaadin-grid><table>"//
+ "<colgroup>" //
+ " <col />" //
+ "</colgroup>" //
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
Grid grid = new Grid();
grid.addColumn("property-0", String.class);
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java
index 43f394eafc..7fa6c24df4 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java
@@ -37,7 +37,7 @@ public class GridDeclarativeAttributeTest extends DeclarativeTestBase<Grid> {
@Test
public void testBasicAttributes() {
- String design = "<v-grid editable='' rows=20 frozen-columns=-1 "
+ String design = "<vaadin-grid editable='' rows=20 frozen-columns=-1 "
+ "editor-save-caption='Tallenna' editor-cancel-caption='Peruuta' column-reordering-allowed=''>";
Grid grid = new Grid();
@@ -55,8 +55,8 @@ public class GridDeclarativeAttributeTest extends DeclarativeTestBase<Grid> {
@Test
public void testFrozenColumnsAttributes() {
- String design = "<v-grid frozen-columns='2'><table>" //
- + "<colgroup><col><col><col></colgroup></table></v-grid>";
+ String design = "<vaadin-grid frozen-columns='2'><table>" //
+ + "<colgroup><col><col><col></colgroup></table></vaadin-grid>";
Grid grid = new Grid();
grid.addColumn("property-0", String.class);
@@ -69,15 +69,15 @@ public class GridDeclarativeAttributeTest extends DeclarativeTestBase<Grid> {
@Test
public void testSelectionMode() {
- String design = "<v-grid selection-mode='none'>";
+ String design = "<vaadin-grid selection-mode='none'>";
assertSame(NoSelectionModel.class, read(design).getSelectionModel()
.getClass());
- design = "<v-grid selection-mode='single'>";
+ design = "<vaadin-grid selection-mode='single'>";
assertSame(SingleSelectionModel.class, read(design).getSelectionModel()
.getClass());
- design = "<v-grid selection-mode='multi'>";
+ design = "<vaadin-grid selection-mode='multi'>";
assertSame(MultiSelectionModel.class, read(design).getSelectionModel()
.getClass());
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java
index 630c81fb30..98ebe67752 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java
@@ -33,7 +33,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testSingleDefaultHeader() {
//@formatter:off
- String design = "<v-grid><table>"
+ String design = "<vaadin-grid><table>"
+ "<colgroup>"
+ " <col sortable='' property-id='Column1'>"
+ " <col sortable='' property-id='Column2'>"
@@ -45,7 +45,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
+ " <th plain-text=''>Column2</th>"
+ " <th plain-text=''>Column3</tr>"
+ "</thead>"
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
//@formatter:on
Grid grid = new Grid();
grid.addColumn("Column1", String.class);
@@ -59,7 +59,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testSingleDefaultHTMLHeader() {
//@formatter:off
- String design = "<v-grid><table>"
+ String design = "<vaadin-grid><table>"
+ "<colgroup>"
+ " <col sortable='' property-id='Column1'>"
+ " <col sortable='' property-id='Column2'>"
@@ -68,7 +68,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
+ "<thead>"
+ " <tr default=''><th>Column1<th>Column2<th>Column3</tr>"
+ "</thead>"
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
//@formatter:on
Grid grid = new Grid();
grid.addColumn("Column1", String.class);
@@ -87,13 +87,14 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testNoHeaderRows() {
//@formatter:off
- String design = "<v-grid><table>"
+ String design = "<vaadin-grid><table>"
+ "<colgroup>"
+ " <col sortable='' property-id='Column1'>"
+ "</colgroup>"
+ "<thead />"
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
//@formatter:on
+
Grid grid = new Grid();
grid.addColumn("Column1", String.class);
grid.removeHeaderRow(grid.getDefaultHeaderRow());
@@ -105,7 +106,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testMultipleHeadersWithColSpans() {
//@formatter:off
- String design = "<v-grid><table>"
+ String design = "<vaadin-grid><table>"
+ "<colgroup>"
+ " <col sortable='' property-id='Column1'>"
+ " <col sortable='' property-id='Column2'>"
@@ -116,8 +117,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
+ " <tr default=''><th>Column1<th>Column2<th>Column3</tr>"
+ " <tr><th>Foo<th colspan=2>Bar</tr>"
+ "</thead>"
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
//@formatter:on
+
Grid grid = new Grid();
grid.addColumn("Column1", String.class);
grid.addColumn("Column2", String.class);
@@ -141,7 +143,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testSingleDefaultFooter() {
//@formatter:off
- String design = "<v-grid><table>"
+ String design = "<vaadin-grid><table>"
+ "<colgroup>"
+ " <col sortable='' property-id='Column1'>"
+ " <col sortable='' property-id='Column2'>"
@@ -151,8 +153,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
+ "<tfoot>"
+ " <tr><td plain-text=''>Column1<td plain-text=''>Column2<td plain-text=''>Column3</tr>"
+ "</tfoot>"
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
//@formatter:on
+
Grid grid = new Grid();
grid.addColumn("Column1", String.class);
grid.addColumn("Column2", String.class);
@@ -172,7 +175,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testSingleDefaultHTMLFooter() {
//@formatter:off
- String design = "<v-grid><table>"
+ String design = "<vaadin-grid><table>"
+ "<colgroup>"
+ " <col sortable='' property-id='Column1'>"
+ " <col sortable='' property-id='Column2'>"
@@ -182,8 +185,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
+ "<tfoot>"
+ " <tr><td>Column1<td>Column2<td>Column3</tr>"
+ "</tfoot>"
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
//@formatter:on
+
Grid grid = new Grid();
grid.addColumn("Column1", String.class);
grid.addColumn("Column2", String.class);
@@ -203,7 +207,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testMultipleFootersWithColSpans() {
//@formatter:off
- String design = "<v-grid><table>"
+ String design = "<vaadin-grid><table>"
+ "<colgroup>"
+ " <col sortable='' property-id='Column1'>"
+ " <col sortable='' property-id='Column2'>"
@@ -215,8 +219,9 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
+ " <tr><td>Column1<td>Column2<td>Column3</tr>"
+ " <tr><td>Foo<td colspan=2>Bar</tr>"
+ "</tfoot>"
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
//@formatter:on
+
Grid grid = new Grid();
grid.addColumn("Column1", String.class);
grid.addColumn("Column2", String.class);
@@ -242,15 +247,16 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testComponentInGridHeader() {
//@formatter:off
- String design = "<v-grid><table>"
+ String design = "<vaadin-grid><table>"
+ "<colgroup>"
+ " <col sortable='' property-id='Column1'>"
+ "</colgroup>"
+ "<thead>"
- + "<tr default=''><th><v-label><b>Foo</b></v-label></tr>"
+ + "<tr default=''><th><vaadin-label><b>Foo</b></vaadin-label></tr>"
+ "</thead>"
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
//@formatter:on
+
Label component = new Label("<b>Foo</b>");
component.setContentMode(ContentMode.HTML);
@@ -265,16 +271,17 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testComponentInGridFooter() {
//@formatter:off
- String design = "<v-grid><table>"
+ String design = "<vaadin-grid><table>"
+ "<colgroup>"
+ " <col sortable='' property-id='Column1'>"
+ "</colgroup>"
+ "<thead />" // No headers read or written
+ "<tfoot>"
- + "<tr><td><v-label><b>Foo</b></v-label></tr>"
+ + "<tr><td><vaadin-label><b>Foo</b></vaadin-label></tr>"
+ "</tfoot>"
- + "</table></v-grid>";
+ + "</table></vaadin-grid>";
//@formatter:on
+
Label component = new Label("<b>Foo</b>");
component.setContentMode(ContentMode.HTML);
@@ -289,15 +296,21 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testHtmlEntitiesinGridHeaderFooter() {
- // @formatter off
- String design = "<v-grid><table>" + "<colgroup>"
+ //@formatter:off
+ String design = "<vaadin-grid><table>"
+ + "<colgroup>"
+ " <col sortable=\"true\" property-id=\"> test\">"
- + "</colgroup>" + "<thead>"
+ + "</colgroup>"
+ + "<thead>"
+ " <tr><th plain-text=\"true\">&gt; Test</th></tr>"
- + "</thead>" + "<tfoot>"
+ + "</thead>"
+ + "<tfoot>"
+ " <tr><td plain-text=\"true\">&gt; Test</td></tr>"
- + "</tfoot>" + "<tbody />" + "</table></v-grid>";
- // @formatter off
+ + "</tfoot>"
+ + "<tbody />"
+ + "</table></vaadin-grid>";
+ //@formatter:on
+
Grid grid = read(design);
String actualHeader = grid.getHeaderRow(0).getCell("> test").getText();
String actualFooter = grid.getFooterRow(0).getCell("> test").getText();
@@ -325,7 +338,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
header.getCell("test").setText("&amp; Test");
footer.getCell("test").setText("&amp; Test");
- Element root = new Element(Tag.valueOf("v-grid"), "");
+ Element root = new Element(Tag.valueOf("vaadin-grid"), "");
grid.writeDesign(root, new DesignContext());
Assert.assertEquals("&amp;amp; Test", root.getElementsByTag("th")
@@ -340,7 +353,7 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
header.getCell("test").setHtml("&amp; Test");
footer.getCell("test").setHtml("&amp; Test");
- root = new Element(Tag.valueOf("v-grid"), "");
+ root = new Element(Tag.valueOf("vaadin-grid"), "");
grid.writeDesign(root, new DesignContext());
Assert.assertEquals("&amp; Test", root.getElementsByTag("th").get(0)
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java
index 04f92b0190..b4cb33560e 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java
@@ -25,7 +25,7 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testSimpleInlineData() {
- String design = "<v-grid><table>"//
+ String design = "<vaadin-grid><table>"//
+ "<colgroup>"
+ " <col sortable='' property-id='Col1' />"
+ "</colgroup>" //
@@ -34,8 +34,8 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
+ "<tr><td>Foo</tr>" //
+ "<tr><td>Bar</tr>" //
+ "<tr><td>Baz</tr>" //
- + "</tbody>"
- + "</table></v-grid>";
+ + "</tbody>" //
+ + "</table></vaadin-grid>";
Grid grid = new Grid();
grid.addColumn("Col1", String.class);
@@ -52,7 +52,7 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testMultipleColumnsInlineData() {
- String design = "<v-grid><table>"//
+ String design = "<vaadin-grid><table>"//
+ "<colgroup>"
+ " <col sortable='' property-id='Col1' />"
+ " <col sortable='' property-id='Col2' />"
@@ -62,8 +62,8 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
+ "<tbody>" //
+ "<tr><td>Foo<td>Bar<td>Baz</tr>" //
+ "<tr><td>My<td>Summer<td>Car</tr>" //
- + "</tbody>"
- + "</table></v-grid>";
+ + "</tbody>" //
+ + "</table></vaadin-grid>";
Grid grid = new Grid();
grid.addColumn("Col1", String.class);
@@ -81,7 +81,7 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testMultipleColumnsInlineDataReordered() {
- String design = "<v-grid><table>"//
+ String design = "<vaadin-grid><table>"//
+ "<colgroup>"
+ " <col sortable='' property-id='Col2' />"
+ " <col sortable='' property-id='Col3' />"
@@ -91,8 +91,8 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
+ "<tbody>" //
+ "<tr><td>Bar<td>Baz<td>Foo</tr>" //
+ "<tr><td>Summer<td>Car<td>My</tr>" //
- + "</tbody>"
- + "</table></v-grid>";
+ + "</tbody>" //
+ + "</table></vaadin-grid>";
Grid grid = new Grid();
grid.addColumn("Col1", String.class);
@@ -108,19 +108,19 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
testWrite(design, grid, true);
testRead(design, grid, true, true);
}
-
+
@Test
public void testHtmlEntities() {
- String design = "<v-grid><table>"//
+ String design = "<vaadin-grid><table>"//
+ "<colgroup>"
+ " <col property-id='test' />"
+ "</colgroup>" //
+ "<thead />" // No headers read or written
- + "<tbody>"
+ + "<tbody>" //
+ " <tr><td>&amp;Test</tr></td>"
+ "</tbody>"
- + "</table></v-grid>";
-
+ + "</table></vaadin-grid>";
+
Grid read = read(design);
Container cds = read.getContainerDataSource();
Assert.assertEquals("&amp;Test",
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java
index dc74f46d4d..d60df4c23b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java
@@ -24,13 +24,13 @@ public class GridStructureDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testReadEmptyGrid() {
- String design = "<v-grid />";
+ String design = "<vaadin-grid />";
testRead(design, new Grid(), false);
}
@Test
public void testEmptyGrid() {
- String design = "<v-grid></v-grid>";
+ String design = "<vaadin-grid></vaadin-grid>";
Grid expected = new Grid();
testWrite(design, expected);
testRead(design, expected, true);
@@ -38,13 +38,13 @@ public class GridStructureDeclarativeTest extends GridDeclarativeTestBase {
@Test(expected = DesignException.class)
public void testMalformedGrid() {
- String design = "<v-grid><v-label /></v-grid>";
+ String design = "<vaadin-grid><vaadin-label /></vaadin-grid>";
testRead(design, new Grid());
}
@Test(expected = DesignException.class)
public void testGridWithNoColGroup() {
- String design = "<v-grid><table><thead><tr><th>Foo</tr></thead></table></v-grid>";
+ String design = "<vaadin-grid><table><thead><tr><th>Foo</tr></thead></table></vaadin-grid>";
testRead(design, new Grid());
}
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
index fe2d1c4a23..4e217da477 100644
--- a/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
@@ -34,7 +34,7 @@ public class GridLayoutDeclarativeTest extends
@Test
public void testMargins() {
- testMargins("v-grid-layout");
+ testMargins("vaadin-grid-layout");
}
@Test
@@ -47,13 +47,13 @@ public class GridLayoutDeclarativeTest extends
b2.setCaptionAsHtml(true);
b3.setCaptionAsHtml(true);
b4.setCaptionAsHtml(true);
- String design = "<v-grid-layout><row>" //
+ String design = "<vaadin-grid-layout><row>" //
+ "<column expand=1>" + writeChild(b1) + "</column>" //
+ "<column expand=3>" + writeChild(b2) + "</column>" //
+ "</row><row>" //
+ "<column>" + writeChild(b3) + "</column>" //
+ "<column>" + writeChild(b4) + "</column>" //
- + "</row></v-grid-layout>";
+ + "</row></vaadin-grid-layout>";
GridLayout gl = new GridLayout(2, 2);
gl.addComponent(b1);
gl.addComponent(b2);
@@ -69,10 +69,10 @@ public class GridLayoutDeclarativeTest extends
public void testOneBigComponentGridLayout() {
Button b1 = new Button("Button 0,0 -> 1,1");
b1.setCaptionAsHtml(true);
- String design = "<v-grid-layout><row>" //
+ String design = "<vaadin-grid-layout><row>" //
+ "<column colspan=2 rowspan=2>" + writeChild(b1) + "</column>" //
+ "</row><row expand=2>" //
- + "</row></v-grid-layout>";
+ + "</row></vaadin-grid-layout>";
GridLayout gl = new GridLayout(2, 2);
gl.addComponent(b1, 0, 0, 1, 1);
gl.setRowExpandRatio(1, 2);
@@ -121,7 +121,7 @@ public class GridLayoutDeclarativeTest extends
// 4 4 - 2 6
// - - 7 7 6
- String design = "<v-grid-layout><row>" //
+ String design = "<vaadin-grid-layout><row>" //
+ "<column colspan=3>" + writeChild(b1) + "</column>" //
+ "<column rowspan=4>" + writeChild(b2) + "</column>" //
+ "<column rowspan=2>" + writeChild(b3) + "</column>" //
@@ -135,7 +135,7 @@ public class GridLayoutDeclarativeTest extends
+ "</row><row>" //
+ "<column colspan=2 />" // Empty placeholder
+ "<column colspan=2>" + writeChild(b7) + "</column>" //
- + "</row></v-grid-layout>";
+ + "</row></vaadin-grid-layout>";
testWrite(design, gl);
testRead(design, gl);
}
@@ -148,14 +148,14 @@ public class GridLayoutDeclarativeTest extends
gl.addComponent(b1, 4, 0, 4, 4);
gl.setColumnExpandRatio(2, 2.0f);
- String design = "<v-grid-layout><row>" //
+ String design = "<vaadin-grid-layout><row>" //
+ "<column colspan=4 rowspan=5 expand='0,0,2,0' />" //
+ "<column rowspan=5>" + writeChild(b1) + "</column>" //
+ "</row><row>" //
+ "</row><row>" //
+ "</row><row>" //
+ "</row><row>" //
- + "</row></v-grid-layout>";
+ + "</row></vaadin-grid-layout>";
testWrite(design, gl);
testRead(design, gl);
}
@@ -168,14 +168,14 @@ public class GridLayoutDeclarativeTest extends
gl.addComponent(b1, 0, 0, 0, 4);
gl.setColumnExpandRatio(4, 2.0f);
- String design = "<v-grid-layout><row>" //
+ String design = "<vaadin-grid-layout><row>" //
+ "<column rowspan=5>" + writeChild(b1) + "</column>" //
+ "<column colspan=4 rowspan=5 expand='0,0,0,2' />" //
+ "</row><row>" //
+ "</row><row>" //
+ "</row><row>" //
+ "</row><row>" //
- + "</row></v-grid-layout>";
+ + "</row></vaadin-grid-layout>";
testWrite(design, gl);
testRead(design, gl);
}
@@ -183,7 +183,7 @@ public class GridLayoutDeclarativeTest extends
@Test
public void testEmptyGridLayout() {
GridLayout gl = new GridLayout();
- String design = "<v-grid-layout />";
+ String design = "<vaadin-grid-layout />";
testWrite(design, gl);
testRead(design, gl);
}
@@ -214,21 +214,21 @@ public class GridLayoutDeclarativeTest extends
String design = "<!DOCTYPE html>" + //
"<html>" + //
" <body> " + //
- " <v-grid-layout> " + //
+ " <vaadin-grid-layout> " + //
" <row> " + //
" <column> " + //
- " <v-grid-layout> " + //
+ " <vaadin-grid-layout> " + //
" <row> " + //
" <column> " + //
- " <v-button>" + //
+ " <vaadin-button>" + //
" Button " + //
- " </v-button> " + //
+ " </vaadin-button> " + //
" </column> " + //
" </row> " + //
- " </v-grid-layout> " + //
+ " </vaadin-grid-layout> " + //
" </column> " + //
" </row> " + //
- " </v-grid-layout> " + //
+ " </vaadin-grid-layout> " + //
" </body>" + //
"</html>";
GridLayout outer = new GridLayout();
diff --git a/server/tests/src/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java
index 670b3beb3d..562c629209 100644
--- a/server/tests/src/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.Image;
public class ImageDeclarativeTest extends DeclarativeTestBase<Image> {
protected String getDesign() {
- return "<v-image source='http://foo.bar/img.png' alt='Some random image from the theme'></v-image>";
+ return "<vaadin-image source='http://foo.bar/img.png' alt='Some random image from the theme'></vaadin-image>";
}
protected Image getExpectedResult() {
@@ -52,7 +52,7 @@ public class ImageDeclarativeTest extends DeclarativeTestBase<Image> {
@Test
public void testEmpty() {
- testRead("<v-image />", new Image());
+ testRead("<vaadin-image />", new Image());
}
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java
index 6749776397..f911aab779 100644
--- a/server/tests/src/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java
@@ -36,7 +36,7 @@ public class LabelDeclarativeTest extends DeclarativeTestBase<Label> {
@Test
public void testEmpty() {
- String design = "<v-label />";
+ String design = "<vaadin-label />";
Label l = new Label();
l.setContentMode(ContentMode.HTML);
testRead(design, l);
@@ -45,7 +45,7 @@ public class LabelDeclarativeTest extends DeclarativeTestBase<Label> {
@Test
public void testDefault() {
- String design = "<v-label>Hello world!</v-label>";
+ String design = "<vaadin-label>Hello world!</vaadin-label>";
Label l = createLabel("Hello world!", null, true);
testRead(design, l);
testWrite(design, l);
@@ -53,7 +53,7 @@ public class LabelDeclarativeTest extends DeclarativeTestBase<Label> {
@Test
public void testRich() {
- String design = "<v-label>This is <b><u>Rich</u></b> content!</v-label>";
+ String design = "<vaadin-label>This is <b><u>Rich</u></b> content!</vaadin-label>";
Label l = createLabel("This is \n<b><u>Rich</u></b> content!", null,
true);
testRead(design, l);
@@ -62,8 +62,8 @@ public class LabelDeclarativeTest extends DeclarativeTestBase<Label> {
@Test
public void testPlainText() {
- String design = "<v-label plain-text>This is only &lt;b&gt;text&lt;/b&gt;"
- + " and will contain visible tags</v-label>";
+ String design = "<vaadin-label plain-text>This is only &lt;b&gt;text&lt;/b&gt;"
+ + " and will contain visible tags</vaadin-label>";
Label l = createLabel(
"This is only <b>text</b> and will contain visible tags", null,
false);
@@ -73,8 +73,8 @@ public class LabelDeclarativeTest extends DeclarativeTestBase<Label> {
@Test
public void testContentAndCaption() {
- String design = "<v-label caption='This is a label'>This is <b><u>Rich</u></b> "
- + "content!</v-label>";
+ String design = "<vaadin-label caption='This is a label'>This is <b><u>Rich</u></b> "
+ + "content!</vaadin-label>";
Label l = createLabel("This is \n<b><u>Rich</u></b> content!",
"This is a label", true);
testRead(design, l);
@@ -83,7 +83,7 @@ public class LabelDeclarativeTest extends DeclarativeTestBase<Label> {
@Test
public void testCaption() {
- String design = "<v-label caption='This is a label' />";
+ String design = "<vaadin-label caption='This is a label' />";
Label l = createLabel(null, "This is a label", true);
testRead(design, l);
testWrite(design, l);
@@ -91,7 +91,7 @@ public class LabelDeclarativeTest extends DeclarativeTestBase<Label> {
@Test
public void testHtmlEntities() {
- String design = "<v-label plain-text=\"true\">&gt; Test</v-label>";
+ String design = "<vaadin-label plain-text=\"true\">&gt; Test</vaadin-label>";
Label read = read(design);
Assert.assertEquals("> Test", read.getValue());
@@ -102,12 +102,12 @@ public class LabelDeclarativeTest extends DeclarativeTestBase<Label> {
Label label = new Label("&amp; Test");
label.setContentMode(ContentMode.TEXT);
- Element root = new Element(Tag.valueOf("v-label"), "");
+ Element root = new Element(Tag.valueOf("vaadin-label"), "");
label.writeDesign(root, new DesignContext());
Assert.assertEquals("&amp;amp; Test", root.html());
label.setContentMode(ContentMode.HTML);
- root = new Element(Tag.valueOf("v-label"), "");
+ root = new Element(Tag.valueOf("vaadin-label"), "");
label.writeDesign(root, new DesignContext());
Assert.assertEquals("&amp; Test", root.html());
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java
index 17fea29168..da7227224d 100644
--- a/server/tests/src/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java
@@ -29,7 +29,7 @@ import com.vaadin.ui.Link;
*/
public class LinkDeclarativeTest extends DeclarativeTestBase<Link> {
private String getBasicDesign() {
- return "<v-link href='http://vaadin.com' target='vaadin-window' target-height=500"
+ return "<vaadin-link href='http://vaadin.com' target='vaadin-window' target-height=500"
+ " target-width=800 target-border='none' />";
}
@@ -55,12 +55,12 @@ public class LinkDeclarativeTest extends DeclarativeTestBase<Link> {
@Test
public void testReadEmpty() {
- testRead("<v-link />", new Link());
+ testRead("<vaadin-link />", new Link());
}
@Test
public void testWriteEmpty() {
- testWrite("<v-link />", new Link());
+ testWrite("<vaadin-link />", new Link());
}
} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java
index fcff6cd4a5..d0fa400d31 100644
--- a/server/tests/src/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java
@@ -31,8 +31,8 @@ public class ListSelectDeclarativeTest extends DeclarativeTestBase<ListSelect> {
}
private String getWithOptionsDesign() {
- return "<v-list-select rows=10>\n" + " <option>Male</option>\n"
- + " <option>Female</option>\n" + "</v-list-select>\n"
+ return "<vaadin-list-select rows=10>\n" + " <option>Male</option>\n"
+ + " <option>Female</option>\n" + "</vaadin-list-select>\n"
+ "";
}
@@ -54,7 +54,7 @@ public class ListSelectDeclarativeTest extends DeclarativeTestBase<ListSelect> {
}
private String getBasicDesign() {
- return "<v-list-select caption='Hello' />";
+ return "<vaadin-list-select caption='Hello' />";
}
@Test
diff --git a/server/tests/src/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java
index 140335e136..511f411a93 100644
--- a/server/tests/src/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java
@@ -29,7 +29,7 @@ public class NativeSelectDeclarativeTest extends
DeclarativeTestBase<NativeSelect> {
public String getBasicDesign() {
- return "<v-native-select><option>foo</option><option>bar</option></v-native-select>";
+ return "<vaadin-native-select><option>foo</option><option>bar</option></vaadin-native-select>";
}
@@ -52,7 +52,7 @@ public class NativeSelectDeclarativeTest extends
@Test
public void testReadOnlyValue() {
- String design = "<v-native-select readonly><option selected>foo</option><option>bar</option></v-native-select>";
+ String design = "<vaadin-native-select readonly><option selected>foo</option><option>bar</option></vaadin-native-select>";
NativeSelect ns = new NativeSelect();
ns.addItems("foo", "bar");
@@ -62,8 +62,8 @@ public class NativeSelectDeclarativeTest extends
testRead(design, ns);
// Selects items are not written out by default
- String design2 = "<v-native-select readonly></v-native-select>";
+ String design2 = "<vaadin-native-select readonly></vaadin-native-select>";
testWrite(design2, ns);
}
-} \ No newline at end of file
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java
index 103d427df9..39191f0665 100644
--- a/server/tests/src/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java
@@ -32,10 +32,10 @@ public class PanelDeclarativeTest extends DeclarativeTestBase<Panel> {
@Test
public void testFeatures() {
- String design = "<v-panel id=panelId caption=\"A panel\" tabindex=2 scroll-left=10 "
+ String design = "<vaadin-panel id=panelId caption=\"A panel\" tabindex=2 scroll-left=10 "
+ "scroll-top=20 width=200px height=150px> "
- + "<v-vertical-layout width=300px height=400px /> "
- + "</v-panel>";
+ + "<vaadin-vertical-layout width=300px height=400px /> "
+ + "</vaadin-panel>";
Panel p = new Panel();
p.setId("panelId");
p.setCaption("A panel");
@@ -56,7 +56,7 @@ public class PanelDeclarativeTest extends DeclarativeTestBase<Panel> {
public void testWithMoreThanOneChild() {
// Check that attempting to have two components in a panel causes a
// DesignException.
- String design = "<v-panel> <v-vertical-layout/> <v-horizontal-layout/> </v-panel>";
+ String design = "<vaadin-panel> <vaadin-vertical-layout/> <vaadin-horizontal-layout/> </vaadin-panel>";
testRead(design, null);
}
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java
index 6934d2011c..5936f03381 100644
--- a/server/tests/src/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java
@@ -30,7 +30,7 @@ public class PasswordFieldDeclarativeTest extends
@Test
public void testReadOnlyValue() {
- String design = "<v-password-field readonly=\"\" value=\"test value\"/>";
+ String design = "<vaadin-password-field readonly=\"\" value=\"test value\"/>";
PasswordField tf = new PasswordField();
tf.setValue("test value");
tf.setReadOnly(true);
diff --git a/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java
index 1b50a517ae..649c38a191 100644
--- a/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java
@@ -30,9 +30,9 @@ public class PopupViewDeclarativeTest extends DeclarativeTestBase<PopupView> {
public void testEmptyPopupView() {
PopupView component = new PopupView();
Component popup = component.getContent().getPopupComponent();
- String design = "<v-popup-view><popup-content>"
+ String design = "<vaadin-popup-view><popup-content>"
+ new DesignContext().createElement(popup)
- + "</popup-content></v-popup-view>";
+ + "</popup-content></vaadin-popup-view>";
testWrite(design, component);
testRead(design, component);
}
@@ -48,12 +48,12 @@ public class PopupViewDeclarativeTest extends DeclarativeTestBase<PopupView> {
component.setHideOnMouseOut(true);
component.setPopupVisible(true);
// hide-on-mouse-out is true by default. not seen in design
- String design = "<v-popup-view popup-visible=''>" //
+ String design = "<vaadin-popup-view popup-visible=''>" //
+ "Click <u>here</u> to open"
+ "<popup-content>"
+ new DesignContext().createElement(verticalLayout)
+ "</popup-content>" //
- + "</v-popup-view>";
+ + "</vaadin-popup-view>";
testWrite(design, component);
testRead(design, component);
}
@@ -63,11 +63,11 @@ public class PopupViewDeclarativeTest extends DeclarativeTestBase<PopupView> {
final Label label = new Label("Foo");
PopupView component = new PopupView("Click Me!", label);
component.setHideOnMouseOut(false);
- String design = "<v-popup-view hide-on-mouse-out='false'>" //
+ String design = "<vaadin-popup-view hide-on-mouse-out='false'>" //
+ "Click Me!"
+ "<popup-content>"
+ new DesignContext().createElement(label) + "</popup-content>" //
- + "</v-popup-view>";
+ + "</vaadin-popup-view>";
testWrite(design, component);
testRead(design, component);
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java
index 82b8acd8ab..64a97edf1d 100644
--- a/server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java
@@ -29,7 +29,7 @@ public class ProgressBarDeclarativeTest extends
DeclarativeTestBase<ProgressBar> {
public String getBasicDesign() {
- return "<v-progress-bar value=0.5 indeterminate=''>";
+ return "<vaadin-progress-bar value=0.5 indeterminate=''>";
}
@@ -52,17 +52,17 @@ public class ProgressBarDeclarativeTest extends
@Test
public void testReadEmpty() {
- testRead("<v-progress-bar>", new ProgressBar());
+ testRead("<vaadin-progress-bar>", new ProgressBar());
}
@Test
public void testWriteEmpty() {
- testWrite("<v-progress-bar>", new ProgressBar());
+ testWrite("<vaadin-progress-bar>", new ProgressBar());
}
@Test
public void testReadOnlyValue() {
- String design = "<v-progress-bar readonly value=0.5 indeterminate=''>";
+ String design = "<vaadin-progress-bar readonly value=0.5 indeterminate=''>";
ProgressBar progressBar = new ProgressBar();
progressBar.setIndeterminate(true);
progressBar.setValue(0.5f);
@@ -72,4 +72,4 @@ public class ProgressBarDeclarativeTest extends
testWrite(design, progressBar);
}
-} \ No newline at end of file
+}
diff --git a/server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java
index 315a5be6b6..4ec7511900 100644
--- a/server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java
@@ -24,9 +24,9 @@ public class RichTextAreaDeclarativeTest extends
DeclarativeTestBase<RichTextArea> {
private String getBasicDesign() {
- return "<v-rich-text-area null-representation='' null-setting-allowed=''>\n"
+ return "<vaadin-rich-text-area null-representation='' null-setting-allowed=''>\n"
+ "\n <b>Header</b> <br/>Some text\n "
- + "</v-rich-text-area>";
+ + "</vaadin-rich-text-area>";
}
private RichTextArea getBasicExpected() {
@@ -49,17 +49,17 @@ public class RichTextAreaDeclarativeTest extends
@Test
public void testReadEmpty() {
- testRead("<v-rich-text-area />", new RichTextArea());
+ testRead("<vaadin-rich-text-area />", new RichTextArea());
}
@Test
public void testWriteEmpty() {
- testWrite("<v-rich-text-area />", new RichTextArea());
+ testWrite("<vaadin-rich-text-area />", new RichTextArea());
}
@Test
public void testReadOnlyValue() {
- String design = "<v-rich-text-area readonly style-name='v-richtextarea-readonly'>Hello World!</v-text-area>";
+ String design = "<vaadin-rich-text-area readonly style-name='v-richtextarea-readonly'>Hello World!</vaadin-text-area>";
RichTextArea ta = new RichTextArea();
ta.setValue("Hello World!");
ta.setReadOnly(true);
diff --git a/server/tests/src/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java
index 0c2ac6bed9..dcfb415810 100644
--- a/server/tests/src/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java
@@ -31,7 +31,7 @@ public class SliderDeclarativeTest extends DeclarativeTestBase<Slider> {
@Test
public void testDefault() {
- String design = "<v-slider>";
+ String design = "<vaadin-slider>";
Slider expected = new Slider();
@@ -41,7 +41,7 @@ public class SliderDeclarativeTest extends DeclarativeTestBase<Slider> {
@Test
public void testHorizontal() {
- String design = "<v-slider min=10 max=20 resolution=1 value=12.3>";
+ String design = "<vaadin-slider min=10 max=20 resolution=1 value=12.3>";
Slider expected = new Slider();
expected.setMin(10.0);
@@ -55,7 +55,7 @@ public class SliderDeclarativeTest extends DeclarativeTestBase<Slider> {
@Test
public void testVertical() {
- String design = "<v-slider vertical>";
+ String design = "<vaadin-slider vertical>";
Slider expected = new Slider();
expected.setOrientation(SliderOrientation.VERTICAL);
@@ -66,7 +66,7 @@ public class SliderDeclarativeTest extends DeclarativeTestBase<Slider> {
@Test
public void testReadOnlyValue() {
- String design = "<v-slider readonly min=10 max=20 resolution=1 value=12.3>";
+ String design = "<vaadin-slider readonly min=10 max=20 resolution=1 value=12.3>";
Slider expected = new Slider();
expected.setMin(10.0);
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java b/server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java
index d909d98a36..1f0b3d924c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java
+++ b/server/tests/src/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java
@@ -36,7 +36,7 @@ public abstract class TableDeclarativeTestBase extends
}
protected String getTag() {
- return "v-table";
+ return "vaadin-table";
}
protected void compareBody(Table read, Table expected) {
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java
index c218f93a02..a68487782a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java
@@ -35,10 +35,10 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> {
@Test
public void testFeatures() {
- String design = "<v-tab-sheet tabindex=5><tab caption=test-caption "
+ String design = "<vaadin-tab-sheet tabindex=5><tab caption=test-caption "
+ "visible=false closable='' enabled=false icon=http://www.vaadin.com/test.png"
+ " icon-alt=OK description=test-desc style-name=test-style "
- + "id=test-id><v-text-field/></tab></v-tab-sheet>";
+ + "id=test-id><vaadin-text-field/></tab></vaadin-tab-sheet>";
TabSheet ts = new TabSheet();
ts.setTabIndex(5);
TextField tf = new TextField();
@@ -59,7 +59,7 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> {
@Test
public void testSelected() {
- String design = "<v-tab-sheet><tab selected=''><v-text-field/></tab></v-tab-sheet>";
+ String design = "<vaadin-tab-sheet><tab selected=''><vaadin-text-field/></tab></vaadin-tab-sheet>";
TabSheet ts = new TabSheet();
TextField tf = new TextField();
ts.addTab(tf);
@@ -70,10 +70,10 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> {
@Test
public void tabsNotShown() {
- String design = "<v-tab-sheet tabs-visible=\"false\">\n"
+ String design = "<vaadin-tab-sheet tabs-visible=\"false\">\n"
+ " <tab caption=\"My Tab\" selected=\"\">\n"
- + " <v-label>My Content</v-label>\n" + " </tab>\n"
- + "</v-tab-sheet>\n";
+ + " <vaadin-label>My Content</vaadin-label>\n" + " </tab>\n"
+ + "</vaadin-tab-sheet>\n";
TabSheet ts = new TabSheet();
ts.setTabsVisible(false);
Label l = new Label("My Content", ContentMode.HTML);
diff --git a/server/tests/src/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java
index f70f1fde98..fdf2599370 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java
@@ -36,7 +36,7 @@ public class TextAreaDeclarativeTest extends DeclarativeTestBase<TextArea> {
@Test
public void testTextArea() {
- String design = "<v-text-area rows=6 wordwrap=false>Hello World!</v-text-area>";
+ String design = "<vaadin-text-area rows=6 wordwrap=false>Hello World!</vaadin-text-area>";
TextArea ta = new TextArea();
ta.setRows(6);
ta.setWordwrap(false);
@@ -47,14 +47,14 @@ public class TextAreaDeclarativeTest extends DeclarativeTestBase<TextArea> {
@Test
public void testHtmlEntities() throws IOException {
- String design = "<v-text-area>&amp; Test</v-text-area>";
+ String design = "<vaadin-text-area>&amp; Test</vaadin-text-area>";
TextArea read = read(design);
Assert.assertEquals("& Test", read.getValue());
read.setValue("&amp; Test");
DesignContext dc = new DesignContext();
- Element root = new Element(Tag.valueOf("v-text-area"), "");
+ Element root = new Element(Tag.valueOf("vaadin-text-area"), "");
read.writeDesign(root, dc);
Assert.assertEquals("&amp;amp; Test", root.html());
@@ -62,7 +62,7 @@ public class TextAreaDeclarativeTest extends DeclarativeTestBase<TextArea> {
@Test
public void testReadOnlyValue() {
- String design = "<v-text-area readonly rows=6 wordwrap=false>Hello World!</v-text-area>";
+ String design = "<vaadin-text-area readonly rows=6 wordwrap=false>Hello World!</vaadin-text-area>";
TextArea ta = new TextArea();
ta.setRows(6);
ta.setWordwrap(false);
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java
index d545ee5a1a..3f2935bb45 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java
@@ -30,7 +30,7 @@ public class TextFieldDeclarativeTest extends DeclarativeTestBase<TextField> {
@Test
public void testEmpty() {
- String design = "<v-text-field/>";
+ String design = "<vaadin-text-field/>";
TextField tf = new TextField();
testRead(design, tf);
testWrite(design, tf);
@@ -38,7 +38,7 @@ public class TextFieldDeclarativeTest extends DeclarativeTestBase<TextField> {
@Test
public void testValue() {
- String design = "<v-text-field value=\"test value\"/>";
+ String design = "<vaadin-text-field value=\"test value\"/>";
TextField tf = new TextField();
tf.setValue("test value");
testRead(design, tf);
@@ -47,7 +47,7 @@ public class TextFieldDeclarativeTest extends DeclarativeTestBase<TextField> {
@Test
public void testReadOnlyValue() {
- String design = "<v-text-field readonly=\"\" value=\"test value\"/>";
+ String design = "<vaadin-text-field readonly=\"\" value=\"test value\"/>";
TextField tf = new TextField();
tf.setValue("test value");
tf.setReadOnly(true);
diff --git a/server/tests/src/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java
index 3fb69a9257..8577ed1af8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java
@@ -32,7 +32,7 @@ public class TreeDeclarativeTest extends DeclarativeTestBase<Tree> {
@Test
public void testDragMode() {
- String design = "<v-tree drag-mode='node' />";
+ String design = "<vaadin-tree drag-mode='node' />";
Tree tree = new Tree();
tree.setDragMode(TreeDragMode.NODE);
@@ -43,13 +43,13 @@ public class TreeDeclarativeTest extends DeclarativeTestBase<Tree> {
@Test
public void testEmpty() {
- testRead("<v-tree />", new Tree());
- testWrite("<v-tree />", new Tree());
+ testRead("<vaadin-tree />", new Tree());
+ testWrite("<vaadin-tree />", new Tree());
}
@Test
public void testNodes() {
- String design = "<v-tree>" //
+ String design = "<vaadin-tree>" //
+ " <node text='Node'/>" //
+ " <node text='Parent'>" //
+ " <node text='Child'>" //
@@ -57,7 +57,7 @@ public class TreeDeclarativeTest extends DeclarativeTestBase<Tree> {
+ " </node>" //
+ " </node>" //
+ " <node text='With icon' icon='http://example.com/icon.png'/>" //
- + "</v-tree>";
+ + "</vaadin-tree>";
Tree tree = new Tree();
diff --git a/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java
index a30ca2a3ef..0e79c906d6 100644
--- a/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java
@@ -33,7 +33,7 @@ public class TreeTableDeclarativeTest extends TableDeclarativeTest {
@Test
public void testAttributes() {
- String design = "<v-tree-table animations-enabled=''>";
+ String design = "<vaadin-tree-table animations-enabled=''>";
TreeTable table = getTable();
table.setAnimationsEnabled(true);
@@ -43,7 +43,7 @@ public class TreeTableDeclarativeTest extends TableDeclarativeTest {
@Test
public void testHierarchy() {
- String design = "<v-tree-table>" //
+ String design = "<vaadin-tree-table>" //
+ "<table>" //
+ "<colgroup><col property-id=''></colgroup>" //
+ "<tbody>" //
@@ -57,7 +57,7 @@ public class TreeTableDeclarativeTest extends TableDeclarativeTest {
+ " <tr depth=1 item-id='2.1'><td></tr>" //
+ "</tbody>" //
+ "</table>" //
- + "</v-tree-table>";
+ + "</vaadin-tree-table>";
TreeTable table = getTable();
table.addContainerProperty("", String.class, "");
@@ -83,7 +83,7 @@ public class TreeTableDeclarativeTest extends TableDeclarativeTest {
@Test
public void testCollapsed() {
- String design = "<v-tree-table>" //
+ String design = "<vaadin-tree-table>" //
+ " <table>" //
+ " <colgroup><col property-id=''></colgroup>" //
+ " <tbody>" //
@@ -92,7 +92,7 @@ public class TreeTableDeclarativeTest extends TableDeclarativeTest {
+ " <tr depth=2 item-id='1.1.1'><td></tr>" //
+ " </tbody>" //
+ " </table>" //
- + "</v-tree-table>";
+ + "</vaadin-tree-table>";
TreeTable table = getTable();
table.addContainerProperty("", String.class, "");
@@ -116,12 +116,12 @@ public class TreeTableDeclarativeTest extends TableDeclarativeTest {
}
protected void assertMalformed(String hierarchy) {
- String design = "<v-tree-table>" //
+ String design = "<vaadin-tree-table>" //
+ " <table>" //
+ " <colgroup><col property-id=''></colgroup>" //
+ " <tbody>" + hierarchy + "</tbody>" //
+ " </table>" //
- + "</v-tree-table>";
+ + "</vaadin-tree-table>";
try {
read(design);
@@ -151,6 +151,6 @@ public class TreeTableDeclarativeTest extends TableDeclarativeTest {
@Override
protected String getTag() {
- return "v-tree-table";
+ return "vaadin-tree-table";
}
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java
index 569080223b..146d1f1ad1 100644
--- a/server/tests/src/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java
@@ -31,11 +31,11 @@ public class TwinColSelectDeclarativeTest extends
DeclarativeTestBase<TwinColSelect> {
public String getBasicDesign() {
- return "<v-twin-col-select rows=5 right-column-caption='Selected values' left-column-caption='Unselected values'>\n"
+ return "<vaadin-twin-col-select rows=5 right-column-caption='Selected values' left-column-caption='Unselected values'>\n"
+ " <option>First item</option>\n"
+ " <option selected>Second item</option>\n"
+ " <option selected>Third item</option>\n"
- + "</v-twin-col-select>";
+ + "</vaadin-twin-col-select>";
}
@@ -63,12 +63,12 @@ public class TwinColSelectDeclarativeTest extends
@Test
public void testReadEmpty() {
- testRead("<v-twin-col-select />", new TwinColSelect());
+ testRead("<vaadin-twin-col-select />", new TwinColSelect());
}
@Test
public void testWriteEmpty() {
- testWrite("<v-twin-col-select />", new TwinColSelect());
+ testWrite("<vaadin-twin-col-select />", new TwinColSelect());
}
} \ No newline at end of file
diff --git a/server/tests/src/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java
index e08980002d..12f319c6ad 100644
--- a/server/tests/src/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java
@@ -39,7 +39,7 @@ public class UploadDeclarativeTest extends DeclarativeTestBase<Upload> {
}
private String getBasicDesign() {
- return "<v-upload button-caption='Send the file' tabindex=5 />";
+ return "<vaadin-upload button-caption='Send the file' tabindex=5 />";
}
private Upload getBasicExpected() {
@@ -51,11 +51,11 @@ public class UploadDeclarativeTest extends DeclarativeTestBase<Upload> {
@Test
public void testReadEmpty() {
- testRead("<v-upload />", new Upload());
+ testRead("<vaadin-upload />", new Upload());
}
@Test
public void testWriteEmpty() {
- testWrite("<v-upload />", new Upload());
+ testWrite("<vaadin-upload />", new Upload());
}
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java
index 607fb471b9..47e9184a1c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java
+++ b/server/tests/src/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java
@@ -38,7 +38,7 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
@Test
public void testDefault() {
- String design = "<v-window>";
+ String design = "<vaadin-window>";
Window expected = new Window();
@@ -49,14 +49,14 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
@Test
public void testFeatures() {
- String design = "<v-window position='100,100' window-mode='maximized' "
+ String design = "<vaadin-window position='100,100' window-mode='maximized' "
+ "center modal='' resizable=false resize-lazy='' closable=false draggable=false "
+ "close-shortcut='ctrl-alt-escape' "
+ "assistive-prefix='Hello' assistive-postfix='World' assistive-role='alertdialog' "
+ "tab-stop-enabled='' "
+ "tab-stop-top-assistive-text='Do not move above the window' "
+ "tab-stop-bottom-assistive-text='End of window'>"
- + "</v-window>";
+ + "</vaadin-window>";
Window expected = new Window();
@@ -106,7 +106,7 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
expected.addCloseShortcut(KeyCode.ARROW_RIGHT, ModifierKey.CTRL);
// Test validity
- String design = "<v-window close-shortcut='escape spacebar ctrl-alt-left ctrl-right' />";
+ String design = "<vaadin-window close-shortcut='escape spacebar ctrl-alt-left ctrl-right' />";
testRead(design, expected);
testWrite(design, expected);
@@ -114,7 +114,7 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
expected.removeCloseShortcut(KeyCode.SPACEBAR);
// Test again
- design = "<v-window close-shortcut='escape ctrl-alt-left ctrl-right' />";
+ design = "<vaadin-window close-shortcut='escape ctrl-alt-left ctrl-right' />";
testRead(design, expected);
testWrite(design, expected);
@@ -133,7 +133,7 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
protected void assertInvalidPosition(String position) {
try {
- read("<v-window position='" + position + "'>");
+ read("<vaadin-window position='" + position + "'>");
Assert.fail("Invalid position '" + position + "' should throw");
} catch (Exception e) {
// expected
@@ -143,8 +143,8 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
@Test
public void testChildContent() {
- String design = "<v-window>" + createElement(new Button("OK"))
- + "</v-window>";
+ String design = "<vaadin-window>" + createElement(new Button("OK"))
+ + "</vaadin-window>";
Window expected = new Window();
expected.setContent(new Button("OK"));
@@ -156,8 +156,8 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
@Test(expected = DesignException.class)
public void testMultipleContentChildren() {
- String design = "<v-window>" + createElement(new Label("Hello"))
- + createElement(new Button("OK")) + "</v-window>";
+ String design = "<vaadin-window>" + createElement(new Label("Hello"))
+ + createElement(new Button("OK")) + "</vaadin-window>";
read(design);
}
@@ -168,7 +168,7 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
Label assistive1 = new Label("Assistive text");
Label assistive2 = new Label("More assistive text");
- String design = "<v-window>"
+ String design = "<vaadin-window>"
+ createElement(assistive1).attr(":assistive-description", "")
+ createElement(new Button("OK"))
+ createElement(assistive2).attr(":assistive-description", "");
@@ -179,7 +179,7 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
testRead(design, expected);
- String written = "<v-window>" + createElement(new Button("OK"))
+ String written = "<vaadin-window>" + createElement(new Button("OK"))
+ createElement(assistive1).attr(":assistive-description", "")
+ createElement(assistive2).attr(":assistive-description", "");
diff --git a/server/tests/src/com/vaadin/ui/declarative/DesignTest.java b/server/tests/src/com/vaadin/ui/declarative/DesignTest.java
index 556adb3dae..f1d6982992 100644
--- a/server/tests/src/com/vaadin/ui/declarative/DesignTest.java
+++ b/server/tests/src/com/vaadin/ui/declarative/DesignTest.java
@@ -90,7 +90,7 @@ public class DesignTest {
private String getHtmlLabelValue(String html) {
Document document = Jsoup.parse(html);
- Element label = document.select("v-label").get(0);
+ Element label = document.select("vaadin-label").get(0);
StringBuilder builder = new StringBuilder();
for (Node child : label.childNodes()) {