summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2016-08-25 19:06:30 +0300
committerVaadin Code Review <review@vaadin.com>2016-08-26 08:23:40 +0000
commit0c8f57d60aba5f4dbad10cf818ae98dc9cb8d47a (patch)
tree1746dcf20199bac3dedf462dbacb876ea9acedf4 /uitest
parent4a6a632b1f57a1ddbb437036cb5d17f98f827b47 (diff)
downloadvaadin-framework-0c8f57d60aba5f4dbad10cf818ae98dc9cb8d47a.tar.gz
vaadin-framework-0c8f57d60aba5f4dbad10cf818ae98dc9cb8d47a.zip
Implement new ProgressBar
Change-Id: Ie5c4b0f4d9bc65e484f08832343ba97fff61a9b6
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/SliderValueFromDataSource.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Tables.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java5
8 files changed, 23 insertions, 24 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java b/uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java
index ffb8e33361..39329d7341 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java
@@ -9,9 +9,9 @@ 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.v7.ui.ProgressBar;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
+import com.vaadin.ui.ProgressBar;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java
index 108d8cf9a7..b55d489c41 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java
@@ -18,8 +18,8 @@ package com.vaadin.tests.components.progressindicator;
import com.vaadin.annotations.Theme;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.ProgressBar;
import com.vaadin.ui.themes.Reindeer;
-import com.vaadin.v7.ui.ProgressBar;
@Theme(Reindeer.THEME_NAME)
public class ProgressBarStaticReindeer extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java
index 457d7571b1..799780dea1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java
@@ -18,8 +18,8 @@ package com.vaadin.tests.components.progressindicator;
import com.vaadin.annotations.Theme;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.ProgressBar;
import com.vaadin.ui.themes.Runo;
-import com.vaadin.v7.ui.ProgressBar;
@Theme(Runo.THEME_NAME)
public class ProgressBarStaticRuno extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java
index 68dfa767a3..568357a34a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java
@@ -20,9 +20,10 @@ import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.v7.ui.ProgressBar;
-import com.vaadin.v7.ui.ProgressIndicator;
+import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
+import com.vaadin.ui.ProgressBar;
+import com.vaadin.v7.ui.ProgressIndicator;
public class ProgressBarTest extends AbstractTestUI {
@@ -48,7 +49,7 @@ public class ProgressBarTest extends AbstractTestUI {
}
}
};
- private ProgressBar progressBar;
+ private Component progressBar;
private int counter = 0;
@Override
@@ -84,7 +85,7 @@ public class ProgressBarTest extends AbstractTestUI {
updateThread.start();
}
- private void useComponent(ProgressBar progressBar) {
+ private void useComponent(Component progressBar) {
if (this.progressBar != null) {
removeComponent(this.progressBar);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderValueFromDataSource.java b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderValueFromDataSource.java
index 02ed9fc8ef..cb183e5e9f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderValueFromDataSource.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderValueFromDataSource.java
@@ -3,9 +3,9 @@ package com.vaadin.tests.components.slider;
import com.vaadin.data.Binder;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.ProgressBar;
import com.vaadin.ui.Slider;
import com.vaadin.v7.data.util.BeanItem;
-import com.vaadin.v7.ui.ProgressBar;
public class SliderValueFromDataSource extends AbstractTestUI {
@@ -35,12 +35,14 @@ public class SliderValueFromDataSource extends AbstractTestUI {
(b, doubleValue) -> item.getItemProperty("floatValue")
.setValue((float) (doubleValue / 10.0)));
binder.bind(bean);
- addComponent(slider);
- ProgressBar pi = new ProgressBar();
- pi.setWidth("200px");
- pi.setPropertyDataSource(item.getItemProperty("floatValue"));
- addComponent(pi);
+ ProgressBar progressBar = new ProgressBar();
+ progressBar.setWidth("200px");
+
+ slider.addValueChangeListener(
+ event -> progressBar.setValue(event.getValue().floatValue()));
+
+ addComponents(slider, progressBar);
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
index 9c1e4705e9..58a66f37b8 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
@@ -20,10 +20,10 @@ import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.shared.ui.slider.SliderOrientation;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
+import com.vaadin.ui.ProgressBar;
import com.vaadin.ui.Slider;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
-import com.vaadin.v7.ui.ProgressBar;
public class Sliders extends VerticalLayout implements View {
public Sliders() {
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Tables.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Tables.java
index daf330bc4a..3baa249473 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Tables.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Tables.java
@@ -28,13 +28,13 @@ import com.vaadin.ui.DateField;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Notification;
+import com.vaadin.ui.ProgressBar;
import com.vaadin.ui.Slider;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
import com.vaadin.v7.data.Container;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.OptionGroup;
-import com.vaadin.v7.ui.ProgressBar;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Table.Align;
import com.vaadin.v7.ui.Table.ColumnGenerator;
@@ -178,8 +178,7 @@ public class Tables extends VerticalLayout implements View {
table.removeGeneratedColumn("progress");
if (componentsInRows) {
- table.addContainerProperty("textfield", TextField.class,
- null);
+ table.addContainerProperty("textfield", TextField.class, null);
table.addGeneratedColumn("textfield", new ColumnGenerator() {
@Override
public Object generateCell(Table source, Object itemId,
@@ -194,8 +193,7 @@ public class Tables extends VerticalLayout implements View {
}
});
- table.addContainerProperty("datefield", TextField.class,
- null);
+ table.addContainerProperty("datefield", TextField.class, null);
table.addGeneratedColumn("datefield", new ColumnGenerator() {
@Override
public Object generateCell(Table source, Object itemId,
@@ -257,8 +255,7 @@ public class Tables extends VerticalLayout implements View {
}
});
- table.addContainerProperty("optiongroup", TextField.class,
- null);
+ table.addContainerProperty("optiongroup", TextField.class, null);
table.addGeneratedColumn("optiongroup", new ColumnGenerator() {
@Override
public Object generateCell(Table source, Object itemId,
diff --git a/uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java
index 44cdcbec1d..c2ec77fee3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java
@@ -19,9 +19,9 @@ import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
+import com.vaadin.testbench.customelements.ProgressBarElement;
import com.vaadin.testbench.elements.ButtonElement;
import com.vaadin.tests.tb3.SingleBrowserTest;
-import com.vaadin.v7.testbench.customelements.ProgressBarElement;
public class NoLayoutUpdateWhichNeedsLayoutTest extends SingleBrowserTest {
@@ -30,8 +30,7 @@ public class NoLayoutUpdateWhichNeedsLayoutTest extends SingleBrowserTest {
openTestURL("debug");
ButtonElement open = $(ButtonElement.class).id("openWindow");
open.click();
- final ProgressBarElement progress = $(
- ProgressBarElement.class).first();
+ final ProgressBarElement progress = $(ProgressBarElement.class).first();
waitUntil(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {