diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/components')
21 files changed, 218 insertions, 210 deletions
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.java b/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.java index cee71fdf4e..9e37fef7d9 100644 --- a/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.java +++ b/uitest/src/com/vaadin/tests/components/button/ButtonToggleIcons.java @@ -1,38 +1,38 @@ -package com.vaadin.tests.components.button;
-
-import com.vaadin.server.ThemeResource;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.Button.ClickListener;
-import com.vaadin.ui.NativeButton;
-import com.vaadin.ui.UI;
-import com.vaadin.ui.VerticalLayout;
-
-@SuppressWarnings("serial")
-public class ButtonToggleIcons extends UI {
-
- @Override
- protected void init(final VaadinRequest request) {
- final VerticalLayout layout = new VerticalLayout();
- setContent(layout);
-
- final ThemeResource iconResource = new ThemeResource(
- "../runo/icons/16/arrow-left.png");
-
- final ClickListener iconToggleListener = new ClickListener() {
- @Override
- public void buttonClick(final ClickEvent event) {
- final Button btn = event.getButton();
- if (btn.getIcon() == null) {
- btn.setIcon(iconResource);
- } else {
- btn.setIcon(null);
- }
- }
- };
-
- layout.addComponent(new Button("Toggle icon", iconToggleListener));
- layout.addComponent(new NativeButton("Toggle icon", iconToggleListener));
- }
-}
+package com.vaadin.tests.components.button; + +import com.vaadin.server.ThemeResource; +import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.NativeButton; +import com.vaadin.ui.UI; +import com.vaadin.ui.VerticalLayout; + +@SuppressWarnings("serial") +public class ButtonToggleIcons extends UI { + + @Override + protected void init(final VaadinRequest request) { + final VerticalLayout layout = new VerticalLayout(); + setContent(layout); + + final ThemeResource iconResource = new ThemeResource( + "../runo/icons/16/arrow-left.png"); + + final ClickListener iconToggleListener = new ClickListener() { + @Override + public void buttonClick(final ClickEvent event) { + final Button btn = event.getButton(); + if (btn.getIcon() == null) { + btn.setIcon(iconResource); + } else { + btn.setIcon(null); + } + } + }; + + layout.addComponent(new Button("Toggle icon", iconToggleListener)); + layout.addComponent(new NativeButton("Toggle icon", iconToggleListener)); + } +} diff --git a/uitest/src/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java b/uitest/src/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java index 933bca8c7d..62223ccc25 100644 --- a/uitest/src/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java +++ b/uitest/src/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java @@ -62,7 +62,9 @@ public class CalendarNotificationsTestIE extends MultiBrowserTest { WebElement day = findElements(By.className("v-calendar-day-number")) .get(2); // IE8 requires you to click on the text part to fire the event - new Actions(getDriver()).moveToElement(day, day.getSize().getWidth() - 3, day.getSize().getHeight() / 2).click().perform(); + new Actions(getDriver()) + .moveToElement(day, day.getSize().getWidth() - 3, + day.getSize().getHeight() / 2).click().perform(); // check that a notification was opened, this is done with a log instead // of a screenshot or element presence check due to problems with IE diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java index 1d2c85c974..a35bc46390 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInput.java @@ -14,18 +14,21 @@ public class ComboBoxValueInput extends AbstractTestUI { ComboBox cb = getComboBox("A combobox", false, "default"); addComponent(cb); - cb = getComboBox("A combobox with input prompt", false, "default-prompt"); + cb = getComboBox("A combobox with input prompt", false, + "default-prompt"); cb.setInputPrompt("Please select"); addComponent(cb); cb = getComboBox("A combobox with null item", true, "null"); addComponent(cb); - cb = getComboBox("A combobox with null item and input prompt", true, "null-prompt"); + cb = getComboBox("A combobox with null item and input prompt", true, + "null-prompt"); cb.setInputPrompt("Please select"); addComponent(cb); - cb = getComboBox("A combobox with filteringMode off", false, "filtering-off"); + cb = getComboBox("A combobox with filteringMode off", false, + "filtering-off"); cb.setFilteringMode(FilteringMode.OFF); addComponent(cb); diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java index b2b3c29098..318ffbe549 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java @@ -131,9 +131,10 @@ public class ComboBoxValueInputTest extends MultiBrowserTest { assertThat(getComboBoxValue(comboBox), is("")); - //selectByText doesn't work when filtering is off. + // selectByText doesn't work when filtering is off. comboBox.openPopup(); - List<WebElement> filteredItems = findElements(By.className("gwt-MenuItem")); + List<WebElement> filteredItems = findElements(By + .className("gwt-MenuItem")); filteredItems.get(1).click(); sendKeysToComboBox(comboBox, "mnop"); diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java b/uitest/src/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java index 41b61c9062..acfb7b165f 100644 --- a/uitest/src/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java @@ -8,7 +8,8 @@ import com.vaadin.ui.ComboBox; import com.vaadin.ui.Label; @SuppressWarnings("serial") -public class ComboSelectedValueBeyondTheFirstDropdownPage extends AbstractTestUI { +public class ComboSelectedValueBeyondTheFirstDropdownPage extends + AbstractTestUI { protected static final int ITEM_COUNT = 21; protected static final String ITEM_NAME_TEMPLATE = "Item %d"; diff --git a/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibilityTest.java b/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibilityTest.java index 4e0204604b..9f1fc6b03e 100644 --- a/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibilityTest.java +++ b/uitest/src/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibilityTest.java @@ -25,5 +25,4 @@ public class CustomComponentChildVisibilityTest extends MultiBrowserTest { return $(LabelElement.class).all().size() > 1; } - }
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffset.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffset.java index 62db60be76..a6fda534b2 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffset.java +++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffset.java @@ -29,7 +29,7 @@ public class DateFieldDayResolutionOffset extends AbstractTestUI { addComponent(dateValue); addComponent(dateField); - dateField.addValueChangeListener( new Property.ValueChangeListener(){ + dateField.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { dateValue.setValue(dateformat.format(dateField.getValue())); @@ -37,7 +37,8 @@ public class DateFieldDayResolutionOffset extends AbstractTestUI { }); } - private DateField getDateField(TimeZone timezone, SimpleDateFormat dateformat) { + private DateField getDateField(TimeZone timezone, + SimpleDateFormat dateformat) { final DateField dateField = new DateField(); try { Date initialDate = dateformat.parse(initialDateString); @@ -51,7 +52,8 @@ public class DateFieldDayResolutionOffset extends AbstractTestUI { } private SimpleDateFormat getDateFormat(TimeZone timezone) { - final SimpleDateFormat dateformat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); + final SimpleDateFormat dateformat = new SimpleDateFormat( + "MM/dd/yyyy HH:mm:ss"); dateformat.setTimeZone(timezone); return dateformat; } diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java index c3b3af9aa4..4ee9597f68 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java +++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java @@ -25,8 +25,9 @@ public class DateFieldDayResolutionOffsetTest extends MultiBrowserTest { } private void select2ndOfSeptember() { - for(WebElement e : findElements(By.className("v-datefield-calendarpanel-day"))) { - if(e.getText().equals("2")) { + for (WebElement e : findElements(By + .className("v-datefield-calendarpanel-day"))) { + if (e.getText().equals("2")) { e.click(); break; } @@ -36,8 +37,7 @@ public class DateFieldDayResolutionOffsetTest extends MultiBrowserTest { private void openDatePicker() { DateFieldElement dateField = $(DateFieldElement.class).first(); - dateField.findElement(By.tagName("button")) - .click(); + dateField.findElement(By.tagName("button")).click(); } }
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrollingTest.java b/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrollingTest.java index 3a0dcafe1f..29476b9ae6 100644 --- a/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrollingTest.java +++ b/uitest/src/com/vaadin/tests/components/formlayout/TableInFormLayoutCausesScrollingTest.java @@ -13,11 +13,10 @@ public class TableInFormLayoutCausesScrollingTest extends MultiBrowserTest { @Test @Ignore - //This test is actually testing that #7309 is NOT fixed. - //Ignoring the test because it is not stable and it's - //occasionally failing on browsers even when it shouldn't. - - //There's no point fixing this test before #7309 is actually fixed. + // This test is actually testing that #7309 is NOT fixed. + // Ignoring the test because it is not stable and it's + // occasionally failing on browsers even when it shouldn't. + // There's no point fixing this test before #7309 is actually fixed. public void pageIsNotScrolled() throws IOException { openTestURL(); diff --git a/uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java b/uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java index 6c23e4e4a5..ce528df373 100644 --- a/uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java +++ b/uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java @@ -69,7 +69,7 @@ public class PopupViewResizeWhileOpenTest extends MultiBrowserTest { } private WebElement getPopupShadow() { - //Shadows with index 0: tooltip, index 1: popup + // Shadows with index 0: tooltip, index 1: popup return findElements(By.className("v-shadow")).get(1); } diff --git a/uitest/src/com/vaadin/tests/components/table/LongMultiselectTest.java b/uitest/src/com/vaadin/tests/components/table/LongMultiselectTest.java index ebf2c1dc47..e9f3bbb355 100644 --- a/uitest/src/com/vaadin/tests/components/table/LongMultiselectTest.java +++ b/uitest/src/com/vaadin/tests/components/table/LongMultiselectTest.java @@ -38,7 +38,8 @@ public class LongMultiselectTest extends MultiBrowserTest { TableElement table = getTable(); assertThat(table.getCell(LASTSELECTEDROW, 1).getText(), is("updated")); - assertThat(table.getCell(LASTSELECTEDROW-1, 1).getText(), is("updated")); + assertThat(table.getCell(LASTSELECTEDROW - 1, 1).getText(), + is("updated")); } private void selectRows() { @@ -47,8 +48,9 @@ public class LongMultiselectTest extends MultiBrowserTest { scrollToBottom(); - new Actions(getDriver()).keyDown(Keys.SHIFT).click(getTable().getCell(LASTSELECTEDROW, 0)).keyUp(Keys.SHIFT) - .build().perform(); + new Actions(getDriver()).keyDown(Keys.SHIFT) + .click(getTable().getCell(LASTSELECTEDROW, 0)) + .keyUp(Keys.SHIFT).build().perform(); } private TableElement getTable() { diff --git a/uitest/src/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java b/uitest/src/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java index 0e7a7c08a4..504957e773 100644 --- a/uitest/src/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java +++ b/uitest/src/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java @@ -51,7 +51,8 @@ public class SelectAllConstantViewportTest extends MultiBrowserTest { int rowLocation = row.getLocation().getY(); - // use click x,y with non-zero offset to actually toggle the checkbox. (#13763) + // use click x,y with non-zero offset to actually toggle the checkbox. + // (#13763) checkbox.click(5, 5); int newRowLocation = row.getLocation().getY(); diff --git a/uitest/src/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java b/uitest/src/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java index aee8cc96d9..4a9d17c02d 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java +++ b/uitest/src/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java @@ -105,8 +105,8 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest { } private void assertThatFocusTextFieldHasText(String text) { - List<WebElement> focused = getTable().findElements(By - .className("v-textfield-focus")); + List<WebElement> focused = getTable().findElements( + By.className("v-textfield-focus")); assertThat(focused.get(0).getAttribute("value"), is(text)); } @@ -114,7 +114,7 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest { private int getSelectedRowTextValue() { WebElement selectedRow = getSelectedRow(); - //i.e. 'red 1foo' + // i.e. 'red 1foo' String text = getText(selectedRow, 2); return Integer.parseInt(text.substring(4, 5)); @@ -127,13 +127,11 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest { } private List<WebElement> getCellContents(WebElement row) { - return row.findElements( - By.className("v-table-cell-content")); + return row.findElements(By.className("v-table-cell-content")); } private WebElement getSelectedRow() { - return getTable().findElement(By - .className("v-selected")); + return getTable().findElement(By.className("v-selected")); } private void clickOnTextField(int row) { @@ -157,15 +155,13 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest { } private WebElement getElement(int row, int index, String className) { - return getRows() - .get(row) - .findElements(By.className(className)) + return getRows().get(row).findElements(By.className(className)) .get(index); } private List<WebElement> getRows() { return getTable().findElement(By.className("v-table-body")) - .findElements(By.tagName("tr")); + .findElements(By.tagName("tr")); } private void selectRow(int row) { @@ -178,7 +174,6 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest { return $(TableElement.class).first(); } - private void clickOnLabel(int row) { WebElement label = getElement(row, "v-label"); label.click(); @@ -200,9 +195,9 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest { private int getSelectedRowIndex() { List<WebElement> rows = getRows(); - //Unfortunately rows.getIndexOf(getSelectedRow()) doesn't work. - for(WebElement r : rows) { - if(r.getAttribute("class").contains("v-selected")) { + // Unfortunately rows.getIndexOf(getSelectedRow()) doesn't work. + for (WebElement r : rows) { + if (r.getAttribute("class").contains("v-selected")) { return rows.indexOf(r); } } diff --git a/uitest/src/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java b/uitest/src/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java index 3ae66de684..5faee3cc59 100644 --- a/uitest/src/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java +++ b/uitest/src/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java @@ -42,7 +42,8 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest { public List<DesiredCapabilities> getBrowsersToTest() { List<DesiredCapabilities> browsersToTest = super.getBrowsersToTest(); - //Can't get IE8 to hit the resizer, extracted IE8 to it's own test class. + // Can't get IE8 to hit the resizer, extracted IE8 to it's own test + // class. browsersToTest.remove(Browser.IE8.getDesiredCapabilities()); return browsersToTest; @@ -54,7 +55,8 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest { List<ButtonElement> buttons = $(ButtonElement.class).all(); - WebElement resizer = getTable().findElement(By.className("v-table-resizer")); + WebElement resizer = getTable().findElement( + By.className("v-table-resizer")); assertEquals(100, getTextFieldWidth()); @@ -84,7 +86,8 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest { private int getTextFieldWidth() { TableElement table = getTable(); - final WebElement textField = table.findElement(By.className("v-textfield")); + final WebElement textField = table.findElement(By + .className("v-textfield")); return textField.getSize().width; } @@ -94,8 +97,7 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest { } private void moveResizer(WebElement resizer, int offset) { - new Actions(driver).clickAndHold(resizer).moveByOffset(offset, 0).release().perform(); + new Actions(driver).clickAndHold(resizer).moveByOffset(offset, 0) + .release().perform(); } } - - diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java b/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java index fffc766e7c..63d50e0464 100755 --- a/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java +++ b/uitest/src/com/vaadin/tests/components/tabsheet/ExtraScrollbarsInTabSheet.java @@ -1,42 +1,42 @@ -package com.vaadin.tests.components.tabsheet;
-
-import com.vaadin.annotations.Theme;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.ui.HorizontalSplitPanel;
-import com.vaadin.ui.Panel;
-import com.vaadin.ui.TabSheet;
-import com.vaadin.ui.UI;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.themes.Runo;
-
-@Theme("runo")
-public class ExtraScrollbarsInTabSheet extends UI {
-
- @Override
- public void init(VaadinRequest request) {
-
- VerticalLayout vl = new VerticalLayout();
- vl.setSizeFull();
-
- HorizontalSplitPanel horizontalSplit = new HorizontalSplitPanel();
-
- TabSheet ts = new TabSheet();
-
- VerticalLayout tabContent = new VerticalLayout();
- tabContent.setSizeFull();
-
- Panel p = new Panel();
- p.addStyleName(Runo.PANEL_LIGHT);
- p.setHeight("400px");
- tabContent.addComponent(p);
-
- ts.addTab(tabContent);
- horizontalSplit.setSecondComponent(ts);
-
- vl.addComponent(horizontalSplit);
-
- setContent(vl);
-
- }
-
-}
+package com.vaadin.tests.components.tabsheet; + +import com.vaadin.annotations.Theme; +import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.HorizontalSplitPanel; +import com.vaadin.ui.Panel; +import com.vaadin.ui.TabSheet; +import com.vaadin.ui.UI; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.themes.Runo; + +@Theme("runo") +public class ExtraScrollbarsInTabSheet extends UI { + + @Override + public void init(VaadinRequest request) { + + VerticalLayout vl = new VerticalLayout(); + vl.setSizeFull(); + + HorizontalSplitPanel horizontalSplit = new HorizontalSplitPanel(); + + TabSheet ts = new TabSheet(); + + VerticalLayout tabContent = new VerticalLayout(); + tabContent.setSizeFull(); + + Panel p = new Panel(); + p.addStyleName(Runo.PANEL_LIGHT); + p.setHeight("400px"); + tabContent.addComponent(p); + + ts.addTab(tabContent); + horizontalSplit.setSecondComponent(ts); + + vl.addComponent(horizontalSplit); + + setContent(vl); + + } + +} diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java index c21c702bd0..3e132c583b 100644 --- a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java +++ b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java @@ -18,18 +18,20 @@ public class FirstTabNotVisibleInTabsheet extends AbstractTestUI { TabSheet tabSheet = new TabSheet(); tabSheet.setWidth("600px"); - firstTab = tabSheet.addTab(new Label("first visible tab"), "first visible tab"); + firstTab = tabSheet.addTab(new Label("first visible tab"), + "first visible tab"); for (int i = 2; i < 10; i++) { tabSheet.addTab(new Label("visible tab " + i), "visible tab " + i); } - addComponent(new VerticalLayout(tabSheet, new Button("Toggle first tab", new Button.ClickListener() { - @Override - public void buttonClick(Button.ClickEvent event) { - firstTab.setVisible(!firstTab.isVisible()); - } - }))); + addComponent(new VerticalLayout(tabSheet, new Button( + "Toggle first tab", new Button.ClickListener() { + @Override + public void buttonClick(Button.ClickEvent event) { + firstTab.setVisible(!firstTab.isVisible()); + } + }))); } @Override diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java index e57651ba03..99c47b1703 100644 --- a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java +++ b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java @@ -1,6 +1,5 @@ package com.vaadin.tests.components.tabsheet; - import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.elements.TabSheetElement; import com.vaadin.tests.tb3.MultiBrowserTest; @@ -17,8 +16,8 @@ public class FirstTabNotVisibleInTabsheetTest extends MultiBrowserTest { TabSheetElement tabSheet = $(TabSheetElement.class).first(); - Assert.assertTrue("TabSheet should have first tab visible", - tabSheet.getTabCaptions().contains("first visible tab")); + Assert.assertTrue("TabSheet should have first tab visible", tabSheet + .getTabCaptions().contains("first visible tab")); } private void toggleFirstTabVisibility() { diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java b/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java index 3323d6a8d7..624fac6e75 100644 --- a/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java +++ b/uitest/src/com/vaadin/tests/components/tabsheet/MoveComponentBetweenTabsheets.java @@ -1,69 +1,69 @@ -package com.vaadin.tests.components.tabsheet;
-
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.tests.components.AbstractTestUI;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.TabSheet;
-
-/**
- * Main UI class
- */
-@SuppressWarnings("serial")
-public class MoveComponentBetweenTabsheets extends AbstractTestUI {
-
- TabSheet left, right;
- private Label l1;
- private Label l2;
- private Label r1;
- private Label r2;
-
- void doTestOperation() {
- right.addTab(l1, "L1");
- right.setSelectedTab(l1);
- }
-
- @Override
- protected void setup(VaadinRequest request) {
-
- // TODO Auto-generated method stub
- Button button = new Button("Move L1 to the right tabsheet");
- button.addClickListener(new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- doTestOperation();
- }
- });
-
- getLayout().addComponent(button);
-
- left = new TabSheet();
- l1 = new Label("Left 1");
- left.addTab(l1, "L1");
- l2 = new Label("Left 2");
- left.addTab(l2, "L2");
- left.setWidth("400px");
-
- right = new TabSheet();
- r1 = new Label("Right 1");
- right.addTab(r1, "R1");
- r2 = new Label("Right 2");
- right.addTab(r2, "R2");
- right.setWidth("400px");
-
- getLayout().addComponent(new HorizontalLayout(left, right));
- }
-
- @Override
- protected String getTestDescription() {
- return "Moving a component from a tabsheet to another sometimes causes a client-side error";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return 10839;
- }
-
-}
+package com.vaadin.tests.components.tabsheet; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.TabSheet; + +/** + * Main UI class + */ +@SuppressWarnings("serial") +public class MoveComponentBetweenTabsheets extends AbstractTestUI { + + TabSheet left, right; + private Label l1; + private Label l2; + private Label r1; + private Label r2; + + void doTestOperation() { + right.addTab(l1, "L1"); + right.setSelectedTab(l1); + } + + @Override + protected void setup(VaadinRequest request) { + + // TODO Auto-generated method stub + Button button = new Button("Move L1 to the right tabsheet"); + button.addClickListener(new Button.ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + doTestOperation(); + } + }); + + getLayout().addComponent(button); + + left = new TabSheet(); + l1 = new Label("Left 1"); + left.addTab(l1, "L1"); + l2 = new Label("Left 2"); + left.addTab(l2, "L2"); + left.setWidth("400px"); + + right = new TabSheet(); + r1 = new Label("Right 1"); + right.addTab(r1, "R1"); + r2 = new Label("Right 2"); + right.addTab(r2, "R2"); + right.setWidth("400px"); + + getLayout().addComponent(new HorizontalLayout(left, right)); + } + + @Override + protected String getTestDescription() { + return "Moving a component from a tabsheet to another sometimes causes a client-side error"; + } + + @Override + protected Integer getTicketNumber() { + return 10839; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/textfield/LocaleChangeOnReadOnlyField.java b/uitest/src/com/vaadin/tests/components/textfield/LocaleChangeOnReadOnlyField.java index a1cabe914e..06469550c9 100644 --- a/uitest/src/com/vaadin/tests/components/textfield/LocaleChangeOnReadOnlyField.java +++ b/uitest/src/com/vaadin/tests/components/textfield/LocaleChangeOnReadOnlyField.java @@ -1,6 +1,5 @@ package com.vaadin.tests.components.textfield; - import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.ui.Button; diff --git a/uitest/src/com/vaadin/tests/components/ui/UIAccessTest.java b/uitest/src/com/vaadin/tests/components/ui/UIAccessTest.java index 9ecaa05315..0e37aa36fb 100644 --- a/uitest/src/com/vaadin/tests/components/ui/UIAccessTest.java +++ b/uitest/src/com/vaadin/tests/components/ui/UIAccessTest.java @@ -43,7 +43,7 @@ public class UIAccessTest extends MultiBrowserTest { waitForLogToContainText("0. Current UI matches in beforeResponse? true"); waitForLogToContainText("1. Current session matches in beforeResponse? true"); } - + @Test public void canBeAccessedFromUIThread() { $(ButtonElement.class).first().click(); @@ -96,7 +96,7 @@ public class UIAccessTest extends MultiBrowserTest { waitForLogToContainText("1. Thread started, waiting for interruption"); waitForLogToContainText("2. I was interrupted"); } - + @Test public void testAccessSynchronously() { $(ButtonElement.class).get(5).click(); @@ -106,7 +106,7 @@ public class UIAccessTest extends MultiBrowserTest { assertTrue(logContainsText("2. has request after accessSynchronously? true")); assertTrue(logContainsText("3. Test value after accessSynchornously: Set in accessSynchronosly")); } - + @Test public void currentInstanceCanAccessValue() { $(ButtonElement.class).get(6).click(); diff --git a/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java b/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java index 2b6ba40e8c..f499f29b9b 100644 --- a/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java +++ b/uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java @@ -11,7 +11,8 @@ import static org.junit.Assert.assertThat; public class UISerializationTest extends SingleBrowserTest { @Test - @Ignore //Broken on all browsers since 9696e6c3e7e952b66ac3f5c9ddc3dfca4233451e + @Ignore + // Broken on all browsers since 9696e6c3e7e952b66ac3f5c9ddc3dfca4233451e public void tb2test() throws Exception { openTestURL(); $(ButtonElement.class).first().click(); |