diff options
author | Artur Signell <artur@vaadin.com> | 2013-04-23 14:54:48 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-04-23 14:54:48 +0300 |
commit | ed79188e0dd8876496c9848ca40479256e08c6c3 (patch) | |
tree | 53ec00a284329cdf68d413cfa2c65bbb9a40e3eb /uitest | |
parent | 53b5766731b678694ee83ce8dd3592185ba36105 (diff) | |
parent | feb9a8c3510afc76c079fafcd9e507205bde139c (diff) | |
download | vaadin-framework-ed79188e0dd8876496c9848ca40479256e08c6c3.tar.gz vaadin-framework-ed79188e0dd8876496c9848ca40479256e08c6c3.zip |
Merge commit 'feb9a8c3510afc76c079fafcd9e507205bde139c'
Conflicts:
WebContent/release-notes.html
theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java
Change-Id: Iad9ee95b2f399ff93f0e426a0810b18d923f8ff6
Diffstat (limited to 'uitest')
7 files changed, 348 insertions, 28 deletions
diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionTabStylenames.html b/uitest/src/com/vaadin/tests/components/accordion/AccordionTabStylenames.html new file mode 100644 index 0000000000..4870777717 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/accordion/AccordionTabStylenames.html @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="http://localhost:8888/" /> +<title>New Test</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">New Test</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.accordion.AccordionTabStylenames?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsaccordionAccordionTabStylenames::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VAccordion[0]/domChild[0]</td> + <td>v-accordion-item-tab0</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsaccordionAccordionTabStylenames::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VAccordion[0]/domChild[1]</td> + <td>v-accordion-item-tab1</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsaccordionAccordionTabStylenames::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VAccordion[0]/domChild[2]</td> + <td>v-accordion-item-tab2</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsaccordionAccordionTabStylenames::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VAccordion[0]/domChild[3]</td> + <td>v-accordion-item-tab3</td> +</tr> +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionTabStylenames.java b/uitest/src/com/vaadin/tests/components/accordion/AccordionTabStylenames.java new file mode 100644 index 0000000000..1412ae6289 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/accordion/AccordionTabStylenames.java @@ -0,0 +1,32 @@ +package com.vaadin.tests.components.accordion; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Accordion; +import com.vaadin.ui.Label; +import com.vaadin.ui.TabSheet.Tab; + +public class AccordionTabStylenames extends TestBase { + + @Override + protected void setup() { + Accordion acc = new Accordion(); + addComponent(acc); + + for (int tabIndex = 0; tabIndex < 5; tabIndex++) { + Tab tab = acc.addTab(new Label("Tab " + tabIndex)); + tab.setCaption("Tab " + tabIndex); + tab.setStyleName("tab" + tabIndex); + } + } + + @Override + protected String getDescription() { + return null; + } + + @Override + protected Integer getTicketNumber() { + return 10605; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java new file mode 100644 index 0000000000..20a62f2a33 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java @@ -0,0 +1,55 @@ +/* + * Copyright 2000-2013 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.combobox; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; + +public class ComboBoxCursorPositionReset extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + final HorizontalLayout root = new HorizontalLayout(); + root.setSizeFull(); + setContent(root); + + ComboBox combo = new ComboBox(); + combo.setImmediate(true); + root.addComponent(combo); + combo.addItem("Hello World"); + combo.addItem("Please click on the text"); + + combo.setValue("Please click on the text"); + Label gap = new Label(); + root.addComponent(gap); + root.setExpandRatio(gap, 1); + + } + + @Override + protected String getTestDescription() { + return "Clicking on the text in the ComboBox should position the caret where you clicked, not cause it to jump to the start or the end"; + } + + @Override + protected Integer getTicketNumber() { + return 11152; + } + +} diff --git a/uitest/src/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.html b/uitest/src/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.html new file mode 100644 index 0000000000..e0b17ec8cf --- /dev/null +++ b/uitest/src/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.html @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="http://localhost:7070" /> +<title>New Test</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">New Test</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>run/com.vaadin.tests.layouts.VerticalLayoutSlotExpansionAndAlignment?restartApplication</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>no-scrollbars</td> +</tr> +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.java b/uitest/src/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.java new file mode 100644 index 0000000000..bba8ccf120 --- /dev/null +++ b/uitest/src/com/vaadin/tests/layouts/VerticalLayoutSlotExpansionAndAlignment.java @@ -0,0 +1,45 @@ +package com.vaadin.tests.layouts; + +import com.vaadin.annotations.Theme; +import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.Alignment; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.UI; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.themes.Reindeer; + +@SuppressWarnings("serial") +public class VerticalLayoutSlotExpansionAndAlignment extends UI { + + @Override + protected void init(VaadinRequest request) { + + VerticalLayout layout = new VerticalLayout(); + layout.setSizeFull(); + setContent(layout); + + HorizontalLayout header = new HorizontalLayout(new Label("HEADER")); + header.setHeight("100px"); + header.setWidth("100%"); + header.setStyleName(Reindeer.LAYOUT_WHITE); + layout.addComponent(header); + + HorizontalLayout content = new HorizontalLayout(new Label("CONTENT")); + content.setSizeFull(); + content.setStyleName(Reindeer.LAYOUT_BLUE); + layout.addComponent(content); + + HorizontalLayout footer = new HorizontalLayout(new Label("FOOTER")); + footer.setHeight("150px"); + footer.setWidth("100%"); + footer.setStyleName(Reindeer.LAYOUT_BLACK); + layout.addComponent(footer); + + // This break things + layout.setComponentAlignment(footer, Alignment.BOTTOM_LEFT); + layout.setExpandRatio(content, 1); + + } + +}
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/navigator/NavigatorTest.html b/uitest/src/com/vaadin/tests/navigator/NavigatorTest.html index 030b30f37a..7eba02aa94 100644 --- a/uitest/src/com/vaadin/tests/navigator/NavigatorTest.html +++ b/uitest/src/com/vaadin/tests/navigator/NavigatorTest.html @@ -18,8 +18,13 @@ </tr> <tr> <td>assertText</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td> - <td>1. Navigated to DefaultView with params</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> + <td>1. Navigated to DefaultView without params</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[6]/VVerticalLayout[0]/Slot[0]/VLabel[0]</td> + <td>Default view:</td> </tr> <tr> <td>click</td> @@ -28,8 +33,13 @@ </tr> <tr> <td>assertText</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td> - <td>2. Navigated to ListView with params</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> + <td>2. Navigated to ListView without params</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[6]/VVerticalLayout[0]/Slot[0]/VScrollTable[0]</td> + <td></td> </tr> <tr> <td>assertLocation</td> @@ -43,8 +53,13 @@ </tr> <tr> <td>assertText</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td> - <td>3. Navigated to EditView with params</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> + <td>3. Navigated to EditView without params</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[6]/VVerticalLayout[0]/Slot[0]/VRichTextArea[0]</td> + <td></td> </tr> <tr> <td>assertLocation</td> @@ -53,12 +68,12 @@ </tr> <tr> <td>mouseClick</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[3]/VTextField[0]</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[4]/VTextField[0]</td> <td>56,6</td> </tr> <tr> <td>enterCharacter</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[3]/VTextField[0]</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[4]/VTextField[0]</td> <td>param=value</td> </tr> <tr> @@ -68,10 +83,20 @@ </tr> <tr> <td>assertText</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> <td>4. Navigated to ListView with params param=value</td> </tr> <tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[6]/VVerticalLayout[0]/Slot[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td> + <td>param</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[6]/VVerticalLayout[0]/Slot[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td> + <td>value</td> +</tr> +<tr> <td>assertLocation</td> <td>*#!list/param=value</td> <td></td> @@ -83,7 +108,7 @@ </tr> <tr> <td>assertText</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> <td>5. Navigated to EditView with params param=value</td> </tr> <tr> @@ -98,7 +123,7 @@ </tr> <tr> <td>assertText</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> <td>6. Prevent navigation to ForbiddenView</td> </tr> <tr> @@ -107,45 +132,123 @@ <td></td> </tr> <tr> + <td>click</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[3]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> + <td>7. Navigated to SpecialCharsView: öääö !%&/()=; fragment: !öääö !%&/()=/param=value</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[6]/VVerticalLayout[0]/Slot[0]/VLabel[0]</td> + <td>öääö !%&/()=</td> +</tr> +<tr> + <td>assertLocation</td> + <td>*#!%C3%B6%C3%A4%C3%A4%C3%B6%20!%25&/()=/param=value</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>window.location.hash='!foo bar'</td> + <td></td> +</tr> +<tr> + <td>pause</td> + <td>3000</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> + <td>8. View 'foo bar' not found!</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[6]/VVerticalLayout[0]/Slot[0]/VLabel[0]</td> + <td>Tried to navigate to foo bar but such a view could not be found :(</td> +</tr> +<tr> + <td>assertLocation</td> + <td>regex:.*#!foo( |%20)bar</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>window.location.hash='!/foo=bar'</td> + <td></td> +</tr> +<tr> + <td>pause</td> + <td>3000</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> + <td>9. Navigated to DefaultView with params foo=bar</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[6]/VVerticalLayout[0]/Slot[0]/VLabel[0]</td> + <td>Default view: foo=bar</td> +</tr> +<tr> + <td>assertLocation</td> + <td>*#!/foo=bar</td> + <td></td> +</tr> +<tr> <td>runScript</td> - <td>window.location.hash='!foo'</td> + <td>window.location.hash='foo bar'</td> <td></td> </tr> <tr> <td>pause</td> - <td>1000</td> + <td>3000</td> <td></td> </tr> <tr> <td>assertText</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td> - <td>7. View 'foo' not found!</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> + <td>10. Navigated to DefaultView without params</td> </tr> <tr> <td>assertLocation</td> - <td>*#!foo</td> + <td>regex:.*#foo( |%20)bar</td> <td></td> </tr> +<!-- +This test is broken in Safari 5; doing the same manually works fine <tr> <td>runScript</td> - <td>window.location.hash='foo'</td> + <td>window.location.hash='!öääö !%25&/()='</td> <td></td> </tr> <tr> <td>pause</td> - <td>1000</td> + <td>3000</td> <td></td> </tr> <tr> <td>assertText</td> - <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/VOrderedLayout$Slot[4]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VLabel[0]</td> - <td>8. Navigated to DefaultView with params</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::PID_SLog_row_0</td> + <td>10. Navigated to SpecialCharsView: öääö !%&/()=; fragment: !öääö !%&/()=</td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=runcomvaadintestsnavigatorNavigatorTest::/VVerticalLayout[0]/Slot[6]/VVerticalLayout[0]/Slot[0]/VLabel[0]</td> + <td>öääö !%&/()=</td> </tr> <tr> <td>assertLocation</td> - <td>*#foo</td> + <td>regex:.*#!(öääö !%|öääö !%25|%C3%B6%C3%A4%C3%A4%C3%B6%20!%25)&/\(\)=</td> <td></td> </tr> + --> </tbody></table> </body> diff --git a/uitest/src/com/vaadin/tests/navigator/NavigatorTest.java b/uitest/src/com/vaadin/tests/navigator/NavigatorTest.java index f35c8b876d..81944abd40 100644 --- a/uitest/src/com/vaadin/tests/navigator/NavigatorTest.java +++ b/uitest/src/com/vaadin/tests/navigator/NavigatorTest.java @@ -37,7 +37,9 @@ public class NavigatorTest extends UI { @Override public void enter(ViewChangeEvent event) { String params = event.getParameters(); - log.log("Navigated to ListView with params " + params); + log.log("Navigated to ListView " + + (params.isEmpty() ? "without params" : "with params " + + params)); removeAllItems(); for (String arg : params.split(",")) { addItem(arg.split("=|$", 2), arg); @@ -49,19 +51,33 @@ public class NavigatorTest extends UI { @Override public void enter(ViewChangeEvent event) { - log.log("Navigated to EditView with params " - + event.getParameters()); - setValue("Displaying edit view with parameters " - + event.getParameters()); + String params = event.getParameters(); + log.log("Navigated to EditView " + + (params.isEmpty() ? "without params" : "with params " + + params)); + setValue("Displaying edit view with parameters " + params); } } + class SpecialCharsView extends Label implements View { + + @Override + public void enter(ViewChangeEvent event) { + log.log("Navigated to SpecialCharsView: " + event.getViewName() + + "; fragment: " + getPage().getUriFragment()); + setValue(event.getViewName()); + } + + } + class DefaultView extends Label implements View { @Override public void enter(ViewChangeEvent event) { - log.log("Navigated to DefaultView with params " - + event.getParameters()); + String params = event.getParameters(); + log.log("Navigated to DefaultView " + + (params.isEmpty() ? "without params" : "with params " + + params)); setValue("Default view: " + event.getParameters()); } } @@ -123,6 +139,7 @@ public class NavigatorTest extends UI { navi.addView("list", new ListView()); navi.addView("edit", new EditView()); + navi.addView("öääö !%&/()=", new SpecialCharsView()); navi.addView("forbidden", new ForbiddenView()); navi.addViewChangeListener(new NaviListener()); @@ -132,6 +149,7 @@ public class NavigatorTest extends UI { layout.addComponent(new NaviButton("list")); layout.addComponent(new NaviButton("edit")); layout.addComponent(new NaviButton("forbidden")); + layout.addComponent(new NaviButton("öääö !%&/()=")); layout.addComponent(params); layout.addComponent(log); |