diff options
Diffstat (limited to 'uitest')
96 files changed, 29 insertions, 808 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/TestDateField.java b/uitest/src/main/java/com/vaadin/tests/TestDateField.java index c3d96a6214..c0df8484ec 100644 --- a/uitest/src/main/java/com/vaadin/tests/TestDateField.java +++ b/uitest/src/main/java/com/vaadin/tests/TestDateField.java @@ -52,7 +52,6 @@ public class TestDateField extends CustomComponent { df.setCaption("DateField caption " + df); df.setDescription("DateField description " + df); df.setComponentError(errorMsg); - df.setImmediate(true); // FIXME: bug #1138 this makes datefield to render with unknown // component (UIDL tree debug) df.addStyleName("thisShouldBeHarmless"); diff --git a/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java b/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java index c23413a87d..52cf961c85 100644 --- a/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java +++ b/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java @@ -1,4 +1,4 @@ -/* +/* * Copyright 2000-2016 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not @@ -95,7 +95,6 @@ public class TestForWindowing extends CustomComponent { s.setMax(13); s.setMin(12); s.setResolution(2); - s.setImmediate(true); // s.setOrientation(Slider.ORIENTATION_VERTICAL); // s.setArrows(false); diff --git a/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java b/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java deleted file mode 100644 index 2e76ed460e..0000000000 --- a/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.vaadin.tests.application; - -import java.lang.reflect.Field; -import java.util.Map; -import java.util.Set; - -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractTestUIWithLog; -import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.ConnectorTracker; -import com.vaadin.ui.Window; - -public class ResynchronizeAfterAsyncRemoval extends AbstractTestUIWithLog { - - @Override - public void setup(VaadinRequest vaadinRequest) { - final Window window = new Window("Asynchronously removed window"); - // without this, the size info sent in the background removes the - // window immediately after showing it, making the test fail - setImmediate(false); - window.center(); - - // The window will enqueue a non-immediate message reporting its current - // position. - addWindow(window); - - // Remove window immediately when the current response is sent - runAfterResponse(new Runnable() { - @Override - public void run() { - removeWindow(window); - } - }); - - // Clicking the button will trigger sending the window coordinates, but - // the window is already removed at that point. - addComponent(new Button("Am I dirty?", new Button.ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - log("Window removed: " + (window.getParent() == null)); - - boolean dirty = getUI().getConnectorTracker() - .isDirty(event.getButton()); - log("Dirty: " + dirty); - } - })); - addComponent(new Button("Log unregistered connector count", - new Button.ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - logUnregisteredConnectorCount(); - } - })); - } - - private void logUnregisteredConnectorCount() { - int count = 0; - - Map<Integer, Set<String>> unregisterIdMap = getUnregisterIdMap(); - for (Set<String> set : unregisterIdMap.values()) { - count += set.size(); - } - log("syncId: " + getConnectorTracker().getCurrentSyncId()); - log("Unregistered connector count: " + count); - } - - @SuppressWarnings("unchecked") - private Map<Integer, Set<String>> getUnregisterIdMap() { - try { - ConnectorTracker tracker = getConnectorTracker(); - Field field = tracker.getClass() - .getDeclaredField("syncIdToUnregisteredConnectorIds"); - field.setAccessible(true); - return (Map<Integer, Set<String>>) field.get(tracker); - } catch (Exception e) { - throw new RuntimeException(e); - } - } -}
\ No newline at end of file diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java index de0f70ef88..e18fabee5b 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java +++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java @@ -228,8 +228,6 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends * when overriding. */ protected void createActions() { - createBooleanAction("Immediate", CATEGORY_STATE, true, - immediateCommand); createBooleanAction("Enabled", CATEGORY_STATE, true, enabledCommand); createBooleanAction("Readonly", CATEGORY_STATE, false, readonlyCommand); createBooleanAction("Visible", CATEGORY_STATE, true, visibleCommand); @@ -543,7 +541,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends } protected boolean isSelected(MenuItem item) { - return (item.getIcon() != null); + return item.getIcon() != null; } private <VALUETYPE> MenuBar.Command singleSelectMenuCommand( @@ -686,8 +684,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent> extends Registration registration; @Override - public void execute(T c, Boolean enabled, - Object data) { + public void execute(T c, Boolean enabled, Object data) { if (enabled) { registration = addListener.apply(c); } else if (registration != null) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java index bf5ef2df13..8dce9c73e2 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java +++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java @@ -82,17 +82,14 @@ public abstract class AbstractComponentTestCase<T extends AbstractComponent> /* COMMANDS */ - protected Command<T, String> widthCommand = (t, value, data) -> t.setWidth( - value); + protected Command<T, String> widthCommand = (t, value, data) -> t + .setWidth(value); protected Command<T, String> heightCommand = (t, value, data) -> t .setHeight(value); protected Command<T, Boolean> enabledCommand = (c, enabled, data) -> c .setEnabled(enabled); - protected Command<T, Boolean> immediateCommand = (c, immediate, data) -> c - .setImmediate(immediate); - protected Command<T, Boolean> errorIndicatorCommand = (c, enabled, data) -> { if (enabled) { @@ -131,8 +128,8 @@ public abstract class AbstractComponentTestCase<T extends AbstractComponent> protected Command<T, Boolean> visibleCommand = (c, enabled, data) -> c .setVisible(enabled); - protected Command<T, Resource> iconCommand = (c, value, data) -> c.setIcon( - value); + protected Command<T, Resource> iconCommand = (c, value, data) -> c + .setIcon(value); protected Command<T, String> captionCommand = (c, value, data) -> c .setCaption(value); diff --git a/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java b/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java index ab63c2ae42..1010a42e7d 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java +++ b/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java @@ -113,7 +113,6 @@ public abstract class ComponentTestCase<T extends AbstractComponent> event -> doCommand(command, event.getValue())); checkBox.setValue(initialState); - checkBox.setImmediate(true); checkBox.setId("checkboxaction-" + caption); // Set default value for all components @@ -135,7 +134,6 @@ public abstract class ComponentTestCase<T extends AbstractComponent> }); button.setId("buttonaction-" + caption); - button.setImmediate(true); return button; } diff --git a/uitest/src/main/java/com/vaadin/tests/components/OutOfSync.java b/uitest/src/main/java/com/vaadin/tests/components/OutOfSync.java deleted file mode 100644 index 8b71c537fb..0000000000 --- a/uitest/src/main/java/com/vaadin/tests/components/OutOfSync.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.vaadin.tests.components; - -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.Notification; - -public class OutOfSync extends AbstractReindeerTestUI { - - @Override - protected void setup(VaadinRequest request) { - // Without this, there is an extra request from the UI that changes the - // request sequence compared to what the test expects - setImmediate(false); - - Button b = new Button("Click me after 1s to be out of sync"); - b.addClickListener(new ClickListener() { - - @Override - public void buttonClick(ClickEvent event) { - Notification.show("This code will never be reached"); - } - }); - setContent(b); - Thread t = new Thread(new Runnable() { - - @Override - public void run() { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - e.printStackTrace(); - } - // Remove button but prevent repaint -> causes out of sync - // issues - getSession().lock(); - try { - setContent(null); - getConnectorTracker().markClean(OutOfSync.this); - } finally { - getSession().unlock(); - } - } - }); - t.start(); - } - - @Override - protected String getTestDescription() { - return "Click the button after 1s when it has been removed server side (causing synchronization problems)"; - } - - @Override - protected Integer getTicketNumber() { - return 10780; - } - -} diff --git a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java index a440b36d59..c37bd5b144 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java +++ b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java @@ -41,7 +41,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI { @Override protected void setup(VaadinRequest request) { mainLayout = new AbsoluteLayout(); - mainLayout.setImmediate(true); mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); @@ -70,7 +69,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI { // btnLogin Button btnLogin = new Button(); btnLogin.setCaption("Login"); - btnLogin.setImmediate(false); btnLogin.setWidth("-1px"); btnLogin.setHeight("-1px"); btnLogin.addClickListener(new Button.ClickListener() { @@ -112,7 +110,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI { GridLayout gridButtons = new GridLayout(2, 3); Button btn1 = new Button("Button one"); - btn1.setImmediate(true); btn1.addClickListener(new Button.ClickListener() { @Override @@ -122,7 +119,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI { gridButtons.addComponent(btn1, 0, 0); Button btn2 = new Button("Button two"); - btn2.setImmediate(true); btn2.addClickListener(new Button.ClickListener() { @Override @@ -132,7 +128,6 @@ public class AbsoluteLayoutHideComponent extends AbstractReindeerTestUI { gridButtons.addComponent(btn2, 0, 1); Button btn3 = new Button("Button three"); - btn3.setImmediate(true); btn3.addClickListener(new Button.ClickListener() { @Override diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/EnableState.java b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/EnableState.java index 5424efc2cb..4bde83dff2 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/EnableState.java +++ b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/EnableState.java @@ -24,22 +24,18 @@ public class EnableState extends AbstractTestCase { button.setEnabled(enabled); // button.requestRepaint(); }); - enable.setImmediate(true); CheckBox caption = new CheckBox("Toggle button caption", true); caption.addValueChangeListener( event -> button.setCaption(button.getCaption() + "+")); - caption.setImmediate(true); CheckBox visible = new CheckBox("Toggle panel visibility", true); visible.addValueChangeListener( event -> panel.setVisible(event.getValue())); - visible.setImmediate(true); CheckBox panelEnable = new CheckBox("Toggle panel enabled", true); panelEnable.addValueChangeListener( event -> panel.setEnabled(event.getValue())); - panelEnable.setImmediate(true); mainWindow.addComponent(enable); mainWindow.addComponent(caption); diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java index 71fc98c504..175ee9db67 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java +++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java @@ -17,14 +17,14 @@ import com.vaadin.ui.VerticalLayout; import com.vaadin.v7.ui.Field; import com.vaadin.v7.ui.TextField; -public class RequiredIndicatorForFieldsWithoutCaption extends AbstractReindeerTestUI { +public class RequiredIndicatorForFieldsWithoutCaption + extends AbstractReindeerTestUI { private Set<Field> fields = new HashSet<>(); @Override protected void setup(VaadinRequest request) { CheckBox required = new CheckBox("Fields required", true); - required.setImmediate(true); required.addValueChangeListener(event -> { boolean newRequired = event.getValue(); for (Field f : fields) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonMouseDetails.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonMouseDetails.java index 1b6a81551a..b5ed6a3461 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonMouseDetails.java +++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonMouseDetails.java @@ -44,7 +44,6 @@ public class ButtonMouseDetails extends TestBase { getLayout().setSpacing(true); Button button = new Button("CLICK ME!", clickListener); - button.setImmediate(true); addComponent(button); addComponent(out); diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java index 44e8fc3ecf..fbe073a4b2 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java +++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java @@ -49,7 +49,6 @@ public class ButtonUpdateAltText extends AbstractReindeerTestUI { addComponent(btn); final CheckBox enable = new CheckBox("Enable alt text", true); - enable.setImmediate(true); enable.addValueChangeListener(event -> { if (event.getValue()) { btn.setIconAlternateText("alt text"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java index b099de70e5..8393cc4d94 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java +++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java @@ -207,7 +207,7 @@ public class CalendarTest extends UI { setLocale(defaultLocale); } - if (parameters.containsKey(("secondsResolution"))) { + if (parameters.containsKey("secondsResolution")) { useSecondResolution = true; } @@ -437,7 +437,6 @@ public class CalendarTest extends UI { private void initHideWeekEndButton() { hideWeekendsButton = new CheckBox("Hide weekends"); - hideWeekendsButton.setImmediate(true); hideWeekendsButton.addValueChangeListener( event -> setWeekendsHidden(hideWeekendsButton.getValue())); } @@ -457,14 +456,12 @@ public class CalendarTest extends UI { private void initReadOnlyButton() { readOnlyButton = new CheckBox("Read-only mode"); - readOnlyButton.setImmediate(true); readOnlyButton.addValueChangeListener(event -> calendarComponent .setReadOnly(readOnlyButton.getValue())); } private void initDisabledButton() { disabledButton = new CheckBox("Disabled"); - disabledButton.setImmediate(true); disabledButton.addValueChangeListener(event -> calendarComponent .setEnabled(!disabledButton.getValue())); } @@ -534,7 +531,6 @@ public class CalendarTest extends UI { private CheckBox createCheckBox(String caption) { CheckBox cb = new CheckBox(caption); - cb.setImmediate(true); return cb; } diff --git a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java deleted file mode 100644 index 7cd127f896..0000000000 --- a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2000-2016 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.tests.components.checkbox; - -import com.vaadin.data.HasValue; -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractReindeerTestUI; -import com.vaadin.ui.CheckBox; -import com.vaadin.ui.Label; - -public class CheckBoxImmediate extends AbstractReindeerTestUI { - private int count = 0; - - @Override - protected void setup(VaadinRequest request) { - final Label status = new Label("Events received: " + count); - status.setId("count"); - addComponent(status); - - CheckBox cb = new CheckBox("Non-immediate"); - HasValue.ValueChangeListener<Boolean> listener = event -> { - count++; - status.setValue("Events received: " + count); - }; - cb.addValueChangeListener(listener); - cb.setImmediate(false); - addComponent(cb); - - cb = new CheckBox("Immediate"); - cb.addValueChangeListener(listener); - cb.setImmediate(true); - addComponent(cb); - } - - @Override - protected String getTestDescription() { - return "Test for verifying that a non-immediate CheckBox does not send value change to server immediately."; - } - - @Override - protected Integer getTicketNumber() { - return 18102; - } - -} diff --git a/uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java index 2b9c2a38a2..e8b99258f7 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java +++ b/uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java @@ -227,7 +227,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI { rgbVisible = event.getValue(); setPopupVisibilities(); }); - rgbBox.setImmediate(true); rgbBox.setId("rgbBox"); optLayout.addComponent(rgbBox); @@ -236,7 +235,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI { hsvVisible = event.getValue(); setPopupVisibilities(); }); - hsvBox.setImmediate(true); hsvBox.setId("hsvBox"); optLayout.addComponent(hsvBox); @@ -245,7 +243,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI { swaVisible = event.getValue(); setPopupVisibilities(); }); - swaBox.setImmediate(true); swaBox.setId("swaBox"); optLayout.addComponent(swaBox); @@ -254,7 +251,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI { historyVisible = event.getValue(); setPopupVisibilities(); }); - hisBox.setImmediate(true); hisBox.setId("hisBox"); optLayout.addComponent(hisBox); @@ -263,7 +259,6 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI { txtfieldVisible = event.getValue(); setPopupVisibilities(); }); - txtBox.setImmediate(true); txtBox.setId("txtBox"); optLayout.addComponent(txtBox); diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java index 7514ee850b..65c7592f03 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java @@ -30,7 +30,6 @@ public class ComboBoxCursorPositionReset extends AbstractReindeerTestUI { setContent(root); ComboBox<String> combo = new ComboBox<>(); - combo.setImmediate(true); root.addComponent(combo); combo.setItems("Hello World", "Please click on the text"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java index adfb120409..14cf564d8d 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java @@ -25,7 +25,6 @@ public class ComboBoxParentDisable extends AbstractTestUIWithLog { combo.setItems("Item 1", "Item 2", "Item 3", "Item 4"); combo.addValueChangeListener( event -> log.log("you made a selection change")); - combo.setImmediate(true); Button btn1 = new Button("Click me"); btn1.addClickListener(event -> log.log("you clicked me")); diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxResetValue.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxResetValue.java index 06d2d72b80..720780bb3b 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxResetValue.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxResetValue.java @@ -23,7 +23,6 @@ public class ComboBoxResetValue extends AbstractReindeerTestUI { final ComboBox cbNullSelectionNotAllowed = getComboBoxWithNullSelectionNotAllowed(); Button b = new Button("Reset"); - b.setImmediate(true); b.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java index 98ddb6be82..8072db9de4 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java @@ -11,7 +11,6 @@ public class ComboboxPrimaryStyleNames extends TestBase { protected void setup() { final ComboBox<String> box = new ComboBox(null, DataSource.create("Value 1", "Value 2", "Value 3", "Value 4")); - box.setImmediate(true); box.setPrimaryStyleName("my-combobox"); addComponent(box); diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java index a3d6546853..a9a76506e9 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java @@ -76,7 +76,6 @@ public class Comboboxes extends ComponentTestCase<ComboBox> { addTestComponent(s8); ComboBox<StringBean> s9 = new PageLength0ComboBox(); - s9.setImmediate(true); s9.setCaption("Pagelength 0"); populate(s9, 15); s9.setItemCaptionGenerator(StringBean::getValue); diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java index 3a3a6bb3ea..c9ab24011a 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java @@ -19,7 +19,6 @@ public class RemovalOfSelectedIcon extends TestBase { addComponent(cb2); Button btClear = new Button("Clear button"); - btClear.setImmediate(true); btClear.addClickListener(new Button.ClickListener() { @Override diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java index f28ad7b104..8403f60ce6 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java @@ -145,7 +145,6 @@ public class CustomDateFormats extends TestBase { df.setLocale(locale); df.setWidth("300px"); df.setDateFormat(pattern); - df.setImmediate(true); String debugId = pattern.replace('/', 'X'); // only certain characters are allowed in debug IDs debugId = debugId.replaceAll("[^-a-zA-Z .'_]", "X"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java index 51a117f78f..fdbd945c3c 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java @@ -37,7 +37,6 @@ public class DateFieldChangeResolution extends AbstractReindeerTestUI { final AbstractDateField dateField = new DateField("Enter date"); dateField.setResolution(Resolution.YEAR); dateField.setId(DATEFIELD_ID); - dateField.setImmediate(true); addComponent(dateField); Label l = new Label("Select resolution"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldIsValid.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldIsValid.java index 0542961260..60a84dd679 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldIsValid.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldIsValid.java @@ -27,7 +27,6 @@ public class DateFieldIsValid extends AbstractTestUIWithLog { @Override protected void setup(VaadinRequest request) { final AbstractDateField dateField = new TestDateField("Insert Date: "); - dateField.setImmediate(true); dateField.setDateFormat(pattern); dateField.addValueChangeListener(event -> log("valueChange: value: " diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java index dceb6f1bb9..e53403dbca 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java @@ -70,9 +70,7 @@ public class DateFieldRangeValidation extends TestBase { "From inclusive", bi.getItemProperty("fromInclusive")); CheckBox toInclusive = new CheckBoxWithPropertyDataSource( "To inclusive", bi.getItemProperty("toInclusive")); - fromInclusive.setImmediate(true); fromInclusive.addValueChangeListener(refreshField); - toInclusive.setImmediate(true); toInclusive.addValueChangeListener(refreshField); PopupDateField toField = createDateField(); diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java index da75872d4a..cfd46f11b4 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java @@ -13,7 +13,6 @@ import com.vaadin.tests.components.TestDateField; import com.vaadin.ui.AbstractDateField; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.CheckBox; import com.vaadin.ui.GridLayout; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.InlineDateField; @@ -35,7 +34,6 @@ public class DateFieldRanges extends AbstractReindeerTestUI { private AbstractDateField fromRange = new TestDateField("Range start"); private AbstractDateField toRange = new TestDateField("Range end"); private AbstractDateField valueDF = new TestDateField("Value"); - private CheckBox immediateCB = new CheckBox("Immediate"); private Button recreate = new Button("Recreate static datefields"); private Button clearRangeButton = new Button("Clear range"); @@ -73,33 +71,23 @@ public class DateFieldRanges extends AbstractReindeerTestUI { }); fromRange.setValue(null); - fromRange.setImmediate(true); fromRange.addValueChangeListener(event -> { inlineDynamicDateField.setRangeStart(fromRange.getValue()); dynamicDateField.setRangeStart(fromRange.getValue()); }); toRange.setValue(null); - toRange.setImmediate(true); toRange.addValueChangeListener(event -> { inlineDynamicDateField.setRangeEnd(toRange.getValue()); dynamicDateField.setRangeEnd(toRange.getValue()); }); valueDF.setValue(null); - valueDF.setImmediate(true); valueDF.addValueChangeListener(event -> { inlineDynamicDateField.setValue(valueDF.getValue()); dynamicDateField.setValue(valueDF.getValue()); }); - immediateCB.setValue(true); - immediateCB.setImmediate(true); - immediateCB.addValueChangeListener(event -> { - inlineDynamicDateField.setImmediate(immediateCB.getValue()); - dynamicDateField.setImmediate(immediateCB.getValue()); - }); - recreate.addClickListener(new Button.ClickListener() { @Override @@ -132,7 +120,6 @@ public class DateFieldRanges extends AbstractReindeerTestUI { fromRange.setId("fromRange"); toRange.setId("toRange"); valueDF.setId("valueDF"); - immediateCB.setId("immediateCB"); recreate.setId("recreate"); clearRangeButton.setId("clearRangeButton"); dynamicDateField.setId("dynamicDateField"); @@ -162,7 +149,6 @@ public class DateFieldRanges extends AbstractReindeerTestUI { hl.addComponent(fromRange); hl.addComponent(toRange); hl.addComponent(valueDF); - hl.addComponent(immediateCB); hl.addComponent(recreate); hl.addComponent(clearRangeButton); addComponent(hl); @@ -227,14 +213,11 @@ public class DateFieldRanges extends AbstractReindeerTestUI { LocalDate toVal = toRange.getValue(); LocalDate value = valueDF.getValue(); Resolution r = (Resolution) resoSelect.getValue(); - boolean immediate = immediateCB.getValue(); df.setValue(value); df.setResolution(r); df.setRangeStart(fromVal); df.setRangeEnd(toVal); - df.setImmediate(immediate); - } } diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDate.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDate.java index 53f8bb1cb2..5eccb02522 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDate.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldUnparsableDate.java @@ -67,20 +67,16 @@ public class DateFieldUnparsableDate extends TestBase { protected void setup() { MyDateField df = new MyDateField( "Returns the old value for invalid dates"); - df.setImmediate(true); addComponent(df); MyDateField2 df2 = new MyDateField2("Returns empty for invalid dates"); - df2.setImmediate(true); addComponent(df2); MyDateField3 df3 = new MyDateField3( "Throws an exception for invalid dates"); - df3.setImmediate(true); addComponent(df3); MyDateField4 df4 = new MyDateField4("Can convert 'today'"); - df4.setImmediate(true); addComponent(df4); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java index e484f19f3d..6b28c9a700 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java @@ -37,11 +37,6 @@ public class DisabledParentLayout extends AbstractReindeerTestUI { final VerticalLayout pane = new VerticalLayout(); AbstractDateField dateField = new TestDateField(); - // If the field is immediate, the UI behaves differently (the value is - // updated and an error is indicated earlier instead of showing the date - // selector on the first click as the test expects. Keeping as - // non-immediate to test the old expected behavior. - dateField.setImmediate(false); pane.addComponent(dateField); content.addComponent(pane); diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java index df2faec965..395e682089 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java @@ -113,7 +113,6 @@ public class LegacyDateFieldRanges extends AbstractReindeerTestUI { }); immediateCB.setValue(true); - immediateCB.setImmediate(true); immediateCB.addValueChangeListener(event -> { inlineDynamicDateField.setImmediate(immediateCB.getValue()); dynamicDateField.setImmediate(immediateCB.getValue()); diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LenientMode.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LenientMode.java index a9d978c9e4..ea503f4284 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LenientMode.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LenientMode.java @@ -35,7 +35,6 @@ public class LenientMode extends TestBase df.setLocale(new Locale("fi")); df.setResolution(Resolution.DAY); df.setLenient(true); - df.setImmediate(true); df.setValue(d); AbstractDateField df2 = new TestDateField("Normal "); @@ -43,7 +42,6 @@ public class LenientMode extends TestBase df2.setResolution(Resolution.DAY); // df2.setLenient(false); df2.setValue(null); - df2.setImmediate(true); df2.setValue(d); addComponent(df); @@ -55,14 +53,12 @@ public class LenientMode extends TestBase df = new TestDateField("Lenient with time"); df.setLocale(new Locale("fi")); df.setLenient(true); - df.setImmediate(true); df.setValue(d); df2 = new TestDateField("Normal with time"); df2.setLocale(new Locale("fi")); // df2.setLenient(false); df2.setValue(null); - df2.setImmediate(true); df2.setValue(d); addComponent(df); diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LowResolution.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LowResolution.java index da2fad276c..e0158f45fe 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LowResolution.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LowResolution.java @@ -5,7 +5,6 @@ import java.time.LocalDate; import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Button; -import com.vaadin.ui.CheckBox; import com.vaadin.ui.DateField; import com.vaadin.ui.InlineDateField; @@ -19,7 +18,6 @@ public class LowResolution extends TestBase { dateField.setResolution(Resolution.MONTH); dateField.addValueChangeListener(event -> getMainWindow() .showNotification("Date now" + event.getValue())); - dateField.setImmediate(true); getLayout().addComponent(dateField); final DateField dateField3 = new DateField(); @@ -27,7 +25,6 @@ public class LowResolution extends TestBase { dateField3.setResolution(Resolution.YEAR); dateField3.addValueChangeListener(event -> getMainWindow() .showNotification("Date now" + event.getValue())); - dateField3.setImmediate(true); getLayout().addComponent(dateField3); final InlineDateField dateField2 = new InlineDateField(); @@ -35,20 +32,8 @@ public class LowResolution extends TestBase { dateField2.setResolution(Resolution.MONTH); dateField2.addValueChangeListener(event -> getMainWindow() .showNotification("Date now" + event.getValue())); - dateField2.setImmediate(true); getLayout().addComponent(dateField2); - CheckBox immediate = new CheckBox( - "Immediate (use sync button to change fields) "); - immediate.setValue(true); - immediate.addListener(event -> { - boolean newImmediate = !dateField.isImmediate(); - dateField.setImmediate(newImmediate); - dateField2.setImmediate(newImmediate); - dateField3.setImmediate(newImmediate); - }); - - getLayout().addComponent(immediate); getLayout().addComponent(new Button("sync")); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.java b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.java index ee9c385b05..8958f024de 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.java +++ b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropDisable.java @@ -38,7 +38,6 @@ public class DragAndDropDisable extends AbstractReindeerTestUI { final CheckBox enabled = new CheckBox("Enabled", true); addComponent(enabled); - enabled.setImmediate(true); enabled.addValueChangeListener( event -> dnd.setEnabled(event.getValue())); @@ -72,7 +71,6 @@ public class DragAndDropDisable extends AbstractReindeerTestUI { final CheckBox enabled = new CheckBox("Enabled", true); addComponent(enabled); - enabled.setImmediate(true); enabled.addValueChangeListener( event -> dnd.setEnabled(event.getValue())); @@ -116,7 +114,6 @@ public class DragAndDropDisable extends AbstractReindeerTestUI { }); final CheckBox enabled = new CheckBox("Enabled", true); addComponent(enabled); - enabled.setImmediate(true); enabled.addValueChangeListener( event -> tbl.setEnabled(event.getValue())); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java index a93f3814d4..8a3c009d46 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java +++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java @@ -1,4 +1,4 @@ -/* +/* * Copyright 2000-2016 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not @@ -17,8 +17,8 @@ package com.vaadin.tests.components.formlayout; import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractReindeerTestUI; -import com.vaadin.ui.FormLayout; import com.vaadin.ui.DateField; +import com.vaadin.ui.FormLayout; public class FormLayoutErrorHover extends AbstractReindeerTestUI { @@ -26,7 +26,6 @@ public class FormLayoutErrorHover extends AbstractReindeerTestUI { protected void setup(VaadinRequest request) { FormLayout formLayout = new FormLayout(); DateField fromDate = new DateField("Date"); - fromDate.setImmediate(true); formLayout.addComponent(fromDate); addComponent(formLayout); diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/NestedFormLayouts.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/NestedFormLayouts.java index da4d77e487..368c6ac983 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/NestedFormLayouts.java +++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/NestedFormLayouts.java @@ -60,14 +60,12 @@ public class NestedFormLayouts extends AbstractReindeerTestUI { final CheckBox spacingCheckBox = new CheckBox("Spacings", false); spacingCheckBox.setId("spacings"); - spacingCheckBox.setImmediate(true); spacingCheckBox.addValueChangeListener( event -> setLayoutSpacing(spacingCheckBox.getValue())); addComponent(spacingCheckBox); final CheckBox marginCheckBox = new CheckBox("Margins", false); marginCheckBox.setId("margins"); - marginCheckBox.setImmediate(true); marginCheckBox.addValueChangeListener( event -> setLayoutMargin(marginCheckBox.getValue())); addComponent(marginCheckBox); diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandRatio.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandRatio.java index eb95470db2..b890441164 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandRatio.java +++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandRatio.java @@ -39,14 +39,11 @@ public class GridLayoutExpandRatio extends AbstractReindeerTestUI { gridLayout = new GridLayout(ROWS, COLS); gridLayout.setHideEmptyRowsAndColumns(true); - layout.setImmediate(true); - gridLayout.setImmediate(true); gridLayout2 = new GridLayout(4, 4); gridLayout2.setHideEmptyRowsAndColumns(true); for (int i = 0; i < ROWS; i++) { for (int j = 0; j < COLS; j++) { Label label = new Label("Slot " + i + " " + j); - label.setImmediate(true); labels[i][j] = label; gridLayout.addComponent(label, j, i); if (!(i == 2 || j == 2)) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java index ef01bac0b0..9bd5275152 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java +++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java @@ -44,7 +44,6 @@ public class GridLayoutScrollPosition extends AbstractReindeerTestUI { "Hide / Show toggleable components"); visibilityToggleCheckBox.setId("visibility-toggle"); visibilityToggleCheckBox.setHeight("2000px"); - visibilityToggleCheckBox.setImmediate(true); visibilityToggleCheckBox.setValue(false); // Initially unchecked gridLayout.addComponent(visibilityToggleCheckBox); diff --git a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java index 8d9f9b0c89..29c226fd8c 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java +++ b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java @@ -50,7 +50,6 @@ public class JavaScriptResizeListener extends AbstractReindeerTestUI { })); addComponent(new CheckBox("Listener active") { { - setImmediate(true); addValueChangeListener(event -> resizeJsComponent .setListenerEnabled(event.getValue())); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java b/uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java index df2fc4b011..f81eea8746 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java +++ b/uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java @@ -51,25 +51,21 @@ public class AudioTest extends TestBase { checkBox.setValue(audio.isShowControls()); checkBox.addValueChangeListener( event -> audio.setShowControls(event.getValue())); - checkBox.setImmediate(true); addComponent(checkBox); checkBox = new CheckBox("HtmlContentAllowed"); checkBox.setValue(audio.isHtmlContentAllowed()); checkBox.addValueChangeListener( event -> audio.setHtmlContentAllowed(event.getValue())); - checkBox.setImmediate(true); addComponent(checkBox); checkBox = new CheckBox("muted"); checkBox.setValue(audio.isMuted()); checkBox.addValueChangeListener( event -> audio.setMuted(event.getValue())); - checkBox.setImmediate(true); addComponent(checkBox); checkBox = new CheckBox("autoplay"); checkBox.setValue(audio.isAutoplay()); checkBox.addValueChangeListener( event -> audio.setAutoplay(event.getValue())); - checkBox.setImmediate(true); addComponent(checkBox); Button b = new Button("Change", new Button.ClickListener() { diff --git a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java index b3aa364364..ce231aad3b 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java +++ b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java @@ -36,7 +36,6 @@ public class ReadOnlyOptionGroup extends AbstractReindeerTestUI { optionGroup.setNewItemsAllowed(true); final CheckBox readOnlyCheckbox = new CheckBox("read-only"); - readOnlyCheckbox.setImmediate(true); readOnlyCheckbox.addValueChangeListener( event -> optionGroup.setReadOnly(readOnlyCheckbox.getValue())); readOnlyCheckbox.setValue(Boolean.TRUE); diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java index 8ef5608fce..61512eabbf 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java +++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java @@ -102,7 +102,6 @@ public class BoxLayoutTest extends AbstractReindeerTestUI { header.addComponent(title); final CheckBox vertical = new CheckBox("Vertical", !horizontal); - vertical.setImmediate(true); vertical.addValueChangeListener(event -> { view.removeAllComponents(); @@ -200,13 +199,11 @@ public class BoxLayoutTest extends AbstractReindeerTestUI { final CheckBox margin = new CheckBox("Margin", false); margin.addValueChangeListener(event -> l.setMargin(event.getValue())); - margin.setImmediate(true); layout.addComponent(margin); layout.addComponent(margin); final CheckBox spacing = new CheckBox("Spacing", false); spacing.addValueChangeListener(event -> l.setSpacing(event.getValue())); - spacing.setImmediate(true); layout.addComponent(spacing); // Cell controls @@ -238,13 +235,12 @@ public class BoxLayoutTest extends AbstractReindeerTestUI { if (target == null) { return; } - l.setComponentAlignment(target, ((Alignment) align.getValue())); + l.setComponentAlignment(target, (Alignment) align.getValue()); } }); cell.addComponent(align); expand = new CheckBox("Expand"); - expand.setImmediate(true); expand.setEnabled(false); expand.addValueChangeListener(event -> { if (target != null) { @@ -343,7 +339,6 @@ public class BoxLayoutTest extends AbstractReindeerTestUI { component.addComponent(componentDescription); componentError = new CheckBox("Error"); - componentError.setImmediate(true); componentError.setEnabled(false); componentError.addValueChangeListener(event -> { if (target != null) { @@ -354,7 +349,6 @@ public class BoxLayoutTest extends AbstractReindeerTestUI { component.addComponent(componentError); componentRequired = new CheckBox("Required"); - componentRequired.setImmediate(true); componentRequired.setEnabled(false); componentRequired.addValueChangeListener(event -> { if (target != null && target instanceof AbstractField) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java index c563673d19..f1702d6b52 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java +++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java @@ -191,9 +191,6 @@ public class VerticalLayoutWithEmptyLabel extends AbstractReindeerTestUI { filterFoobarField.setMaxLength(16); // this.filterFoobarField.setStyleName("pexp-fixed-width"); - // Configure incoming checkbox - incomingOnlyField.setImmediate(true); - // Add filter inputs for phone # and foobar ID tableControlsLayout.addComponent(filterPhoneField); tableControlsLayout.addComponent(filterFoobarField); diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java b/uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java index c2ca47ae79..4fc83a96ad 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java +++ b/uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java @@ -39,7 +39,6 @@ public class BasicPanelTest extends TestBase { panel.setContent(panelLayout); final CheckBox heightSelection = new CheckBox("Undefined height"); - heightSelection.setImmediate(true); heightSelection.addValueChangeListener(event -> { if (heightSelection.getValue() == Boolean.TRUE) { panel.setHeight(null); @@ -66,7 +65,6 @@ public class BasicPanelTest extends TestBase { panel.setScrollTop(50); panel.setScrollLeft(50); - panel.setImmediate(true); updateLabelText(); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.java b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.java index 49c5a87860..5b38070607 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.java +++ b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaUpdateWhileTyping.java @@ -2,9 +2,9 @@ package com.vaadin.tests.components.richtextarea; import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractReindeerTestUI; +import com.vaadin.ui.RichTextArea; import com.vaadin.v7.shared.ui.progressindicator.ProgressIndicatorServerRpc; import com.vaadin.v7.ui.ProgressIndicator; -import com.vaadin.ui.RichTextArea; public class RichTextAreaUpdateWhileTyping extends AbstractReindeerTestUI { @@ -30,7 +30,6 @@ public class RichTextAreaUpdateWhileTyping extends AbstractReindeerTestUI { rta = new RichTextArea(); rta.setId("rta"); - rta.setImmediate(true); addComponent(rta); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java index 6c6952ddb8..188f617106 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java +++ b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java @@ -41,7 +41,6 @@ public class SliderUpdateFromValueChange extends AbstractReindeerTestUI { slider.markAsDirty(); }); - slider.setImmediate(true); slider.setWidth(200, Unit.PIXELS); addComponent(slider); diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java index e5ebef01fa..10d8ea9a85 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java +++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelReversePosition.java @@ -23,7 +23,6 @@ public class SplitPanelReversePosition extends TestBase { final HorizontalSplitPanel hsplit = new HorizontalSplitPanel(); hsplit.setSizeFull(); - hsplit.setImmediate(true); hsplit.setSplitPosition(100, Sizeable.UNITS_PIXELS, hsplitReversed); hsplit.addSplitterClickListener( new HorizontalSplitPanel.SplitterClickListener() { @@ -40,7 +39,6 @@ public class SplitPanelReversePosition extends TestBase { final VerticalSplitPanel vsplit = new VerticalSplitPanel(); vsplit.setSizeFull(); - vsplit.setImmediate(true); vsplit.setSplitPosition(10, Sizeable.UNITS_PERCENTAGE, vsplitReversed); vsplit.addSplitterClickListener(new SplitterClickListener() { @Override diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java index 8f1c70fff6..02789e9319 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java @@ -15,7 +15,6 @@ public class AddItemToEmptyTable extends TestBase { protected void setup() { CheckBox cb = new CheckBox("Set first column width"); cb.setValue(false); - cb.setImmediate(true); cb.addValueChangeListener(event -> { if (event.getValue()) { rightTable.setColumnWidth("name", 150); @@ -27,7 +26,6 @@ public class AddItemToEmptyTable extends TestBase { cb = new CheckBox("Set second column width"); cb.setValue(true); - cb.setImmediate(true); cb.addValueChangeListener(event -> { if (event.getValue()) { rightTable.setColumnWidth("info", 20); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnHeaderAlignments.java b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnHeaderAlignments.java index 3360927310..2d3ac270d6 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnHeaderAlignments.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnHeaderAlignments.java @@ -42,7 +42,6 @@ public class ColumnHeaderAlignments extends TestBase { barTable.setFooterVisible(visible); bazTable.setFooterVisible(visible); }); - footers.setImmediate(true); addComponent(footers); HorizontalLayout tables = new HorizontalLayout(); fooTable = createTable(null); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java index 6bc84db6e9..9bcbd6e2f5 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/DoublesInTable.java @@ -38,12 +38,10 @@ public class DoublesInTable extends TestBase { @Override protected void setup() { editMode = new CheckBox("Edit mode"); - editMode.setImmediate(true); editMode.addValueChangeListener( event -> table.setEditable(editMode.getValue())); useCustomConverters = new CheckBox("Use custom converters"); - useCustomConverters.setImmediate(true); useCustomConverters.addValueChangeListener(event -> recreateTable()); localeSelect = createLocaleSelect(); @@ -77,23 +75,22 @@ public class DoublesInTable extends TestBase { } private static BeanItemContainer<Person> createContainer(int nr) { - BeanItemContainer<Person> bic = new BeanItemContainer<>( - Person.class); + BeanItemContainer<Person> bic = new BeanItemContainer<>(Person.class); for (int i = 1; i <= nr; i++) { Person p = new Person(); p.setFirstName("First " + i); p.setLastName("Last " + i); p.setAge(i); - p.setDeceased((i % 5 - 2) == 0); + p.setDeceased(i % 5 - 2 == 0); p.setEmail("person" + i + "@mail.com"); p.setRent(new BigDecimal(i * 1250.25)); p.setSalary(3000 + i); - p.setSex((i % 4) == 0 ? Sex.MALE : Sex.FEMALE); + p.setSex(i % 4 == 0 ? Sex.MALE : Sex.FEMALE); p.setBirthDate(new Date(2011 - 1900 - p.getAge(), 11 - 1, 24)); if (i % 42 == 0) { p.setSex(Sex.UNKNOWN); } - String city = "City " + (i / 10); + String city = "City " + i / 10; Country country = Country.FINLAND; Address address = new Address("Street " + i, 12345 + i * 2, city, country); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java b/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java index 1b142e5f6b..1460d184dc 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/EditableTableLeak.java @@ -83,7 +83,6 @@ public class EditableTableLeak extends TestBase { @Override protected void setup() { addComponent(useFieldFactory); - useFieldFactory.setImmediate(true); useFieldFactory.addValueChangeListener(event -> { if (useFieldFactory.getValue()) { table.setTableFieldFactory(new CachingFieldFactory()); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java b/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java index 015a8c213a..3c122bc844 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java @@ -137,7 +137,6 @@ public class EmptyRowsWhenScrolling extends UI { private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); - mainLayout.setImmediate(false); mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); @@ -156,7 +155,6 @@ public class EmptyRowsWhenScrolling extends UI { private VerticalLayout buildVerticalLayout_1() { // common part: create layout verticalLayout_1 = new VerticalLayout(); - verticalLayout_1.setImmediate(false); verticalLayout_1.setWidth("100.0%"); verticalLayout_1.setHeight("100.0%"); verticalLayout_1.setMargin(false); @@ -180,7 +178,6 @@ public class EmptyRowsWhenScrolling extends UI { private HorizontalLayout buildHorizontalLayout_1() { // common part: create layout horizontalLayout_1 = new HorizontalLayout(); - horizontalLayout_1.setImmediate(false); horizontalLayout_1.setWidth("100.0%"); horizontalLayout_1.setHeight("-1px"); horizontalLayout_1.setMargin(false); @@ -188,7 +185,6 @@ public class EmptyRowsWhenScrolling extends UI { // btnRefreshTable setBtnRefreshTable(new Button()); getBtnRefreshTable().setCaption("Reload table row cache"); - getBtnRefreshTable().setImmediate(false); getBtnRefreshTable().setWidth("-1px"); getBtnRefreshTable().setHeight("-1px"); horizontalLayout_1.addComponent(getBtnRefreshTable()); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java b/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java index 4ba73268f4..185780606c 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java @@ -46,14 +46,12 @@ public class Footer extends AbstractReindeerTestUI { options.setSpacing(true); final CheckBox visible = new CheckBox("Footers Visible", true); - visible.setImmediate(true); visible.addValueChangeListener( event -> table.setFooterVisible(visible.getValue())); options.addComponent(visible); final TextField footer1Value = new TextField(null, "Footer1"); - footer1Value.setImmediate(true); Button footer1Btn = new Button("Change", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -67,7 +65,6 @@ public class Footer extends AbstractReindeerTestUI { options.addComponent(footer1); final TextField footer2Value = new TextField(null, "Footer2"); - footer2Value.setImmediate(true); Button footer2Btn = new Button("Change", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { @@ -81,7 +78,6 @@ public class Footer extends AbstractReindeerTestUI { options.addComponent(footer2); final TextField footer3Value = new TextField(null, "Footer3"); - footer3Value.setImmediate(true); Button footer3Btn = new Button("Change", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java b/uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java index aa80d15af8..438e102d41 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java @@ -44,14 +44,12 @@ public class FooterClick extends AbstractTestUIWithLog { }); CheckBox immediateCheckbox = new CheckBox("Immediate"); - immediateCheckbox.setImmediate(true); immediateCheckbox.setValue(table.isImmediate()); immediateCheckbox.addValueChangeListener( event -> table.setImmediate(event.getValue())); CheckBox columnReorderingCheckbox = new CheckBox( "Column reordering allowed"); - columnReorderingCheckbox.setImmediate(true); columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed()); columnReorderingCheckbox.addValueChangeListener( event -> table.setColumnReorderingAllowed(event.getValue())); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java index 2325d09192..80a75bdb9d 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java @@ -33,20 +33,17 @@ public class HeaderClick extends AbstractReindeerTestUI { }); CheckBox immediateCheckbox = new CheckBox("Immediate"); - immediateCheckbox.setImmediate(true); immediateCheckbox.setValue(table.isImmediate()); immediateCheckbox.addValueChangeListener( event -> table.setImmediate(event.getValue())); CheckBox sortEnabledCheckbox = new CheckBox("Sortable"); - sortEnabledCheckbox.setImmediate(true); sortEnabledCheckbox.setValue(table.isSortEnabled()); sortEnabledCheckbox.addValueChangeListener( event -> table.setSortEnabled(event.getValue())); CheckBox columnReorderingCheckbox = new CheckBox( "Column reordering allowed"); - columnReorderingCheckbox.setImmediate(true); columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed()); columnReorderingCheckbox.addValueChangeListener( event -> table.setColumnReorderingAllowed(event.getValue())); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java index 8263b481eb..52554e26a4 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java @@ -27,14 +27,12 @@ public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog { table.setFooterVisible(true); CheckBox immediateCheckbox = new CheckBox("Immediate"); - immediateCheckbox.setImmediate(true); immediateCheckbox.setValue(table.isImmediate()); immediateCheckbox.addValueChangeListener( event -> table.setImmediate(event.getValue())); CheckBox headerClickListenerCheckbox = new CheckBox( "Header click listener"); - headerClickListenerCheckbox.setImmediate(true); headerClickListenerCheckbox.addValueChangeListener( new HasValue.ValueChangeListener<Boolean>() { @@ -66,7 +64,6 @@ public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog { CheckBox footerClickListenerCheckbox = new CheckBox( "Footer click listener"); - footerClickListenerCheckbox.setImmediate(true); footerClickListenerCheckbox.addValueChangeListener( new HasValue.ValueChangeListener<Boolean>() { @@ -96,14 +93,12 @@ public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog { footerClickListenerCheckbox.setValue(true); CheckBox sortEnabledCheckbox = new CheckBox("Sortable"); - sortEnabledCheckbox.setImmediate(true); sortEnabledCheckbox.setValue(table.isSortEnabled()); sortEnabledCheckbox.addValueChangeListener( event -> table.setSortEnabled(event.getValue())); CheckBox columnReorderingCheckbox = new CheckBox( "Column reordering allowed"); - columnReorderingCheckbox.setImmediate(true); columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed()); columnReorderingCheckbox.addValueChangeListener( event -> table.setColumnReorderingAllowed(event.getValue())); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java index 2da88f74dd..af894cf61e 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java @@ -22,7 +22,6 @@ public class HeaderPositionWhenSorting extends AbstractReindeerTestUI @Override protected void setup(VaadinRequest request) { CheckBox cb = new CheckBox("Item click listener"); - cb.setImmediate(true); cb.addValueChangeListener(event -> { if (event.getValue()) { table.addItemClickListener(HeaderPositionWhenSorting.this); @@ -33,7 +32,6 @@ public class HeaderPositionWhenSorting extends AbstractReindeerTestUI addComponent(cb); CheckBox cbActionHandler = new CheckBox("Action handler"); - cbActionHandler.setImmediate(true); cbActionHandler.addValueChangeListener(event -> { if (event.getValue()) { table.addActionHandler(HeaderPositionWhenSorting.this); @@ -45,7 +43,6 @@ public class HeaderPositionWhenSorting extends AbstractReindeerTestUI CheckBox cbActionHasActions = new CheckBox( "Action handler has actions"); - cbActionHasActions.setImmediate(true); cbActionHasActions.addValueChangeListener(event -> { actionHandlerHasActions = event.getValue(); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java index b9e9c2949e..a3f2ddacea 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java @@ -27,7 +27,6 @@ public class HeaderUpdateWhenNoRows extends AbstractReindeerTestUI { } }); - showHeaders.setImmediate(true); showHeaders.setValue(true); addComponent(showHeaders); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java b/uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java index 5f082080d3..f5e62adfc8 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java @@ -137,7 +137,6 @@ public class ItemClickEvents extends AbstractReindeerTestUI { CheckBox b = new CheckBox("immediate"); b.setValue(c.isImmediate()); b.addValueChangeListener(event -> c.setImmediate(event.getValue())); - b.setImmediate(true); layout.addComponent(b); b = new CheckBox("selectable"); if (c instanceof Table) { @@ -149,18 +148,15 @@ public class ItemClickEvents extends AbstractReindeerTestUI { b.addValueChangeListener( event -> ((Tree) c).setSelectable(event.getValue())); } - b.setImmediate(true); layout.addComponent(b); b = new CheckBox("nullsel"); b.setValue(c.isNullSelectionAllowed()); b.addValueChangeListener( event -> c.setNullSelectionAllowed(event.getValue())); - b.setImmediate(true); layout.addComponent(b); b = new CheckBox("multi"); b.setValue(c.isMultiSelect()); b.addValueChangeListener(event -> c.setMultiSelect(event.getValue())); - b.setImmediate(true); layout.addComponent(b); return layout; } diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java index eedb414070..89b4b46da4 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java @@ -20,7 +20,6 @@ public class TableAndBrowserContextMenu extends TestBase @Override public void setup() { CheckBox cb = new CheckBox("Item click listener"); - cb.setImmediate(true); cb.addValueChangeListener(event -> { if (event.getValue()) { table.addListener(TableAndBrowserContextMenu.this); @@ -31,7 +30,6 @@ public class TableAndBrowserContextMenu extends TestBase addComponent(cb); CheckBox cbActionHandler = new CheckBox("Action handler"); - cbActionHandler.setImmediate(true); cbActionHandler.addValueChangeListener(event -> { if (event.getValue()) { table.addActionHandler(TableAndBrowserContextMenu.this); @@ -43,7 +41,6 @@ public class TableAndBrowserContextMenu extends TestBase CheckBox cbActionHasActions = new CheckBox( "Action handler has actions"); - cbActionHasActions.setImmediate(true); cbActionHasActions.addValueChangeListener(event -> { actionHandlerHasActions = event.getValue(); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java index bb272ac910..cc741fadc1 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java @@ -47,7 +47,6 @@ public class TableHeightWhenHidingHeaders extends AbstractTestCase { } }); showHeaders.setValue(true); - showHeaders.setImmediate(true); mainWindow.addComponent(showHeaders); mainWindow.addComponent(table); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java index 9aab0303b6..b2b4bb12cd 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java @@ -29,18 +29,15 @@ public class TableItemDescriptionGeneratorUI extends AbstractReindeerTestUI { componentDescription .addValueChangeListener(event -> table.setContainerDataSource( createContainer(componentDescription.getValue()))); - componentDescription.setImmediate(true); componentDescription.setValue(true); tableCellItemDescription = new CheckBox("Tooltip on table cells"); tableCellItemDescription .addValueChangeListener(event -> table.refreshRowCache()); - tableCellItemDescription.setImmediate(true); tableCellItemDescription.setValue(true); tableRowItemDescription = new CheckBox("Tooltip on table Rows"); tableRowItemDescription .addValueChangeListener(event -> table.refreshRowCache()); - tableRowItemDescription.setImmediate(true); tableRowItemDescription.setValue(true); addComponent(componentDescription); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollOnFocus.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollOnFocus.java index d289798c3d..5f1c8b4283 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollOnFocus.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollOnFocus.java @@ -10,7 +10,6 @@ public class TableScrollOnFocus extends TestBase { final Table table = new Table(); final CheckBox chkSelectable = new CheckBox("selectable"); - chkSelectable.setImmediate(true); chkSelectable.addValueChangeListener( event -> table.setSelectable(chkSelectable.getValue())); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java index 4b68467091..53bb8e25df 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java @@ -91,7 +91,6 @@ public class TableUndefinedSize extends TestBase { log.log("Column 1 hidden"); } }); - cb.setImmediate(true); visibilities.addComponent(cb); cb = new CheckBox("Column 2"); @@ -106,7 +105,6 @@ public class TableUndefinedSize extends TestBase { log.log("Column 2 hidden"); } }); - cb.setImmediate(true); visibilities.addComponent(cb); cb = new CheckBox("Column 3"); @@ -122,7 +120,6 @@ public class TableUndefinedSize extends TestBase { log.log("Column 3 hidden"); } }); - cb.setImmediate(true); visibilities.addComponent(cb); addComponent(log); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java index 632facee44..05da1f3f81 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java @@ -92,9 +92,6 @@ public class TableWithBrokenGeneratorAndContainer extends TestBase { @Override protected void setup() { - brokenContainer.setImmediate(true); - brokenGenerator.setImmediate(true); - clearTableOnError.setImmediate(true); clearTableOnError.addValueChangeListener(event -> { Boolean value = clearTableOnError.getValue(); setErrorHandler(value != null ? value : false); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java b/uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java index 71775c0ad9..9fbb0256b7 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java @@ -35,7 +35,6 @@ public class ValueAfterClearingContainer extends TestBase { addComponent(table); final CheckBox multiselect = new CheckBox("Multiselect"); - multiselect.setImmediate(true); multiselect.setId("multiselect"); multiselect.addValueChangeListener(event -> { Boolean value = multiselect.getValue(); diff --git a/uitest/src/main/java/com/vaadin/tests/components/textarea/Wordwrap.java b/uitest/src/main/java/com/vaadin/tests/components/textarea/Wordwrap.java index b393ff3105..8503f82479 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textarea/Wordwrap.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textarea/Wordwrap.java @@ -37,7 +37,6 @@ public class Wordwrap extends TestBase { area2.setCaption("Nonwrapping"); } }); - onoff.setImmediate(true); addComponent(onoff); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java index 374ab40e3f..4b39ed8637 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java @@ -33,7 +33,6 @@ public class SelectionAndCursorPosition extends AbstractReindeerTestUI { Panel panel = new Panel(fl); panel.setCaption("Hackers panel"); CheckBox ml = new CheckBox("Multiline"); - ml.setImmediate(true); // FIXME re-add this when TextArea has been replaced with vaadin8 // version // ml.addListener(new Property.ValueChangeListener() { diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java index cd08db9cd9..7076e6c03e 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java @@ -24,7 +24,6 @@ public class SetTabIndex extends TestBase { addComponent(field0); final CheckBox readonly = new CheckBox("Readonly"); - readonly.setImmediate(true); readonly.addValueChangeListener(event -> { boolean newReadonly = event.getValue(); field1.setReadOnly(newReadonly); diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java index 84eefedde1..6329d6fdd0 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java @@ -36,7 +36,7 @@ public class TextFieldFocusAndBlurListeners extends TestBase TextField tf2 = new TextField("TextField 2", "Has focus, blur and valuechange listeners"); tf2.setWidth("300px"); - tf2.addValueChangeListener(l -> this.valueChange(tf2)); + tf2.addValueChangeListener(l -> valueChange(tf2)); tf2.addFocusListener(this); tf2.addBlurListener(this); @@ -45,15 +45,14 @@ public class TextFieldFocusAndBlurListeners extends TestBase TextField tf3 = new TextField("TextField 3", "Has non-immediate valuechange listener"); tf3.setWidth("300px"); - tf3.addValueChangeListener(l -> this.valueChange(tf3)); + tf3.addValueChangeListener(l -> valueChange(tf3)); addComponent(tf3); TextField tf4 = new TextField("TextField 4", "Has immediate valuechange listener"); tf4.setWidth("300px"); - tf4.setImmediate(true); - tf4.addValueChangeListener(l -> this.valueChange(tf4)); + tf4.addValueChangeListener(l -> valueChange(tf4)); addComponent(tf4); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInputPromptAndClickShortcut.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInputPromptAndClickShortcut.java index d721fb5a4a..b278afa892 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInputPromptAndClickShortcut.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInputPromptAndClickShortcut.java @@ -25,7 +25,6 @@ public class TextFieldInputPromptAndClickShortcut extends TestBase { button.setClickShortcut(KeyCode.ESCAPE); final CheckBox inputPromptSelection = new CheckBox("Input prompt"); - inputPromptSelection.setImmediate(true); inputPromptSelection.addValueChangeListener(event -> { if (event.getValue()) { textField.setInputPrompt("Input prompt"); @@ -34,7 +33,6 @@ public class TextFieldInputPromptAndClickShortcut extends TestBase { } log.log("Set input prompt: " + textField.getInputPrompt()); }); - inputPromptSelection.setImmediate(true); addComponent(textField); addComponent(button); diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java index cd1c49c62d..1c75961795 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java +++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java @@ -22,7 +22,6 @@ public class TreeConnectors extends TestBase { protected void setup() { CheckBox cb = new CheckBox("Connectors"); cb.setValue(false); - cb.setImmediate(true); cb.addValueChangeListener(event -> { if (event.getValue()) { tree.addStyleName(BaseTheme.TREE_CONNECTORS); diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java index 9d15e2f3a1..f4d90d6e9b 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java +++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java @@ -42,7 +42,6 @@ public class TreeFiltering extends TestBase { final CheckBox filterType = new CheckBox( "Include parent when filtering", true); - filterType.setImmediate(true); filterType.addValueChangeListener(event -> { cont.setIncludeParentsWhenFiltering(event.getValue()); ccTree.markAsDirty(); diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/IdOverrideTest.java b/uitest/src/main/java/com/vaadin/tests/components/ui/IdOverrideTest.java index 33408d31db..3bef55450a 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/ui/IdOverrideTest.java +++ b/uitest/src/main/java/com/vaadin/tests/components/ui/IdOverrideTest.java @@ -39,7 +39,6 @@ public class IdOverrideTest extends AbstractReindeerTestUI { final IdTestLabel idTestLabelWithId = new IdTestLabel("set id"); idTestLabelWithId.setSizeUndefined(); idTestLabelWithId.setId("set10179"); - idTestLabelWithId.setImmediate(true); addComponent(idTestLabelWithId); final Label label = new Label("no id"); @@ -66,7 +65,6 @@ public class IdOverrideTest extends AbstractReindeerTestUI { } }); button.setId("toggle"); - button.setImmediate(true); addComponent(button); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java b/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java deleted file mode 100644 index cf9eb1b9eb..0000000000 --- a/uitest/src/main/java/com/vaadin/tests/components/window/LazyWindowResize.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.vaadin.tests.components.window; - -import com.vaadin.server.Page.BrowserWindowResizeEvent; -import com.vaadin.server.Page.BrowserWindowResizeListener; -import com.vaadin.shared.ui.label.ContentMode; -import com.vaadin.tests.components.AbstractTestCase; -import com.vaadin.tests.util.Log; -import com.vaadin.tests.util.LoremIpsum; -import com.vaadin.ui.CheckBox; -import com.vaadin.ui.Label; -import com.vaadin.ui.LegacyWindow; -import com.vaadin.ui.VerticalLayout; -import com.vaadin.ui.Window; -import com.vaadin.ui.Window.ResizeEvent; -import com.vaadin.ui.Window.ResizeListener; - -public class LazyWindowResize extends AbstractTestCase { - - private LegacyWindow mainWindow; - private Window subWindow; - private CheckBox lazyMode; - private Log log = new Log(5); - private CheckBox resizeListenerCheckBox; - - protected ResizeListener resizeListener = new ResizeListener() { - - @Override - public void windowResized(ResizeEvent e) { - log.log("Sub window resized"); - } - }; - - protected BrowserWindowResizeListener browserWindowResizeListener = new BrowserWindowResizeListener() { - @Override - public void browserWindowResized(BrowserWindowResizeEvent event) { - log.log("Main window resized"); - } - }; - - private CheckBox immediateCheckBox; - - @Override - protected String getDescription() { - return "Check or uncheck the checkbox to use lazy or eager resize events. Lazy mode uses a small delay before recalculating layout sizes and can be used to speed up resizes in slow UIs."; - } - - @Override - protected Integer getTicketNumber() { - return 6715; - } - - @Override - public void init() { - mainWindow = new LegacyWindow("Resize test"); - setMainWindow(mainWindow); - VerticalLayout layout = new VerticalLayout(); - layout.setMargin(true); - subWindow = new Window("Sub window", layout); - subWindow.setHeight("50%"); - subWindow.setWidth("50%"); - subWindow.center(); - layout.addComponent(new Label(LoremIpsum.get(1000))); - getMainWindow().addWindow(subWindow); - - lazyMode = new CheckBox("Lazy resize"); - lazyMode.setImmediate(true); - lazyMode.addValueChangeListener(event -> setLazy(lazyMode.getValue())); - - resizeListenerCheckBox = new CheckBox("Resize listener"); - resizeListenerCheckBox.setImmediate(true); - resizeListenerCheckBox.addValueChangeListener(event -> { - if (resizeListenerCheckBox.getValue()) { - subWindow.addResizeListener(resizeListener); - mainWindow.addListener(browserWindowResizeListener); - } else { - subWindow.removeResizeListener(resizeListener); - mainWindow.removeListener(browserWindowResizeListener); - } - }); - immediateCheckBox = new CheckBox("Windows immediate"); - immediateCheckBox.setImmediate(true); - immediateCheckBox.addValueChangeListener(event -> { - mainWindow.setImmediate(immediateCheckBox.getValue()); - subWindow.setImmediate(immediateCheckBox.getValue()); - }); - mainWindow.addComponent(lazyMode); - mainWindow.addComponent(resizeListenerCheckBox); - mainWindow.addComponent(immediateCheckBox); - mainWindow.addComponent(log); - mainWindow.addComponent(new Label("<br/><br/>", ContentMode.HTML)); - mainWindow.addComponent(new Label(LoremIpsum.get(10000))); - - setLazy(false); - } - - private void setLazy(boolean b) { - mainWindow.setResizeLazy(b); - subWindow.setResizeLazy(b); - } - -} diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java deleted file mode 100644 index 3a9b4a9315..0000000000 --- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowResizeListener.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.vaadin.tests.components.window; - -import com.vaadin.server.Page; -import com.vaadin.server.Page.BrowserWindowResizeEvent; -import com.vaadin.tests.components.TestBase; -import com.vaadin.ui.Button; -import com.vaadin.ui.CheckBox; -import com.vaadin.ui.Label; -import com.vaadin.ui.VerticalLayout; -import com.vaadin.ui.Window; - -public class WindowResizeListener extends TestBase { - - @Override - protected String getDescription() { - return "Size changes from windows (both sub " - + "and browsers level) should get back to server." - + " If size changes, a separate server side event should occur."; - } - - @Override - protected Integer getTicketNumber() { - return null; - } - - Window subwin = new ResizeListenerWindow(); - - @Override - protected void setup() { - - final Label l = new Label(); - getLayout().addComponent(l); - - getMainWindow().addListener(new Page.BrowserWindowResizeListener() { - @Override - public void browserWindowResized(BrowserWindowResizeEvent event) { - l.setValue("Current browser window size: " - + getMainWindow().getBrowserWindowWidth() + " x " - + getMainWindow().getBrowserWindowHeight()); - } - }); - - CheckBox subwindow = new CheckBox("show subwindow"); - subwindow.setImmediate(true); - subwindow.addValueChangeListener(event -> { - if (event.getValue()) { - getMainWindow().addWindow(subwin); - } else { - getMainWindow().removeWindow(subwin); - } - }); - getLayout().addComponent(subwindow); - - CheckBox immediate = new CheckBox("immediate"); - immediate.addValueChangeListener(event -> { - boolean booleanValue = event.getValue(); - getMainWindow().setImmediate(booleanValue); - subwin.setImmediate(booleanValue); - }); - immediate.setImmediate(true); - immediate.setValue(true); - getMainWindow().setImmediate(true); - subwin.setImmediate(true); - getLayout().addComponent(immediate); - - getLayout().addComponent(new Button("Sync")); - - } -} - -class ResizeListenerWindow extends Window { - Label sizeLabel = new Label(); - - public ResizeListenerWindow() { - super("Subwindow", new VerticalLayout()); - setWidth("400px"); - - VerticalLayout hl = (VerticalLayout) getContent(); - hl.setMargin(true); - hl.addComponent(new Label("Current size: ")); - hl.addComponent(sizeLabel); - - addResizeListener(new ResizeListener() { - @Override - public void windowResized(ResizeEvent e) { - updateLabel(); - } - }); - - updateLabel(); - } - - public void updateLabel() { - sizeLabel.setValue(getWidth() + getWidthUnits().getSymbol() + " x " - + getHeight() + getHeightUnits().getSymbol()); - } -} diff --git a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java index a423fbef0e..d1e2544257 100644 --- a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java +++ b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java @@ -92,7 +92,6 @@ public class BeanItemContainerFilteringTest extends TestBase { filterString.getValue().toString(), false, false); } }); - cb.setImmediate(true); vl.addComponent(cb); nextLabel = new Label(); @@ -112,7 +111,6 @@ public class BeanItemContainerFilteringTest extends TestBase { nextLabel.setCaption("Next id: " + nextToAdd); } }); - addItemButton.setImmediate(true); vl.addComponent(addItemButton); final Button addItemAfterButton = new Button("addItemAfter()", @@ -136,7 +134,6 @@ public class BeanItemContainerFilteringTest extends TestBase { nextLabel.setCaption("Next id: " + nextToAdd); } }); - addItemAfterButton.setImmediate(true); vl.addComponent(addItemAfterButton); position = new TextField("Position:", "0"); @@ -162,7 +159,6 @@ public class BeanItemContainerFilteringTest extends TestBase { nextLabel.setCaption("Next id: " + nextToAdd); } }); - addItemAtButton.setImmediate(true); vl.addComponent(addItemAtButton); getLayout().addComponent(table); diff --git a/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java b/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java index d6d5d3309a..ceaca59143 100644 --- a/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java +++ b/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java @@ -59,7 +59,6 @@ public class IndexedContainerFilteringTest extends TestBase { filterString.getValue().toString(), false, false); } }); - cb.setImmediate(true); vl.addComponent(cb); nextLabel = new Label(); @@ -81,7 +80,6 @@ public class IndexedContainerFilteringTest extends TestBase { nextLabel.setCaption("Next id: " + nextToAdd); } }); - addItemButton.setImmediate(true); vl.addComponent(addItemButton); final Button addItemAfterButton = new Button("addItemAfter()", @@ -106,7 +104,6 @@ public class IndexedContainerFilteringTest extends TestBase { nextLabel.setCaption("Next id: " + nextToAdd); } }); - addItemAfterButton.setImmediate(true); vl.addComponent(addItemAfterButton); position = new TextField("Position:", "0"); @@ -132,7 +129,6 @@ public class IndexedContainerFilteringTest extends TestBase { nextLabel.setCaption("Next id: " + nextToAdd); } }); - addItemAtButton.setImmediate(true); vl.addComponent(addItemAtButton); getLayout().addComponent(table); diff --git a/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java b/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java index eec30f5b40..6ebffe7029 100644 --- a/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java +++ b/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java @@ -33,13 +33,11 @@ public class TreeDragStart extends TestBase { final Tree tree = new Tree("Inventory"); CheckBox checkBox = new CheckBox("Enabled"); - checkBox.setImmediate(true); checkBox.setValue(true); checkBox.addValueChangeListener( event -> tree.setEnabled(!tree.isEnabled())); addComponent(checkBox); checkBox = new CheckBox("Drag start"); - checkBox.setImmediate(true); checkBox.setValue(true); checkBox.addValueChangeListener(event -> { if (event.getValue()) { @@ -99,8 +97,7 @@ public class TreeDragStart extends TestBase { if (sourceItemId instanceof BeanItem<?>) { beanItem = (BeanItem<?>) sourceItemId; } else if (sourceItemId instanceof InventoryObject) { - beanItem = new BeanItem<>( - (InventoryObject) sourceItemId); + beanItem = new BeanItem<>((InventoryObject) sourceItemId); } // Remove the item from the source container and diff --git a/uitest/src/main/java/com/vaadin/tests/integration/EmbedSizeTest.java b/uitest/src/main/java/com/vaadin/tests/integration/EmbedSizeTest.java index 8a94497686..5c8692ce1c 100644 --- a/uitest/src/main/java/com/vaadin/tests/integration/EmbedSizeTest.java +++ b/uitest/src/main/java/com/vaadin/tests/integration/EmbedSizeTest.java @@ -16,7 +16,6 @@ public class EmbedSizeTest extends TestBase { LegacyWindow mainWindow = getMainWindow(); mainWindow.setSizeUndefined(); mainWindow.getContent().setSizeUndefined(); - mainWindow.setImmediate(true); CheckBox lazyCheckBox = new CheckBox("Lazy resize"); lazyCheckBox.addValueChangeListener(event -> { @@ -25,7 +24,6 @@ public class EmbedSizeTest extends TestBase { log.log("Resize lazy: " + resizeLazy); }); lazyCheckBox.setValue(Boolean.FALSE); - lazyCheckBox.setImmediate(true); addComponent(lazyCheckBox); addComponent(log); diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java index 77373c723e..b6df3d34c3 100644 --- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java +++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java @@ -79,7 +79,6 @@ public class CaptionsInLayouts extends AbstractReindeerTestUI { private Component toggleRequired() { CheckBox requiredToggle = new CheckBox(); - requiredToggle.setImmediate(true); requiredToggle.setCaption("Required"); requiredToggle .addValueChangeListener(event -> setRequired(event.getValue())); @@ -88,7 +87,6 @@ public class CaptionsInLayouts extends AbstractReindeerTestUI { private Component toggleIcon() { CheckBox iconToggle = new CheckBox(); - iconToggle.setImmediate(true); iconToggle.setCaption("Icons"); iconToggle.addValueChangeListener(event -> setIcon(event.getValue())); return iconToggle; @@ -114,7 +112,6 @@ public class CaptionsInLayouts extends AbstractReindeerTestUI { private Component toggleError() { CheckBox errorToggle = new CheckBox(); - errorToggle.setImmediate(true); errorToggle.setCaption("Error"); errorToggle.addValueChangeListener(event -> setError(event.getValue())); return errorToggle; diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java index 82752d67d4..b995fe9093 100644 --- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java +++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java @@ -87,7 +87,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase { private Component toggleRequired() { CheckBox requiredToggle = new CheckBox(); - requiredToggle.setImmediate(true); requiredToggle.setCaption("Required"); requiredToggle .addValueChangeListener(event -> setRequired(event.getValue())); @@ -96,7 +95,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase { private Component toggleIcon() { CheckBox iconToggle = new CheckBox(); - iconToggle.setImmediate(true); iconToggle.setCaption("Icons"); iconToggle.addValueChangeListener(event -> setIcon(event.getValue())); return iconToggle; @@ -104,7 +102,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase { private Component toggleReadOnly() { CheckBox readOnlyToggle = new CheckBox(); - readOnlyToggle.setImmediate(true); readOnlyToggle.setCaption("Read only"); readOnlyToggle .addValueChangeListener(event -> setReadOnly(event.getValue())); @@ -114,7 +111,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase { private Component toggleEnabled() { CheckBox enabledToggle = new CheckBox(); - enabledToggle.setImmediate(true); enabledToggle.setValue(true); enabledToggle.setCaption("Enabled"); enabledToggle @@ -125,7 +121,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase { private Component toggleInvalid() { CheckBox invalid = new CheckBox("Invalid"); - invalid.setImmediate(true); invalid.addValueChangeListener(event -> setInvalid(event.getValue())); return invalid; @@ -177,7 +172,6 @@ public class CaptionsInLayoutsWaiAria extends TestBase { private Component toggleError() { CheckBox errorToggle = new CheckBox(); - errorToggle.setImmediate(true); errorToggle.setCaption("Error"); errorToggle.addValueChangeListener(event -> setError(event.getValue())); return errorToggle; diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java index 77e49f4a87..2ebd4ac495 100644 --- a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java +++ b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutCustomCss.java @@ -42,7 +42,6 @@ public class CssLayoutCustomCss extends TestBase implements ClickListener { private Component createMarginsToggle() { final CheckBox cb = new CheckBox("Margins"); - cb.setImmediate(true); cb.addValueChangeListener( event -> ((MarginHandler) layout).setMargin(cb.getValue())); diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java b/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java index b17a2a771b..f06db44b5c 100644 --- a/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java +++ b/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java @@ -28,7 +28,6 @@ public class FormLayoutWithInvisibleComponent extends TestBase { messages.setRequired(true); messages.setCaption("Messages visible"); }); - control.setImmediate(true); formLayout.addComponent(control); messages = new TextArea("Messages hidden"); diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java index 64d0ba5e6c..8164d72f7f 100644 --- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java +++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java @@ -149,8 +149,8 @@ public class CSSInjectWithColorpicker extends UI { Styles styles = Page.getCurrent().getStyles(); // inject the new color as a style - styles.add(".v-app .v-textarea.text-label { color:" - + color.getCSS() + "; }"); + styles.add(".v-app .v-textarea.text-label { color:" + color.getCSS() + + "; }"); }); return textColor; @@ -160,14 +160,13 @@ public class CSSInjectWithColorpicker extends UI { * Creates a font family selection dialog */ private Component createFontSelect() { - final ComboBox<String> select = new ComboBox<>(null, Arrays.asList( - "Arial", "Helvetica", "Verdana", "Courier", "Times", - "sans-serif")); + final ComboBox<String> select = new ComboBox<>(null, + Arrays.asList("Arial", "Helvetica", "Verdana", "Courier", + "Times", "sans-serif")); select.setValue("Arial"); select.setWidth("200px"); select.setPlaceholder("Font"); select.setDescription("Font"); - select.setImmediate(true); select.setEmptySelectionAllowed(false); select.addValueChangeListener(event -> { // Get the new font family @@ -196,7 +195,6 @@ public class CSSInjectWithColorpicker extends UI { select.setValue(12); select.setPlaceholder("Font size"); select.setDescription("Font size"); - select.setImmediate(true); select.setEmptySelectionAllowed(false); select.addValueChangeListener(event -> { // Get the new font size diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java index 22ff9a8f5f..b135faa6e1 100644 --- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java +++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java @@ -27,7 +27,6 @@ public class ReducingRoundTrips extends AbstractReindeerTestUI { @Override protected void setup(VaadinRequest request) { PasswordField passwordField = new PasswordField("Enter password"); - passwordField.setImmediate(true); CapsLockWarningWithRpc capsLockWarningWithRpc = new CapsLockWarningWithRpc(); capsLockWarningWithRpc.extend(passwordField); diff --git a/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java b/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java index 8c2d0bb561..bd022cae76 100644 --- a/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java +++ b/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java @@ -42,7 +42,6 @@ public class TogglePush extends AbstractReindeerTestUI { CheckBox pushSetting = new CheckBox("Push enabled"); pushSetting.setValue(Boolean .valueOf(getPushConfiguration().getPushMode().isEnabled())); - pushSetting.setImmediate(true); pushSetting.addValueChangeListener(event -> { if (event.getValue()) { getPushConfiguration().setPushMode(PushMode.AUTOMATIC); diff --git a/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java b/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java index 862636fa3b..81c5a07261 100644 --- a/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java +++ b/uitest/src/main/java/com/vaadin/tests/themes/ButtonsTest.java @@ -38,7 +38,6 @@ public class ButtonsTest extends com.vaadin.server.LegacyApplication { } }); themeToggle.setStyleName("small"); - themeToggle.setImmediate(true); styleToggle = new CheckBox("Black style"); styleToggle.addValueChangeListener(event -> { @@ -48,7 +47,6 @@ public class ButtonsTest extends com.vaadin.server.LegacyApplication { main.getContent().setStyleName(""); } }); - styleToggle.setImmediate(true); styleToggle.setStyleName("small"); iconToggle = new CheckBox("64x icons"); @@ -56,7 +54,6 @@ public class ButtonsTest extends com.vaadin.server.LegacyApplication { largeIcons = !largeIcons; recreateAll(); }); - iconToggle.setImmediate(true); iconToggle.setStyleName("small"); nativeToggle = new CheckBox("Native buttons"); @@ -64,7 +61,6 @@ public class ButtonsTest extends com.vaadin.server.LegacyApplication { nativeButtons = !nativeButtons; recreateAll(); }); - nativeToggle.setImmediate(true); nativeToggle.setStyleName("small"); toggles.setSpacing(true); diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java index d8d7d73d7c..19012a6019 100644 --- a/uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java +++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java @@ -397,7 +397,6 @@ public class CalendarTest extends GridLayout implements View { private void initHideWeekEndButton() { hideWeekendsButton = new CheckBox("Hide weekends"); - hideWeekendsButton.setImmediate(true); hideWeekendsButton.addValueChangeListener( event -> setWeekendsHidden(hideWeekendsButton.getValue())); } @@ -417,14 +416,12 @@ public class CalendarTest extends GridLayout implements View { private void initReadOnlyButton() { readOnlyButton = new CheckBox("Read-only mode"); - readOnlyButton.setImmediate(true); readOnlyButton.addValueChangeListener(event -> calendarComponent .setReadOnly(readOnlyButton.getValue())); } private void initDisabledButton() { disabledButton = new CheckBox("Disabled"); - disabledButton.setImmediate(true); disabledButton.addValueChangeListener(event -> calendarComponent .setEnabled(!disabledButton.getValue())); } @@ -503,7 +500,6 @@ public class CalendarTest extends GridLayout implements View { private CheckBox createCheckBox(String caption) { CheckBox cb = new CheckBox(caption); - cb.setImmediate(true); return cb; } diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java index 9c8d9f39b4..642ebfd28e 100644 --- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java +++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java @@ -46,23 +46,18 @@ public class Tabsheets extends VerticalLayout implements View { addComponent(wrap); final CheckBox closable = new CheckBox("Closable"); - closable.setImmediate(true); wrap.addComponent(closable); final CheckBox overflow = new CheckBox("Overflow"); - overflow.setImmediate(true); wrap.addComponent(overflow); final CheckBox caption = new CheckBox("Captions", true); - caption.setImmediate(true); wrap.addComponent(caption); final CheckBox icon = new CheckBox("Icons"); - icon.setImmediate(true); wrap.addComponent(icon); final CheckBox disable = new CheckBox("Disable tabs"); - disable.setImmediate(true); wrap.addComponent(disable); Label h3 = new Label("Additional Styles"); @@ -76,35 +71,27 @@ public class Tabsheets extends VerticalLayout implements View { addComponent(wrap); final CheckBox framed = new CheckBox("Framed", true); - framed.setImmediate(true); wrap.addComponent(framed); final CheckBox centered = new CheckBox("Centered tabs"); - centered.setImmediate(true); wrap.addComponent(centered); final CheckBox rightAlign = new CheckBox("Right-aligned tabs"); - rightAlign.setImmediate(true); wrap.addComponent(rightAlign); final CheckBox equal = new CheckBox("Equal-width tabs"); - equal.setImmediate(true); wrap.addComponent(equal); final CheckBox padded = new CheckBox("Padded tabbar"); - padded.setImmediate(true); wrap.addComponent(padded); final CheckBox compact = new CheckBox("Compact"); - compact.setImmediate(true); wrap.addComponent(compact); final CheckBox iconsOnTop = new CheckBox("Icons on top"); - iconsOnTop.setImmediate(true); wrap.addComponent(iconsOnTop); final CheckBox selectedOnly = new CheckBox("Selected tab closable"); - selectedOnly.setImmediate(true); wrap.addComponent(selectedOnly); HasValue.ValueChangeListener<Boolean> update = event -> { diff --git a/uitest/src/main/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.java b/uitest/src/main/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.java index 0fa98d3d86..ec3a9e1b7c 100644 --- a/uitest/src/main/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.java +++ b/uitest/src/main/java/com/vaadin/tests/validation/ValidationOfRequiredEmptyFields.java @@ -27,7 +27,6 @@ public class ValidationOfRequiredEmptyFields extends AbstractReindeerTestUI { @Override protected void setup(VaadinRequest request) { requiredInput = new CheckBox("Field required"); - requiredInput.setImmediate(true); requiredInput.addValueChangeListener( event -> tf.setRequired(requiredInput.getValue())); @@ -41,7 +40,6 @@ public class ValidationOfRequiredEmptyFields extends AbstractReindeerTestUI { }); integerValidatorInput = new CheckBox("Integer validator"); - integerValidatorInput.setImmediate(true); integerValidatorInput.addValueChangeListener(event -> { if (integerValidatorInput.getValue()) { tf.addValidator(integerValidator); @@ -50,7 +48,6 @@ public class ValidationOfRequiredEmptyFields extends AbstractReindeerTestUI { } }); stringLengthValidatorInput = new CheckBox("String length validator"); - stringLengthValidatorInput.setImmediate(true); stringLengthValidatorInput.addValueChangeListener(event -> { if (stringLengthValidatorInput.getValue()) { tf.addValidator(stringLengthValidator); diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java index e4dce67da8..a651da1a44 100644 --- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java +++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridClientColumnRendererConnector.java @@ -30,7 +30,6 @@ import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.HasWidgets; import com.vaadin.client.data.DataChangeHandler; import com.vaadin.client.data.DataSource; -import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.shared.Registration; import com.vaadin.shared.ui.Connect; import com.vaadin.tests.widgetset.server.v7.grid.GridClientColumnRenderers; @@ -41,6 +40,7 @@ import com.vaadin.v7.client.renderers.NumberRenderer; import com.vaadin.v7.client.renderers.Renderer; import com.vaadin.v7.client.renderers.TextRenderer; import com.vaadin.v7.client.renderers.WidgetRenderer; +import com.vaadin.v7.client.ui.AbstractLegacyComponentConnector; import com.vaadin.v7.client.widget.grid.CellReference; import com.vaadin.v7.client.widget.grid.RendererCellReference; import com.vaadin.v7.client.widget.grid.datasources.ListDataSource; @@ -53,7 +53,7 @@ import com.vaadin.v7.client.widgets.Grid; @Connect(GridClientColumnRenderers.GridController.class) public class GridClientColumnRendererConnector - extends AbstractComponentConnector { + extends AbstractLegacyComponentConnector { public static enum Renderers { TEXT_RENDERER, WIDGET_RENDERER, HTML_RENDERER, NUMBER_RENDERER, DATE_RENDERER, CPLX_RENDERER; diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java index ef9ef3adc9..60019fc201 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridCheckBoxDisplay.java @@ -43,7 +43,6 @@ public class GridCheckBoxDisplay extends AbstractReindeerTestUI { grid.setSelectionMode(Grid.SelectionMode.SINGLE); grid.setEditorEnabled(true); - grid.setImmediate(true); getLayout().addComponent(grid); getLayout().setExpandRatio(grid, 1); diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsLocation.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsLocation.java index 03f96ed20b..7a88da395b 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsLocation.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridDetailsLocation.java @@ -70,7 +70,6 @@ public class GridDetailsLocation extends UI { layout.addComponent(checkbox); numberTextField = new TextField("Row"); - numberTextField.setImmediate(true); layout.addComponent(numberTextField); layout.addComponent( diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java index 155c3aafeb..3932773f4b 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java @@ -126,7 +126,6 @@ public class GridFastAsyncUpdate extends AbstractTestUI { grid = new Grid(container); grid.setWidth("100%"); - grid.setImmediate(true); grid.setSelectionMode(SelectionMode.SINGLE); grid.addSelectionListener(new SelectionListener() { @Override diff --git a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java b/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java deleted file mode 100644 index 99562f7dcb..0000000000 --- a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2000-2016 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.tests.application; - -import org.junit.Assert; -import org.junit.Test; - -import com.vaadin.testbench.elements.ButtonElement; -import com.vaadin.tests.tb3.SingleBrowserTest; - -public class ResynchronizeAfterAsyncRemovalTest extends SingleBrowserTest { - @Test - public void noResyncAfterAsyncRemoval() { - openTestURL(); - - $(ButtonElement.class).first().click(); - - Assert.assertEquals("Timing issue in the test?", - "1. Window removed: true", getLogRow(1)); - - Assert.assertEquals( - "Removing window should not cause button to be marked as dirty", - "2. Dirty: false", getLogRow(0)); - - ButtonElement logCountButton = $(ButtonElement.class).all().get(1); - logCountButton.click(); - - Assert.assertEquals("Sanity check", "3. syncId: 2", getLogRow(1)); - Assert.assertEquals("Sanity check", - "4. Unregistered connector count: 1", getLogRow(0)); - - logCountButton.click(); - - Assert.assertEquals("Sanity check", "5. syncId: 3", getLogRow(1)); - Assert.assertEquals( - "Unregistered connector map should have been cleared", - "6. Unregistered connector count: 0", getLogRow(0)); - } -} diff --git a/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java b/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java deleted file mode 100644 index 2e8d462f5b..0000000000 --- a/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2000-2016 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.tests.components; - -import org.junit.Assert; -import org.junit.Test; - -import com.vaadin.testbench.elements.ButtonElement; -import com.vaadin.tests.tb3.MultiBrowserTest; - -public class OutOfSyncTest extends MultiBrowserTest { - - @Test - public void testClientResync() throws InterruptedException { - openTestURL(); - - // Wait for server to get rid of the Button - sleep(1000); - - // On the first round-trip after the component has been removed, the - // server assumes the client will remove the button. How ever (to force - // it to be out of sync) the test UI calls markClean() on the Button to - // make it not update with the response. - $(ButtonElement.class).first().click(); - Assert.assertTrue( - "Button should not have disappeared on the first click.", - $(ButtonElement.class).exists()); - - // Truly out of sync, full resync is forced. - $(ButtonElement.class).first().click(); - Assert.assertFalse("Button should disappear with the second click.", - $(ButtonElement.class).exists()); - } - -} diff --git a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java deleted file mode 100644 index 1d54339f8f..0000000000 --- a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2000-2016 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.tests.components.checkbox; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import com.vaadin.testbench.elements.CheckBoxElement; -import com.vaadin.testbench.elements.LabelElement; -import com.vaadin.tests.tb3.MultiBrowserTest; - -public class CheckBoxImmediateTest extends MultiBrowserTest { - - @Test - public void testNonImmediateCheckBox() { - openTestURL(); - - CheckBoxElement checkBoxElement = $(CheckBoxElement.class).first(); - WebElement inputElem = checkBoxElement.findElement(By.tagName("input")); - final WebElement countElem = $(LabelElement.class).id("count"); - - inputElem.click(); - assertEquals("Events received: 0", countElem.getText()); - } - - @Test - public void testImmediateCheckBox() { - openTestURL(); - - CheckBoxElement checkBoxElement = $(CheckBoxElement.class).get(1); - WebElement inputElem = checkBoxElement.findElement(By.tagName("input")); - final WebElement countElem = $(LabelElement.class).id("count"); - - inputElem.click(); - assertEquals("Events received: 1", countElem.getText()); - } -} |