diff options
Diffstat (limited to 'uitest')
2 files changed, 9 insertions, 9 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxNewItemProvider.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxNewItemProvider.java index 71f8503216..1d912c4bcc 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxNewItemProvider.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxNewItemProvider.java @@ -9,7 +9,7 @@ public class ComboBoxNewItemProvider @Override protected void configureNewItemHandling() { comboBox.setNewItemProvider(text -> { - if (Boolean.TRUE.equals(delay.getValue())) { + if (delay.getValue()) { try { Thread.sleep(2000); } catch (InterruptedException e1) { @@ -25,7 +25,7 @@ public class ComboBoxNewItemProvider valueChangeLabel .setValue("adding new item... count: " + items.size()); comboBox.getDataProvider().refreshAll(); - if (Boolean.TRUE.equals(noSelection.getValue())) { + if (noSelection.getValue()) { return Optional.empty(); } } diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSelectingNewItemValueChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSelectingNewItemValueChangeTest.java index c45291c05b..0707ebd020 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSelectingNewItemValueChangeTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSelectingNewItemValueChangeTest.java @@ -1,6 +1,6 @@ package com.vaadin.tests.components.combobox; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertEquals; import org.junit.Test; import org.openqa.selenium.Keys; @@ -190,19 +190,19 @@ public class ComboBoxSelectingNewItemValueChangeTest extends MultiBrowserTest { } private void assertValueChange(int count) { - assertTrue(changeLabelElement.getText().equals(String.format( + assertEquals(String.format( "Value change count: %s Selection change count: %s user originated: true", - count, count))); + count, count), changeLabelElement.getText()); } private void assertRejected(String value) { - assertTrue(changeLabelElement.getText() - .equals(String.format("item %s discarded", value))); + assertEquals(String.format("item %s discarded", value), + changeLabelElement.getText()); } private void assertItemCount(int count) { - assertTrue(changeLabelElement.getText() - .equals(String.format("adding new item... count: %s", count))); + assertEquals(String.format("adding new item... count: %s", count), + changeLabelElement.getText()); } private void reject(boolean reject) { |