summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhe Sun <31067185+ZheSun88@users.noreply.github.com>2019-08-06 08:25:02 +0300
committerGitHub <noreply@github.com>2019-08-06 08:25:02 +0300
commit6cb298b39d00c4498206fc76e316a3bc52b31a6e (patch)
treed386a03f7192d5a248ca5a07b91de39147af7ed2
parented218e90868fbcc65bbc6b3fa5ef0a37c5719473 (diff)
downloadvaadin-framework-6cb298b39d00c4498206fc76e316a3bc52b31a6e.tar.gz
vaadin-framework-6cb298b39d00c4498206fc76e316a3bc52b31a6e.zip
Additional updates and fixes for 8.9 branch (#11679)
* Release note update for 8.9 * Fix unstable tests in the branch * Code formatting
-rw-r--r--all/src/main/templates/release-notes.html6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VUpload.java4
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java6
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractDateField.java5
-rw-r--r--server/src/main/java/com/vaadin/ui/ComboBox.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldWeekDaysTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/DateFieldHeaderScrollWithFrozenTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/upload/DisablingUploadTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java6
9 files changed, 35 insertions, 23 deletions
diff --git a/all/src/main/templates/release-notes.html b/all/src/main/templates/release-notes.html
index 3c0a856da5..a875b408b7 100644
--- a/all/src/main/templates/release-notes.html
+++ b/all/src/main/templates/release-notes.html
@@ -84,8 +84,10 @@
<ul>
<li>Adds css class name to <tt>Grid.Editor</tt> on slected row</li>
- <li>Improves error handling on <tt>Upload</tt> handler</li>
- <li>Improves support for OSGi</li>
+ <li>Improves error handling on <tt>Upload</tt> handler</li>
+ <li>Improves support for detail row index handling on <tt>Escalator</tt></li>
+ <li>Improves support for OSGi</li>
+ <li>Updates <tt>Spring</tt> addon to 3.2.1</li>
</ul>
</p>
diff --git a/client/src/main/java/com/vaadin/client/ui/VUpload.java b/client/src/main/java/com/vaadin/client/ui/VUpload.java
index 7ec8fbb71f..56532b4a19 100644
--- a/client/src/main/java/com/vaadin/client/ui/VUpload.java
+++ b/client/src/main/java/com/vaadin/client/ui/VUpload.java
@@ -231,8 +231,8 @@ public class VUpload extends SimplePanel {
}
private void ensureUploadButton() {
- //when push got enabled, need to ensure the upload is disabled properly
- //check ticket #11652
+ // when push got enabled, need to ensure the upload is disabled properly
+ // check ticket #11652
if (fu.getElement().getParentElement().getParentElement()
.hasClassName("v-disabled")) {
disableUpload();
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java
index 333b7e3dec..2ca2ffa961 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -7958,11 +7958,13 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
if (!event.getCell().isHeader()) {
return;
}
- int offset = 0; // apply offset depending on selection column, see #10546
+ int offset = 0; // apply offset depending on selection column, see
+ // #10546
if (getSelectionColumn().isPresent()) {
offset = -1;
}
- if (event.getCell().getColumnIndex()+offset < getFrozenColumnCount()) {
+ if (event.getCell().getColumnIndex()
+ + offset < getFrozenColumnCount()) {
return;
}
diff --git a/server/src/main/java/com/vaadin/ui/AbstractDateField.java b/server/src/main/java/com/vaadin/ui/AbstractDateField.java
index f7a085bc0d..cb39cf607b 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractDateField.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractDateField.java
@@ -93,11 +93,12 @@ public abstract class AbstractDateField<T extends Temporal & TemporalAdjuster &
@Override
public void updateValueWithDelay(String newDateString,
- Map<String, Integer> resolutions) {
+ Map<String, Integer> resolutions) {
valueUpdate(newDateString, resolutions);
}
- private void valueUpdate(String newDateString, Map<String, Integer> resolutions) {
+ private void valueUpdate(String newDateString,
+ Map<String, Integer> resolutions) {
Set<String> resolutionNames = getResolutions().map(Enum::name)
.collect(Collectors.toSet());
resolutionNames.retainAll(resolutions.keySet());
diff --git a/server/src/main/java/com/vaadin/ui/ComboBox.java b/server/src/main/java/com/vaadin/ui/ComboBox.java
index b9511450a5..e04cd64241 100644
--- a/server/src/main/java/com/vaadin/ui/ComboBox.java
+++ b/server/src/main/java/com/vaadin/ui/ComboBox.java
@@ -972,7 +972,8 @@ public class ComboBox<T> extends AbstractSingleSelect<T>
// This workaround is done to fix issue #11642 for unpaged comboboxes.
// Data sources for on the client need to be updated after data provider
- // refreshAll so that serverside selection works even before the dropdown
+ // refreshAll so that serverside selection works even before the
+ // dropdown
// is opened. Only done for in-memory data providers for performance
// reasons.
if (dataProvider instanceof InMemoryDataProvider) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldWeekDaysTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldWeekDaysTest.java
index 7b79b1b161..d01f7214ad 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldWeekDaysTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldWeekDaysTest.java
@@ -55,7 +55,6 @@ public class DateTimeFieldWeekDaysTest extends SingleBrowserTest {
openPopupAndValidateNoWeeknumbers();
-
$(ButtonElement.class).id("finnish").click();
openPopupAndValidateWeekNumbers();
@@ -67,7 +66,7 @@ public class DateTimeFieldWeekDaysTest extends SingleBrowserTest {
// Open date popup
popupButton.click();
sleep(100);
-
+
waitUntil(ExpectedConditions.visibilityOfElementLocated(
org.openqa.selenium.By.className("v-datefield-popup")));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/DateFieldHeaderScrollWithFrozenTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/DateFieldHeaderScrollWithFrozenTest.java
index c934bee2a0..b354b061e1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/DateFieldHeaderScrollWithFrozenTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/DateFieldHeaderScrollWithFrozenTest.java
@@ -1,7 +1,5 @@
package com.vaadin.tests.components.grid;
-import static org.junit.Assert.assertTrue;
-
import org.junit.Test;
import org.openqa.selenium.WebElement;
@@ -10,6 +8,8 @@ import com.vaadin.testbench.elements.GridElement;
import com.vaadin.testbench.elements.GridElement.GridCellElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
+import static org.junit.Assert.assertTrue;
+
public class DateFieldHeaderScrollWithFrozenTest extends MultiBrowserTest {
@Test
@@ -24,6 +24,8 @@ public class DateFieldHeaderScrollWithFrozenTest extends MultiBrowserTest {
GridCellElement frozenElement = gridElement.getHeaderCell(1, 1);
gridElement.getHorizontalScroller().scrollLeft(60);
+ //be sure that the scroll has happened
+ sleep(100);
int buttonRight = buttonElement.getLocation().getX()
+ buttonElement.getRect().getWidth();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/DisablingUploadTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/DisablingUploadTest.java
index 2df398313c..3404641407 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/upload/DisablingUploadTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/upload/DisablingUploadTest.java
@@ -78,13 +78,14 @@ public class DisablingUploadTest extends SingleBrowserTest {
assertEquals("false", stateButton.getCaption());
uploadFile(false);
- //assert no new log
+ // assert no new log
assertEquals("Upload log row does not match expected", expected,
actual);
}
@Test
- public void pushDisabled_uploadFile_uploadButtonDisabled() throws Exception {
+ public void pushDisabled_uploadFile_uploadButtonDisabled()
+ throws Exception {
buttonGroup();
pushButton.click();
@@ -102,13 +103,14 @@ public class DisablingUploadTest extends SingleBrowserTest {
assertEquals("false", stateButton.getCaption());
uploadFile(false);
- //assert no new log
+ // assert no new log
assertEquals("Upload log row does not match expected", expected,
actual);
}
@Test
- public void pushEnabled_uploadLargeFile_uploadButtonDisabled() throws Exception {
+ public void pushEnabled_uploadLargeFile_uploadButtonDisabled()
+ throws Exception {
buttonGroup();
uploadFile(true);
@@ -124,13 +126,14 @@ public class DisablingUploadTest extends SingleBrowserTest {
assertEquals("false", stateButton.getCaption());
uploadFile(true);
- //assert no new log
+ // assert no new log
assertEquals("Upload log row does not match expected", expected,
actual);
}
@Test
- public void pushDisabled_uploadLargeFile_uploadButtonDisabled() throws Exception {
+ public void pushDisabled_uploadLargeFile_uploadButtonDisabled()
+ throws Exception {
buttonGroup();
pushButton.click();
@@ -148,7 +151,7 @@ public class DisablingUploadTest extends SingleBrowserTest {
assertEquals("false", stateButton.getCaption());
uploadFile(true);
- //assert no new log
+ // assert no new log
assertEquals("Upload log row does not match expected", expected,
actual);
}
@@ -174,7 +177,7 @@ public class DisablingUploadTest extends SingleBrowserTest {
private File createTempFile(boolean large) throws IOException {
File tempFile = File.createTempFile("TestFileUpload", ".txt");
BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile));
- if(large) {
+ if (large) {
writer.write(getLargeTempFileContents());
} else {
writer.write(getTempFileContents());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java
index 3e197d2281..23635b1004 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowTwinColSelectTest.java
@@ -23,7 +23,8 @@ public class WindowTwinColSelectTest extends MultiBrowserTest {
assertTrue(optionsElement.isDisplayed());
assertTrue(selectionsElement.isDisplayed());
assertEquals("Coordinate is not matching within the tolerance",
- optionsElement.getLocation().getY(), selectionsElement.getLocation().getY(), 3);
+ optionsElement.getLocation().getY(),
+ selectionsElement.getLocation().getY(), 3);
}
@Test
@@ -41,6 +42,7 @@ public class WindowTwinColSelectTest extends MultiBrowserTest {
assertTrue(optionsElement.isDisplayed());
assertTrue(selectionsElement.isDisplayed());
assertEquals("Coordinate is not matching within the tolerance.",
- optionsElement.getLocation().getY(), selectionsElement.getLocation().getY(), 3);
+ optionsElement.getLocation().getY(),
+ selectionsElement.getLocation().getY(), 3);
}
}