diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2018-07-10 12:59:02 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-07-10 12:59:02 +0300 |
commit | 7f06076dc4bd4cbdc5a2cc6cde00adb6dec1de2e (patch) | |
tree | 53b749ea56dcaa0dca28b0f5e466f14debe604a3 /uitest/src | |
parent | 71b6a20b60d8e3021ab1459bdf2ff1b9c5e3e6ab (diff) | |
download | vaadin-framework-7f06076dc4bd4cbdc5a2cc6cde00adb6dec1de2e.tar.gz vaadin-framework-7f06076dc4bd4cbdc5a2cc6cde00adb6dec1de2e.zip |
Fix formatting, improve documentation on autoformat (#11033)
Diffstat (limited to 'uitest/src')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCaretNavigationTest.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCaretNavigationTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCaretNavigationTest.java index a1e0396107..f5a543d4bf 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCaretNavigationTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCaretNavigationTest.java @@ -28,7 +28,8 @@ public class ComboBoxCaretNavigationTest extends SingleBrowserTest { comboBox.sendKeys(Keys.HOME); assertCaretPosition("Home key didn't work well.", 0, comboBox); comboBox.sendKeys(Keys.END); - assertCaretPosition("End key didn't work well.", text.length(), comboBox); + assertCaretPosition("End key didn't work well.", text.length(), + comboBox); } @Test @@ -37,9 +38,11 @@ public class ComboBoxCaretNavigationTest extends SingleBrowserTest { String text = comboBox.getPopupSuggestions().get(1); comboBox.selectByText(text); comboBox.sendKeys(Keys.ARROW_LEFT); - assertCaretPosition("Left Arrow key didn't work well.", text.length() - 1, comboBox); + assertCaretPosition("Left Arrow key didn't work well.", + text.length() - 1, comboBox); comboBox.sendKeys(Keys.ARROW_RIGHT); - assertCaretPosition("Right Arrow key didn't work well.", text.length(), comboBox); + assertCaretPosition("Right Arrow key didn't work well.", text.length(), + comboBox); } @Test @@ -59,13 +62,16 @@ public class ComboBoxCaretNavigationTest extends SingleBrowserTest { String text = comboBox.getPopupSuggestions().get(1); comboBox.selectByText(text); comboBox.sendKeys(Keys.ARROW_LEFT); - assertCaretPosition("Left Arrow key didn't work well.", text.length() - 1, comboBox); + assertCaretPosition("Left Arrow key didn't work well.", + text.length() - 1, comboBox); comboBox.sendKeys(Keys.END); - assertCaretPosition("End key didn't work well.", text.length(), comboBox); + assertCaretPosition("End key didn't work well.", text.length(), + comboBox); } - private void assertCaretPosition(String message, int position, ComboBoxElement comboBox) { - assertArrayEquals(message, new int[]{position, position}, + private void assertCaretPosition(String message, int position, + ComboBoxElement comboBox) { + assertArrayEquals(message, new int[] { position, position }, getSelection(comboBox.getInputField())); } @@ -74,7 +80,7 @@ public class ComboBoxCaretNavigationTest extends SingleBrowserTest { List<Long> range = (List<Long>) executeScript( "return [arguments[0].selectionStart,arguments[0].selectionEnd]", element); - return new int[]{range.get(0).intValue(), range.get(1).intValue()}; + return new int[] { range.get(0).intValue(), range.get(1).intValue() }; } } |