* Release note update for 8.9 * Fix unstable tests in the branch * Code formattingtags/8.9.0.beta3
@@ -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> |
@@ -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(); |
@@ -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; | |||
} | |||
@@ -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()); |
@@ -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) { |
@@ -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"))); | |||
@@ -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(); |
@@ -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()); |
@@ -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); | |||
} | |||
} |